The drawer now renders the FULL hierarchy of scopes that apply at the
caret, instead of only the most-specific one. Inside a table cell with
text selected the user sees four panels stacked:
Format ← active selection's inline marks/links
Cell ← tone, vertical align, cell text-align
Row ← +/- row, row header toggle
Table ← striped, compact, +/- column, col header
Each panel is independently collapsible. Default: the leaf (most
specific) is open, the rest are collapsed but accessible via the
chevron next to their header. User-explicit toggles persist across
context changes.
HIER-1 — soma:
- WordsDrawerMode union expanded: split 'table' → 'cell' | 'row' |
'table'; split 'list' → 'list-item' | 'list'; added 'block' for the
paragraph/heading/quote text-align scope.
- WordsDrawerProvider gains `modes: readonly DrawerMode[]` derived
that walks the caret context outward (most-specific first). The
legacy `mode` field is kept as the top of the stack for consumers
that just want the leaf.
- snippetProps surfaces both `modes` (stack) and `mode` (leaf).
- Morfo `data-words-drawer-mode` values updated to the new union.
HIER-2 — eidos panel split:
- Table panel decomposed into three: cell-scope (tone + vertical +
text-align), row-scope (+/- row, row header), table-scope (+/- col,
col header, striped, compact).
- List panel decomposed into list-item-scope (indent/outdent) +
list-scope (kind).
- New 'block' panel hosts text-align when caret is in a heading /
paragraph / quote outside a table cell.
- Each panel is a `<section data-words-drawer-panel data-depth=N>`
with its own toggleable header + body snippet.
HIER-3 — per-panel collapse:
- SvelteMap stores user-explicit open/closed overrides per mode.
isPanelOpen() falls back to "open if leaf, else collapsed" when no
override exists.
- Drawer header now shows leaf title in bold + breadcrumb of deeper
panels in muted text (Format · Cell · Row · Table).
- Visual depth cue: border-inline-start of each panel renders at
decreasing strength as depth grows (leaf solid, deeper at 60% /
30% accent border).
Visual verification: selected text inside a sample table cell shows
4 panels stacked (Format open, Cell/Row/Table collapsed), header
breadcrumb "FORMAT · Cell · Row · Table". Click on any collapsed
header expands it. 214/214 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>