diff --git a/src/uix/eidos/components/context-menu/README.md b/src/uix/eidos/components/context-menu/README.md new file mode 100644 index 000000000..69a270962 --- /dev/null +++ b/src/uix/eidos/components/context-menu/README.md @@ -0,0 +1,108 @@ +# `` — eidos + +Right-click / long-press menu. Visually identical to +`` — same panel chrome, same item rows. Differences vs +DropdownMenu: + +| | DropdownMenu | ContextMenu | +|---|---|---| +| Trigger | ` + + + + + + + + {#if tab === 'live'} +
+

Live state

+

+ No knobs at the eidos level — visual treatment is uniform. + Interact with the demo's CheckboxItems / RadioGroup to see + state binding; the trigger area summons the menu via + right-click, Ctrl+Click on macOS, or long-press on touch. +

+
+ + + +
+ +
+
+ soma + headless · cursor-anchored, contextmenu interception + svelte +
+
{somaSnippet}
+
+ +
+
+ eidos + visual · namespaced compound + svelte +
+
{eidosSnippet}
+
+
+ {/if} + + {#if tab === 'api'} +
+

API reference

+

+ 14 pass-through parts (DropdownMenu surface minus + CheckboxGroup). No evaluative props at the eidos layer. +

+
+ + + + + + + + + + + + + + +
PartNotes
ContextMenu (root)Provider; bind:open, modal, dir.
Trigger`<span>` wrapping right-clickable content. Soma intercepts `contextmenu` / long-press / Shift+F10.
ContentFloating panel anchored at the cursor position.
ArrowOptional pointer.
Itemrole=menuitem, onSelect, closeOnSelect.
Group / GroupHeadingSemantic grouping.
Separatorrole=separator.
CheckboxItemrole=menuitemcheckbox; bind:checked.
RadioGroup / RadioItemrole=menuitemradio.
Sub / SubTrigger / SubContentNested fly-out.
+
+
+ {/if} + + {#if tab === 'morfo'} +
+

Morfo contract

+
+ + + + {#each partsList as part} + {@const partAny = part as unknown as Record} + + + + + + + {/each} + +
KebabRoleMarkerKind
{partAny.kebab}{partAny.role ?? '—'}{partAny.marker ?? '—'}{partAny.kind ?? '—'}
+
+
+ {/if} + + {#if tab === 'sema'} +
+

+ sema · events +

+
+ + + + {#each events as action} + {@const sem = action.semantic} + + + + + + + {/each} + +
NameFamilyVerbSequence
{action.name}{sem.family}{sem.verb ?? '—'}{sem.sequence ?? 'pre'}
+
+
+ {/if} + + {#if tab === 'recipe'} +
+

Eidos recipe

+

+ context-menu.css. Visually identical to + DropdownMenu — panel chrome, item rows, indicator slots and + submenu chevrons share the same vocabulary. The Trigger + gets a subtle data-state='open' dashed outline + as an affordance for "the menu came from this region". +

+
+ {/if} + + {#if tab === 'a11y'} +
+

A11y

+

+ WAI-ARIA APG Menu. +

+
+ + + + + + + + + + + + +
InputEffect
Right-clickOpen the menu at cursor.
Ctrl+Click (macOS)Same as right-click.
Long-press (touch)Same after the platform's long-press delay.
Shift+F10Open the menu via keyboard.
ArrowUp / ArrowDownNavigate items.
Enter / SpaceActivate item.
EscapeClose.
ArrowRight on SubTriggerOpen submenu.
+
+
+ {/if} +