entasis 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.js +1 -1
  2. package/dist/components/AIChat/aiChat.theme.js +2 -2
  3. package/dist/components/AIComposer/aiComposer.theme.js +2 -2
  4. package/dist/components/AIContext/aiContext.theme.js +2 -2
  5. package/dist/components/AIFilePreview/aiFilePreview.theme.js +1 -1
  6. package/dist/components/AIMarker/aiMarker.theme.js +2 -2
  7. package/dist/components/AIMessage/aiMessage.theme.js +2 -2
  8. package/dist/components/AIMessageActions/aiMessageActions.theme.js +1 -1
  9. package/dist/components/AIModelSelector/aiModelSelector.theme.js +1 -1
  10. package/dist/components/AIReasoning/aiReasoning.theme.js +1 -1
  11. package/dist/components/AISuggestion/aiSuggestion.theme.js +1 -1
  12. package/dist/components/AIThread/aiThread.theme.js +2 -2
  13. package/dist/components/AIThreadToc/aiThreadToc.theme.js +1 -1
  14. package/dist/components/AITool/aiTool.theme.js +2 -2
  15. package/dist/components/AudioPlayer/audioPlayer.theme.js +2 -2
  16. package/dist/components/Avatar/avatarGroup.theme.js +1 -1
  17. package/dist/components/Button/button.mcp.d.ts +1 -1
  18. package/dist/components/Button/button.mcp.js +2 -2
  19. package/dist/components/ButtonGroup/buttonGroup.theme.js +1 -1
  20. package/dist/components/DocumentViewer/documentViewer.theme.js +1 -1
  21. package/dist/components/EventCalendar/eventCalendar.theme.js +1 -1
  22. package/dist/components/Form/ColorInput/colorInput.theme.js +2 -2
  23. package/dist/components/Form/ColorPicker/colorPicker.theme.js +2 -2
  24. package/dist/components/Form/DateInput/dateInput.theme.js +2 -2
  25. package/dist/components/Form/DateSelector/dateSelector.theme.js +1 -1
  26. package/dist/components/Form/File/fileInput.theme.js +2 -2
  27. package/dist/components/Form/KeyValueInput/keyValueInput.theme.js +2 -2
  28. package/dist/components/Form/MultiStepForm/multiStepForm.theme.js +1 -1
  29. package/dist/components/Form/NumberInput/numberInput.theme.js +2 -2
  30. package/dist/components/Form/PasswordInput/passwordInput.theme.js +2 -2
  31. package/dist/components/Form/PhoneInput/phoneInput.theme.js +2 -2
  32. package/dist/components/Form/PinInput/pinInput.theme.js +2 -2
  33. package/dist/components/Form/TagsInput/tagsInput.theme.js +2 -2
  34. package/dist/components/Form/TextArea/textArea.theme.js +2 -2
  35. package/dist/components/Form/TextInput/textInput.theme.js +2 -2
  36. package/dist/components/Form/TimeInput/timeInput.theme.js +2 -2
  37. package/dist/components/Form/VoiceInput/voiceInput.theme.js +2 -2
  38. package/dist/components/GanttChart/ganttChart.theme.js +2 -2
  39. package/dist/components/Grid/gridSpan.theme.js +2 -2
  40. package/dist/components/MediaVolume/mediaVolumeControl.theme.js +1 -1
  41. package/dist/components/MenuBar/menuBar.theme.js +2 -2
  42. package/dist/components/MenuOption/menuOption.theme.js +2 -2
  43. package/dist/components/MetadataList/metadataList.theme.js +2 -2
  44. package/dist/components/MiniCalendar/miniCalendar.theme.js +2 -2
  45. package/dist/components/NetworkIndicator/networkIndicator.mcp.d.ts +1 -1
  46. package/dist/components/NetworkIndicator/networkIndicator.mcp.js +1 -1
  47. package/dist/components/NetworkIndicator/networkIndicator.theme.js +2 -2
  48. package/dist/components/QRCode/qrCode.theme.js +2 -2
  49. package/dist/components/RichTextInput/richTextInput.theme.js +2 -2
  50. package/dist/components/ScrollArea/scrollArea.theme.js +2 -2
  51. package/dist/components/SegmentedControl/segmentedControl.theme.js +1 -1
  52. package/dist/components/SelectionMenu/selectionMenu.theme.js +1 -1
  53. package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
  54. package/dist/components/Sidebar/sidebar.mcp.js +23 -1
  55. package/dist/components/Sidebar/sidebar.theme.js +42 -43
  56. package/dist/components/SortableList/sortableList.theme.js +2 -2
  57. package/dist/components/SpinnerText/spinnerText.mcp.d.ts +1 -1
  58. package/dist/components/SpinnerText/spinnerText.mcp.js +1 -1
  59. package/dist/components/SpinnerText/spinnerText.theme.js +2 -2
  60. package/dist/components/ToggleButton/toggleButton.theme.js +1 -1
  61. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.js +1 -1
  62. package/dist/components/ToggleMenu/toggleMenu.theme.js +2 -2
  63. package/dist/components/VideoPlayer/videoPlayer.theme.js +2 -2
  64. package/dist/generated/componentMcpRegistry.d.ts +4 -4
  65. package/package.json +1 -1
