docs(dialog-demo): update prose for polymorphic close

The dialog demo prose described "Six events" with the per-event close-*
shape that was collapsed into a single polymorphic close in commit
9f5fbfdb. Three updates:

- Header lede: "Eight parts; six events" → "Eight parts; two events
  (open + polymorphic close)" with the polymorphism rationale.
- morfo tab section: explains the imperative data-last-action +
  per-cause semantic pattern instead of the old per-event prewrite story.
- sema tab section: describes how dismissWith() swaps the family at
  trigger time per cause.
- Keyboard hint: "Close (close-dismiss)" → "Close (close with
  data-last-action='dismissed')" to match runtime behaviour.

The compiled events table at the bottom of the morfo tab auto-derives
from the morfo, so it already shows the correct collapsed event list
without modification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
active-uix
dev 5 months ago
parent 34e0064f2c
commit f0440d647a

@ -148,10 +148,17 @@
<div data-uix-eyebrow>Overlays · Dialog</div> <div data-uix-eyebrow>Overlays · Dialog</div>
<h1 data-uix-page-title>Dialog</h1> <h1 data-uix-page-title>Dialog</h1>
<p data-uix-page-lede> <p data-uix-page-lede>
Modal blocking surface. Eight parts; six events with the full Modal blocking surface. Eight parts; two events
asymmetric exit set (saved · cancelled · dismissed · dismissed-outside (<code>open</code> + a polymorphic <code>close</code>) with the
· failed) surfaced via <code>data-last-action</code>. Modal subset of full asymmetric exit set (saved · cancelled · dismissed ·
intent — only <code>neutral</code> / <code>risk</code> / dismissed-outside · failed) surfaced via
<code>data-last-action</code>. The provider concretes the
<code>close</code> event's family at trigger time —
<code>emerge.close</code> (cancel / dismiss / dismiss-outside),
<code>commit.save + fulfill</code> (save) or
<code>signal.alert + threat</code> (fail) — per book §5.3
polymorphism. Modal subset of intent — only
<code>neutral</code> / <code>risk</code> /
<code>threat</code>; affirm / fulfill / loss are intentionally <code>threat</code>; affirm / fulfill / loss are intentionally
off the table per the modal canon. off the table per the modal canon.
</p> </p>
@ -455,12 +462,16 @@
· declarative contract · declarative contract
</h2> </h2>
<p data-uix-section-desc> <p data-uix-section-desc>
Source: <code>src/uix/morfo/components/dialog.ts</code>. Six Source: <code>src/uix/morfo/components/dialog.ts</code>. Two
events surface five distinct exit reasons via events — <code>open</code> (intent-bound via fromProp) and
<code>data-last-action</code> prewrites. open is intent-bound; a polymorphic <code>close</code> (book §5.3) with
close-cancel / close-dismiss / close-dismiss-outside drop the <code>allowedFamilies: ['emerge', 'commit', 'signal']</code>.
intent (backing out has no evaluative load); close-after-fail The provider sets <code>data-last-action</code> imperatively
explicitly carries threat regardless of provider intent. before each close and passes the concrete semantic per cause:
cancel / dismiss / dismiss-outside fire as plain emerge
(backing out has no evaluative load); save fires as
commit.save + fulfill; fail fires as signal.alert + threat
regardless of provider intent.
</p> </p>
<div data-uix-table-wrap> <div data-uix-table-wrap>
@ -588,14 +599,17 @@
· events + perceptual signature · events + perceptual signature
</h2> </h2>
<p data-uix-section-desc> <p data-uix-section-desc>
Six events. <code>open</code> is fromProp-bound to the Two events. <code>open</code> is fromProp-bound to the
provider's <code>intent</code> — a threat dialog opens with provider's <code>intent</code> — a threat dialog opens with
threat-flavoured perceptual weight. close-save consummates as threat-flavoured perceptual weight. <code>close</code> is
fulfill (the user committed). close-cancel / polymorphic (book §5.3) — the table shows its declared
close-dismiss-* drop intent (no evaluative load on backing default family (<code>emerge</code>); the runtime swaps the
out). close-after-fail explicitly hits threat regardless of family per cause via <code>opts.semantic</code> in
provider intent. Click <strong>play</strong> to fire on the <code>dismissWith()</code>: save → commit.save + fulfill;
live dialog. cancel / dismiss / dismiss-outside → emerge.close (no
evaluative load on backing out); fail → signal.alert +
threat regardless of provider intent. Click
<strong>play</strong> to fire on the live dialog.
</p> </p>
<div data-uix-table-wrap> <div data-uix-table-wrap>
@ -671,7 +685,7 @@
<thead><tr><th>Key</th><th>Action</th></tr></thead> <thead><tr><th>Key</th><th>Action</th></tr></thead>
<tbody> <tbody>
<tr><td><span data-uix-kbd>Enter</span> / <span data-uix-kbd>Space</span></td><td>Open from Trigger.</td></tr> <tr><td><span data-uix-kbd>Enter</span> / <span data-uix-kbd>Space</span></td><td>Open from Trigger.</td></tr>
<tr><td><span data-uix-kbd>Escape</span></td><td>Close (close-dismiss).</td></tr> <tr><td><span data-uix-kbd>Escape</span></td><td>Close (close with data-last-action='dismissed').</td></tr>
<tr><td><span data-uix-kbd>Tab</span> / <span data-uix-kbd>Shift+Tab</span></td><td>Cycle focus inside Content.</td></tr> <tr><td><span data-uix-kbd>Tab</span> / <span data-uix-kbd>Shift+Tab</span></td><td>Cycle focus inside Content.</td></tr>
</tbody> </tbody>
</table> </table>

Loading…
Cancel
Save

Powered by TurnKey Linux.