entasis 0.4.1 → 0.6.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 (180) hide show
  1. package/README.md +1 -0
  2. package/dist/attachments/spinnerOverlay.theme.d.ts +2 -36
  3. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.d.ts +2 -30
  4. package/dist/components/AIChat/aiChat.theme.d.ts +2 -14
  5. package/dist/components/AIComposer/aiComposer.theme.d.ts +2 -50
  6. package/dist/components/AIContext/aiContext.theme.d.ts +2 -37
  7. package/dist/components/AIConversation/aiConversation.theme.d.ts +2 -4
  8. package/dist/components/AIFilePreview/aiFilePreview.theme.d.ts +2 -17
  9. package/dist/components/AIMarker/aiMarker.theme.d.ts +2 -18
  10. package/dist/components/AIMessage/aiMessage.theme.d.ts +2 -72
  11. package/dist/components/AIMessageActions/aiMessageActions.theme.d.ts +2 -29
  12. package/dist/components/AIModelSelector/aiModelSelector.theme.d.ts +2 -25
  13. package/dist/components/AIReasoning/aiReasoning.theme.d.ts +2 -9
  14. package/dist/components/AISuggestion/aiSuggestion.theme.d.ts +2 -6
  15. package/dist/components/AIThread/aiThread.theme.d.ts +2 -35
  16. package/dist/components/AIThreadToc/aiThreadToc.theme.d.ts +2 -44
  17. package/dist/components/AITool/aiTool.mcp.d.ts +1 -1
  18. package/dist/components/AITool/aiTool.mcp.js +1 -1
  19. package/dist/components/AITool/aiTool.theme.d.ts +2 -170
  20. package/dist/components/AITool/aiTool.theme.js +14 -12
  21. package/dist/components/Accordion/accordion.theme.d.ts +2 -135
  22. package/dist/components/Alert/alert.theme.d.ts +2 -88
  23. package/dist/components/AppShell/appShell.theme.d.ts +2 -34
  24. package/dist/components/AspectRatio/aspectRatio.theme.d.ts +2 -5
  25. package/dist/components/AudioPlayer/audioPlayer.theme.d.ts +2 -179
  26. package/dist/components/Avatar/avatar.theme.d.ts +2 -38
  27. package/dist/components/Avatar/avatarGroup.theme.d.ts +2 -17
  28. package/dist/components/Breadcrumbs/breadcrumbs.theme.d.ts +2 -33
  29. package/dist/components/Button/Button.svelte +15 -13
  30. package/dist/components/Button/button.theme.d.ts +2 -55
  31. package/dist/components/ButtonGroup/buttonGroup.theme.d.ts +2 -4
  32. package/dist/components/Card/card.theme.d.ts +2 -119
  33. package/dist/components/Carousel/carousel.theme.d.ts +2 -73
  34. package/dist/components/Chart/chart.theme.d.ts +2 -24
  35. package/dist/components/Chip/chip.theme.d.ts +2 -56
  36. package/dist/components/Code/code.theme.d.ts +2 -9
  37. package/dist/components/Collapsible/collapsible.theme.d.ts +2 -44
  38. package/dist/components/Command/command.theme.d.ts +2 -103
  39. package/dist/components/Confirmation/confirmation.theme.d.ts +2 -10
  40. package/dist/components/ContextMenu/contextMenu.theme.d.ts +2 -10
  41. package/dist/components/DataTable/dataTable.theme.d.ts +2 -160
  42. package/dist/components/Dialog/Dialog.svelte +16 -0
  43. package/dist/components/Dialog/dialog.mcp.d.ts +1 -1
  44. package/dist/components/Dialog/dialog.mcp.js +2 -1
  45. package/dist/components/Dialog/dialog.props.d.ts +5 -0
  46. package/dist/components/Dialog/dialog.theme.d.ts +2 -137
  47. package/dist/components/Dialog/dialog.theme.js +12 -8
  48. package/dist/components/Diff/diff.theme.d.ts +2 -6
  49. package/dist/components/DocumentViewer/documentViewer.theme.d.ts +2 -87
  50. package/dist/components/Empty/empty.theme.d.ts +2 -71
  51. package/dist/components/EventCalendar/eventCalendar.theme.d.ts +2 -3171
  52. package/dist/components/FloatingWindow/floatingWindow.theme.d.ts +2 -96
  53. package/dist/components/Form/Calendar/CalendarPrimitive.svelte.d.ts +2 -63
  54. package/dist/components/Form/Calendar/calendar.theme.d.ts +2 -63
  55. package/dist/components/Form/CheckboxesInput/checkboxesInput.theme.d.ts +2 -100
  56. package/dist/components/Form/ColorInput/colorInput.theme.d.ts +2 -32
  57. package/dist/components/Form/ColorPicker/colorPicker.theme.d.ts +2 -127
  58. package/dist/components/Form/Combobox/combobox.theme.d.ts +2 -50
  59. package/dist/components/Form/DateInput/dateInput.theme.d.ts +2 -26
  60. package/dist/components/Form/DateSelector/dateSelector.theme.d.ts +2 -17
  61. package/dist/components/Form/Field/field.theme.d.ts +2 -146
  62. package/dist/components/Form/File/fileInput.theme.d.ts +2 -41
  63. package/dist/components/Form/Form/form.state.svelte.d.ts +4 -4
  64. package/dist/components/Form/Form/form.theme.d.ts +2 -129
  65. package/dist/components/Form/Form/visibility.d.ts +54 -54
  66. package/dist/components/Form/KeyValueInput/keyValueInput.theme.d.ts +2 -50
  67. package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.d.ts +4 -4
  68. package/dist/components/Form/MultiStepForm/multiStepForm.theme.d.ts +2 -25
  69. package/dist/components/Form/NumberInput/numberInput.theme.d.ts +2 -25
  70. package/dist/components/Form/PasswordInput/passwordInput.theme.d.ts +2 -25
  71. package/dist/components/Form/PhoneInput/phoneInput.theme.d.ts +2 -112
  72. package/dist/components/Form/PinInput/pinInput.theme.d.ts +2 -38
  73. package/dist/components/Form/RadioInput/radioInput.theme.d.ts +2 -94
  74. package/dist/components/Form/Select/select.theme.d.ts +2 -71
  75. package/dist/components/Form/Slider/slider.theme.d.ts +2 -266
  76. package/dist/components/Form/Switch/switch.theme.d.ts +2 -40
  77. package/dist/components/Form/TagGroup/tagGroup.theme.d.ts +2 -19
  78. package/dist/components/Form/TagsInput/tagsInput.theme.d.ts +2 -53
  79. package/dist/components/Form/TextArea/textArea.theme.d.ts +2 -25
  80. package/dist/components/Form/TextInput/textInput.theme.d.ts +2 -25
  81. package/dist/components/Form/TimeInput/timeInput.theme.d.ts +2 -47
  82. package/dist/components/Form/VoiceInput/voiceInput.theme.d.ts +2 -155
  83. package/dist/components/GanttChart/ganttChart.theme.d.ts +2 -2478
  84. package/dist/components/Globe/globe.theme.d.ts +2 -13
  85. package/dist/components/Grid/grid.theme.d.ts +2 -18
  86. package/dist/components/Grid/gridSpan.theme.d.ts +2 -4
  87. package/dist/components/Heading/heading.theme.d.ts +2 -41
  88. package/dist/components/Hitbox/hitbox.theme.d.ts +2 -10
  89. package/dist/components/HoverCard/hoverCard.theme.d.ts +11 -27
  90. package/dist/components/HoverCard/hoverCard.theme.js +9 -4
  91. package/dist/components/ImageGallery/imageGallery.theme.d.ts +2 -6
  92. package/dist/components/ImageZoom/imageZoom.theme.d.ts +2 -16
  93. package/dist/components/Kanban/kanban.theme.d.ts +2 -60
  94. package/dist/components/Kbd/kbd.theme.d.ts +2 -33
  95. package/dist/components/Layout/layoutSpacing.d.ts +1 -1
  96. package/dist/components/LinkPreview/linkPreview.theme.d.ts +2 -58
  97. package/dist/components/Map/map.theme.d.ts +2 -14
  98. package/dist/components/Markdown/markdown.theme.d.ts +2 -10
  99. package/dist/components/Marquee/marquee.theme.d.ts +2 -37
  100. package/dist/components/MediaVolume/mediaVolumeControl.theme.d.ts +2 -22
  101. package/dist/components/Menu/menu.theme.d.ts +2 -12
  102. package/dist/components/MenuBar/menuBar.theme.d.ts +2 -16
  103. package/dist/components/MenuOption/menuOption.theme.d.ts +2 -75
  104. package/dist/components/Mermaid/mermaid.theme.d.ts +2 -15
  105. package/dist/components/MetadataList/metadataList.theme.d.ts +2 -97
  106. package/dist/components/Meter/meter.theme.d.ts +2 -111
  107. package/dist/components/MiniCalendar/miniCalendar.theme.d.ts +2 -71
  108. package/dist/components/NetworkIndicator/networkIndicator.theme.d.ts +2 -41
  109. package/dist/components/Overlay/overlay.theme.d.ts +2 -92
  110. package/dist/components/PageShell/pageShell.theme.d.ts +2 -36
  111. package/dist/components/Pagination/pagination.theme.d.ts +2 -108
  112. package/dist/components/Popover/popover.theme.d.ts +2 -40
  113. package/dist/components/PopupMenu/popupMenu.theme.d.ts +2 -4
  114. package/dist/components/ProgressCircle/progressCircle.theme.d.ts +2 -22
  115. package/dist/components/QRCode/qrCode.theme.d.ts +2 -19
  116. package/dist/components/Rating/rating.theme.d.ts +2 -37
  117. package/dist/components/Resizable/resizable.theme.d.ts +2 -65
  118. package/dist/components/RichTextInput/richTextInput.theme.d.ts +2 -167
  119. package/dist/components/ScrollArea/scrollArea.theme.d.ts +2 -15
  120. package/dist/components/SegmentedControl/segmentedControl.theme.d.ts +2 -76
  121. package/dist/components/SelectionMenu/selectionMenu.theme.d.ts +2 -5
  122. package/dist/components/Separator/separator.theme.d.ts +2 -33
  123. package/dist/components/Sidebar/Sidebar.svelte +8 -2
  124. package/dist/components/Sidebar/SidebarAction.svelte +2 -2
  125. package/dist/components/Sidebar/SidebarActivityBar.svelte +3 -3
  126. package/dist/components/Sidebar/SidebarDesktopShell.svelte +3 -0
  127. package/dist/components/Sidebar/SidebarDesktopShell.svelte.d.ts +1 -0
  128. package/dist/components/Sidebar/SidebarGroup.svelte +6 -6
  129. package/dist/components/Sidebar/SidebarMenuButton.svelte +15 -18
  130. package/dist/components/Sidebar/SidebarMenuItem.svelte +15 -21
  131. package/dist/components/Sidebar/SidebarMenuSubItem.svelte +5 -6
  132. package/dist/components/Sidebar/SidebarMobileDrawer.svelte +3 -1
  133. package/dist/components/Sidebar/SidebarMobileDrawer.svelte.d.ts +1 -0
  134. package/dist/components/Sidebar/SidebarPanel.svelte +3 -6
  135. package/dist/components/Sidebar/SidebarTreeNode.svelte +2 -2
  136. package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
  137. package/dist/components/Sidebar/sidebar.mcp.js +1 -0
  138. package/dist/components/Sidebar/sidebar.props.d.ts +2 -0
  139. package/dist/components/Sidebar/sidebar.theme.d.ts +116 -540
  140. package/dist/components/Sidebar/sidebar.theme.js +73 -67
  141. package/dist/components/Skeleton/skeleton.theme.d.ts +2 -14
  142. package/dist/components/SortableList/sortableList.theme.d.ts +2 -43
  143. package/dist/components/Spinner/spinner.theme.d.ts +2 -41
  144. package/dist/components/SpinnerText/spinnerText.theme.d.ts +2 -49
  145. package/dist/components/Stack/stack.theme.d.ts +2 -12
  146. package/dist/components/Stat/stat.theme.d.ts +2 -132
  147. package/dist/components/Stepper/stepper.theme.d.ts +2 -22
  148. package/dist/components/Tabbar/tabbar.theme.d.ts +2 -110
  149. package/dist/components/Table/table.theme.d.ts +2 -42
  150. package/dist/components/TableOfContents/tableOfContents.theme.d.ts +2 -28
  151. package/dist/components/Tabs/tabs.theme.d.ts +2 -20
  152. package/dist/components/Theme/Theme.svelte +4 -4
  153. package/dist/components/Theme/theme.designTokens.d.ts +10 -0
  154. package/dist/components/Theme/theme.designTokens.js +14 -1
  155. package/dist/components/Theme/theme.state.svelte.js +3 -3
  156. package/dist/components/Timeline/timeline.theme.d.ts +2 -226
  157. package/dist/components/Toast/toast.theme.d.ts +2 -236
  158. package/dist/components/ToggleButton/toggleButton.theme.d.ts +2 -57
  159. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.d.ts +2 -9
  160. package/dist/components/ToggleMenu/toggleMenu.theme.d.ts +2 -7
  161. package/dist/components/Tooltip/tooltip.theme.d.ts +2 -25
  162. package/dist/components/Tree/tree.theme.d.ts +2 -7
  163. package/dist/components/VideoPlayer/videoPlayer.theme.d.ts +2 -145
  164. package/dist/generated/componentContract.d.ts +1 -1
  165. package/dist/generated/componentContract.js +2 -0
  166. package/dist/generated/componentMcpRegistry.d.ts +5 -5
  167. package/dist/tailwind/colors.js +7 -1
  168. package/dist/tailwind/global.js +4 -1
  169. package/dist/tailwind/spacing.d.ts +13 -0
  170. package/dist/tailwind/spacing.js +5 -2
  171. package/dist/tailwind/theme.mcp.d.ts +1 -1
  172. package/dist/tailwind/theme.mcp.js +1 -1
  173. package/dist/utils/cva/cva.mcp.d.ts +1 -1
  174. package/dist/utils/cva/cva.mcp.js +1 -1
  175. package/dist/utils/cva/index.d.ts +1 -1
  176. package/dist/utils/cva/merge.d.ts +108 -0
  177. package/dist/utils/cva/merge.js +6 -2
  178. package/dist/utils/cva/theme.d.ts +36 -1
  179. package/dist/utils/cva/theme.js +25 -2
  180. 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- **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.\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";