@@ -1 +1 @@
1
- export declare const sidebarDescription = "\n# Sidebar Component\n\nSidebar navigation with data-driven groups, icon collapse, mobile drawer behavior,\nrecursive tree groups, header/footer rows, search, actions, and snippet escape hatches.\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n\timport { Sidebar, type SidebarGroup } from 'entasis/sidebar';\n</script>\n```\n\n## Basic Usage\n\n```svelte\n<script lang=\"ts\">\n\timport { Sidebar, type SidebarGroup } from 'entasis/sidebar';\n\timport { houseIcon } from 'entasis/icons/house';\n\timport { gearIcon } from 'entasis/icons/gear';\n\n\tconst items: SidebarGroup[] = [\n\t\t{\n\t\t\tlabel: 'Workspace',\n\t\t\titems: [\n\t\t\t\t{ label: 'Dashboard', href: '/', icon: houseIcon, isActive: true },\n\t\t\t\t{ label: 'Settings', href: '/settings', icon: gearIcon }\n\t\t\t]\n\t\t}\n\t];\n</script>\n\n<Sidebar items={items}>\n\t{#snippet children({ toggle })}\n\t\t<header>\n\t\t\t<button type=\"button\" onclick={toggle}>Toggle</button>\n\t\t</header>\n\t\t<main>Page content</main>\n\t{/snippet}\n</Sidebar>\n```\n\n## AI-Safe Usage Contract\n\n1. Use `items` for normal navigation. Use `content` only when data-driven rows cannot express the layout.\n2. Use local Entasis icon snippets such as `houseIcon`, not Lucide component constructors.\n3. Use `MenuItem[]` from `entasis/menu` for `menu` and action dropdowns.\n4. Do not combine `menu` with `href` or `onclick` on the same row; use `action` for a trailing row menu.\n5. Keep `children`, `header`, `content`, `footer`, `banner`, and action snippets pure; they receive `SidebarApi`.\n6. Use `collapsible=\"icon\"` for icon rail behavior, `collapsible=\"offcanvas\"` for hidden desktop panels, and `collapsible=\"none\"` for fixed sidebars. Icon collapse automatically falls back to offcanvas when any data-driven row lacks an icon.\n7. Offcanvas sidebars reveal over the content from the screen edge by default when hidden; set `edgeReveal={false}` to disable that. A revealed hidden sidebar keeps its resize handle and dismisses through a small rectangular pointer tolerance.\n8. Set `keyboardShortcut={false}` when embedding Sidebar inside another shortcut-heavy surface.\n9. Sidebar owns navigation, resize mechanics, the lower application wall, and variant surface geometry. AppShell forwards its variant and composes PageShell inside that surface.\n10. Use `size` for typography, icon scale, and item height. Use `density` independently for section padding, gaps, and submenu spacing.\n11. Use `activityBar` for a persistent icon rail outside the panel (section switching, workspaces). Every item needs an `icon` and a `label`; the label is the accessible name and the tooltip. It is layout mode only: `mode=\"panel\"` renders the navigation panel alone.\n12. Use `expandOnHover` only with `collapsible=\"icon\"`. It is a temporary peek, not a toggle: the persisted collapsed state never changes, while the peeked panel renders with expanded semantics.\n\n## Data Model\n\n### SidebarGroup\n- **label**: string - Group label, hidden in icon-collapsed mode.\n- **items**: SidebarMenuEntry[] - Menu rows.\n- **tree**: SidebarTreeNode[] - Recursive tree rows instead of menu items.\n- **action**: SidebarMenuActionDescriptor | SidebarMenuActionDescriptor[] | Snippet<[SidebarApi]> - Top-right group actions. Pass an array to pin several affordances (a `+` and a drag handle) to one group header; each renders as its own icon-only ghost button.\n- **collapsible**: boolean - Makes the group label a toggle.\n- **defaultOpen**: boolean - Initial collapsible group state.\n- **separator**: boolean - Divider before the group.\n\n### SidebarMenuEntry\n- **label**: string - Visible row label.\n- **icon**: SidebarIcon - Entasis icon snippet or string.\n- **iconColor**: Colors - Role tint for the leading icon, applied through `data-color`.\n- **iconVariant**: 'bare' | 'tile' - Leading icon treatment. `tile` paints a rounded square (`bg-color-muted text-color-muted-readable`) around the glyph, so per-project colour chips come from the role scale instead of hand-built markup.\n- **href**: string - Render as an anchor. Mutually exclusive with menu.\n- **onclick**: (event: MouseEvent) => void - Native click handler for button or anchor rows. Mutually exclusive with menu.\n- **isActive**: boolean - Adds active styling and `aria-current=\"page\"`.\n- **disabled**: boolean - Disables button rows and marks anchor rows disabled.\n- **badge**: string | number - Trailing count/status, hidden in icon mode.\n- **tooltip**: string - Entasis Tooltip content in icon mode. Defaults to label.\n- **items**: SidebarMenuSubEntry[] - Inline nested menu.\n- **collapsible**: boolean - Set false for an always-open submenu.\n- **defaultOpen**: boolean - Initial nested menu state.\n- **menu**: MenuItem[] - Popup menu opened from the full row. Mutually exclusive with href/onclick.\n- **action**: SidebarMenuActionDescriptor | Snippet<[SidebarApi]> - Hover/focus trailing action.\n\n### SidebarActivityBar\nIcon rail pinned to the outer edge of the sidebar, visible in every display state.\n- **items**: SidebarActivityBarItem[] - Items rendered from the top.\n- **footerItems**: SidebarActivityBarItem[] - Items pinned to the end of the column.\n- **header** / **footer**: Snippet - Custom content before the first item and after the pinned ones.\n- **width**: string (default '3rem') - Column thickness, published as `--sidebar-width-activity`.\n- **label**: string - Accessible name for the column landmark. Set it whenever the panel also renders navigation.\n- **onSelect**: ({ item, index }) => void - Fires after an item is activated. `index` counts `items` then `footerItems`.\n\n### SidebarActivityBarItem\n- **icon**: SidebarIcon (required) - Icon rendered in the square.\n- **label**: string (required) - Accessible name and default tooltip; the square shows no text.\n- **id**: string - Stable render key.\n- **href** / **target** / **rel** - Render an anchor instead of a button.\n- **onclick**: (event: MouseEvent) => void - Native click handler.\n- **isActive**: boolean - Adds active styling and `aria-current=\"page\"`.\n- **badge**: string | number | Snippet - Corner badge pinned to the outer top corner. An empty string renders a bare dot. A string or number badge joins the accessible name (`\"Alerts, 3\"`); a dot and a Snippet badge are decorative, so put their meaning in `label`.\n- **disabled**: boolean - Blocks activation and skips the item during keyboard navigation.\n- **tooltip**: string | false - Tooltip override; `false` suppresses it.\n\n### SidebarMenuButtonItem\nUse for `headerButton`, `footerButton`, or direct `<SidebarMenuButton />` rows.\n- **icon**: SidebarIcon - Leading logo/icon.\n- **avatar**: { src?: string; alt?: string; fallback?: string } - Leading avatar.\n- **variant**: 'default' | 'brand' | 'compact'.\n- **title**: string - Primary text.\n- **subtitle**: string - Secondary text.\n- **trailing**: SidebarIcon | false | SidebarMenuActionDescriptor - Trailing content. An icon is decorative; an action descriptor (`{ icon, label, onclick }`, the same shape as a group action) renders its own icon-only ghost button beside the row, so a workspace card can carry its own collapse control without a custom `header` snippet. Descriptor handlers are `onclick(event, api)`, so `api.toggle()` is reachable.\n- **href** / **onclick** / **menu** - Choose link, button, or popup behavior. `onclick(event, api)` receives the SidebarApi beside the event, so `api.toggle()` is reachable from the row itself.\n- **menuIconClass**: string - Class override for option icons inside the popup menu.\n\n## Props\n\n### State\n- **open**: boolean (bindable, default true) - Desktop expanded state.\n- **defaultOpen**: boolean (default true) - Initial desktop state when `open` is omitted.\n- **onOpenChange**: (open: boolean) => void - Called once for a library-originated desktop state change. Repeated requests and parent prop updates stay silent.\n- **onDisplayStateChange**: (state: SidebarDisplayState) => void - Called once for a library-originated semantic display-state change.\n- **api.displayState**: 'expanded' | 'collapsed' | 'hidden' - Semantic desktop state; hidden means closed offcanvas. A hover peek does not change it.\n- **api.isPeeking**: boolean - True while a hover peek renders the collapsed panel at full width. Read it alongside `displayState` when a snippet hides content in icon mode.\n- **keyboardShortcut**: string | false (default 'b') - Ctrl/Cmd shortcut key.\n\n### Layout\n- **side**: 'left' | 'right' - Desktop and mobile side.\n- **variant**: 'admin' | 'floating' | 'inset' | 'split' | 'framed' - Sidebar geometry. `framed` is the admin geometry for a sidebar hosted inside a raised card (AppShell variant framed), with a `surface-recessed` well. `admin` renders the conventional full-height navigation column; `inset` integrates navigation into the lower wall with an inset content surface; `split` renders detached sidebar and content surfaces.\n- **size**: 'small' | 'normal' | 'large' (default 'normal') - Typography, icon, avatar, badge, leading-media, item-height, and search-height scale.\n- **iconSize**: 'small' | 'normal' | 'large' - Icon and leading-media scale inside the panel on its own; defaults to `size`. Menu rows, sub rows, group labels and the header button follow it; the activity bar keeps `size`.\n- **activeVariant**: 'soft' | 'outline' | 'solid' (default 'soft') - How active rows are painted. `soft` is the shared selected recipe (`selectedSoft`: `bg-selected-muted text-selected-muted-readable`), `solid` its loud counterpart (`selectedSolid`: `bg-selected text-selected-contrast`), `outline` a bordered surface card (`bg-surface border border-neutral-muted text-neutral`) that reads as a raised card on a tinted well. Each row carries the choice as `data-active-variant`, so no descendant selector is needed to restyle selection.\n- **density**: 'compact' | 'normal' | 'comfortable' (default 'normal') - Section padding, group padding, gaps, horizontal inset, and submenu spacing.\n- **collapsible**: 'offcanvas' | 'icon' | 'none' - Collapse behavior. Icon mode requires icons on every data-driven row and otherwise resolves to offcanvas.\n- **collapseIcon**: DisclosureIndicator \u2014 'chevron' | 'plus-minus' | 'none' (default 'chevron') - Disclosure indicator drawn on collapsible menu rows. 'none' renders no indicator.\n- **mode**: 'layout' | 'panel' - Full resizing layout or only the visible navigation panel.\n- **frame**: 'viewport' | 'contained' - Standalone Sidebar positioning. Viewport mode uses Theme's dynamic window-height token; contained mode fills a positioned parent.\n- **width**: string - Expanded width.\n- **widthIcon**: string - Icon-collapsed width.\n- **widthMobile**: string - Mobile drawer width.\n- **rail**: boolean | 'line' | 'thumb' - Edge toggle rail. `true` keeps the thin line style; `thumb` renders a short visible handle with the same full-height hitbox. The appearance is preserved when the rail shares the resize control.\n- **activityBar**: SidebarActivityBar - Icon rail pinned outside the panel, in layout mode only (`mode=\"panel\"` renders the panel alone and ignores it). It never slides off screen: only the panel takes the offcanvas offset, and the reserved layout column is the panel width plus the rail width. On mobile it renders as a horizontal row at the top of the drawer.\n- **expandOnHover**: boolean (default false) - With `collapsible=\"icon\"`, hovering or focusing into the collapsed panel expands it to `width` over the page (`data-peek=\"true\"`) while the reserved column stays at `widthIcon`, so page content does not reflow. The persisted collapsed state is untouched, and the peeked panel renders exactly like an expanded one: group headers, badges, search, inline submenus, and inline tree branches all come back, and the rail or resize handle travels to its inner edge.\n- **edgeReveal**: boolean (default true) - Pointer/focus edge preview for hidden offcanvas sidebars. Hover reveal overlays content, remains resizable when configured, and re-hides after the pointer leaves its small rectangular tolerance. Dragging the sidebar closed suppresses immediate hover reopening until the pointer leaves the edge trigger; toggle/click opens persistently.\n- **resizable**: boolean | SidebarResizableOptions - Enables pointer and keyboard resizing while expanded, icon-collapsed, or temporarily edge-revealed. By default, collapse requires dragging 75% of `minWidth` beyond the minimum; override `collapseThreshold` for a custom boundary. Use `storageKey` to restore and persist the expanded width across sessions.\n - `onWidthChange({ width, isUserInteraction })` reports every expanded-width change with one named payload: continuously while the user resizes (`isUserInteraction: true`) and once when a stored width is restored (`isUserInteraction: false`).\n\n### Content\n- **items**: SidebarGroup[] - Data-driven body navigation.\n- **headerButton** / **footerButton**: SidebarMenuButtonItem - Sticky large rows.\n- **search**: SidebarSearch - Header search input; use its native `oninput` handler.\n- **headerMenu** / **footerMenu**: SidebarMenuEntry[] - Sticky quick menus.\n- Menu entries and nested entries accept `size: 'small' | 'normal' | 'large'` for row geometry.\n- **header**, **content**, **footer**, **children**, **banner**: Snippet<[SidebarApi]> - Escape hatches. The `header` snippet renders **first** in the header region, above `headerButton`, `search` and `headerMenu`.\n\n### Styling\n- **class**: string - Classes applied to the Sidebar root.\n- **theme**: SidebarThemeProps - Semantic part overrides such as `panel`, `header`, `nav`, `footer`, menu, search, rail, and mobile drawer parts.\n\n## Motion\n\n- **motion** theme slot: the y-axis slide shared by collapsible groups, inline submenus, and\n tree branches. Takes `in` / `out` slide params plus a `duration` / `easing` motion token.\n- Ladder: `<Theme components={{ sidebar: { motion } }}>` \u2192 `setSidebarTheme({ motion })` \u2192\n `theme.motion`. Reduced motion collapses it to 0.\n\n## Accessibility\n\n- The body navigation renders inside a named `<nav>` landmark (`data-sidebar=\"nav\"`), so assistive tech can jump straight to it and tell it apart from the activity bar's own landmark.\n- Active links set `aria-current=\"page\"`.\n- Collapsible rows and groups set `aria-expanded`.\n- Disabled buttons use `disabled`; disabled links omit `href`, use `aria-disabled` and `tabindex=-1`, and block activation.\n- Mobile drawer includes a backdrop button labelled \"Close Sidebar\".\n- Icon-collapsed rows keep their labels mounted and visually fade them, preserving accessible names and stable icon geometry.\n- Search, group controls, actions, and nested rows become inert before collapse can remove or hide them; focus returns to the owning visible row.\n- Nested groups, tree branches, and inline submenus use reversible height transitions for open, close, and sidebar-collapse changes.\n- Tree roots use menu-row styling and nested tree nodes use submenu-row styling. In desktop icon mode, root folders open a PopupMenu and descendants remain navigable through recursive Menu submenu popovers; root leaves retain direct navigation and tooltips.\n- When `rail` and `resizable` are both enabled, one edge control owns click-to-toggle, drag resize, and keyboard resize without overlapping hitboxes.\n- Hidden offcanvas sidebars keep that combined edge control while temporarily revealed. Resizing does not pin the sidebar open; leaving the panel, trigger, and handle tolerance re-hides it without discarding the configured width.\n- Both peeks (edge reveal and `expandOnHover`) stay open while focus is inside the panel or while an overlay opened from inside it is open, including nested submenus. They release about 120ms after the pointer, focus, and every such overlay are gone.\n- The activity bar is its own `<nav>` landmark with a `<ul>` of items, a roving tabindex, and ArrowUp/ArrowDown/Home/End navigation that loops and skips disabled items. Tab lands on the `isActive` item. Each square takes its accessible name from `label`, with a string or number `badge` appended to it, and shows `label` as a tooltip on hover and focus.\n- A hidden offcanvas panel is `inert`, so Tab never lands in a panel parked off screen; a peek makes it interactive again.\n\n## Notes\n\n- Dropdown menus use Entasis `PopupMenu` and `MenuItem[]`.\n- The component uses semantic Entasis tokens. Do not add shadcn `sidebar-*` color tokens.\n- Snippet icons from `entasis/icons/*` are the preferred icon format.\n";
1
+ export declare const sidebarDescription = "\n# Sidebar Component\n\nSidebar navigation with data-driven groups, icon collapse, mobile drawer behavior,\nrecursive tree groups, header/footer rows, search, actions, and snippet escape hatches.\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n\timport { Sidebar, type SidebarGroup } from 'entasis/sidebar';\n</script>\n```\n\n## Basic Usage\n\n```svelte\n<script lang=\"ts\">\n\timport { Sidebar, type SidebarGroup } from 'entasis/sidebar';\n\timport { houseIcon } from 'entasis/icons/house';\n\timport { gearIcon } from 'entasis/icons/gear';\n\n\tconst items: SidebarGroup[] = [\n\t\t{\n\t\t\tlabel: 'Workspace',\n\t\t\titems: [\n\t\t\t\t{ label: 'Dashboard', href: '/', icon: houseIcon, isActive: true },\n\t\t\t\t{ label: 'Settings', href: '/settings', icon: gearIcon }\n\t\t\t]\n\t\t}\n\t];\n</script>\n\n<Sidebar items={items}>\n\t{#snippet children({ toggle })}\n\t\t<header>\n\t\t\t<button type=\"button\" onclick={toggle}>Toggle</button>\n\t\t</header>\n\t\t<main>Page content</main>\n\t{/snippet}\n</Sidebar>\n```\n\n## AI-Safe Usage Contract\n\n1. Use `items` for normal navigation. Use `content` only when data-driven rows cannot express the layout.\n2. Use local Entasis icon snippets such as `houseIcon`, not Lucide component constructors.\n3. Use `MenuItem[]` from `entasis/menu` for `menu` and action dropdowns.\n4. Do not combine `menu` with `href` or `onclick` on the same row; use `action` for a trailing row menu.\n5. Keep `children`, `header`, `content`, `footer`, `banner`, and action snippets pure; they receive `SidebarApi`.\n6. Use `collapsible=\"icon\"` for icon rail behavior, `collapsible=\"offcanvas\"` for hidden desktop panels, and `collapsible=\"none\"` for fixed sidebars. Icon collapse automatically falls back to offcanvas when any data-driven row lacks an icon.\n7. Offcanvas sidebars reveal over the content from the screen edge by default when hidden; set `edgeReveal={false}` to disable that. A revealed hidden sidebar keeps its resize handle and dismisses through a small rectangular pointer tolerance.\n8. Set `keyboardShortcut={false}` when embedding Sidebar inside another shortcut-heavy surface.\n9. Sidebar owns navigation, resize mechanics, the lower application wall, and variant surface geometry. AppShell forwards its variant and composes PageShell inside that surface.\n10. Use `size` for typography, icon scale, and item height. Use `density` independently for section padding, gaps, and submenu spacing.\n11. Use `activityBar` for a persistent icon rail outside the panel (section switching, workspaces). Every item needs an `icon` and a `label`; the label is the accessible name and the tooltip. It is layout mode only: `mode=\"panel\"` renders the navigation panel alone.\n12. Use `expandOnHover` only with `collapsible=\"icon\"`. It is a temporary peek, not a toggle: the persisted collapsed state never changes, while the peeked panel renders with expanded semantics.\n\n## Data Model\n\n### SidebarGroup\n- **label**: string - Group label, hidden in icon-collapsed mode.\n- **items**: SidebarMenuEntry[] - Menu rows.\n- **tree**: SidebarTreeNode[] - Recursive tree rows instead of menu items.\n- **action**: SidebarMenuActionDescriptor | SidebarMenuActionDescriptor[] | Snippet<[SidebarApi]> - Top-right group actions. Pass an array to pin several affordances (a `+` and a drag handle) to one group header; each renders as its own icon-only ghost button.\n- **collapsible**: boolean - Makes the group label a toggle.\n- **defaultOpen**: boolean - Initial collapsible group state.\n- **separator**: boolean - Divider before the group.\n\n### SidebarMenuEntry\n- **label**: string - Visible row label.\n- **icon**: SidebarIcon - Entasis icon snippet or string.\n- **iconColor**: Colors - Role tint for the leading icon, applied through `data-color`.\n- **iconVariant**: 'bare' | 'tile' - Leading icon treatment. `tile` paints a rounded square (`bg-color-muted text-color-muted-readable`) around the glyph, so per-project colour chips come from the role scale instead of hand-built markup.\n- **href**: string - Render as an anchor. Mutually exclusive with menu.\n- **onclick**: (event: MouseEvent) => void - Native click handler for button or anchor rows. Mutually exclusive with menu.\n- **isActive**: boolean - Adds active styling and `aria-current=\"page\"`.\n- **disabled**: boolean - Disables button rows and marks anchor rows disabled.\n- **badge**: string | number - Trailing count/status, hidden in icon mode.\n- **tooltip**: string - Entasis Tooltip content in icon mode. Defaults to label.\n- **items**: SidebarMenuSubEntry[] - Inline nested menu.\n- **collapsible**: boolean - Set false for an always-open submenu.\n- **defaultOpen**: boolean - Initial nested menu state.\n- **menu**: MenuItem[] - Popup menu opened from the full row. Mutually exclusive with href/onclick.\n- **action**: SidebarMenuActionDescriptor | Snippet<[SidebarApi]> - Hover/focus trailing action.\n\n### SidebarActivityBar\nIcon rail pinned to the outer edge of the sidebar, visible in every display state.\n- **items**: SidebarActivityBarItem[] - Items rendered from the top.\n- **footerItems**: SidebarActivityBarItem[] - Items pinned to the end of the column.\n- **header** / **footer**: Snippet - Custom content before the first item and after the pinned ones.\n- **width**: string (default '3rem') - Column thickness, published as `--sidebar-width-activity`.\n- **label**: string - Accessible name for the column landmark. Set it whenever the panel also renders navigation.\n- **onSelect**: ({ item, index }) => void - Fires after an item is activated. `index` counts `items` then `footerItems`.\n\n### SidebarActivityBarItem\n- **icon**: SidebarIcon (required) - Icon rendered in the square.\n- **label**: string (required) - Accessible name and default tooltip; the square shows no text.\n- **id**: string - Stable render key.\n- **href** / **target** / **rel** - Render an anchor instead of a button.\n- **onclick**: (event: MouseEvent) => void - Native click handler.\n- **isActive**: boolean - Adds active styling and `aria-current=\"page\"`.\n- **badge**: string | number | Snippet - Corner badge pinned to the outer top corner. An empty string renders a bare dot. A string or number badge joins the accessible name (`\"Alerts, 3\"`); a dot and a Snippet badge are decorative, so put their meaning in `label`.\n- **disabled**: boolean - Blocks activation and skips the item during keyboard navigation.\n- **tooltip**: string | false - Tooltip override; `false` suppresses it.\n\n### SidebarMenuButtonItem\nUse for `headerButton`, `footerButton`, or direct `<SidebarMenuButton />` rows.\n- **icon**: SidebarIcon - Leading logo/icon.\n- **avatar**: { src?: string; alt?: string; fallback?: string } - Leading avatar.\n- **variant**: 'default' | 'brand' | 'compact'.\n- **title**: string - Primary text.\n- **subtitle**: string - Secondary text.\n- **trailing**: SidebarIcon | false | SidebarMenuActionDescriptor - Trailing content. An icon is decorative; an action descriptor (`{ icon, label, onclick }`, the same shape as a group action) renders its own icon-only ghost button beside the row, so a workspace card can carry its own collapse control without a custom `header` snippet. Descriptor handlers are `onclick(event, api)`, so `api.toggle()` is reachable.\n- **href** / **onclick** / **menu** - Choose link, button, or popup behavior. `onclick(event, api)` receives the SidebarApi beside the event, so `api.toggle()` is reachable from the row itself.\n- **menuIconClass**: string - Class override for option icons inside the popup menu.\n\n## Props\n\n### State\n- **open**: boolean (bindable, default true) - Desktop expanded state.\n- **defaultOpen**: boolean (default true) - Initial desktop state when `open` is omitted.\n- **onOpenChange**: (open: boolean) => void - Called once for a library-originated desktop state change. Repeated requests and parent prop updates stay silent.\n- **onDisplayStateChange**: (state: SidebarDisplayState) => void - Called once for a library-originated semantic display-state change.\n- **api.displayState**: 'expanded' | 'collapsed' | 'hidden' - Semantic desktop state; hidden means closed offcanvas. A hover peek does not change it.\n- **api.isPeeking**: boolean - True while a hover peek renders the collapsed panel at full width. Read it alongside `displayState` when a snippet hides content in icon mode.\n- **keyboardShortcut**: string | false (default 'b') - Ctrl/Cmd shortcut key.\n\n### Layout\n- **side**: 'left' | 'right' - Desktop and mobile side.\n- **variant**: 'admin' | 'floating' | 'inset' | 'split' | 'framed' - Sidebar geometry. `framed` is the admin geometry for a sidebar hosted inside a raised card (AppShell variant framed), with a `surface-recessed` well. `admin` renders the conventional full-height navigation column; `inset` integrates navigation into the lower wall with an inset content surface; `split` renders detached sidebar and content surfaces.\n- **size**: 'small' | 'normal' | 'large' (default 'normal') - Typography, icon, avatar, badge, leading-media, item-height, and search-height scale.\n- **iconSize**: 'small' | 'normal' | 'large' - Icon and leading-media scale inside the panel on its own; defaults to `size`. Menu rows, sub rows, group labels and the header button follow it; the activity bar keeps `size`.\n- **activeVariant**: 'soft' | 'outline' | 'solid' (default 'soft') - How active rows are painted. `soft` is the shared selected recipe (`selectedSoft`: `bg-selected-muted text-selected-muted-readable`), `solid` its loud counterpart (`selectedSolid`: `bg-selected text-selected-contrast`), `outline` a bordered surface card (`bg-surface border border-neutral-muted text-neutral`) that reads as a raised card on a tinted well. Each row carries the choice as `data-active-variant`, so no descendant selector is needed to restyle selection.\n- **density**: 'compact' | 'normal' | 'comfortable' (default 'normal') - Section padding, group padding, gaps, horizontal inset, and submenu spacing.\n- **collapsible**: 'offcanvas' | 'icon' | 'none' - Collapse behavior. Icon mode requires icons on every data-driven row and otherwise resolves to offcanvas.\n- **collapseIcon**: DisclosureIndicator \u2014 'chevron' | 'plus-minus' | 'none' (default 'chevron') - Disclosure indicator drawn on collapsible menu rows. 'none' renders no indicator.\n- **mode**: 'layout' | 'panel' - Full resizing layout or only the visible navigation panel.\n- **frame**: 'viewport' | 'contained' - Standalone Sidebar positioning. Viewport mode uses Theme's dynamic window-height token; contained mode fills a positioned parent.\n- **width**: string - Expanded width.\n- **widthIcon**: string - Icon-collapsed width.\n- **widthMobile**: string - Mobile drawer width.\n- **rail**: boolean | 'line' | 'thumb' - Edge toggle rail. `true` keeps the thin line style; `thumb` renders a short visible handle with the same full-height hitbox. The appearance is preserved when the rail shares the resize control.\n- **activityBar**: SidebarActivityBar - Icon rail pinned outside the panel, in layout mode only (`mode=\"panel\"` renders the panel alone and ignores it). It never slides off screen: only the panel takes the offcanvas offset, and the reserved layout column is the panel width plus the rail width. On mobile it renders as a horizontal row at the top of the drawer.\n- **expandOnHover**: boolean (default false) - With `collapsible=\"icon\"`, hovering or focusing into the collapsed panel expands it to `width` over the page (`data-peek=\"true\"`) while the reserved column stays at `widthIcon`, so page content does not reflow. The persisted collapsed state is untouched, and the peeked panel renders exactly like an expanded one: group headers, badges, search, inline submenus, and inline tree branches all come back, and the rail or resize handle travels to its inner edge.\n- **edgeReveal**: boolean (default true) - Pointer/focus edge preview for hidden offcanvas sidebars. Hover reveal overlays content, remains resizable when configured, and re-hides after the pointer leaves its small rectangular tolerance. Dragging the sidebar closed suppresses immediate hover reopening until the pointer leaves the edge trigger; toggle/click opens persistently.\n- **resizable**: boolean | SidebarResizableOptions - Enables pointer and keyboard resizing while expanded, icon-collapsed, or temporarily edge-revealed. By default, collapse requires dragging 75% of `minWidth` beyond the minimum; override `collapseThreshold` for a custom boundary. Use `storageKey` to restore and persist the expanded width across sessions.\n - `onWidthChange({ width, isUserInteraction })` reports every expanded-width change with one named payload: continuously while the user resizes (`isUserInteraction: true`) and once when a stored width is restored (`isUserInteraction: false`).\n\n### Content\n- **items**: SidebarGroup[] - Data-driven body navigation.\n- **headerButton** / **footerButton**: SidebarMenuButtonItem - Sticky large rows.\n- **search**: SidebarSearch - Header search input; use its native `oninput` handler.\n- **headerMenu** / **footerMenu**: SidebarMenuEntry[] - Sticky quick menus.\n- Menu entries and nested entries accept `size: 'small' | 'normal' | 'large'` for row geometry.\n- **header**, **content**, **footer**, **children**, **banner**: Snippet<[SidebarApi]> - Escape hatches. The `header` snippet renders **first** in the header region, above `headerButton`, `search` and `headerMenu`.\n\n### Styling\n- **class**: string - Classes applied to the Sidebar root.\n- **theme**: SidebarThemeProps - Semantic part overrides such as `panel`, `header`, `nav`, `footer`, menu, search, rail, and mobile drawer parts. Every part, with the element it lands on, its variants and their default classes, is listed in the entasis skill's `theme-parts/sidebar.md`; the registry key is `sidebar`.\n\n## Motion\n\n- **motion** theme slot: the y-axis slide shared by collapsible groups, inline submenus, and\n tree branches. Takes `in` / `out` slide params plus a `duration` / `easing` motion token.\n- Ladder: `<Theme components={{ sidebar: { motion } }}>` \u2192 `setSidebarTheme({ motion })` \u2192\n `theme.motion`. Reduced motion collapses it to 0.\n\n## Restyle recipes\n\nThe five asks that come up first, as the override to copy. Each one is rendered and asserted by\n`sidebar-recipes.svelte.test.ts`, so it cannot drift from the component. One rule behind them: a\ndefault written under a variant prefix (`data-[active-variant=solid]:data-active:bg-selected`,\n`data-[side=left]:border-r`) is only replaced by an override carrying the same prefixes; an\nunprefixed class coexists with it and loses on specificity. `theme-parts/sidebar.md` shows every\ndefault verbatim, prefixes included.\n\n- **Dark panel.** `dark` scopes the dark theme's variables to the panel, so every neutral ink inside\n flips with it (every theme also emits its variables on `.<name>`, so the class scopes the dark theme to one subtree); needs a theme named `dark`, which the documented setup declares.\n `theme={{ panel: { base: 'dark bg-slate-900' }, mobilePanel: { base: 'dark bg-slate-900' } }}`\n- **Active row in your colour.** `activeVariant=\"solid\"` plus the same prefix chain as the default:\n `theme={{ menuButton: { base: 'rounded-full', activeVariant: { solid: 'data-[active-variant=solid]:data-active:bg-indigo-600 data-[active-variant=solid]:data-active:text-white' } } }}`\n- **No hover change.** The overlay is a `::before` and the default also brightens the ink on hover:\n `theme={{ menuButton: { base: 'state-layer-none hover:text-inherit' }, subButton: { base: 'state-layer-none hover:text-neutral/70' } }}`\n- **Flat panel.** The edge is a prefixed `border-r` / `border-l` on the admin variant, the shadow a\n `raised-*` on the floating ones:\n `theme={{ panel: { base: 'raised-none', variant: { admin: 'data-[side=left]:border-r-0 data-[side=right]:border-l-0' } } }}`\n- **Row height.** A plain height beats the compound `h-control-*`: `theme={{ menuButton: { base: 'h-11' } }}`\n- **Bigger icons.** A prop, not a theme: `iconSize=\"large\"`.\n\n## Accessibility\n\n- The body navigation renders inside a named `<nav>` landmark (`data-sidebar=\"nav\"`), so assistive tech can jump straight to it and tell it apart from the activity bar's own landmark.\n- Active links set `aria-current=\"page\"`.\n- Collapsible rows and groups set `aria-expanded`.\n- Disabled buttons use `disabled`; disabled links omit `href`, use `aria-disabled` and `tabindex=-1`, and block activation.\n- Mobile drawer includes a backdrop button labelled \"Close Sidebar\".\n- Icon-collapsed rows keep their labels mounted and visually fade them, preserving accessible names and stable icon geometry.\n- Search, group controls, actions, and nested rows become inert before collapse can remove or hide them; focus returns to the owning visible row.\n- Nested groups, tree branches, and inline submenus use reversible height transitions for open, close, and sidebar-collapse changes.\n- Tree roots use menu-row styling and nested tree nodes use submenu-row styling. In desktop icon mode, root folders open a PopupMenu and descendants remain navigable through recursive Menu submenu popovers; root leaves retain direct navigation and tooltips.\n- When `rail` and `resizable` are both enabled, one edge control owns click-to-toggle, drag resize, and keyboard resize without overlapping hitboxes.\n- Hidden offcanvas sidebars keep that combined edge control while temporarily revealed. Resizing does not pin the sidebar open; leaving the panel, trigger, and handle tolerance re-hides it without discarding the configured width.\n- Both peeks (edge reveal and `expandOnHover`) stay open while focus is inside the panel or while an overlay opened from inside it is open, including nested submenus. They release about 120ms after the pointer, focus, and every such overlay are gone.\n- The activity bar is its own `<nav>` landmark with a `<ul>` of items, a roving tabindex, and ArrowUp/ArrowDown/Home/End navigation that loops and skips disabled items. Tab lands on the `isActive` item. Each square takes its accessible name from `label`, with a string or number `badge` appended to it, and shows `label` as a tooltip on hover and focus.\n- A hidden offcanvas panel is `inert`, so Tab never lands in a panel parked off screen; a peek makes it interactive again.\n\n## Notes\n\n- Dropdown menus use Entasis `PopupMenu` and `MenuItem[]`.\n- The component uses semantic Entasis tokens. Do not add shadcn `sidebar-*` color tokens.\n- Snippet icons from `entasis/icons/*` are the preferred icon format.\n";
@@ -157,7 +157,7 @@ Use for \`headerButton\`, \`footerButton\`, or direct \`<SidebarMenuButton />\`
157
157
 
158
158
  ### Styling
159
159
  - **class**: string - Classes applied to the Sidebar root.
160
- - **theme**: SidebarThemeProps - Semantic part overrides such as \`panel\`, \`header\`, \`nav\`, \`footer\`, menu, search, rail, and mobile drawer parts.
160
+ - **theme**: SidebarThemeProps - Semantic part overrides such as \`panel\`, \`header\`, \`nav\`, \`footer\`, menu, search, rail, and mobile drawer parts. Every part, with the element it lands on, its variants and their default classes, is listed in the entasis skill's \`theme-parts/sidebar.md\`; the registry key is \`sidebar\`.
161
161
 
162
162
  ## Motion
163
163
 
@@ -166,6 +166,28 @@ Use for \`headerButton\`, \`footerButton\`, or direct \`<SidebarMenuButton />\`
166
166
  - Ladder: \`<Theme components={{ sidebar: { motion } }}>\` → \`setSidebarTheme({ motion })\` →
167
167
  \`theme.motion\`. Reduced motion collapses it to 0.
168
168
 
169
+ ## Restyle recipes
170
+
171
+ The five asks that come up first, as the override to copy. Each one is rendered and asserted by
172
+ \`sidebar-recipes.svelte.test.ts\`, so it cannot drift from the component. One rule behind them: a
173
+ default written under a variant prefix (\`data-[active-variant=solid]:data-active:bg-selected\`,
174
+ \`data-[side=left]:border-r\`) is only replaced by an override carrying the same prefixes; an
175
+ unprefixed class coexists with it and loses on specificity. \`theme-parts/sidebar.md\` shows every
176
+ default verbatim, prefixes included.
177
+
178
+ - **Dark panel.** \`dark\` scopes the dark theme's variables to the panel, so every neutral ink inside
179
+ flips with it (every theme also emits its variables on \`.<name>\`, so the class scopes the dark theme to one subtree); needs a theme named \`dark\`, which the documented setup declares.
180
+ \`theme={{ panel: { base: 'dark bg-slate-900' }, mobilePanel: { base: 'dark bg-slate-900' } }}\`
181
+ - **Active row in your colour.** \`activeVariant="solid"\` plus the same prefix chain as the default:
182
+ \`theme={{ menuButton: { base: 'rounded-full', activeVariant: { solid: 'data-[active-variant=solid]:data-active:bg-indigo-600 data-[active-variant=solid]:data-active:text-white' } } }}\`
183
+ - **No hover change.** The overlay is a \`::before\` and the default also brightens the ink on hover:
184
+ \`theme={{ menuButton: { base: 'state-layer-none hover:text-inherit' }, subButton: { base: 'state-layer-none hover:text-neutral/70' } }}\`
185
+ - **Flat panel.** The edge is a prefixed \`border-r\` / \`border-l\` on the admin variant, the shadow a
186
+ \`raised-*\` on the floating ones:
187
+ \`theme={{ panel: { base: 'raised-none', variant: { admin: 'data-[side=left]:border-r-0 data-[side=right]:border-l-0' } } }}\`
188
+ - **Row height.** A plain height beats the compound \`h-control-*\`: \`theme={{ menuButton: { base: 'h-11' } }}\`
189
+ - **Bigger icons.** A prop, not a theme: \`iconSize="large"\`.
190
+
169
191
  ## Accessibility
170
192
 
171
193
  - The body navigation renders inside a named \`<nav>\` landmark (\`data-sidebar="nav"\`), so assistive tech can jump straight to it and tell it apart from the activity bar's own landmark.
@@ -22,9 +22,11 @@ const activeVariants = {
22
22
  // Icon and leading-media sizes. `size` sets them by default; `iconSize`, declared after it on the
23
23
  // panel parts, publishes the same variables and wins when a consumer sets it on its own.
24
24
  const sidebarSizeVariables = {
25
- small: '[--sidebar-icon-size:0.875rem] [--sidebar-media-size:1.75rem] [--sidebar-compact-media-size:1rem]',
26
- normal: '[--sidebar-icon-size:1rem] [--sidebar-media-size:2rem] [--sidebar-compact-media-size:1.25rem]',
27
- large: '[--sidebar-icon-size:1.25rem] [--sidebar-media-size:2.25rem] [--sidebar-compact-media-size:1.5rem]'
25
+ // The same tokens the rest of the kit sizes icons and media by, so a `spacing` retune still
26
+ // reaches the sidebar; `iconSize` simply republishes them one step up or down.
27
+ small: '[--sidebar-icon-size:var(--icon-size-sm)] [--sidebar-media-size:calc(var(--spacing)*7)] [--sidebar-compact-media-size:calc(var(--spacing)*4)]',
28
+ normal: '[--sidebar-icon-size:var(--icon-size-md)] [--sidebar-media-size:calc(var(--spacing)*8)] [--sidebar-compact-media-size:calc(var(--spacing)*5)]',
29
+ large: '[--sidebar-icon-size:var(--icon-size-lg)] [--sidebar-media-size:calc(var(--spacing)*9)] [--sidebar-compact-media-size:calc(var(--spacing)*6)]'
28
30
  };
29
31
  const sidebarDensityVariables = {
30
32
  // The same spacing tokens the group's `p-sm/md/lg` resolve to, so anything positioned from
@@ -123,16 +125,16 @@ const defaultGroup = cva({
123
125
  }
124
126
  });
125
127
  const defaultGroupLabel = cva({
126
- base: 'text-neutral/70 flex shrink-0 items-center rounded-sm font-medium outline-none transition-[height,margin,padding,opacity] duration-normal ease-linear group-data-[collapsible=icon]:opacity-0 disabled:pointer-events-none [&>svg]:shrink-0',
128
+ base: 'text-neutral/70 flex shrink-0 items-center rounded-sm font-medium outline-none transition-[height,margin,padding,opacity] duration-normal ease-linear group-data-[collapsible=icon]:opacity-0 disabled:pointer-events-none [&>svg]:shrink-0 [&>svg]:size-[var(--sidebar-icon-size)]',
127
129
  variants: {
128
130
  interactive: {
129
131
  true: 'state-layer hover:text-neutral focus-visible:ring-2 focus-visible:ring-focus/50',
130
132
  false: null
131
133
  },
132
134
  size: {
133
- small: 'h-control-sm text-xs group-data-[collapsible=icon]:-mt-layout-md [&>svg]:size-icon-sm',
134
- normal: 'h-control-md text-sm group-data-[collapsible=icon]:-mt-layout-lg [&>svg]:size-icon-md',
135
- large: 'h-control-lg text-sm group-data-[collapsible=icon]:-mt-layout-lg [&>svg]:size-icon-lg'
135
+ small: 'h-control-sm text-xs group-data-[collapsible=icon]:-mt-layout-md',
136
+ normal: 'h-control-md text-sm group-data-[collapsible=icon]:-mt-layout-lg',
137
+ large: 'h-control-lg text-sm group-data-[collapsible=icon]:-mt-layout-lg'
136
138
  },
137
139
  density: {
138
140
  compact: 'px-md',
@@ -193,7 +195,7 @@ const defaultMenu = cva({
193
195
  }
194
196
  });
195
197
  const defaultMenuButton = cva({
196
- base: 'state-layer peer/menu-button group/menu-button flex w-full items-center overflow-hidden rounded-sm text-left outline-none transition-[background,color,width,height,padding,margin,border-radius] duration-normal ease-linear hover:text-neutral focus-visible:ring-2 focus-visible:ring-focus/50 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:font-medium group-has-data-[sidebar=menu-action]/menu-item:pr-layout-lg group-data-[collapsible=icon]:mx-[calc((var(--sidebar-width-icon)-var(--sidebar-icon-button-width))/2-var(--sidebar-group-padding))] group-data-[collapsible=icon]:w-[var(--sidebar-icon-button-width)] group-data-[collapsible=icon]:rounded-none group-data-[variant=admin]:group-data-[collapsible=icon]:rounded-sm group-data-[variant=framed]:group-data-[collapsible=icon]:rounded-sm group-data-[variant=inset]:group-data-[collapsible=icon]:rounded-sm group-data-[collapsible=icon]:![padding-inline:calc((var(--sidebar-icon-button-width)-var(--sidebar-icon-size))/2)] group-data-[collapsible=icon]:ring-inset [&_svg]:shrink-0',
198
+ base: 'state-layer peer/menu-button group/menu-button flex w-full items-center overflow-hidden rounded-sm text-left outline-none transition-[background,color,width,height,padding,margin,border-radius] duration-normal ease-linear hover:text-neutral focus-visible:ring-2 focus-visible:ring-focus/50 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:font-medium group-has-data-[sidebar=menu-action]/menu-item:pr-layout-lg group-data-[collapsible=icon]:mx-[calc((var(--sidebar-width-icon)-var(--sidebar-icon-button-width))/2-var(--sidebar-group-padding))] group-data-[collapsible=icon]:w-[var(--sidebar-icon-button-width)] group-data-[collapsible=icon]:rounded-none group-data-[variant=admin]:group-data-[collapsible=icon]:rounded-sm group-data-[variant=framed]:group-data-[collapsible=icon]:rounded-sm group-data-[variant=inset]:group-data-[collapsible=icon]:rounded-sm group-data-[collapsible=icon]:![padding-inline:calc((var(--sidebar-icon-button-width)-var(--sidebar-icon-size))/2)] group-data-[collapsible=icon]:ring-inset [&_svg]:shrink-0 [&_svg]:size-[var(--sidebar-icon-size)]',
197
199
  variants: {
198
200
  activeVariant: activeVariants,
199
201
  variant: {
@@ -201,9 +203,9 @@ const defaultMenuButton = cva({
201
203
  outline: 'border border-neutral-muted bg-surface'
202
204
  },
203
205
  size: {
204
- small: 'text-xs leading-4 [&_svg]:size-icon-sm',
205
- normal: 'text-sm leading-5 [&_svg]:size-icon-md',
206
- large: 'text-base leading-6 [&_svg]:size-icon-lg'
206
+ small: 'text-xs leading-4',
207
+ normal: 'text-sm leading-5',
208
+ large: 'text-base leading-6'
207
209
  },
208
210
  density: {
209
211
  compact: 'gap-sm px-sm',
@@ -253,12 +255,12 @@ const defaultMenuSecondary = cva({
253
255
  }
254
256
  });
255
257
  const defaultMenuTrailing = cva({
256
- base: 'ml-auto shrink-0 opacity-100 transition-[opacity,transform] duration-normal ease-standard group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:translate-x-1 group-data-[collapsible=icon]:opacity-0',
258
+ base: 'ml-auto shrink-0 opacity-100 transition-[opacity,transform] duration-normal ease-standard group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:translate-x-1 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-[var(--sidebar-icon-size)]',
257
259
  variants: {
258
260
  size: {
259
- small: '[&>svg]:size-icon-sm',
260
- normal: '[&>svg]:size-icon-md',
261
- large: '[&>svg]:size-icon-lg'
261
+ small: '',
262
+ normal: '',
263
+ large: ''
262
264
  }
263
265
  },
264
266
  defaultVariants: {
@@ -292,13 +294,13 @@ const defaultTreeSubMenu = cva({
292
294
  }
293
295
  });
294
296
  const defaultSubButton = cva({
295
- base: 'state-layer text-neutral/70 hover:text-neutral flex min-w-0 -translate-x-px items-center overflow-hidden rounded-sm outline-none transition-[background,color,height,padding] duration-normal ease-linear focus-visible:ring-2 focus-visible:ring-focus/50 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0',
297
+ base: 'state-layer text-neutral/70 hover:text-neutral flex min-w-0 -translate-x-px items-center overflow-hidden rounded-sm outline-none transition-[background,color,height,padding] duration-normal ease-linear focus-visible:ring-2 focus-visible:ring-focus/50 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0 [&>svg]:size-[var(--sidebar-icon-size)]',
296
298
  variants: {
297
299
  activeVariant: activeVariants,
298
300
  size: {
299
- small: 'h-6 text-xs leading-4 [&>svg]:size-icon-sm',
300
- normal: 'h-control-sm text-sm leading-5 [&>svg]:size-icon-md',
301
- large: 'h-control-md text-base leading-6 [&>svg]:size-icon-lg'
301
+ small: 'h-6 text-xs leading-4',
302
+ normal: 'h-control-sm text-sm leading-5',
303
+ large: 'h-control-md text-base leading-6'
302
304
  },
303
305
  density: {
304
306
  compact: 'gap-sm px-md',
@@ -319,12 +321,12 @@ const defaultSubButton = cva({
319
321
  }
320
322
  });
321
323
  const defaultMenuAction = cva({
322
- base: 'state-layer text-neutral hover:text-neutral peer-hover/menu-button:text-neutral absolute top-1/2 flex aspect-square -translate-y-1/2 items-center justify-center rounded-sm p-0 opacity-100 outline-none transition group-data-[collapsible=icon]:hidden focus-visible:ring-2 focus-visible:ring-focus/50 md:opacity-0 group-focus-within/menu-row:opacity-100 group-hover/menu-row:opacity-100 has-[[aria-expanded=true]]:opacity-100 [&>svg]:shrink-0',
324
+ base: 'state-layer text-neutral hover:text-neutral peer-hover/menu-button:text-neutral absolute top-1/2 flex aspect-square -translate-y-1/2 items-center justify-center rounded-sm p-0 opacity-100 outline-none transition group-data-[collapsible=icon]:hidden focus-visible:ring-2 focus-visible:ring-focus/50 md:opacity-0 group-focus-within/menu-row:opacity-100 group-hover/menu-row:opacity-100 has-[[aria-expanded=true]]:opacity-100 [&>svg]:shrink-0 [&>svg]:size-[var(--sidebar-icon-size)]',
323
325
  variants: {
324
326
  size: {
325
- small: 'size-4.5 [&>svg]:size-icon-sm',
326
- normal: 'size-5 [&>svg]:size-icon-md',
327
- large: 'size-6 [&>svg]:size-icon-lg'
327
+ small: 'size-4.5',
328
+ normal: 'size-5',
329
+ large: 'size-6'
328
330
  },
329
331
  density: {
330
332
  compact: 'right-0.5',
@@ -340,12 +342,12 @@ const defaultMenuAction = cva({
340
342
  // One icon-only ghost button box. `size` follows the descriptor, defaulting to the Sidebar size,
341
343
  // so a group's `+` lands at row scale instead of at the group label's scale.
342
344
  const defaultActionSlot = cva({
343
- base: 'state-layer text-neutral hover:text-neutral flex aspect-square shrink-0 items-center justify-center rounded-sm p-0 outline-none transition focus-visible:ring-2 focus-visible:ring-focus/50 [&>svg]:shrink-0',
345
+ base: 'state-layer text-neutral hover:text-neutral flex aspect-square shrink-0 items-center justify-center rounded-sm p-0 outline-none transition focus-visible:ring-2 focus-visible:ring-focus/50 [&>svg]:shrink-0 [&>svg]:size-[var(--sidebar-icon-size)]',
344
346
  variants: {
345
347
  size: {
346
- small: 'h-control-sm [&>svg]:size-icon-sm',
347
- normal: 'h-control-md [&>svg]:size-icon-md',
348
- large: 'h-control-lg [&>svg]:size-icon-lg'
348
+ small: 'h-control-sm',
349
+ normal: 'h-control-md',
350
+ large: 'h-control-lg'
349
351
  }
350
352
  },
351
353
  defaultVariants: {
@@ -383,12 +385,12 @@ const defaultButtonRow = cva({
383
385
  base: 'flex w-full min-w-0 items-center gap-micro'
384
386
  });
385
387
  const defaultActionTrigger = cva({
386
- base: 'flex size-full items-center justify-center rounded-sm bg-transparent outline-none [&>svg]:shrink-0',
388
+ base: 'flex size-full items-center justify-center rounded-sm bg-transparent outline-none [&>svg]:shrink-0 [&>svg]:size-[var(--sidebar-icon-size)]',
387
389
  variants: {
388
390
  size: {
389
- small: '[&>svg]:size-icon-sm',
390
- normal: '[&>svg]:size-icon-md',
391
- large: '[&>svg]:size-icon-lg'
391
+ small: '',
392
+ normal: '',
393
+ large: ''
392
394
  }
393
395
  },
394
396
  defaultVariants: {
@@ -678,8 +680,8 @@ const defaultMedia = cva({
678
680
  base: 'bg-neutral text-neutral-contrast flex aspect-square shrink-0 items-center justify-center rounded-sm',
679
681
  variants: {
680
682
  itemSize: {
681
- normal: 'text-xs',
682
- large: ''
683
+ normal: 'text-xs size-[var(--sidebar-compact-media-size)]',
684
+ large: `size-[var(--sidebar-media-size)] [&_svg]:size-[var(--sidebar-icon-size)]`
683
685
  },
684
686
  size: {
685
687
  small: '',
@@ -688,12 +690,9 @@ const defaultMedia = cva({
688
690
  }
689
691
  },
690
692
  compoundVariants: [
691
- { itemSize: 'large', size: 'small', class: 'size-7 [&_svg]:size-icon-sm' },
692
- { itemSize: 'large', size: 'normal', class: 'size-8 [&_svg]:size-icon-md' },
693
- { itemSize: 'large', size: 'large', class: 'size-9 [&_svg]:size-icon-lg' },
694
- { itemSize: 'normal', size: 'small', class: 'size-4 [&_svg]:size-icon-xs' },
695
- { itemSize: 'normal', size: 'normal', class: 'size-5 [&_svg]:size-icon-xs' },
696
- { itemSize: 'normal', size: 'large', class: 'size-6 [&_svg]:size-icon-sm' }
693
+ { itemSize: 'normal', size: 'small', class: '[&_svg]:size-icon-xs' },
694
+ { itemSize: 'normal', size: 'normal', class: '[&_svg]:size-icon-xs' },
695
+ { itemSize: 'normal', size: 'large', class: '[&_svg]:size-icon-sm' }
697
696
  ],
698
697
  defaultVariants: {
699
698
  itemSize: 'large',
@@ -701,12 +700,12 @@ const defaultMedia = cva({
701
700
  }
702
701
  });
703
702
  const defaultAvatar = cva({
704
- base: 'bg-neutral-muted text-neutral-muted-readable flex shrink-0 items-center justify-center overflow-hidden rounded-sm font-medium',
703
+ base: 'bg-neutral-muted text-neutral-muted-readable flex shrink-0 items-center justify-center overflow-hidden rounded-sm font-medium size-[var(--sidebar-media-size)]',
705
704
  variants: {
706
705
  size: {
707
- small: 'size-7 text-xs',
708
- normal: 'size-8 text-sm',
709
- large: 'size-9 text-sm'
706
+ small: 'text-xs',
707
+ normal: 'text-sm',
708
+ large: 'text-sm'
710
709
  }
711
710
  },
712
711
  defaultVariants: {
@@ -85,5 +85,5 @@ export const sortableListTheme = {
85
85
  handle: defaultHandle,
86
86
  empty: defaultEmpty
87
87
  };
88
- export const setSortableListTheme = setComponentTheme('sortableList');
89
- export const useSortableListTheme = useComponentTheme('sortableList', sortableListTheme);
88
+ export const setSortableListTheme = setComponentTheme('sortable-list');
89
+ export const useSortableListTheme = useComponentTheme('sortable-list', sortableListTheme);
@@ -1 +1 @@
1
- export declare const spinnerTextDescription = "\n# SpinnerText Component\n\nSpinnerText combines the existing Spinner with a stable-width sequence of loading messages. Messages cycle on a configurable delay and transition vertically or through a left-to-right reveal without shifting surrounding layout.\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n\timport { SpinnerText } from 'entasis/spinner-text';\n</script>\n```\n\n## Basic usage\n\n```svelte\n<SpinnerText\n\ttexts={['Reading files', 'Building context', 'Preparing answer']}\n\tdelay={1800}\n\tshimmer\n/>\n```\n\n## Props\n\n- **texts**: `readonly string[]` (required) - Messages displayed in sequence. The first message is rendered during SSR.\n- **delay**: `number` (default: `2200`) - Milliseconds between message changes. Zero, negative, and non-finite values pause cycling.\n- **transition**: `'vertical' | 'reveal'` (default: `'vertical'`) - Moves the outgoing message down while the next enters from above, or replaces both through opposing left-to-right clip reveals.\n- **shimmer**: `boolean` (default: `false`) - Applies the Entasis shimmer utility to the active message.\n- **showSpinner**: `boolean` (default: `true`) - Shows or hides the leading Spinner.\n- **spinnerVariant**: `'default' | 'grid' | 'pulse' | 'puff' | 'lines' | 'circles'` (default: Theme `spinnerVariant`, then `'default'`) - Overrides the global spinner animation for this instance.\n- **spinner**: `Snippet<[SpinnerTextSpinnerPayload]>` - Replaces the default visual spinner. Receives the resolved `color`, `size`, and `variant`.\n- **size**: `'small' | 'normal' | 'large'` (default: `'normal'`) - Controls spinner dimensions, gap, text size, and line height.\n- **color**: `Colors` (default: `'neutral'`) - Semantic color applied to both spinner and text.\n- **label**: `string` (default: `'Loading'`) - Accessible fallback when `texts` is empty.\n- **ref**: `HTMLElement | null` (bindable) - Root status element.\n- **class**: `string` - Additional root classes.\n- **theme**: `SpinnerTextThemeProps` - Per-instance theme overrides.\n\nStandard Svelte attachments are spread onto the root status element.\n\n## Custom spinner\n\n```svelte\n<script lang=\"ts\">\n\timport { Spinner } from 'entasis/spinner';\n\timport { SpinnerText } from 'entasis/spinner-text';\n</script>\n\n<SpinnerText texts={['Thinking', 'Composing']} color=\"primary\">\n\t{#snippet spinner({ size, color })}\n\t\t<Spinner variant=\"circles\" decorative {size} {color} />\n\t{/snippet}\n</SpinnerText>\n```\n\n## Behavior\n\n- A root attachment owns the interval and restarts it when `texts` length or `delay` changes.\n- One or zero messages do not create an interval.\n- All messages occupy the same hidden CSS grid cell, so the component reserves the width of its longest message and does not resize on every transition.\n- The vertical transition uses the design system's configured duration and easing.\n- The reveal transition clips the outgoing text from the left while revealing the incoming text from the left.\n- Vertical uses 1.5 times the configured theme duration; reveal uses 2.5 times that duration. Both use the configured easing.\n- The default Spinner is visually reduced one step relative to the message line height. Custom spinner snippets retain full control over their dimensions.\n- Shimmer behavior remains owned by the existing global shimmer utility.\n- The default indicator delegates to Spinner and remains compatible with global spinner theme configuration.\n\n## Accessibility\n\n- The root uses `role=\"status\"`, `aria-live=\"polite\"`, and `aria-atomic=\"true\"`.\n- Visual transition layers and the spinner are hidden from assistive technology.\n- A single screen-reader-only message changes with the active text, avoiding duplicate announcements while outgoing and incoming visual layers overlap.\n- When `texts` is empty, `label` supplies the accessible status name.\n\n## Theme parts\n\n- **root** - Inline status wrapper, semantic color, and size-specific gap.\n- **spinner** - Default or custom spinner container.\n- **viewport** - Clipped text transition viewport.\n- **sizer** - Hidden grid that reserves the longest message width.\n- **sizerItem** - Individual hidden sizing message.\n- **message** - Active visual message and optional shimmer state.\n\n## Motion\n\n- **motion** theme slot, keyed by `mode`: the `vertical` slide runs on `slow`, the `reveal`\n wipe on `slower`. Only `duration` / `easing` are read; the geometry is fixed.\n- Ladder: `<Theme components={{ spinnerText: { motion } }}>` \u2192 `setSpinnerTextTheme({ motion })`\n \u2192 `theme.motion`. Reduced motion collapses it to 0 (the text swaps instantly).\n";
1
+ export declare const spinnerTextDescription = "\n# SpinnerText Component\n\nSpinnerText combines the existing Spinner with a stable-width sequence of loading messages. Messages cycle on a configurable delay and transition vertically or through a left-to-right reveal without shifting surrounding layout.\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n\timport { SpinnerText } from 'entasis/spinner-text';\n</script>\n```\n\n## Basic usage\n\n```svelte\n<SpinnerText\n\ttexts={['Reading files', 'Building context', 'Preparing answer']}\n\tdelay={1800}\n\tshimmer\n/>\n```\n\n## Props\n\n- **texts**: `readonly string[]` (required) - Messages displayed in sequence. The first message is rendered during SSR.\n- **delay**: `number` (default: `2200`) - Milliseconds between message changes. Zero, negative, and non-finite values pause cycling.\n- **transition**: `'vertical' | 'reveal'` (default: `'vertical'`) - Moves the outgoing message down while the next enters from above, or replaces both through opposing left-to-right clip reveals.\n- **shimmer**: `boolean` (default: `false`) - Applies the Entasis shimmer utility to the active message.\n- **showSpinner**: `boolean` (default: `true`) - Shows or hides the leading Spinner.\n- **spinnerVariant**: `'default' | 'grid' | 'pulse' | 'puff' | 'lines' | 'circles'` (default: Theme `spinnerVariant`, then `'default'`) - Overrides the global spinner animation for this instance.\n- **spinner**: `Snippet<[SpinnerTextSpinnerPayload]>` - Replaces the default visual spinner. Receives the resolved `color`, `size`, and `variant`.\n- **size**: `'small' | 'normal' | 'large'` (default: `'normal'`) - Controls spinner dimensions, gap, text size, and line height.\n- **color**: `Colors` (default: `'neutral'`) - Semantic color applied to both spinner and text.\n- **label**: `string` (default: `'Loading'`) - Accessible fallback when `texts` is empty.\n- **ref**: `HTMLElement | null` (bindable) - Root status element.\n- **class**: `string` - Additional root classes.\n- **theme**: `SpinnerTextThemeProps` - Per-instance theme overrides.\n\nStandard Svelte attachments are spread onto the root status element.\n\n## Custom spinner\n\n```svelte\n<script lang=\"ts\">\n\timport { Spinner } from 'entasis/spinner';\n\timport { SpinnerText } from 'entasis/spinner-text';\n</script>\n\n<SpinnerText texts={['Thinking', 'Composing']} color=\"primary\">\n\t{#snippet spinner({ size, color })}\n\t\t<Spinner variant=\"circles\" decorative {size} {color} />\n\t{/snippet}\n</SpinnerText>\n```\n\n## Behavior\n\n- A root attachment owns the interval and restarts it when `texts` length or `delay` changes.\n- One or zero messages do not create an interval.\n- All messages occupy the same hidden CSS grid cell, so the component reserves the width of its longest message and does not resize on every transition.\n- The vertical transition uses the design system's configured duration and easing.\n- The reveal transition clips the outgoing text from the left while revealing the incoming text from the left.\n- Vertical uses 1.5 times the configured theme duration; reveal uses 2.5 times that duration. Both use the configured easing.\n- The default Spinner is visually reduced one step relative to the message line height. Custom spinner snippets retain full control over their dimensions.\n- Shimmer behavior remains owned by the existing global shimmer utility.\n- The default indicator delegates to Spinner and remains compatible with global spinner theme configuration.\n\n## Accessibility\n\n- The root uses `role=\"status\"`, `aria-live=\"polite\"`, and `aria-atomic=\"true\"`.\n- Visual transition layers and the spinner are hidden from assistive technology.\n- A single screen-reader-only message changes with the active text, avoiding duplicate announcements while outgoing and incoming visual layers overlap.\n- When `texts` is empty, `label` supplies the accessible status name.\n\n## Theme parts\n\n- **root** - Inline status wrapper, semantic color, and size-specific gap.\n- **spinner** - Default or custom spinner container.\n- **viewport** - Clipped text transition viewport.\n- **sizer** - Hidden grid that reserves the longest message width.\n- **sizerItem** - Individual hidden sizing message.\n- **message** - Active visual message and optional shimmer state.\n\n## Motion\n\n- **motion** theme slot, keyed by `mode`: the `vertical` slide runs on `slow`, the `reveal`\n wipe on `slower`. Only `duration` / `easing` are read; the geometry is fixed.\n- Ladder: `<Theme components={{ 'spinner-text': { motion } }}>` \u2192 `setSpinnerTextTheme({ motion })`\n \u2192 `theme.motion`. Reduced motion collapses it to 0 (the text swaps instantly).\n";
@@ -86,6 +86,6 @@ Standard Svelte attachments are spread onto the root status element.
86
86
 
