API Reference live_interaction_contracts v#1.0.0

Copy Markdown View Source

Modules

Dev/test-only conformance harness for Phoenix LiveView browser-native interaction contracts. Not a UI component library.

Server-side monotonic guard for versioned async query/result exchange — the piece that upgrades the Channel contract from convention to construction (CHANNEL_CONTRACT.md; combobox spike verdict 1).

Single import entrypoint for the conformance-backed reference components.

Headless, unstyled, patch-safe combobox — the composition case: popover listbox (openness in the top layer) × Cursor (aria-activedescendant on the input) × Channel (versioned async query/results with the server-side monotonic guard, LiveInteractionContracts.Channel).

Headless, unstyled, patch-safe dropdown menu — popover (open/close, browser-owned) composed with a Cursor (aria-activedescendant) over server-rendered, identity-bearing menu items.

Headless, unstyled, patch-safe popover — the first conformance-backed reference component.

Headless, unstyled, patch-safe select — popover (openness) + cursor (aria-activedescendant) + server-owned selection projected into a hidden form input.

Headless, unstyled, patch-safe tooltip — popover with a hover/focus trigger instead of a click trigger. Simpler than <.popover>: no cursor, no aria-activedescendant, no item navigation, and (unlike popover/menu) no client-managed ARIA reflection either, since tooltips have no expanded state.

Mix Tasks

Scans a target LiveView app's source for the KERNEL invariants that predict interaction bugs under DOM patching, and reports candidate risk sites.

The version-upgrade fuse. Runs the harness against two LiveView versions and reports which browser-native machines changed patch-safety behavior — so an interaction-heavy app can see, before merging a LiveView bump, exactly which delegated machines drifted.

Regenerates delegation-ledger.{json,md} (at the package root, or --out) from the harness's stable full-matrix results (priv/harness/results-1.2.5.json by default). Pass --results results.json to use freshly generated local results.

Boots a bundled LiveView fixture app against a chosen LiveView version, drives it with Playwright in real browsers, and asserts the frozen classification (green machines green, red fixtures red, deterministic). Exits non-zero on any regression — this is the fuse.