@@ -130,6 +130,7 @@ Use for \`headerButton\`, \`footerButton\`, or direct \`<SidebarMenuButton />\`
130
130
  - **side**: 'left' | 'right' - Desktop and mobile side.
131
131
  - **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.
132
132
  - **size**: 'small' | 'normal' | 'large' (default 'normal') - Typography, icon, avatar, badge, leading-media, item-height, and search-height scale.
133
+ - **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\`.
133
134
  - **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.
134
135
  - **density**: 'compact' | 'normal' | 'comfortable' (default 'normal') - Section padding, group padding, gaps, horizontal inset, and submenu spacing.
135
136
  - **collapsible**: 'offcanvas' | 'icon' | 'none' - Collapse behavior. Icon mode requires icons on every data-driven row and otherwise resolves to offcanvas.
@@ -344,6 +344,8 @@ type SidebarOwnProps = {
344
344
  variant?: SidebarVariant;
345
345
  /** Typography, icon, and item-height scale. */
346
346
  size?: SidebarSize;
347
+ /** Icon and leading-media scale inside the panel, on its own. Defaults to `size`. */
348
+ iconSize?: SidebarSize;
347
349
  /** How active rows are painted. Defaults to 'soft', the shared selected recipe. */
348
350
  activeVariant?: SidebarActiveVariant;
349
351
  /** Spacing density for section padding, gaps, and nested navigation. */