87
87
  - **motion** theme slot, keyed by \`mode\`: the \`vertical\` slide runs on \`slow\`, the \`reveal\`
88
88
  wipe on \`slower\`. Only \`duration\` / \`easing\` are read; the geometry is fixed.
89
- - Ladder: \`<Theme components={{ spinnerText: { motion } }}>\` → \`setSpinnerTextTheme({ motion })\`
89
+ - Ladder: \`<Theme components={{ 'spinner-text': { motion } }}>\` → \`setSpinnerTextTheme({ motion })\`
90
90
  → \`theme.motion\`. Reduced motion collapses it to 0 (the text swaps instantly).
91
91
  `;
@@ -98,6 +98,6 @@ export const spinnerTextTheme = {
98
98
  sizerItem: defaultSizerItem,
99
99
  message: defaultMessage
100
100
  };
101
- export const setSpinnerTextTheme = setComponentTheme('spinnerText');
101
+ export const setSpinnerTextTheme = setComponentTheme('spinner-text');
102
102
  export const useSpinnerTextTheme = useComponentTheme('spinnerText', spinnerTextTheme);
103
- export const useSpinnerTextMotion = () => useComponentMotion('spinnerText', defaultSpinnerTextMotion);
103
+ export const useSpinnerTextMotion = () => useComponentMotion('spinner-text', defaultSpinnerTextMotion);
@@ -97,5 +97,5 @@ export const toggleButtonTheme = {
97
97
  prefix: defaultToggleButtonPrefix,
98
98
  suffix: defaultToggleButtonSuffix
99
99
  };
100
- export const setToggleButtonTheme = setComponentTheme('toggleButton');
100
+ export const setToggleButtonTheme = setComponentTheme('toggle-button');
101
101
  export const useToggleButtonTheme = useComponentTheme('toggleButton', toggleButtonTheme);
@@ -15,5 +15,5 @@ const defaultToggleButtonGroup = cva({
15
15
  export const toggleButtonGroupTheme = {
16
16
  root: defaultToggleButtonGroup
17
17
  };
18
- export const setToggleButtonGroupTheme = setComponentTheme('toggleButtonGroup');
18
+ export const setToggleButtonGroupTheme = setComponentTheme('toggle-button-group');
19
19
  export const useToggleButtonGroupTheme = useComponentTheme('toggleButtonGroup', toggleButtonGroupTheme);
@@ -18,5 +18,5 @@ export const toggleMenuTheme = {
18
18
  unit: defaultToggleMenuUnit,
19
19
  more: defaultToggleMenuMore
20
20
  };
21
- export const setToggleMenuTheme = setComponentTheme('toggleMenu');
22
- export const useToggleMenuTheme = useComponentTheme('toggleMenu', toggleMenuTheme);
21
+ export const setToggleMenuTheme = setComponentTheme('toggle-menu');
22
+ export const useToggleMenuTheme = useComponentTheme('toggle-menu', toggleMenuTheme);
@@ -314,5 +314,5 @@ export const videoPlayerTheme = {
314
314
  popoverPanel: defaultVideoPlayerPopoverPanel,
315
315
  volumePanel: defaultVideoPlayerVolumePanel
316
316
  };
317
- export const setVideoPlayerTheme = setComponentTheme('videoPlayer');
318
- export const useVideoPlayerTheme = useComponentTheme('videoPlayer', videoPlayerTheme);
317
+ export const setVideoPlayerTheme = setComponentTheme('video-player');
318
+ export const useVideoPlayerTheme = useComponentTheme('video-player', videoPlayerTheme);