@adea-ai/ui 0.162.14 → 0.162.16

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 (200) hide show
  1. package/dist/components/composites/accent-picker/accent-picker.js +1 -1
  2. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  3. package/dist/components/composites/accent-picker/custom-color-popover.js +1 -1
  4. package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
  5. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +1 -1
  6. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  7. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  8. package/dist/components/composites/appearance-editor/appearance-choices.js +2 -2
  9. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  10. package/dist/components/composites/confirmation/confirmation.js +1 -1
  11. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  12. package/dist/components/composites/icon-picker/icon-picker.js +1 -1
  13. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  14. package/dist/components/composites/list-row/list-row-control.js +1 -1
  15. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  16. package/dist/components/composites/settings/settings.js +1 -1
  17. package/dist/components/composites/settings/settings.js.map +1 -1
  18. package/dist/components/composites/stack-trace/stack-trace.js +1 -1
  19. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  20. package/dist/components/composites/tree/tree.js +1 -1
  21. package/dist/components/composites/tree/tree.js.map +1 -1
  22. package/dist/components/composites/workspace-mark/workspace-mark.js +1 -1
  23. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  24. package/dist/components/conversation/thread-panel.js +1 -1
  25. package/dist/components/conversation/thread-panel.js.map +1 -1
  26. package/dist/components/layout/app-shell/skip-link.js +1 -1
  27. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  28. package/dist/components/layout/side-rail/side-rail.js +1 -1
  29. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  30. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js +1 -1
  31. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js.map +1 -1
  32. package/dist/components/layout/sidebar-nav/sidebar-nav.js +1 -1
  33. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  34. package/dist/components/layout/top-bar/top-bar.js +2 -2
  35. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  36. package/dist/components/ui/accordion/accordion.js +1 -1
  37. package/dist/components/ui/accordion/accordion.js.map +1 -1
  38. package/dist/components/ui/annotation-surface/annotation-surface.js +1 -1
  39. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  40. package/dist/components/ui/attachment/attachment.js +2 -2
  41. package/dist/components/ui/attachment/attachment.js.map +1 -1
  42. package/dist/components/ui/board/board.js +2 -2
  43. package/dist/components/ui/board/board.js.map +1 -1
  44. package/dist/components/ui/breadcrumb/breadcrumb.js +1 -1
  45. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  46. package/dist/components/ui/button/button.js +1 -1
  47. package/dist/components/ui/button/button.js.map +1 -1
  48. package/dist/components/ui/checkbox/checkbox.js +1 -1
  49. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  50. package/dist/components/ui/collapsible/collapsible.js +1 -1
  51. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  52. package/dist/components/ui/combobox/combobox.js +3 -3
  53. package/dist/components/ui/combobox/combobox.js.map +1 -1
  54. package/dist/components/ui/field/field.js +2 -2
  55. package/dist/components/ui/field/field.js.map +1 -1
  56. package/dist/components/ui/input/input-control.js +1 -1
  57. package/dist/components/ui/input/input-control.js.map +1 -1
  58. package/dist/components/ui/input-group/input-group.js +1 -1
  59. package/dist/components/ui/input-group/input-group.js.map +1 -1
  60. package/dist/components/ui/input-otp/input-otp.js +1 -1
  61. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  62. package/dist/components/ui/menubar/menubar.js +1 -1
  63. package/dist/components/ui/menubar/menubar.js.map +1 -1
  64. package/dist/components/ui/native-select/native-select.js +1 -1
  65. package/dist/components/ui/native-select/native-select.js.map +1 -1
  66. package/dist/components/ui/pagination/pagination.js +1 -1
  67. package/dist/components/ui/pagination/pagination.js.map +1 -1
  68. package/dist/components/ui/questionnaire/questionnaire.js +1 -1
  69. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  70. package/dist/components/ui/radio-group/radio-group.js +2 -2
  71. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  72. package/dist/components/ui/scroll-area/scroll-area.js +1 -1
  73. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  74. package/dist/components/ui/select/select.js +1 -1
  75. package/dist/components/ui/select/select.js.map +1 -1
  76. package/dist/components/ui/slider/slider.js +1 -1
  77. package/dist/components/ui/slider/slider.js.map +1 -1
  78. package/dist/components/ui/switch/switch.js +1 -1
  79. package/dist/components/ui/switch/switch.js.map +1 -1
  80. package/dist/components/ui/tabs/tabs.js +1 -1
  81. package/dist/components/ui/tabs/tabs.js.map +1 -1
  82. package/dist/components/ui/text-link/text-link.js +1 -1
  83. package/dist/components/ui/text-link/text-link.js.map +1 -1
  84. package/dist/components/ui/textarea/textarea.js +1 -1
  85. package/dist/components/ui/textarea/textarea.js.map +1 -1
  86. package/dist/components/ui/toast/toast.js +1 -1
  87. package/dist/components/ui/toast/toast.js.map +1 -1
  88. package/dist/components/ui/trace/trace.js +1 -1
  89. package/dist/components/ui/trace/trace.js.map +1 -1
  90. package/dist/lib/overlay.d.ts.map +1 -1
  91. package/dist/lib/overlay.js +1 -1
  92. package/dist/lib/overlay.js.map +1 -1
  93. package/dist/lib/tokens.d.ts.map +1 -1
  94. package/dist/lib/tokens.js +2 -2
  95. package/dist/lib/tokens.js.map +1 -1
  96. package/dist/lib/variants.d.ts +1 -1
  97. package/dist/lib/variants.d.ts.map +1 -1
  98. package/dist/lib/variants.js +1 -1
  99. package/dist/lib/variants.js.map +1 -1
  100. package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +1 -1
  101. package/dist/r/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
  102. package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
  103. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
  104. package/dist/r/src/components/composites/confirmation/confirmation.tsx +1 -1
  105. package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +1 -1
  106. package/dist/r/src/components/composites/list-row/list-row-control.tsx +1 -1
  107. package/dist/r/src/components/composites/settings/settings.tsx +1 -1
  108. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +1 -1
  109. package/dist/r/src/components/composites/tree/tree.tsx +1 -1
  110. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
  111. package/dist/r/src/components/conversation/thread-panel.tsx +1 -1
  112. package/dist/r/src/components/layout/app-shell/skip-link.tsx +1 -1
  113. package/dist/r/src/components/layout/side-rail/side-rail.tsx +1 -1
  114. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
  115. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
  116. package/dist/r/src/components/layout/top-bar/top-bar.tsx +2 -2
  117. package/dist/r/src/components/ui/accordion/accordion.tsx +1 -1
  118. package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
  119. package/dist/r/src/components/ui/attachment/attachment.tsx +2 -2
  120. package/dist/r/src/components/ui/board/board.tsx +2 -2
  121. package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
  122. package/dist/r/src/components/ui/button/button.tsx +1 -1
  123. package/dist/r/src/components/ui/checkbox/checkbox.tsx +1 -1
  124. package/dist/r/src/components/ui/collapsible/collapsible.tsx +1 -1
  125. package/dist/r/src/components/ui/combobox/combobox.tsx +3 -3
  126. package/dist/r/src/components/ui/field/field.tsx +2 -2
  127. package/dist/r/src/components/ui/input/input-control.tsx +1 -1
  128. package/dist/r/src/components/ui/input-group/input-group.tsx +1 -1
  129. package/dist/r/src/components/ui/input-otp/input-otp.tsx +1 -1
  130. package/dist/r/src/components/ui/menubar/menubar.tsx +1 -1
  131. package/dist/r/src/components/ui/native-select/native-select.tsx +1 -1
  132. package/dist/r/src/components/ui/pagination/pagination.tsx +1 -1
  133. package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +1 -1
  134. package/dist/r/src/components/ui/radio-group/radio-group.tsx +2 -2
  135. package/dist/r/src/components/ui/scroll-area/scroll-area.tsx +1 -1
  136. package/dist/r/src/components/ui/select/select.tsx +1 -1
  137. package/dist/r/src/components/ui/slider/slider.tsx +1 -1
  138. package/dist/r/src/components/ui/switch/switch.tsx +1 -1
  139. package/dist/r/src/components/ui/tabs/tabs.tsx +1 -1
  140. package/dist/r/src/components/ui/text-link/text-link.tsx +1 -1
  141. package/dist/r/src/components/ui/textarea/textarea.tsx +1 -1
  142. package/dist/r/src/components/ui/toast/toast.tsx +1 -1
  143. package/dist/r/src/components/ui/trace/trace.tsx +1 -1
  144. package/dist/r/src/lib/overlay.ts +1 -1
  145. package/dist/r/src/lib/tokens.ts +4 -2
  146. package/dist/r/src/lib/variants.ts +1 -1
  147. package/dist/r/src/styles/base.css +35 -7
  148. package/dist/vite/tailwind-sources.d.ts.map +1 -1
  149. package/dist/vite/tailwind-sources.js +16 -5
  150. package/dist/vite/tailwind-sources.js.map +1 -1
  151. package/package.json +1 -1
  152. package/src/components/composites/accent-picker/accent-picker.tsx +1 -1
  153. package/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
  154. package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
  155. package/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
  156. package/src/components/composites/confirmation/confirmation.tsx +1 -1
  157. package/src/components/composites/icon-picker/icon-picker.tsx +1 -1
  158. package/src/components/composites/list-row/list-row-control.tsx +1 -1
  159. package/src/components/composites/settings/settings.tsx +1 -1
  160. package/src/components/composites/stack-trace/stack-trace.tsx +1 -1
  161. package/src/components/composites/tree/tree.tsx +1 -1
  162. package/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
  163. package/src/components/conversation/thread-panel.tsx +1 -1
  164. package/src/components/layout/app-shell/skip-link.tsx +1 -1
  165. package/src/components/layout/side-rail/side-rail.tsx +1 -1
  166. package/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
  167. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
  168. package/src/components/layout/top-bar/top-bar.tsx +2 -2
  169. package/src/components/ui/accordion/accordion.tsx +1 -1
  170. package/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
  171. package/src/components/ui/attachment/attachment.tsx +2 -2
  172. package/src/components/ui/board/board.tsx +2 -2
  173. package/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
  174. package/src/components/ui/button/button.tsx +1 -1
  175. package/src/components/ui/checkbox/checkbox.tsx +1 -1
  176. package/src/components/ui/collapsible/collapsible.tsx +1 -1
  177. package/src/components/ui/combobox/combobox.tsx +3 -3
  178. package/src/components/ui/field/field.tsx +2 -2
  179. package/src/components/ui/input/input-control.tsx +1 -1
  180. package/src/components/ui/input-group/input-group.tsx +1 -1
  181. package/src/components/ui/input-otp/input-otp.tsx +1 -1
  182. package/src/components/ui/menubar/menubar.tsx +1 -1
  183. package/src/components/ui/native-select/native-select.tsx +1 -1
  184. package/src/components/ui/pagination/pagination.tsx +1 -1
  185. package/src/components/ui/questionnaire/questionnaire.tsx +1 -1
  186. package/src/components/ui/radio-group/radio-group.tsx +2 -2
  187. package/src/components/ui/scroll-area/scroll-area.tsx +1 -1
  188. package/src/components/ui/select/select.tsx +1 -1
  189. package/src/components/ui/slider/slider.tsx +1 -1
  190. package/src/components/ui/switch/switch.tsx +1 -1
  191. package/src/components/ui/tabs/tabs.tsx +1 -1
  192. package/src/components/ui/text-link/text-link.tsx +1 -1
  193. package/src/components/ui/textarea/textarea.tsx +1 -1
  194. package/src/components/ui/toast/toast.tsx +1 -1
  195. package/src/components/ui/trace/trace.tsx +1 -1
  196. package/src/lib/overlay.ts +1 -1
  197. package/src/lib/tokens.ts +4 -2
  198. package/src/lib/variants.ts +1 -1
  199. package/src/styles/base.css +35 -7
  200. package/src/vite/tailwind-sources.ts +20 -3
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","names":["<TreeContext value={context}>\n <div\n {...rest}\n role=\"tree\"\n aria-multiselectable={local.selectionMode === 'multiple' ? 'true' : undefined}\n data-slot=\"tree\"\n class={cn(\n /* A virtualized host remounts rows as it scrolls; scroll anchoring\n would latch onto the focused row and fight the scrollbar. */\n 'flex min-w-0 flex-col [overflow-anchor:none]',\n local.class\n )}\n onKeyDown={handleKeyDown}\n >\n {local.children}\n </div>\n </TreeContext>","value={context}","role=\"tree\"","onKeyDown={handleKeyDown}","<div\n {...rest}\n role=\"tree\"\n aria-multiselectable={local.selectionMode === 'multiple' ? 'true' : undefined}\n data-slot=\"tree\"\n class={cn(\n /* A virtualized host remounts rows as it scrolls; scroll anchoring\n would latch onto the focused row and fight the scrollbar. */\n 'flex min-w-0 flex-col [overflow-anchor:none]',\n local.class\n )}\n onKeyDown={handleKeyDown}\n >\n {local.children}\n </div>","role=\"treeitem\"","onFocus={handleFocus}","onClick={handleClick}","onDblClick={handleDoubleClick}","ref={composeRefs(setRef, () => local.ref)}","<For each={Array.from({ length: local.item.level - 1 }, (_, index) => index)}>\n {(index) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"tree-row-guide\"\n class=\"pointer-events-none absolute inset-y-0 w-px bg-border\"\n style={{ 'inset-inline-start': `${rowInset(index + 1) + GUIDE_CENTER}px` }}\n />\n )}\n </For>","<div\n {...rest}\n ref={composeRefs(setRef, () => local.ref)}\n id={rest.id ?? `${tree.idPrefix}-item-${encodeURIComponent(id())}`}\n role=\"treeitem\"\n aria-level={local.item.level}\n aria-expanded={local.item.expandable ? (local.item.expanded ? 'true' : 'false') : undefined}\n aria-selected={local.selected === undefined ? undefined : local.selected ? 'true' : 'false'}\n aria-posinset={position()?.position}\n aria-setsize={position()?.setSize}\n tabindex={tree.isActive(id()) ? 0 : -1}\n data-tree-id={id()}\n data-active={tree.isActive(id()) ? '' : undefined}\n data-selected={local.selected ? '' : undefined}\n data-expanded={local.item.expandable ? String(local.item.expanded) : undefined}\n class={cn(\n 'group/tree-row flex min-h-row-sm w-full min-w-0 items-center gap-1.5 rounded-md pe-1.5 text-left text-sm outline-none transition-colors',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n {\n // Guide lines are positioned against the row; without them it keeps its original classes.\n relative: tree.guides(),\n 'bg-primary-subtle text-foreground': local.selected,\n 'hover:bg-surface-hover': !local.selected,\n },\n local.class\n )}\n style={{ 'padding-inline-start': `${rowInset(local.item.level)}px` }}\n onFocus={handleFocus}\n onClick={handleClick}\n onDblClick={handleDoubleClick}\n >\n <Show when={tree.guides() && local.item.level > 1}>\n <For each={Array.from({ length: local.item.level - 1 }, (_, index) => index)}>\n {(index) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"tree-row-guide\"\n class=\"pointer-events-none absolute inset-y-0 w-px bg-border\"\n style={{ 'inset-inline-start': `${rowInset(index + 1) + GUIDE_CENTER}px` }}\n />\n )}\n </For>\n </Show>\n <span\n data-slot={markerTarget() ? 'tree-row-disclosure' : undefined}\n class={cn(\n 'flex',\n !markerTarget() && 'size-3.5',\n 'shrink-0 items-center justify-center text-muted-foreground',\n /* The glyph stays 14px wide but the target is not: it takes the row's full\n height (a flex child's `self-stretch`, so it follows row density and a\n tall trailing control) and the pseudo-element widens it to 26px, which\n stops at the row's own padding and gap, never over the icon or label. */\n markerTarget() &&\n 'relative w-3.5 cursor-pointer self-stretch hover:text-foreground after:absolute after:inset-y-0 after:-inset-x-1.5'\n )}\n onMouseDown={handleMarkerTargetMouseDown}\n onClick={handleMarkerClick}\n onDblClick={handleMarkerTargetDoubleClick}\n >\n {local.item.expandable ? (\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 transition-transform', local.item.expanded && 'rotate-90')}\n />\n ) : null}\n </span>\n <Show when={leading()}>\n {(slot) => (\n <span class=\"flex size-4 shrink-0 items-center justify-center [&_svg]:size-4\">\n {slot()}\n </span>\n )}\n </Show>\n <span class=\"min-w-0 flex-1 truncate\">{local.children}</span>\n <Show when={trailing()}>\n {(slot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground\">\n {slot()}\n </span>\n )}\n </Show>\n </div>","<ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 transition-transform', local.item.expanded && 'rotate-90')}\n />","class={cn(\n 'flex',\n !markerTarget() && 'size-3.5',\n 'shrink-0 items-center justify-center text-muted-foreground',\n /* The glyph stays 14px wide but the target is not: it takes the row's full\n height (a flex child's `self-stretch`, so it follows row density and a\n tall trailing control) and the pseudo-element widens it to 26px, which\n stops at the row's own padding and gap, never over the icon or label. */\n markerTarget() &&\n 'relative w-3.5 cursor-pointer self-stretch hover:text-foreground after:absolute after:inset-y-0 after:-inset-x-1.5'\n )}","<span\n data-slot=\"tree-row-actions\"\n data-pinned={local.pinned ? '' : undefined}\n class={cn(\n 'flex shrink-0 items-center gap-1 opacity-0 transition-opacity ease-out',\n 'group-hover/tree-row:opacity-100 group-focus-within/tree-row:opacity-100 data-pinned:opacity-100',\n local.class\n )}\n {...rest}\n />","<For each={ancestors()}>\n {(item) => (\n <button\n type=\"button\"\n tabindex={-1}\n data-tree-sticky-id={item.id}\n class=\"flex min-h-row-sm w-full min-w-0 items-center gap-1.5 pe-1.5 text-left text-sm outline-none hover:bg-surface-hover\"\n style={{ 'padding-inline-start': `${rowInset(item.level)}px` }}\n // A press must not focus this aria-hidden shortcut: focus would leave the\n // tree, its recovery state would clear and Arrow keys would stop working.\n onMouseDown={handleMarkerMouseDown}\n onClick={() => props.onSelect?.(item.id)}\n >\n <span class=\"flex size-3.5 shrink-0 items-center justify-center text-muted-foreground\">\n <ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />\n </span>\n {props.label(item.id)}\n </button>\n )}\n </For>","<ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />","class=\"size-3.5 rotate-90\"","'padding-inline-start': `${rowInset(item.level)}px`","<div data-slot=\"tree-sticky-header\" class={cn('sticky top-0 z-10 h-0', props.class)}>\n <Show when={ancestors().length > 0}>\n <div aria-hidden=\"true\" class=\"border-b border-border bg-background\">\n <For each={ancestors()}>\n {(item) => (\n <button\n type=\"button\"\n tabindex={-1}\n data-tree-sticky-id={item.id}\n class=\"flex min-h-row-sm w-full min-w-0 items-center gap-1.5 pe-1.5 text-left text-sm outline-none hover:bg-surface-hover\"\n style={{ 'padding-inline-start': `${rowInset(item.level)}px` }}\n // A press must not focus this aria-hidden shortcut: focus would leave the\n // tree, its recovery state would clear and Arrow keys would stop working.\n onMouseDown={handleMarkerMouseDown}\n onClick={() => props.onSelect?.(item.id)}\n >\n <span class=\"flex size-3.5 shrink-0 items-center justify-center text-muted-foreground\">\n <ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />\n </span>\n {props.label(item.id)}\n </button>\n )}\n </For>\n </div>\n </Show>\n </div>","LucideChevronRight","_$spread","_$insert","_$effect","_$setStyleProperty","_$readShallow","_$setAttribute","_$className","_$addEvent"],"sources":["../../../../src/components/composites/tree/tree.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { ChevronRight as LucideChevronRight } from '@lucide/solid'\nimport {\n createContext,\n createEffect,\n createMemo,\n createProjection,\n createUniqueId,\n For,\n onCleanup,\n Show,\n omit,\n useContext,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport {\n indexTreeItems,\n treeNavigationAction,\n typeaheadIndex,\n type TreeItemDescriptor,\n type TreeNavigationIndex,\n} from './tree-navigation'\nimport { fastIcon } from '#lib/fast-icon'\nimport { forwardRef } from '#lib/refs'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronRight = fastIcon(LucideChevronRight)\n\ntype TreeContextValue = {\n idPrefix: string\n activeId: () => string | null\n /** O(1) per change: only the rows whose answer flips re-run, not every row. */\n isActive: (id: string) => boolean\n index: () => TreeNavigationIndex\n register: (id: string, element: HTMLDivElement) => void\n unregister: (id: string, element: HTMLDivElement | undefined) => void\n focusItem: (id: string) => void\n noteFocus: (id: string) => void\n noteBlur: (next: EventTarget | null) => void\n activate: (id: string, event: Event) => void\n expand: (id: string, expanded: boolean) => void\n disclosure: () => TreeDisclosure\n guides: () => boolean\n onActiveIdChange: (id: string) => void\n}\n\nconst TreeContext = createContext<TreeContextValue | null>(null)\n\nfunction useTreeContext() {\n const tree = useContext(TreeContext)\n if (!tree) throw new Error('[adea-ui]: TreeRow must be used inside Tree.')\n return tree\n}\n\n/**\n * Who owns the pointer on a row's disclosure chevron.\n *\n * - `row` (default): the chevron is decoration; a click anywhere on the row,\n * chevron included, is a row activation. This is the file-explorer\n * convention, where the host's `onActivate` toggles a folder.\n * - `marker`: the chevron of an expandable row is its own pointer target. It\n * calls `onExpand(id, !expanded)` and nothing else; the rest of the row still\n * activates. For trees where expanding and selecting are independent (a\n * source list that selects a source and separately reveals its details).\n */\nexport type TreeDisclosure = 'row' | 'marker'\n\ntype TreeAccessibleName =\n | { 'aria-label': string; 'aria-labelledby'?: string }\n | { 'aria-label'?: string; 'aria-labelledby': string }\n\nexport type TreeProps = Omit<\n ComponentProps<'div'>,\n 'children' | 'role' | 'tabindex' | 'onKeyDown' | 'aria-label' | 'aria-labelledby'\n> &\n TreeAccessibleName & {\n /** Complete, ordered projection of currently visible (expanded) items. */\n visibleItems: readonly TreeItemDescriptor[]\n /** The host-owned identity of the row that currently owns roving focus. */\n activeId: string | null\n /**\n * Called when keyboard or pointer navigation changes the active row, and when\n * the active row leaves `visibleItems` (collapsed away, filtered out) and the\n * first visible row takes over as the roving stop.\n */\n onActiveIdChange: (id: string) => void\n /** Called for Left/Right expand and collapse requests. */\n onExpand?: (id: string, expanded: boolean) => void\n /**\n * Opt-in pointer behaviour of the disclosure chevron; see {@link TreeDisclosure}.\n * Keyboard behaviour is identical in both modes: Left/Right expand and collapse.\n */\n disclosure?: TreeDisclosure\n /**\n * Draw a vertical guide line down each ancestor level of a nested row, so a\n * group of children reads as belonging to its parent. Off by default: a flat\n * list or a dense file explorer carries its own rhythm.\n */\n guides?: boolean\n /** Called for Enter or pointer activation. Domain action stays host-owned. */\n onActivate?: (id: string, event: Event) => void\n /** Called for Space selection. Selection state stays host-owned. */\n onSelectItem?: (id: string, event: Event) => void\n /** Ask the host window to mount/reveal an item before focus moves to it. */\n onRequestReveal?: (id: string) => void\n /** Report a mounted row's border-box block size in CSS pixels for host range math. */\n onRowSizeChange?: (id: string, blockSize: number) => void\n /** Declares a multi-select tree to assistive technology. */\n selectionMode?: 'single' | 'multiple'\n /**\n * The text a row is found by when the reader types its first letters. Supply\n * it to turn on typeahead: a typed prefix moves focus to the next visible row\n * whose label starts with it, revealing an unmounted row first.\n */\n typeaheadLabel?: (id: string) => string\n children?: JSX.Element\n }\n\n/**\n * Tree.\n *\n * Supplies semantic and keyboard behavior for a tree whose host owns the\n * visible projection, filesystem state, row window and domain actions. The\n * mounted children can be a small virtualized window; `visibleItems` remains\n * the complete ordered projection so keyboard movement and sibling positions\n * do not depend on which rows currently exist in the DOM.\n *\n * This component implements the WAI-ARIA tree row navigation contract itself\n * and leaves product state to callbacks; it predates ui-sdk, whose Tree owns\n * its items and expansion where this one takes the host's projection as given.\n *\n * By default the disclosure chevron is decoration and a click anywhere on a\n * row activates it, so a file explorer can toggle a folder from `onActivate`.\n * Reach for `disclosure=\"marker\"` when expanding and selecting are separate\n * decisions: the chevron then calls only `onExpand`, and the rest of the row\n * calls only `onActivate`. The chevron stays `aria-hidden` and out of the tab\n * order in both modes; keyboard expansion is Left/Right either way.\n *\n * Collapsing is the one thing that can move focus without a key or a click on\n * the target row: when the active row leaves `visibleItems`, the first visible\n * row becomes the roving stop and `onActiveIdChange` is called with it. If the\n * removed row held focus, or was the last row the tree saw focused, focus moves\n * to that same row; if it had no focus, only the roving stop moves. Focus that\n * has already gone to a control outside the tree is never pulled back: the tree\n * forgets its last focused row when focus moves to an element outside it, and\n * the roving stop alone moves if that control still has focus when the row is\n * hidden. Focus the tree has asked for but not yet moved (a queued recovery, or a\n * keyboard move to a row the host has not mounted) is withdrawn when focus lands\n * outside the tree, and is checked again when a row mounts. This is the same in\n * both `disclosure` modes and for every way a host collapses a row.\n */\nexport function Tree(props: TreeProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'visibleItems',\n 'activeId',\n 'onActiveIdChange',\n 'onExpand',\n 'disclosure',\n 'guides',\n 'onActivate',\n 'onSelectItem',\n 'onRequestReveal',\n 'onRowSizeChange',\n 'selectionMode',\n 'typeaheadLabel',\n 'children'\n )\n\n const index = createMemo(() => indexTreeItems(local.visibleItems))\n const effectiveActiveId = createMemo(() => {\n const candidate = local.activeId\n const visible = index()\n return candidate !== null && visible.byId.has(candidate) ? candidate : (visible.ids[0] ?? null)\n })\n // Keyed by row id, so moving the roving stop notifies only the row it leaves\n // and the row it reaches, not every mounted row.\n const activeRows = createProjection<Record<string, true>>((draft) => {\n const id = effectiveActiveId()\n for (const key of Object.keys(draft)) if (key !== id) delete draft[key]\n if (id !== null) draft[id] = true\n }, {})\n const idPrefix = `tree-${createUniqueId()}`\n const rows = new Map<string, HTMLDivElement>()\n const rowIdsByElement = new WeakMap<HTMLDivElement, string>()\n let pendingFocusId: string | null = null\n let pendingFocusGuard: ((event: FocusEvent) => void) | undefined\n let requestedRevealId: string | null = null\n let focusedId: string | null = null\n let disposed = false\n const isInsideTreeRow = (element: Element) => {\n const row = element.closest('[role=\"treeitem\"]')\n return row instanceof HTMLDivElement && rowIdsByElement.has(row)\n }\n // True when a focusable control outside this tree owns focus. Nothing focused\n // (`body`) is not outside: that is where focus falls when a focused row is removed.\n const focusIsOutsideTree = () => {\n if (typeof document === 'undefined') return false\n const active = document.activeElement\n return (\n active instanceof Element &&\n active !== document.body &&\n active !== document.documentElement &&\n !isInsideTreeRow(active)\n )\n }\n // Rows are only observed for a host that reads their sizes (a virtualiser); an\n // observer per tree otherwise measures every row on every mount for nothing.\n const rowSizeObserver =\n typeof ResizeObserver === 'undefined' || !local.onRowSizeChange\n ? undefined\n : new ResizeObserver((entries) => {\n if (disposed) return\n for (const entry of entries) {\n const id = rowIdsByElement.get(entry.target as HTMLDivElement)\n const blockSize =\n entry.borderBoxSize[0]?.blockSize ?? (entry.target as HTMLElement).offsetHeight\n if (id !== undefined && Number.isFinite(blockSize) && blockSize > 0)\n local.onRowSizeChange?.(id, blockSize)\n }\n })\n\n // Focus the tree has asked for but not yet moved (a microtask away, or waiting for a\n // virtualised row to mount) is only a request. While one is pending, focus arriving\n // on a control outside the tree withdraws it, so a row mounting later cannot take\n // focus back from a control the user, or the host, has since chosen.\n const setPendingFocus = (id: string | null) => {\n pendingFocusId = id\n if (typeof document === 'undefined') return\n if (id === null) {\n if (pendingFocusGuard) document.removeEventListener('focusin', pendingFocusGuard, true)\n pendingFocusGuard = undefined\n } else if (!pendingFocusGuard) {\n pendingFocusGuard = (event) => {\n if (event.target instanceof Element && !isInsideTreeRow(event.target)) cancelPendingFocus()\n }\n document.addEventListener('focusin', pendingFocusGuard, true)\n }\n }\n // Withdrawing a request also drops the memory of the row it was recovering for:\n // nothing is left to recover.\n const cancelPendingFocus = () => {\n setPendingFocus(null)\n focusedId = null\n }\n\n let typed = ''\n let typedTimer: ReturnType<typeof setTimeout> | undefined\n\n onCleanup(() => {\n disposed = true\n setPendingFocus(null)\n rowSizeObserver?.disconnect()\n clearTimeout(typedTimer)\n })\n\n const requestReveal = (id: string, deferred = false) => {\n if (requestedRevealId === id) return\n requestedRevealId = id\n if (!deferred) {\n local.onRequestReveal?.(id)\n return\n }\n // From an effect's apply phase the host's callback runs a microtask later,\n // where it may read its own state (the window it renders) as any handler\n // would. A row that mounts meanwhile has already settled the request.\n queueMicrotask(() => {\n if (!disposed && requestedRevealId === id) local.onRequestReveal?.(id)\n })\n }\n\n const focusWhenMounted = (id: string) => {\n queueMicrotask(() => {\n if (pendingFocusId !== id || effectiveActiveId() !== id) return\n const row = rows.get(id)\n if (!row || typeof document === 'undefined') return\n // Ownership is checked when focus would move, not when it was requested: a\n // control outside the tree may have taken focus since, and keeps it.\n if (focusIsOutsideTree()) {\n cancelPendingFocus()\n return\n }\n row.focus()\n if (document.activeElement === row) setPendingFocus(null)\n })\n }\n\n const focusItem = (id: string) => {\n setPendingFocus(id)\n local.onActiveIdChange(id)\n if (rows.has(id)) requestedRevealId = null\n else requestReveal(id)\n focusWhenMounted(id)\n }\n\n const context: TreeContextValue = {\n idPrefix,\n activeId: effectiveActiveId,\n isActive: (id) => activeRows[id] === true,\n index,\n register: (id, element) => {\n rows.set(id, element)\n rowIdsByElement.set(element, id)\n rowSizeObserver?.observe(element)\n if (requestedRevealId === id) requestedRevealId = null\n if (pendingFocusId === id) focusWhenMounted(id)\n },\n unregister: (id, element) => {\n if (rows.get(id) !== element) return\n const focusWasInside =\n !disposed &&\n Boolean(\n element && typeof document !== 'undefined' && element.contains(document.activeElement)\n )\n rows.delete(id)\n if (element) {\n rowIdsByElement.delete(element)\n rowSizeObserver?.unobserve(element)\n }\n if (requestedRevealId === id) requestedRevealId = null\n if (focusWasInside) {\n queueMicrotask(() => {\n const fallbackId = effectiveActiveId()\n if (disposed || fallbackId === null || pendingFocusId === fallbackId) return\n // Focus fell out of the removed row, but it may have been given to a control\n // outside the tree before this ran. Only nothing-focused (body) recovers.\n if (focusIsOutsideTree()) {\n focusedId = null\n return\n }\n focusItem(fallbackId)\n })\n }\n },\n focusItem,\n noteFocus: (id) => {\n focusedId = id\n },\n noteBlur: (next) => {\n // Focus moving to an element outside this tree ends the memory of the last\n // focused row and withdraws any focus the tree was still waiting to give a\n // row. A null target (focus to nothing, or the window losing focus) is\n // ambiguous, so both stay for the recovery below.\n if (next instanceof Element && !isInsideTreeRow(next)) cancelPendingFocus()\n },\n activate: (id, event) => local.onActivate?.(id, event),\n expand: (id, expanded) => local.onExpand?.(id, expanded),\n disclosure: () => local.disclosure ?? 'row',\n guides: () => local.guides ?? false,\n onActiveIdChange: (id) => local.onActiveIdChange(id),\n }\n\n // A filtered, collapsed-away or removed active ID falls back to the first\n // visible item. This keeps one treeitem in the sequential tab order while\n // notifying the host.\n createEffect(\n () => ({ activeId: effectiveActiveId(), byId: index().byId, requested: local.activeId }),\n ({ activeId, byId, requested }) => {\n if (activeId === null) return\n // If the projection removes the last row that took focus (a host filter, or\n // an ancestor collapsing), move focus to the same fallback that now owns the\n // roving tab stop, unless a control outside the tree has focus: that control\n // keeps it, and only the roving stop moves.\n if (focusedId !== null && !byId.has(focusedId) && pendingFocusId !== activeId) {\n if (focusIsOutsideTree()) {\n focusedId = null\n if (requested !== activeId) local.onActiveIdChange(activeId)\n } else {\n focusItem(activeId)\n }\n } else if (requested !== activeId) {\n local.onActiveIdChange(activeId)\n }\n // Preserve the active row in a caller-owned virtual window, including when\n // the pane mounts with its saved active row outside the initial render range.\n if (!rows.has(activeId)) requestReveal(activeId, true)\n if (pendingFocusId === activeId) focusWhenMounted(activeId)\n }\n )\n\n const typeahead = (event: KeyboardEvent) => {\n const label = local.typeaheadLabel\n if (\n !label ||\n event.ctrlKey ||\n event.metaKey ||\n event.altKey ||\n event.key.length !== 1 ||\n event.key === ' '\n )\n return\n typed += event.key\n clearTimeout(typedTimer)\n typedTimer = setTimeout(() => (typed = ''), 700)\n const { ids, indexById } = index()\n const active = local.activeId === null ? -1 : (indexById.get(local.activeId) ?? -1)\n const target = ids[typeaheadIndex(ids.map(label), active, typed)]\n if (target === undefined) return\n event.preventDefault()\n focusItem(target)\n }\n\n const handleKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n if (event.defaultPrevented || isActionTarget(event.target, event.currentTarget)) return\n\n const action = treeNavigationAction(index(), effectiveActiveId(), event.key)\n if (!action) {\n typeahead(event)\n return\n }\n event.preventDefault()\n\n switch (action.type) {\n case 'focus':\n focusItem(action.id)\n break\n case 'expand':\n local.onExpand?.(action.id, action.expanded)\n break\n case 'activate':\n local.onActivate?.(action.id, event)\n break\n case 'select':\n local.onSelectItem?.(action.id, event)\n break\n }\n }\n\n return (\n <TreeContext value={context}>\n <div\n {...rest}\n role=\"tree\"\n aria-multiselectable={local.selectionMode === 'multiple' ? 'true' : undefined}\n data-slot=\"tree\"\n class={cn(\n /* A virtualized host remounts rows as it scrolls; scroll anchoring\n would latch onto the focused row and fight the scrollbar. */\n 'flex min-w-0 flex-col [overflow-anchor:none]',\n local.class\n )}\n onKeyDown={handleKeyDown}\n >\n {local.children}\n </div>\n </TreeContext>\n )\n}\n\nexport type TreeRowProps = Omit<\n ComponentProps<'div'>,\n | 'children'\n | 'role'\n | 'tabindex'\n | 'onClick'\n | 'onFocus'\n | 'onDoubleClick'\n | 'style'\n | 'aria-level'\n | 'aria-expanded'\n | 'aria-selected'\n | 'aria-posinset'\n | 'aria-setsize'\n> & {\n item: TreeItemDescriptor\n /** Host-owned selection state; omitted for non-selectable trees. */\n selected?: boolean\n leading?: JSX.Element\n trailing?: JSX.Element\n children: JSX.Element\n onDoubleClick?: (id: string, event: MouseEvent & { currentTarget: HTMLDivElement }) => void\n}\n\n/**\n * TreeRow.\n *\n * Keeps the donor's disclosure marker, leading file/folder affordance, primary\n * label and trailing-action hierarchy while replacing the donor's button and\n * runtime callbacks with a shared treeitem and host-owned slots/actions.\n *\n * With `Tree`'s `disclosure=\"marker\"` the chevron of an expandable row is a\n * separate pointer target (`data-slot=\"tree-row-disclosure\"`) that only calls\n * `onExpand`. It is not focusable and has no role: the row remains the single\n * focus stop, Enter and Space still activate and select, and Left/Right still\n * expand and collapse, so the marker adds a pointer path and nothing else.\n * Pressing it does not move focus or the roving stop to its row; if the toggle\n * hides the focused row, `Tree` recovers focus as it does for any collapse (see\n * the `Tree` comment).\n */\nexport function TreeRow(props: TreeRowProps) {\n const tree = useTreeContext()\n const local = props\n const rest = omit(\n props,\n 'class',\n 'item',\n 'selected',\n 'leading',\n 'trailing',\n 'children',\n 'onDoubleClick',\n 'ref'\n )\n\n let row: HTMLDivElement | undefined\n let registeredId: string | undefined\n const id = () => local.item.id\n // Each slot is a JSX getter that builds its subtree per read, so it is read once\n // into a memo. The memo holds the slot as given (not resolved), so the wrapper\n // span renders exactly when it did before: whenever a slot is passed, even one\n // whose content is currently empty, which keeps the row's spacing stable.\n const leading = createMemo(() => local.leading)\n const trailing = createMemo(() => local.trailing)\n\n const handleFocusOut = (event: FocusEvent) => tree.noteBlur(event.relatedTarget)\n\n onCleanup(() => {\n row?.removeEventListener('focusout', handleFocusOut)\n tree.unregister(registeredId ?? id(), row)\n })\n\n // The row registers in the effect below, which runs once the ref has landed:\n // a ref callback is not a tracking scope, so reading the id here would miss\n // the first change.\n const setRef = (element: HTMLDivElement) => {\n row = element\n // A listener, not an `onFocusOut` prop, so a host's own handler is untouched.\n element.addEventListener('focusout', handleFocusOut)\n }\n\n // Registers the row under its id, and moves the registration when the row is\n // reused for another item.\n createEffect(id, (nextId) => {\n if (!row || registeredId === nextId) return\n if (registeredId !== undefined) tree.unregister(registeredId, row)\n registeredId = nextId\n tree.register(nextId, row)\n })\n\n const handleFocus = () => {\n tree.noteFocus(id())\n if (tree.activeId() !== id()) tree.onActiveIdChange(id())\n }\n\n const handleClick: JSX.EventHandler<HTMLDivElement, MouseEvent> = (event) => {\n if (isActionTarget(event.target, event.currentTarget)) return\n tree.focusItem(id())\n tree.activate(id(), event)\n }\n\n const handleDoubleClick: JSX.EventHandler<HTMLDivElement, MouseEvent> = (event) => {\n if (isActionTarget(event.target, event.currentTarget)) return\n local.onDoubleClick?.(id(), event)\n }\n\n const position = () => tree.index().positionById.get(id())\n // Only an expandable row has a chevron to press; a leaf's marker slot stays\n // part of the row so a click there is an ordinary row click.\n const markerTarget = () => tree.disclosure() === 'marker' && local.item.expandable\n\n // Event handler props are bound once, so the marker's handlers are always\n // attached and ask at event time whether the marker is a target: a row can\n // become expandable, or the tree switch disclosure modes, after it renders.\n const handleMarkerClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) => {\n if (!markerTarget()) return\n // The row's own handler would focus and activate the row.\n event.stopPropagation()\n tree.expand(id(), !local.item.expanded)\n }\n const handleMarkerTargetMouseDown: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) => {\n if (markerTarget()) handleMarkerMouseDown(event)\n }\n const handleMarkerTargetDoubleClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) => {\n if (markerTarget()) handleMarkerDoubleClick(event)\n }\n return (\n <div\n {...rest}\n ref={composeRefs(setRef, () => local.ref)}\n id={rest.id ?? `${tree.idPrefix}-item-${encodeURIComponent(id())}`}\n role=\"treeitem\"\n aria-level={local.item.level}\n aria-expanded={local.item.expandable ? (local.item.expanded ? 'true' : 'false') : undefined}\n aria-selected={local.selected === undefined ? undefined : local.selected ? 'true' : 'false'}\n aria-posinset={position()?.position}\n aria-setsize={position()?.setSize}\n tabindex={tree.isActive(id()) ? 0 : -1}\n data-tree-id={id()}\n data-active={tree.isActive(id()) ? '' : undefined}\n data-selected={local.selected ? '' : undefined}\n data-expanded={local.item.expandable ? String(local.item.expanded) : undefined}\n class={cn(\n 'group/tree-row flex min-h-row-sm w-full min-w-0 items-center gap-1.5 rounded-md pe-1.5 text-left text-sm outline-none transition-colors',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n {\n // Guide lines are positioned against the row; without them it keeps its original classes.\n relative: tree.guides(),\n 'bg-primary-subtle text-foreground': local.selected,\n 'hover:bg-surface-hover': !local.selected,\n },\n local.class\n )}\n style={{ 'padding-inline-start': `${rowInset(local.item.level)}px` }}\n onFocus={handleFocus}\n onClick={handleClick}\n onDblClick={handleDoubleClick}\n >\n <Show when={tree.guides() && local.item.level > 1}>\n <For each={Array.from({ length: local.item.level - 1 }, (_, index) => index)}>\n {(index) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"tree-row-guide\"\n class=\"pointer-events-none absolute inset-y-0 w-px bg-border\"\n style={{ 'inset-inline-start': `${rowInset(index + 1) + GUIDE_CENTER}px` }}\n />\n )}\n </For>\n </Show>\n <span\n data-slot={markerTarget() ? 'tree-row-disclosure' : undefined}\n class={cn(\n 'flex',\n !markerTarget() && 'size-3.5',\n 'shrink-0 items-center justify-center text-muted-foreground',\n /* The glyph stays 14px wide but the target is not: it takes the row's full\n height (a flex child's `self-stretch`, so it follows row density and a\n tall trailing control) and the pseudo-element widens it to 26px, which\n stops at the row's own padding and gap, never over the icon or label. */\n markerTarget() &&\n 'relative w-3.5 cursor-pointer self-stretch hover:text-foreground after:absolute after:inset-y-0 after:-inset-x-1.5'\n )}\n onMouseDown={handleMarkerTargetMouseDown}\n onClick={handleMarkerClick}\n onDblClick={handleMarkerTargetDoubleClick}\n >\n {local.item.expandable ? (\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 transition-transform', local.item.expanded && 'rotate-90')}\n />\n ) : null}\n </span>\n <Show when={leading()}>\n {(slot) => (\n <span class=\"flex size-4 shrink-0 items-center justify-center [&_svg]:size-4\">\n {slot()}\n </span>\n )}\n </Show>\n <span class=\"min-w-0 flex-1 truncate\">{local.children}</span>\n <Show when={trailing()}>\n {(slot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground\">\n {slot()}\n </span>\n )}\n </Show>\n </div>\n )\n}\n\n/**\n * TreeRowActions.\n *\n * Row-level commands (rename, copy, delete) that stay out of the way until the\n * row is hovered or holds focus, so a long tree reads as names rather than a\n * wall of buttons. Put it in `TreeRow`'s `trailing` slot beside any status that\n * must stay visible. `pinned` keeps the actions shown, e.g. while a destructive\n * action waits for its confirming second press.\n */\nexport function TreeRowActions(props: ComponentProps<'span'> & { pinned?: boolean }) {\n const local = props\n const rest = omit(props, 'class', 'pinned')\n return (\n <span\n data-slot=\"tree-row-actions\"\n data-pinned={local.pinned ? '' : undefined}\n class={cn(\n 'flex shrink-0 items-center gap-1 opacity-0 transition-opacity ease-out',\n 'group-hover/tree-row:opacity-100 group-focus-within/tree-row:opacity-100 data-pinned:opacity-100',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TreeStickyHeaderProps = {\n /** The first row in view; its expanded ancestors pin above it. Null pins nothing. */\n topId: string | null\n /** A pinned folder's content: the same icon and name its row shows. */\n label: (id: string) => JSX.Element\n /** A pinned folder was pressed; a file explorer scrolls its row into view. */\n onSelect?: (id: string) => void\n /** The most ancestors pinned at once; the deepest ones win. Defaults to 5. */\n maxRows?: number\n class?: string\n}\n\n/**\n * TreeStickyHeader.\n *\n * Pins the folders above the first row in view to the top of a scrolling tree, so a reader deep\n * in a long folder still sees where they are (Zed's sticky scroll, VS Code's sticky tree). Put it\n * first inside `Tree`, whose root is the scroll container. It takes no layout space: the pinned\n * rows float over the rows beneath, so the host's row window math is unchanged.\n *\n * The pinned rows repeat rows the tree already exposes, so they are hidden from assistive\n * technology and kept out of the tab order; they are a pointer shortcut only. The host decides\n * which row is first in view (it owns the row window), and should pass the row under the pinned\n * stack rather than the one at the very top, see `treeStickyAncestors`.\n */\nexport function TreeStickyHeader(props: TreeStickyHeaderProps) {\n const tree = useTreeContext()\n const ancestors = createMemo(() =>\n treeStickyAncestors(tree.index(), props.topId).slice(-(props.maxRows ?? 5))\n )\n return (\n <div data-slot=\"tree-sticky-header\" class={cn('sticky top-0 z-10 h-0', props.class)}>\n <Show when={ancestors().length > 0}>\n <div aria-hidden=\"true\" class=\"border-b border-border bg-background\">\n <For each={ancestors()}>\n {(item) => (\n <button\n type=\"button\"\n tabindex={-1}\n data-tree-sticky-id={item.id}\n class=\"flex min-h-row-sm w-full min-w-0 items-center gap-1.5 pe-1.5 text-left text-sm outline-none hover:bg-surface-hover\"\n style={{ 'padding-inline-start': `${rowInset(item.level)}px` }}\n // A press must not focus this aria-hidden shortcut: focus would leave the\n // tree, its recovery state would clear and Arrow keys would stop working.\n onMouseDown={handleMarkerMouseDown}\n onClick={() => props.onSelect?.(item.id)}\n >\n <span class=\"flex size-3.5 shrink-0 items-center justify-center text-muted-foreground\">\n <ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />\n </span>\n {props.label(item.id)}\n </button>\n )}\n </For>\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * The expanded folders above `id`, outermost first. A host finds the row under the pinned stack\n * by asking again for the row at `scrollTop + ancestors × rowHeight` until the answer settles.\n */\nexport function treeStickyAncestors(\n index: Pick<TreeNavigationIndex, 'byId'>,\n id: string | null\n): TreeItemDescriptor[] {\n const chain: TreeItemDescriptor[] = []\n let parentId = id === null ? null : (index.byId.get(id)?.parentId ?? null)\n while (parentId !== null) {\n const parent = index.byId.get(parentId)\n if (!parent) break\n chain.push(parent)\n parentId = parent.parentId\n }\n return chain.toReversed()\n}\n\n// Pressing the chevron must not move focus to its row: a mousedown on a\n// non-focusable child would otherwise focus the row, making it the roving stop\n// (and notifying `onActiveIdChange`) for what is a disclosure toggle, not a\n// selection. The press itself leaves focus where it was, so Left/Right keep\n// acting on the row the keyboard user left off at. It cannot stop the toggle\n// from hiding that row; `Tree` then recovers focus onto the first visible row.\nconst handleMarkerMouseDown: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) =>\n event.preventDefault()\n// A double-click is two toggles; it must not also reach `onDoubleClick`\n// (rename, open) as though the row itself had been double-clicked.\nconst handleMarkerDoubleClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) =>\n event.stopPropagation()\n\n/** The inline-start padding of a row at a one-based `level`, in px. */\nfunction rowInset(level: number): number {\n return 6 + Math.max(0, level - 1) * 12\n}\n/** Half the 14px chevron: a level's guide line runs down the middle of its parent's chevron. */\nconst GUIDE_CENTER = 7\n\nfunction isActionTarget(target: EventTarget | null, currentTarget: HTMLElement): boolean {\n if (!(target instanceof Element) || target === currentTarget) return false\n // Solid delivers an event from a portalled child (a row's menu) to the component that hosts\n // the portal, so a click on a menu item would otherwise also activate the row behind it.\n if (!currentTarget.contains(target)) return true\n return Boolean(\n target.closest(\n 'a, button, input, textarea, select, [contenteditable=\"true\"], [role=\"button\"], [data-tree-keyboard-stop]'\n )\n )\n}\n\nfunction composeRefs(\n internal: (element: HTMLDivElement) => void,\n external: () => ComponentProps<'div'>['ref']\n): (element: HTMLDivElement) => void {\n return (element) => {\n internal(element)\n forwardRef(external, element)\n }\n}\n\nexport type { TreeItemDescriptor } from './tree-navigation'\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,IAAM,eAAe,SAASoB,cAAkB;AAoBhD,IAAM,cAAc,cAAuC,IAAI;AAE/D,SAAS,iBAAiB;CACxB,MAAM,OAAO,WAAW,WAAW;CACnC,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,8CAA8C;CACzE,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,SAAgB,KAAK,OAAkB;CACrC,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,gBACA,YACA,oBACA,YACA,cACA,UACA,cACA,gBACA,mBACA,mBACA,iBACA,kBACA,UACF;CAEA,MAAM,QAAQ,iBAAiB,eAAe,MAAM,YAAY,CAAC;CACjE,MAAM,oBAAoB,iBAAiB;EACzC,MAAM,YAAY,MAAM;EACxB,MAAM,UAAU,MAAM;EACtB,OAAO,cAAc,QAAQ,QAAQ,KAAK,IAAI,SAAS,IAAI,YAAa,QAAQ,IAAI,MAAM;CAC5F,CAAC;CAGD,MAAM,aAAa,kBAAwC,UAAU;EACnE,MAAM,KAAK,kBAAkB;EAC7B,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG,IAAI,QAAQ,IAAI,OAAO,MAAM;EACnE,IAAI,OAAO,MAAM,MAAM,MAAM;CAC/B,GAAG,CAAC,CAAC;CACL,MAAM,WAAW,QAAQ,eAAe;CACxC,MAAM,uBAAO,IAAI,IAA4B;CAC7C,MAAM,kCAAkB,IAAI,QAAgC;CAC5D,IAAI,iBAAgC;CACpC,IAAI;CACJ,IAAI,oBAAmC;CACvC,IAAI,YAA2B;CAC/B,IAAI,WAAW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CACA,OAAO,MAAM,WAAW;AAC1B;AAQA,IAAM,yBAAwE,UAC5E,MAAM,eAAe;AAGvB,IAAM,2BAA0E,UAC9E,MAAM,gBAAgB;;AAGxB,SAAS,SAAS,OAAuB;CACvC,OAAO,IAAI,KAAK,IAAI,GAAG,QAAQ,CAAC,IAAI;AACtC;;AAEA,IAAM,eAAe;AAErB,SAAS,eAAe,QAA4B,eAAqC;CACvF,IAAI,EAAE,kBAAkB,YAAY,WAAW,eAAe,OAAO;CAGrE,IAAI,CAAC,cAAc,SAAS,MAAM,GAAG,OAAO;CAC5C,OAAO,QACL,OAAO,QACL,8GACF,CACF;AACF;AAEA,SAAS,YACP,UACA,UACmC;CACnC,QAAQ,YAAY;EAClB,SAAS,OAAO;EAChB,WAAW,UAAU,OAAO;CAC9B;AACF"}
1
+ {"version":3,"file":"tree.js","names":["<TreeContext value={context}>\n <div\n {...rest}\n role=\"tree\"\n aria-multiselectable={local.selectionMode === 'multiple' ? 'true' : undefined}\n data-slot=\"tree\"\n class={cn(\n /* A virtualized host remounts rows as it scrolls; scroll anchoring\n would latch onto the focused row and fight the scrollbar. */\n 'flex min-w-0 flex-col [overflow-anchor:none]',\n local.class\n )}\n onKeyDown={handleKeyDown}\n >\n {local.children}\n </div>\n </TreeContext>","value={context}","role=\"tree\"","onKeyDown={handleKeyDown}","<div\n {...rest}\n role=\"tree\"\n aria-multiselectable={local.selectionMode === 'multiple' ? 'true' : undefined}\n data-slot=\"tree\"\n class={cn(\n /* A virtualized host remounts rows as it scrolls; scroll anchoring\n would latch onto the focused row and fight the scrollbar. */\n 'flex min-w-0 flex-col [overflow-anchor:none]',\n local.class\n )}\n onKeyDown={handleKeyDown}\n >\n {local.children}\n </div>","role=\"treeitem\"","onFocus={handleFocus}","onClick={handleClick}","onDblClick={handleDoubleClick}","ref={composeRefs(setRef, () => local.ref)}","<For each={Array.from({ length: local.item.level - 1 }, (_, index) => index)}>\n {(index) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"tree-row-guide\"\n class=\"pointer-events-none absolute inset-y-0 w-px bg-border\"\n style={{ 'inset-inline-start': `${rowInset(index + 1) + GUIDE_CENTER}px` }}\n />\n )}\n </For>","<div\n {...rest}\n ref={composeRefs(setRef, () => local.ref)}\n id={rest.id ?? `${tree.idPrefix}-item-${encodeURIComponent(id())}`}\n role=\"treeitem\"\n aria-level={local.item.level}\n aria-expanded={local.item.expandable ? (local.item.expanded ? 'true' : 'false') : undefined}\n aria-selected={local.selected === undefined ? undefined : local.selected ? 'true' : 'false'}\n aria-posinset={position()?.position}\n aria-setsize={position()?.setSize}\n tabindex={tree.isActive(id()) ? 0 : -1}\n data-tree-id={id()}\n data-active={tree.isActive(id()) ? '' : undefined}\n data-selected={local.selected ? '' : undefined}\n data-expanded={local.item.expandable ? String(local.item.expanded) : undefined}\n class={cn(\n 'group/tree-row flex min-h-row-sm w-full min-w-0 items-center gap-1.5 rounded-md pe-1.5 text-left text-sm outline-none transition-colors',\n 'focus-visible:border-ring focus-visible:focus-outline-inset',\n {\n // Guide lines are positioned against the row; without them it keeps its original classes.\n relative: tree.guides(),\n 'bg-primary-subtle text-foreground': local.selected,\n 'hover:bg-surface-hover': !local.selected,\n },\n local.class\n )}\n style={{ 'padding-inline-start': `${rowInset(local.item.level)}px` }}\n onFocus={handleFocus}\n onClick={handleClick}\n onDblClick={handleDoubleClick}\n >\n <Show when={tree.guides() && local.item.level > 1}>\n <For each={Array.from({ length: local.item.level - 1 }, (_, index) => index)}>\n {(index) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"tree-row-guide\"\n class=\"pointer-events-none absolute inset-y-0 w-px bg-border\"\n style={{ 'inset-inline-start': `${rowInset(index + 1) + GUIDE_CENTER}px` }}\n />\n )}\n </For>\n </Show>\n <span\n data-slot={markerTarget() ? 'tree-row-disclosure' : undefined}\n class={cn(\n 'flex',\n !markerTarget() && 'size-3.5',\n 'shrink-0 items-center justify-center text-muted-foreground',\n /* The glyph stays 14px wide but the target is not: it takes the row's full\n height (a flex child's `self-stretch`, so it follows row density and a\n tall trailing control) and the pseudo-element widens it to 26px, which\n stops at the row's own padding and gap, never over the icon or label. */\n markerTarget() &&\n 'relative w-3.5 cursor-pointer self-stretch hover:text-foreground after:absolute after:inset-y-0 after:-inset-x-1.5'\n )}\n onMouseDown={handleMarkerTargetMouseDown}\n onClick={handleMarkerClick}\n onDblClick={handleMarkerTargetDoubleClick}\n >\n {local.item.expandable ? (\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 transition-transform', local.item.expanded && 'rotate-90')}\n />\n ) : null}\n </span>\n <Show when={leading()}>\n {(slot) => (\n <span class=\"flex size-4 shrink-0 items-center justify-center [&_svg]:size-4\">\n {slot()}\n </span>\n )}\n </Show>\n <span class=\"min-w-0 flex-1 truncate\">{local.children}</span>\n <Show when={trailing()}>\n {(slot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground\">\n {slot()}\n </span>\n )}\n </Show>\n </div>","<ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 transition-transform', local.item.expanded && 'rotate-90')}\n />","class={cn(\n 'flex',\n !markerTarget() && 'size-3.5',\n 'shrink-0 items-center justify-center text-muted-foreground',\n /* The glyph stays 14px wide but the target is not: it takes the row's full\n height (a flex child's `self-stretch`, so it follows row density and a\n tall trailing control) and the pseudo-element widens it to 26px, which\n stops at the row's own padding and gap, never over the icon or label. */\n markerTarget() &&\n 'relative w-3.5 cursor-pointer self-stretch hover:text-foreground after:absolute after:inset-y-0 after:-inset-x-1.5'\n )}","<span\n data-slot=\"tree-row-actions\"\n data-pinned={local.pinned ? '' : undefined}\n class={cn(\n 'flex shrink-0 items-center gap-1 opacity-0 transition-opacity ease-out',\n 'group-hover/tree-row:opacity-100 group-focus-within/tree-row:opacity-100 data-pinned:opacity-100',\n local.class\n )}\n {...rest}\n />","<For each={ancestors()}>\n {(item) => (\n <button\n type=\"button\"\n tabindex={-1}\n data-tree-sticky-id={item.id}\n class=\"flex min-h-row-sm w-full min-w-0 items-center gap-1.5 pe-1.5 text-left text-sm outline-none hover:bg-surface-hover\"\n style={{ 'padding-inline-start': `${rowInset(item.level)}px` }}\n // A press must not focus this aria-hidden shortcut: focus would leave the\n // tree, its recovery state would clear and Arrow keys would stop working.\n onMouseDown={handleMarkerMouseDown}\n onClick={() => props.onSelect?.(item.id)}\n >\n <span class=\"flex size-3.5 shrink-0 items-center justify-center text-muted-foreground\">\n <ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />\n </span>\n {props.label(item.id)}\n </button>\n )}\n </For>","<ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />","class=\"size-3.5 rotate-90\"","'padding-inline-start': `${rowInset(item.level)}px`","<div data-slot=\"tree-sticky-header\" class={cn('sticky top-0 z-10 h-0', props.class)}>\n <Show when={ancestors().length > 0}>\n <div aria-hidden=\"true\" class=\"border-b border-border bg-background\">\n <For each={ancestors()}>\n {(item) => (\n <button\n type=\"button\"\n tabindex={-1}\n data-tree-sticky-id={item.id}\n class=\"flex min-h-row-sm w-full min-w-0 items-center gap-1.5 pe-1.5 text-left text-sm outline-none hover:bg-surface-hover\"\n style={{ 'padding-inline-start': `${rowInset(item.level)}px` }}\n // A press must not focus this aria-hidden shortcut: focus would leave the\n // tree, its recovery state would clear and Arrow keys would stop working.\n onMouseDown={handleMarkerMouseDown}\n onClick={() => props.onSelect?.(item.id)}\n >\n <span class=\"flex size-3.5 shrink-0 items-center justify-center text-muted-foreground\">\n <ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />\n </span>\n {props.label(item.id)}\n </button>\n )}\n </For>\n </div>\n </Show>\n </div>","LucideChevronRight","_$spread","_$insert","_$effect","_$setStyleProperty","_$readShallow","_$setAttribute","_$className","_$addEvent"],"sources":["../../../../src/components/composites/tree/tree.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { ChevronRight as LucideChevronRight } from '@lucide/solid'\nimport {\n createContext,\n createEffect,\n createMemo,\n createProjection,\n createUniqueId,\n For,\n onCleanup,\n Show,\n omit,\n useContext,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport {\n indexTreeItems,\n treeNavigationAction,\n typeaheadIndex,\n type TreeItemDescriptor,\n type TreeNavigationIndex,\n} from './tree-navigation'\nimport { fastIcon } from '#lib/fast-icon'\nimport { forwardRef } from '#lib/refs'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronRight = fastIcon(LucideChevronRight)\n\ntype TreeContextValue = {\n idPrefix: string\n activeId: () => string | null\n /** O(1) per change: only the rows whose answer flips re-run, not every row. */\n isActive: (id: string) => boolean\n index: () => TreeNavigationIndex\n register: (id: string, element: HTMLDivElement) => void\n unregister: (id: string, element: HTMLDivElement | undefined) => void\n focusItem: (id: string) => void\n noteFocus: (id: string) => void\n noteBlur: (next: EventTarget | null) => void\n activate: (id: string, event: Event) => void\n expand: (id: string, expanded: boolean) => void\n disclosure: () => TreeDisclosure\n guides: () => boolean\n onActiveIdChange: (id: string) => void\n}\n\nconst TreeContext = createContext<TreeContextValue | null>(null)\n\nfunction useTreeContext() {\n const tree = useContext(TreeContext)\n if (!tree) throw new Error('[adea-ui]: TreeRow must be used inside Tree.')\n return tree\n}\n\n/**\n * Who owns the pointer on a row's disclosure chevron.\n *\n * - `row` (default): the chevron is decoration; a click anywhere on the row,\n * chevron included, is a row activation. This is the file-explorer\n * convention, where the host's `onActivate` toggles a folder.\n * - `marker`: the chevron of an expandable row is its own pointer target. It\n * calls `onExpand(id, !expanded)` and nothing else; the rest of the row still\n * activates. For trees where expanding and selecting are independent (a\n * source list that selects a source and separately reveals its details).\n */\nexport type TreeDisclosure = 'row' | 'marker'\n\ntype TreeAccessibleName =\n | { 'aria-label': string; 'aria-labelledby'?: string }\n | { 'aria-label'?: string; 'aria-labelledby': string }\n\nexport type TreeProps = Omit<\n ComponentProps<'div'>,\n 'children' | 'role' | 'tabindex' | 'onKeyDown' | 'aria-label' | 'aria-labelledby'\n> &\n TreeAccessibleName & {\n /** Complete, ordered projection of currently visible (expanded) items. */\n visibleItems: readonly TreeItemDescriptor[]\n /** The host-owned identity of the row that currently owns roving focus. */\n activeId: string | null\n /**\n * Called when keyboard or pointer navigation changes the active row, and when\n * the active row leaves `visibleItems` (collapsed away, filtered out) and the\n * first visible row takes over as the roving stop.\n */\n onActiveIdChange: (id: string) => void\n /** Called for Left/Right expand and collapse requests. */\n onExpand?: (id: string, expanded: boolean) => void\n /**\n * Opt-in pointer behaviour of the disclosure chevron; see {@link TreeDisclosure}.\n * Keyboard behaviour is identical in both modes: Left/Right expand and collapse.\n */\n disclosure?: TreeDisclosure\n /**\n * Draw a vertical guide line down each ancestor level of a nested row, so a\n * group of children reads as belonging to its parent. Off by default: a flat\n * list or a dense file explorer carries its own rhythm.\n */\n guides?: boolean\n /** Called for Enter or pointer activation. Domain action stays host-owned. */\n onActivate?: (id: string, event: Event) => void\n /** Called for Space selection. Selection state stays host-owned. */\n onSelectItem?: (id: string, event: Event) => void\n /** Ask the host window to mount/reveal an item before focus moves to it. */\n onRequestReveal?: (id: string) => void\n /** Report a mounted row's border-box block size in CSS pixels for host range math. */\n onRowSizeChange?: (id: string, blockSize: number) => void\n /** Declares a multi-select tree to assistive technology. */\n selectionMode?: 'single' | 'multiple'\n /**\n * The text a row is found by when the reader types its first letters. Supply\n * it to turn on typeahead: a typed prefix moves focus to the next visible row\n * whose label starts with it, revealing an unmounted row first.\n */\n typeaheadLabel?: (id: string) => string\n children?: JSX.Element\n }\n\n/**\n * Tree.\n *\n * Supplies semantic and keyboard behavior for a tree whose host owns the\n * visible projection, filesystem state, row window and domain actions. The\n * mounted children can be a small virtualized window; `visibleItems` remains\n * the complete ordered projection so keyboard movement and sibling positions\n * do not depend on which rows currently exist in the DOM.\n *\n * This component implements the WAI-ARIA tree row navigation contract itself\n * and leaves product state to callbacks; it predates ui-sdk, whose Tree owns\n * its items and expansion where this one takes the host's projection as given.\n *\n * By default the disclosure chevron is decoration and a click anywhere on a\n * row activates it, so a file explorer can toggle a folder from `onActivate`.\n * Reach for `disclosure=\"marker\"` when expanding and selecting are separate\n * decisions: the chevron then calls only `onExpand`, and the rest of the row\n * calls only `onActivate`. The chevron stays `aria-hidden` and out of the tab\n * order in both modes; keyboard expansion is Left/Right either way.\n *\n * Collapsing is the one thing that can move focus without a key or a click on\n * the target row: when the active row leaves `visibleItems`, the first visible\n * row becomes the roving stop and `onActiveIdChange` is called with it. If the\n * removed row held focus, or was the last row the tree saw focused, focus moves\n * to that same row; if it had no focus, only the roving stop moves. Focus that\n * has already gone to a control outside the tree is never pulled back: the tree\n * forgets its last focused row when focus moves to an element outside it, and\n * the roving stop alone moves if that control still has focus when the row is\n * hidden. Focus the tree has asked for but not yet moved (a queued recovery, or a\n * keyboard move to a row the host has not mounted) is withdrawn when focus lands\n * outside the tree, and is checked again when a row mounts. This is the same in\n * both `disclosure` modes and for every way a host collapses a row.\n */\nexport function Tree(props: TreeProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'visibleItems',\n 'activeId',\n 'onActiveIdChange',\n 'onExpand',\n 'disclosure',\n 'guides',\n 'onActivate',\n 'onSelectItem',\n 'onRequestReveal',\n 'onRowSizeChange',\n 'selectionMode',\n 'typeaheadLabel',\n 'children'\n )\n\n const index = createMemo(() => indexTreeItems(local.visibleItems))\n const effectiveActiveId = createMemo(() => {\n const candidate = local.activeId\n const visible = index()\n return candidate !== null && visible.byId.has(candidate) ? candidate : (visible.ids[0] ?? null)\n })\n // Keyed by row id, so moving the roving stop notifies only the row it leaves\n // and the row it reaches, not every mounted row.\n const activeRows = createProjection<Record<string, true>>((draft) => {\n const id = effectiveActiveId()\n for (const key of Object.keys(draft)) if (key !== id) delete draft[key]\n if (id !== null) draft[id] = true\n }, {})\n const idPrefix = `tree-${createUniqueId()}`\n const rows = new Map<string, HTMLDivElement>()\n const rowIdsByElement = new WeakMap<HTMLDivElement, string>()\n let pendingFocusId: string | null = null\n let pendingFocusGuard: ((event: FocusEvent) => void) | undefined\n let requestedRevealId: string | null = null\n let focusedId: string | null = null\n let disposed = false\n const isInsideTreeRow = (element: Element) => {\n const row = element.closest('[role=\"treeitem\"]')\n return row instanceof HTMLDivElement && rowIdsByElement.has(row)\n }\n // True when a focusable control outside this tree owns focus. Nothing focused\n // (`body`) is not outside: that is where focus falls when a focused row is removed.\n const focusIsOutsideTree = () => {\n if (typeof document === 'undefined') return false\n const active = document.activeElement\n return (\n active instanceof Element &&\n active !== document.body &&\n active !== document.documentElement &&\n !isInsideTreeRow(active)\n )\n }\n // Rows are only observed for a host that reads their sizes (a virtualiser); an\n // observer per tree otherwise measures every row on every mount for nothing.\n const rowSizeObserver =\n typeof ResizeObserver === 'undefined' || !local.onRowSizeChange\n ? undefined\n : new ResizeObserver((entries) => {\n if (disposed) return\n for (const entry of entries) {\n const id = rowIdsByElement.get(entry.target as HTMLDivElement)\n const blockSize =\n entry.borderBoxSize[0]?.blockSize ?? (entry.target as HTMLElement).offsetHeight\n if (id !== undefined && Number.isFinite(blockSize) && blockSize > 0)\n local.onRowSizeChange?.(id, blockSize)\n }\n })\n\n // Focus the tree has asked for but not yet moved (a microtask away, or waiting for a\n // virtualised row to mount) is only a request. While one is pending, focus arriving\n // on a control outside the tree withdraws it, so a row mounting later cannot take\n // focus back from a control the user, or the host, has since chosen.\n const setPendingFocus = (id: string | null) => {\n pendingFocusId = id\n if (typeof document === 'undefined') return\n if (id === null) {\n if (pendingFocusGuard) document.removeEventListener('focusin', pendingFocusGuard, true)\n pendingFocusGuard = undefined\n } else if (!pendingFocusGuard) {\n pendingFocusGuard = (event) => {\n if (event.target instanceof Element && !isInsideTreeRow(event.target)) cancelPendingFocus()\n }\n document.addEventListener('focusin', pendingFocusGuard, true)\n }\n }\n // Withdrawing a request also drops the memory of the row it was recovering for:\n // nothing is left to recover.\n const cancelPendingFocus = () => {\n setPendingFocus(null)\n focusedId = null\n }\n\n let typed = ''\n let typedTimer: ReturnType<typeof setTimeout> | undefined\n\n onCleanup(() => {\n disposed = true\n setPendingFocus(null)\n rowSizeObserver?.disconnect()\n clearTimeout(typedTimer)\n })\n\n const requestReveal = (id: string, deferred = false) => {\n if (requestedRevealId === id) return\n requestedRevealId = id\n if (!deferred) {\n local.onRequestReveal?.(id)\n return\n }\n // From an effect's apply phase the host's callback runs a microtask later,\n // where it may read its own state (the window it renders) as any handler\n // would. A row that mounts meanwhile has already settled the request.\n queueMicrotask(() => {\n if (!disposed && requestedRevealId === id) local.onRequestReveal?.(id)\n })\n }\n\n const focusWhenMounted = (id: string) => {\n queueMicrotask(() => {\n if (pendingFocusId !== id || effectiveActiveId() !== id) return\n const row = rows.get(id)\n if (!row || typeof document === 'undefined') return\n // Ownership is checked when focus would move, not when it was requested: a\n // control outside the tree may have taken focus since, and keeps it.\n if (focusIsOutsideTree()) {\n cancelPendingFocus()\n return\n }\n row.focus()\n if (document.activeElement === row) setPendingFocus(null)\n })\n }\n\n const focusItem = (id: string) => {\n setPendingFocus(id)\n local.onActiveIdChange(id)\n if (rows.has(id)) requestedRevealId = null\n else requestReveal(id)\n focusWhenMounted(id)\n }\n\n const context: TreeContextValue = {\n idPrefix,\n activeId: effectiveActiveId,\n isActive: (id) => activeRows[id] === true,\n index,\n register: (id, element) => {\n rows.set(id, element)\n rowIdsByElement.set(element, id)\n rowSizeObserver?.observe(element)\n if (requestedRevealId === id) requestedRevealId = null\n if (pendingFocusId === id) focusWhenMounted(id)\n },\n unregister: (id, element) => {\n if (rows.get(id) !== element) return\n const focusWasInside =\n !disposed &&\n Boolean(\n element && typeof document !== 'undefined' && element.contains(document.activeElement)\n )\n rows.delete(id)\n if (element) {\n rowIdsByElement.delete(element)\n rowSizeObserver?.unobserve(element)\n }\n if (requestedRevealId === id) requestedRevealId = null\n if (focusWasInside) {\n queueMicrotask(() => {\n const fallbackId = effectiveActiveId()\n if (disposed || fallbackId === null || pendingFocusId === fallbackId) return\n // Focus fell out of the removed row, but it may have been given to a control\n // outside the tree before this ran. Only nothing-focused (body) recovers.\n if (focusIsOutsideTree()) {\n focusedId = null\n return\n }\n focusItem(fallbackId)\n })\n }\n },\n focusItem,\n noteFocus: (id) => {\n focusedId = id\n },\n noteBlur: (next) => {\n // Focus moving to an element outside this tree ends the memory of the last\n // focused row and withdraws any focus the tree was still waiting to give a\n // row. A null target (focus to nothing, or the window losing focus) is\n // ambiguous, so both stay for the recovery below.\n if (next instanceof Element && !isInsideTreeRow(next)) cancelPendingFocus()\n },\n activate: (id, event) => local.onActivate?.(id, event),\n expand: (id, expanded) => local.onExpand?.(id, expanded),\n disclosure: () => local.disclosure ?? 'row',\n guides: () => local.guides ?? false,\n onActiveIdChange: (id) => local.onActiveIdChange(id),\n }\n\n // A filtered, collapsed-away or removed active ID falls back to the first\n // visible item. This keeps one treeitem in the sequential tab order while\n // notifying the host.\n createEffect(\n () => ({ activeId: effectiveActiveId(), byId: index().byId, requested: local.activeId }),\n ({ activeId, byId, requested }) => {\n if (activeId === null) return\n // If the projection removes the last row that took focus (a host filter, or\n // an ancestor collapsing), move focus to the same fallback that now owns the\n // roving tab stop, unless a control outside the tree has focus: that control\n // keeps it, and only the roving stop moves.\n if (focusedId !== null && !byId.has(focusedId) && pendingFocusId !== activeId) {\n if (focusIsOutsideTree()) {\n focusedId = null\n if (requested !== activeId) local.onActiveIdChange(activeId)\n } else {\n focusItem(activeId)\n }\n } else if (requested !== activeId) {\n local.onActiveIdChange(activeId)\n }\n // Preserve the active row in a caller-owned virtual window, including when\n // the pane mounts with its saved active row outside the initial render range.\n if (!rows.has(activeId)) requestReveal(activeId, true)\n if (pendingFocusId === activeId) focusWhenMounted(activeId)\n }\n )\n\n const typeahead = (event: KeyboardEvent) => {\n const label = local.typeaheadLabel\n if (\n !label ||\n event.ctrlKey ||\n event.metaKey ||\n event.altKey ||\n event.key.length !== 1 ||\n event.key === ' '\n )\n return\n typed += event.key\n clearTimeout(typedTimer)\n typedTimer = setTimeout(() => (typed = ''), 700)\n const { ids, indexById } = index()\n const active = local.activeId === null ? -1 : (indexById.get(local.activeId) ?? -1)\n const target = ids[typeaheadIndex(ids.map(label), active, typed)]\n if (target === undefined) return\n event.preventDefault()\n focusItem(target)\n }\n\n const handleKeyDown: JSX.EventHandler<HTMLDivElement, KeyboardEvent> = (event) => {\n if (event.defaultPrevented || isActionTarget(event.target, event.currentTarget)) return\n\n const action = treeNavigationAction(index(), effectiveActiveId(), event.key)\n if (!action) {\n typeahead(event)\n return\n }\n event.preventDefault()\n\n switch (action.type) {\n case 'focus':\n focusItem(action.id)\n break\n case 'expand':\n local.onExpand?.(action.id, action.expanded)\n break\n case 'activate':\n local.onActivate?.(action.id, event)\n break\n case 'select':\n local.onSelectItem?.(action.id, event)\n break\n }\n }\n\n return (\n <TreeContext value={context}>\n <div\n {...rest}\n role=\"tree\"\n aria-multiselectable={local.selectionMode === 'multiple' ? 'true' : undefined}\n data-slot=\"tree\"\n class={cn(\n /* A virtualized host remounts rows as it scrolls; scroll anchoring\n would latch onto the focused row and fight the scrollbar. */\n 'flex min-w-0 flex-col [overflow-anchor:none]',\n local.class\n )}\n onKeyDown={handleKeyDown}\n >\n {local.children}\n </div>\n </TreeContext>\n )\n}\n\nexport type TreeRowProps = Omit<\n ComponentProps<'div'>,\n | 'children'\n | 'role'\n | 'tabindex'\n | 'onClick'\n | 'onFocus'\n | 'onDoubleClick'\n | 'style'\n | 'aria-level'\n | 'aria-expanded'\n | 'aria-selected'\n | 'aria-posinset'\n | 'aria-setsize'\n> & {\n item: TreeItemDescriptor\n /** Host-owned selection state; omitted for non-selectable trees. */\n selected?: boolean\n leading?: JSX.Element\n trailing?: JSX.Element\n children: JSX.Element\n onDoubleClick?: (id: string, event: MouseEvent & { currentTarget: HTMLDivElement }) => void\n}\n\n/**\n * TreeRow.\n *\n * Keeps the donor's disclosure marker, leading file/folder affordance, primary\n * label and trailing-action hierarchy while replacing the donor's button and\n * runtime callbacks with a shared treeitem and host-owned slots/actions.\n *\n * With `Tree`'s `disclosure=\"marker\"` the chevron of an expandable row is a\n * separate pointer target (`data-slot=\"tree-row-disclosure\"`) that only calls\n * `onExpand`. It is not focusable and has no role: the row remains the single\n * focus stop, Enter and Space still activate and select, and Left/Right still\n * expand and collapse, so the marker adds a pointer path and nothing else.\n * Pressing it does not move focus or the roving stop to its row; if the toggle\n * hides the focused row, `Tree` recovers focus as it does for any collapse (see\n * the `Tree` comment).\n */\nexport function TreeRow(props: TreeRowProps) {\n const tree = useTreeContext()\n const local = props\n const rest = omit(\n props,\n 'class',\n 'item',\n 'selected',\n 'leading',\n 'trailing',\n 'children',\n 'onDoubleClick',\n 'ref'\n )\n\n let row: HTMLDivElement | undefined\n let registeredId: string | undefined\n const id = () => local.item.id\n // Each slot is a JSX getter that builds its subtree per read, so it is read once\n // into a memo. The memo holds the slot as given (not resolved), so the wrapper\n // span renders exactly when it did before: whenever a slot is passed, even one\n // whose content is currently empty, which keeps the row's spacing stable.\n const leading = createMemo(() => local.leading)\n const trailing = createMemo(() => local.trailing)\n\n const handleFocusOut = (event: FocusEvent) => tree.noteBlur(event.relatedTarget)\n\n onCleanup(() => {\n row?.removeEventListener('focusout', handleFocusOut)\n tree.unregister(registeredId ?? id(), row)\n })\n\n // The row registers in the effect below, which runs once the ref has landed:\n // a ref callback is not a tracking scope, so reading the id here would miss\n // the first change.\n const setRef = (element: HTMLDivElement) => {\n row = element\n // A listener, not an `onFocusOut` prop, so a host's own handler is untouched.\n element.addEventListener('focusout', handleFocusOut)\n }\n\n // Registers the row under its id, and moves the registration when the row is\n // reused for another item.\n createEffect(id, (nextId) => {\n if (!row || registeredId === nextId) return\n if (registeredId !== undefined) tree.unregister(registeredId, row)\n registeredId = nextId\n tree.register(nextId, row)\n })\n\n const handleFocus = () => {\n tree.noteFocus(id())\n if (tree.activeId() !== id()) tree.onActiveIdChange(id())\n }\n\n const handleClick: JSX.EventHandler<HTMLDivElement, MouseEvent> = (event) => {\n if (isActionTarget(event.target, event.currentTarget)) return\n tree.focusItem(id())\n tree.activate(id(), event)\n }\n\n const handleDoubleClick: JSX.EventHandler<HTMLDivElement, MouseEvent> = (event) => {\n if (isActionTarget(event.target, event.currentTarget)) return\n local.onDoubleClick?.(id(), event)\n }\n\n const position = () => tree.index().positionById.get(id())\n // Only an expandable row has a chevron to press; a leaf's marker slot stays\n // part of the row so a click there is an ordinary row click.\n const markerTarget = () => tree.disclosure() === 'marker' && local.item.expandable\n\n // Event handler props are bound once, so the marker's handlers are always\n // attached and ask at event time whether the marker is a target: a row can\n // become expandable, or the tree switch disclosure modes, after it renders.\n const handleMarkerClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) => {\n if (!markerTarget()) return\n // The row's own handler would focus and activate the row.\n event.stopPropagation()\n tree.expand(id(), !local.item.expanded)\n }\n const handleMarkerTargetMouseDown: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) => {\n if (markerTarget()) handleMarkerMouseDown(event)\n }\n const handleMarkerTargetDoubleClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) => {\n if (markerTarget()) handleMarkerDoubleClick(event)\n }\n return (\n <div\n {...rest}\n ref={composeRefs(setRef, () => local.ref)}\n id={rest.id ?? `${tree.idPrefix}-item-${encodeURIComponent(id())}`}\n role=\"treeitem\"\n aria-level={local.item.level}\n aria-expanded={local.item.expandable ? (local.item.expanded ? 'true' : 'false') : undefined}\n aria-selected={local.selected === undefined ? undefined : local.selected ? 'true' : 'false'}\n aria-posinset={position()?.position}\n aria-setsize={position()?.setSize}\n tabindex={tree.isActive(id()) ? 0 : -1}\n data-tree-id={id()}\n data-active={tree.isActive(id()) ? '' : undefined}\n data-selected={local.selected ? '' : undefined}\n data-expanded={local.item.expandable ? String(local.item.expanded) : undefined}\n class={cn(\n 'group/tree-row flex min-h-row-sm w-full min-w-0 items-center gap-1.5 rounded-md pe-1.5 text-left text-sm outline-none transition-colors',\n 'focus-visible:border-ring focus-visible:focus-outline-inset',\n {\n // Guide lines are positioned against the row; without them it keeps its original classes.\n relative: tree.guides(),\n 'bg-primary-subtle text-foreground': local.selected,\n 'hover:bg-surface-hover': !local.selected,\n },\n local.class\n )}\n style={{ 'padding-inline-start': `${rowInset(local.item.level)}px` }}\n onFocus={handleFocus}\n onClick={handleClick}\n onDblClick={handleDoubleClick}\n >\n <Show when={tree.guides() && local.item.level > 1}>\n <For each={Array.from({ length: local.item.level - 1 }, (_, index) => index)}>\n {(index) => (\n <span\n aria-hidden=\"true\"\n data-slot=\"tree-row-guide\"\n class=\"pointer-events-none absolute inset-y-0 w-px bg-border\"\n style={{ 'inset-inline-start': `${rowInset(index + 1) + GUIDE_CENTER}px` }}\n />\n )}\n </For>\n </Show>\n <span\n data-slot={markerTarget() ? 'tree-row-disclosure' : undefined}\n class={cn(\n 'flex',\n !markerTarget() && 'size-3.5',\n 'shrink-0 items-center justify-center text-muted-foreground',\n /* The glyph stays 14px wide but the target is not: it takes the row's full\n height (a flex child's `self-stretch`, so it follows row density and a\n tall trailing control) and the pseudo-element widens it to 26px, which\n stops at the row's own padding and gap, never over the icon or label. */\n markerTarget() &&\n 'relative w-3.5 cursor-pointer self-stretch hover:text-foreground after:absolute after:inset-y-0 after:-inset-x-1.5'\n )}\n onMouseDown={handleMarkerTargetMouseDown}\n onClick={handleMarkerClick}\n onDblClick={handleMarkerTargetDoubleClick}\n >\n {local.item.expandable ? (\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 transition-transform', local.item.expanded && 'rotate-90')}\n />\n ) : null}\n </span>\n <Show when={leading()}>\n {(slot) => (\n <span class=\"flex size-4 shrink-0 items-center justify-center [&_svg]:size-4\">\n {slot()}\n </span>\n )}\n </Show>\n <span class=\"min-w-0 flex-1 truncate\">{local.children}</span>\n <Show when={trailing()}>\n {(slot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground\">\n {slot()}\n </span>\n )}\n </Show>\n </div>\n )\n}\n\n/**\n * TreeRowActions.\n *\n * Row-level commands (rename, copy, delete) that stay out of the way until the\n * row is hovered or holds focus, so a long tree reads as names rather than a\n * wall of buttons. Put it in `TreeRow`'s `trailing` slot beside any status that\n * must stay visible. `pinned` keeps the actions shown, e.g. while a destructive\n * action waits for its confirming second press.\n */\nexport function TreeRowActions(props: ComponentProps<'span'> & { pinned?: boolean }) {\n const local = props\n const rest = omit(props, 'class', 'pinned')\n return (\n <span\n data-slot=\"tree-row-actions\"\n data-pinned={local.pinned ? '' : undefined}\n class={cn(\n 'flex shrink-0 items-center gap-1 opacity-0 transition-opacity ease-out',\n 'group-hover/tree-row:opacity-100 group-focus-within/tree-row:opacity-100 data-pinned:opacity-100',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TreeStickyHeaderProps = {\n /** The first row in view; its expanded ancestors pin above it. Null pins nothing. */\n topId: string | null\n /** A pinned folder's content: the same icon and name its row shows. */\n label: (id: string) => JSX.Element\n /** A pinned folder was pressed; a file explorer scrolls its row into view. */\n onSelect?: (id: string) => void\n /** The most ancestors pinned at once; the deepest ones win. Defaults to 5. */\n maxRows?: number\n class?: string\n}\n\n/**\n * TreeStickyHeader.\n *\n * Pins the folders above the first row in view to the top of a scrolling tree, so a reader deep\n * in a long folder still sees where they are (Zed's sticky scroll, VS Code's sticky tree). Put it\n * first inside `Tree`, whose root is the scroll container. It takes no layout space: the pinned\n * rows float over the rows beneath, so the host's row window math is unchanged.\n *\n * The pinned rows repeat rows the tree already exposes, so they are hidden from assistive\n * technology and kept out of the tab order; they are a pointer shortcut only. The host decides\n * which row is first in view (it owns the row window), and should pass the row under the pinned\n * stack rather than the one at the very top, see `treeStickyAncestors`.\n */\nexport function TreeStickyHeader(props: TreeStickyHeaderProps) {\n const tree = useTreeContext()\n const ancestors = createMemo(() =>\n treeStickyAncestors(tree.index(), props.topId).slice(-(props.maxRows ?? 5))\n )\n return (\n <div data-slot=\"tree-sticky-header\" class={cn('sticky top-0 z-10 h-0', props.class)}>\n <Show when={ancestors().length > 0}>\n <div aria-hidden=\"true\" class=\"border-b border-border bg-background\">\n <For each={ancestors()}>\n {(item) => (\n <button\n type=\"button\"\n tabindex={-1}\n data-tree-sticky-id={item.id}\n class=\"flex min-h-row-sm w-full min-w-0 items-center gap-1.5 pe-1.5 text-left text-sm outline-none hover:bg-surface-hover\"\n style={{ 'padding-inline-start': `${rowInset(item.level)}px` }}\n // A press must not focus this aria-hidden shortcut: focus would leave the\n // tree, its recovery state would clear and Arrow keys would stop working.\n onMouseDown={handleMarkerMouseDown}\n onClick={() => props.onSelect?.(item.id)}\n >\n <span class=\"flex size-3.5 shrink-0 items-center justify-center text-muted-foreground\">\n <ChevronRight aria-hidden=\"true\" class=\"size-3.5 rotate-90\" />\n </span>\n {props.label(item.id)}\n </button>\n )}\n </For>\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * The expanded folders above `id`, outermost first. A host finds the row under the pinned stack\n * by asking again for the row at `scrollTop + ancestors × rowHeight` until the answer settles.\n */\nexport function treeStickyAncestors(\n index: Pick<TreeNavigationIndex, 'byId'>,\n id: string | null\n): TreeItemDescriptor[] {\n const chain: TreeItemDescriptor[] = []\n let parentId = id === null ? null : (index.byId.get(id)?.parentId ?? null)\n while (parentId !== null) {\n const parent = index.byId.get(parentId)\n if (!parent) break\n chain.push(parent)\n parentId = parent.parentId\n }\n return chain.toReversed()\n}\n\n// Pressing the chevron must not move focus to its row: a mousedown on a\n// non-focusable child would otherwise focus the row, making it the roving stop\n// (and notifying `onActiveIdChange`) for what is a disclosure toggle, not a\n// selection. The press itself leaves focus where it was, so Left/Right keep\n// acting on the row the keyboard user left off at. It cannot stop the toggle\n// from hiding that row; `Tree` then recovers focus onto the first visible row.\nconst handleMarkerMouseDown: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) =>\n event.preventDefault()\n// A double-click is two toggles; it must not also reach `onDoubleClick`\n// (rename, open) as though the row itself had been double-clicked.\nconst handleMarkerDoubleClick: JSX.EventHandler<HTMLSpanElement, MouseEvent> = (event) =>\n event.stopPropagation()\n\n/** The inline-start padding of a row at a one-based `level`, in px. */\nfunction rowInset(level: number): number {\n return 6 + Math.max(0, level - 1) * 12\n}\n/** Half the 14px chevron: a level's guide line runs down the middle of its parent's chevron. */\nconst GUIDE_CENTER = 7\n\nfunction isActionTarget(target: EventTarget | null, currentTarget: HTMLElement): boolean {\n if (!(target instanceof Element) || target === currentTarget) return false\n // Solid delivers an event from a portalled child (a row's menu) to the component that hosts\n // the portal, so a click on a menu item would otherwise also activate the row behind it.\n if (!currentTarget.contains(target)) return true\n return Boolean(\n target.closest(\n 'a, button, input, textarea, select, [contenteditable=\"true\"], [role=\"button\"], [data-tree-keyboard-stop]'\n )\n )\n}\n\nfunction composeRefs(\n internal: (element: HTMLDivElement) => void,\n external: () => ComponentProps<'div'>['ref']\n): (element: HTMLDivElement) => void {\n return (element) => {\n internal(element)\n forwardRef(external, element)\n }\n}\n\nexport type { TreeItemDescriptor } from './tree-navigation'\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,IAAM,eAAe,SAASoB,cAAkB;AAoBhD,IAAM,cAAc,cAAuC,IAAI;AAE/D,SAAS,iBAAiB;CACxB,MAAM,OAAO,WAAW,WAAW;CACnC,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,8CAA8C;CACzE,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,SAAgB,KAAK,OAAkB;CACrC,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,gBACA,YACA,oBACA,YACA,cACA,UACA,cACA,gBACA,mBACA,mBACA,iBACA,kBACA,UACF;CAEA,MAAM,QAAQ,iBAAiB,eAAe,MAAM,YAAY,CAAC;CACjE,MAAM,oBAAoB,iBAAiB;EACzC,MAAM,YAAY,MAAM;EACxB,MAAM,UAAU,MAAM;EACtB,OAAO,cAAc,QAAQ,QAAQ,KAAK,IAAI,SAAS,IAAI,YAAa,QAAQ,IAAI,MAAM;CAC5F,CAAC;CAGD,MAAM,aAAa,kBAAwC,UAAU;EACnE,MAAM,KAAK,kBAAkB;EAC7B,KAAK,MAAM,OAAO,OAAO,K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CADrF,OACER;AA2BJ;;;;;AAMA,SAAgB,oBACd,OACA,IACsB;CACtB,MAAM,QAA8B,CAAC;CACrC,IAAI,WAAW,OAAO,OAAO,OAAQ,MAAM,KAAK,IAAI,EAAE,CAAC,EAAE,YAAY;CACrE,OAAO,aAAa,MAAM;EACxB,MAAM,SAAS,MAAM,KAAK,IAAI,QAAQ;EACtC,IAAI,CAAC,QAAQ;EACb,MAAM,KAAK,MAAM;EACjB,WAAW,OAAO;CACpB;CACA,OAAO,MAAM,WAAW;AAC1B;AAQA,IAAM,yBAAwE,UAC5E,MAAM,eAAe;AAGvB,IAAM,2BAA0E,UAC9E,MAAM,gBAAgB;;AAGxB,SAAS,SAAS,OAAuB;CACvC,OAAO,IAAI,KAAK,IAAI,GAAG,QAAQ,CAAC,IAAI;AACtC;;AAEA,IAAM,eAAe;AAErB,SAAS,eAAe,QAA4B,eAAqC;CACvF,IAAI,EAAE,kBAAkB,YAAY,WAAW,eAAe,OAAO;CAGrE,IAAI,CAAC,cAAc,SAAS,MAAM,GAAG,OAAO;CAC5C,OAAO,QACL,OAAO,QACL,8GACF,CACF;AACF;AAEA,SAAS,YACP,UACA,UACmC;CACnC,QAAQ,YAAY;EAClB,SAAS,OAAO;EAChB,WAAW,UAAU,OAAO;CAC9B;AACF"}
@@ -30,7 +30,7 @@ function WorkspaceMark(props) {
30
30
  return local.active ? "" : void 0;
31
31
  },
32
32
  get "class"() {
33
- return cn("relative flex size-9 shrink-0 items-center justify-center rounded-lg border text-sm font-semibold", "transition-[color,background-color,border-color,transform] ease-out outline-none select-none", "hover:scale-105 active:scale-95", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "disabled:pointer-events-none disabled:opacity-50", local.active ? "border-primary bg-primary-subtle text-primary" : "border-border bg-card text-muted-foreground hover:text-foreground", local.class);
33
+ return cn("relative flex size-9 shrink-0 items-center justify-center rounded-lg border text-sm font-semibold", "transition-[color,background-color,border-color,transform] ease-out outline-none select-none", "hover:scale-105 active:scale-95", "focus-visible:border-ring focus-visible:focus-outline", "disabled:pointer-events-none disabled:opacity-50", local.active ? "border-primary bg-primary-subtle text-primary" : "border-border bg-card text-muted-foreground hover:text-foreground", local.class);
34
34
  }
35
35
  }, rest], true);
36
36
  setAttribute(_el$2, "id", `${labelId}-name`);
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-mark.js","names":["type=\"button\"","<Show\n when={local.children}\n fallback={\n <span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>\n }\n >\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>","<span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>","{childrenSlot()}","<Show when={badge()}>\n {(badgeSlot) => (\n <span\n id={`${labelId}-badge`}\n data-slot=\"workspace-mark-badge\"\n class=\"absolute end-0 top-0 flex translate-x-1/2 -translate-y-1/2 items-center justify-center rtl:-translate-x-1/2\"\n >\n {badgeSlot()}\n </span>\n )}\n </Show>","<button\n type=\"button\"\n aria-label={badge() ? undefined : local.name}\n aria-labelledby={\n badge() && !props['aria-label']\n ? `${labelId}-name ${labelId}-mark ${labelId}-badge`\n : undefined\n }\n aria-current={local.active ? 'true' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n 'relative flex size-9 shrink-0 items-center justify-center rounded-lg border text-sm font-semibold',\n 'transition-[color,background-color,border-color,transform] ease-out outline-none select-none',\n 'hover:scale-105 active:scale-95',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n local.active\n ? 'border-primary bg-primary-subtle text-primary'\n : 'border-border bg-card text-muted-foreground hover:text-foreground',\n local.class\n )}\n {...rest}\n >\n <span id={`${labelId}-name`} class=\"sr-only\">\n {local.name}\n </span>\n <span id={`${labelId}-mark`} class=\"contents\" aria-hidden=\"true\">\n <Show\n when={local.children}\n fallback={\n <span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>\n }\n >\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>\n </span>{' '}\n {/* The badge is centred on the corner rather than tucked inside it. Inset\n by an edge offset, a count badge is wider than the space between the\n corner and the monogram, so it sat on the letter; centred on the corner,\n a dot, a one-digit and a two-digit count all clear the letter's box. */}\n <Show when={badge()}>\n {(badgeSlot) => (\n <span\n id={`${labelId}-badge`}\n data-slot=\"workspace-mark-badge\"\n class=\"absolute end-0 top-0 flex translate-x-1/2 -translate-y-1/2 items-center justify-center rtl:-translate-x-1/2\"\n >\n {badgeSlot()}\n </span>\n )}\n </Show>\n </button>","<LazyTooltip placement=\"right\" content={local.name}>\n {(tip) => (\n <span\n ref={tip.ref}\n class=\"contents\"\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n >\n {mark}\n </span>\n )}\n </LazyTooltip>","placement=\"right\"","ref={tip.ref}","resolveChildren","_$spread","_$setAttribute","_$insert","_$addEvent","_$effect"],"sources":["../../../../src/components/composites/workspace-mark/workspace-mark.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { children as resolveChildren, Show, createUniqueId, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { LazyTooltip } from '../../ui/tooltip'\n\n/**\n * WorkspaceMark.\n *\n * The mark for one workspace in a rail: an initial or a glyph, a ring while it is\n * active, and a badge for something unread. It is deliberately not an `Avatar` —\n * a workspace is not a person, it does not need an image or initials derived from a\n * name, and a rail of them needs an *active* treatment an avatar does not have.\n *\n * The mark is square with a rounded corner rather than round, which is what\n * distinguishes a workspace from a person at a glance in a rail that holds both.\n */\nexport type WorkspaceMarkProps = ComponentProps<'button'> & {\n /** The workspace's name. Used for the label, the initial, and the tooltip. */\n name: string\n /** Draw the active ring. */\n active?: boolean\n /** A count or a dot, drawn at the corner. */\n badge?: JSX.Element\n /** Replace the initial with a glyph. */\n children?: JSX.Element\n}\n\nexport function WorkspaceMark(props: WorkspaceMarkProps) {\n const local = props\n const rest = omit(props, 'class', 'name', 'active', 'badge', 'children')\n // A count is visible label text, so the accessible name must include it and the monogram.\n const labelId = createUniqueId()\n\n const badge = resolveChildren(() => local.badge)\n const mark = (\n <button\n type=\"button\"\n aria-label={badge() ? undefined : local.name}\n aria-labelledby={\n badge() && !props['aria-label']\n ? `${labelId}-name ${labelId}-mark ${labelId}-badge`\n : undefined\n }\n aria-current={local.active ? 'true' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n 'relative flex size-9 shrink-0 items-center justify-center rounded-lg border text-sm font-semibold',\n 'transition-[color,background-color,border-color,transform] ease-out outline-none select-none',\n 'hover:scale-105 active:scale-95',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n local.active\n ? 'border-primary bg-primary-subtle text-primary'\n : 'border-border bg-card text-muted-foreground hover:text-foreground',\n local.class\n )}\n {...rest}\n >\n <span id={`${labelId}-name`} class=\"sr-only\">\n {local.name}\n </span>\n <span id={`${labelId}-mark`} class=\"contents\" aria-hidden=\"true\">\n <Show\n when={local.children}\n fallback={\n <span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>\n }\n >\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>\n </span>{' '}\n {/* The badge is centred on the corner rather than tucked inside it. Inset\n by an edge offset, a count badge is wider than the space between the\n corner and the monogram, so it sat on the letter; centred on the corner,\n a dot, a one-digit and a two-digit count all clear the letter's box. */}\n <Show when={badge()}>\n {(badgeSlot) => (\n <span\n id={`${labelId}-badge`}\n data-slot=\"workspace-mark-badge\"\n class=\"absolute end-0 top-0 flex translate-x-1/2 -translate-y-1/2 items-center justify-center rtl:-translate-x-1/2\"\n >\n {badgeSlot()}\n </span>\n )}\n </Show>\n </button>\n )\n\n return (\n <LazyTooltip placement=\"right\" content={local.name}>\n {(tip) => (\n <span\n ref={tip.ref}\n class=\"contents\"\n aria-describedby={tip.describedBy()}\n onPointer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ChC,CAAA,CACF;CAnCRS,OAAA,MAwCER,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,MAAM;EAAC;EAAnBA,WACI,qBACA;GAMM,IAAA,QAAA,QAAA;GALJO,aAAA,OAAA,MAAI,GAAG,QAAQ,OAAO;GADxBC,OAAA,OAKG,SACG;GANN,OAAA;EAMM,EAAA,CAAA;CAEJ,CAAA,GAlDR,IAmDQ;CApDV,MAAM,OACJP;CAsDF,OACEC,gBAAAA,aAAAA;EAAaC,WAAU;EAAQ,IAAA,UAAA;GAAS,OAAA,MAAM;EAAI;EAAlDD,WACI,eACA;GAQM,IAAA,QAAA,QAAA;GAHJO,SAAA,OAAA,SAAS,IAAI,OAAO;GADpBA,SAAA,OAAA,gBAAgB,IAAI,cAAc;GAHlC,IAAA,QAAK,IAAI;GAAT,OAAA,UAAA,cAAA,MAAA,QAAA,KAAY,IAAZL,UAAAA;;GAAY,GAAZA,KAAY,IAAZ,IAAS,MAATA;GADFI,OAAA,OAOG,IACG;GALJE,aAAkB,IAAI,YAAY,IAAlC,QAAA;IAAmCH,aAAA,OAAA,oBAAA,GAAA;;GAHrC,OAAA;EAQM,EAAA,CAAA;CAEG,CAAA;AAEjB"}
1
+ {"version":3,"file":"workspace-mark.js","names":["type=\"button\"","<Show\n when={local.children}\n fallback={\n <span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>\n }\n >\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>","<span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>","{childrenSlot()}","<Show when={badge()}>\n {(badgeSlot) => (\n <span\n id={`${labelId}-badge`}\n data-slot=\"workspace-mark-badge\"\n class=\"absolute end-0 top-0 flex translate-x-1/2 -translate-y-1/2 items-center justify-center rtl:-translate-x-1/2\"\n >\n {badgeSlot()}\n </span>\n )}\n </Show>","<button\n type=\"button\"\n aria-label={badge() ? undefined : local.name}\n aria-labelledby={\n badge() && !props['aria-label']\n ? `${labelId}-name ${labelId}-mark ${labelId}-badge`\n : undefined\n }\n aria-current={local.active ? 'true' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n 'relative flex size-9 shrink-0 items-center justify-center rounded-lg border text-sm font-semibold',\n 'transition-[color,background-color,border-color,transform] ease-out outline-none select-none',\n 'hover:scale-105 active:scale-95',\n 'focus-visible:border-ring focus-visible:focus-outline',\n 'disabled:pointer-events-none disabled:opacity-50',\n local.active\n ? 'border-primary bg-primary-subtle text-primary'\n : 'border-border bg-card text-muted-foreground hover:text-foreground',\n local.class\n )}\n {...rest}\n >\n <span id={`${labelId}-name`} class=\"sr-only\">\n {local.name}\n </span>\n <span id={`${labelId}-mark`} class=\"contents\" aria-hidden=\"true\">\n <Show\n when={local.children}\n fallback={\n <span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>\n }\n >\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>\n </span>{' '}\n {/* The badge is centred on the corner rather than tucked inside it. Inset\n by an edge offset, a count badge is wider than the space between the\n corner and the monogram, so it sat on the letter; centred on the corner,\n a dot, a one-digit and a two-digit count all clear the letter's box. */}\n <Show when={badge()}>\n {(badgeSlot) => (\n <span\n id={`${labelId}-badge`}\n data-slot=\"workspace-mark-badge\"\n class=\"absolute end-0 top-0 flex translate-x-1/2 -translate-y-1/2 items-center justify-center rtl:-translate-x-1/2\"\n >\n {badgeSlot()}\n </span>\n )}\n </Show>\n </button>","<LazyTooltip placement=\"right\" content={local.name}>\n {(tip) => (\n <span\n ref={tip.ref}\n class=\"contents\"\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n >\n {mark}\n </span>\n )}\n </LazyTooltip>","placement=\"right\"","ref={tip.ref}","resolveChildren","_$spread","_$setAttribute","_$insert","_$addEvent","_$effect"],"sources":["../../../../src/components/composites/workspace-mark/workspace-mark.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { children as resolveChildren, Show, createUniqueId, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { LazyTooltip } from '../../ui/tooltip'\n\n/**\n * WorkspaceMark.\n *\n * The mark for one workspace in a rail: an initial or a glyph, a ring while it is\n * active, and a badge for something unread. It is deliberately not an `Avatar` —\n * a workspace is not a person, it does not need an image or initials derived from a\n * name, and a rail of them needs an *active* treatment an avatar does not have.\n *\n * The mark is square with a rounded corner rather than round, which is what\n * distinguishes a workspace from a person at a glance in a rail that holds both.\n */\nexport type WorkspaceMarkProps = ComponentProps<'button'> & {\n /** The workspace's name. Used for the label, the initial, and the tooltip. */\n name: string\n /** Draw the active ring. */\n active?: boolean\n /** A count or a dot, drawn at the corner. */\n badge?: JSX.Element\n /** Replace the initial with a glyph. */\n children?: JSX.Element\n}\n\nexport function WorkspaceMark(props: WorkspaceMarkProps) {\n const local = props\n const rest = omit(props, 'class', 'name', 'active', 'badge', 'children')\n // A count is visible label text, so the accessible name must include it and the monogram.\n const labelId = createUniqueId()\n\n const badge = resolveChildren(() => local.badge)\n const mark = (\n <button\n type=\"button\"\n aria-label={badge() ? undefined : local.name}\n aria-labelledby={\n badge() && !props['aria-label']\n ? `${labelId}-name ${labelId}-mark ${labelId}-badge`\n : undefined\n }\n aria-current={local.active ? 'true' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n 'relative flex size-9 shrink-0 items-center justify-center rounded-lg border text-sm font-semibold',\n 'transition-[color,background-color,border-color,transform] ease-out outline-none select-none',\n 'hover:scale-105 active:scale-95',\n 'focus-visible:border-ring focus-visible:focus-outline',\n 'disabled:pointer-events-none disabled:opacity-50',\n local.active\n ? 'border-primary bg-primary-subtle text-primary'\n : 'border-border bg-card text-muted-foreground hover:text-foreground',\n local.class\n )}\n {...rest}\n >\n <span id={`${labelId}-name`} class=\"sr-only\">\n {local.name}\n </span>\n <span id={`${labelId}-mark`} class=\"contents\" aria-hidden=\"true\">\n <Show\n when={local.children}\n fallback={\n <span data-slot=\"workspace-mark-initial\">{local.name.charAt(0).toUpperCase()}</span>\n }\n >\n {(childrenSlot) => <>{childrenSlot()}</>}\n </Show>\n </span>{' '}\n {/* The badge is centred on the corner rather than tucked inside it. Inset\n by an edge offset, a count badge is wider than the space between the\n corner and the monogram, so it sat on the letter; centred on the corner,\n a dot, a one-digit and a two-digit count all clear the letter's box. */}\n <Show when={badge()}>\n {(badgeSlot) => (\n <span\n id={`${labelId}-badge`}\n data-slot=\"workspace-mark-badge\"\n class=\"absolute end-0 top-0 flex translate-x-1/2 -translate-y-1/2 items-center justify-center rtl:-translate-x-1/2\"\n >\n {badgeSlot()}\n </span>\n )}\n </Show>\n </button>\n )\n\n return (\n <LazyTooltip placement=\"right\" content={local.name}>\n {(tip) => (\n <span\n ref={tip.ref}\n class=\"contents\"\n aria-describedby={tip.describedBy()}\n onPointerEnter={tip.onPointerEnter}\n onFocus={tip.onFocus}\n >\n {mark}\n </span>\n )}\n </LazyTooltip>\n )\n}\n"],"mappings":";;;;;;;;;AA2BA,SAAgB,cAAc,OAA2B;CACvD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,UAAU,SAAS,UAAU;CAEvE,MAAM,UAAU,eAAe;CAE/B,MAAM,QAAQS,eAAsB,MAAM,KAAK;CAE7C,IAAA,OAAA,OAmDQ;CA5BN,IAAA,QAAA,KAAA;CAGA,IAAA,QAAA,MAAA;CALAC,OAAA,MAAA,CAAA;EApBAV,MAAAA;EACA,IAAA,eAAA;GAAY,OAAA,MAAM,IAAI,KAAA,IAAY,MAAM;EAAI;EAC5C,IAAA,oBAAA;GACE,OAAA,MAAM,KAAK,CAAC,MAAM,gBACd,GAAG,QAAQ,QAAQ,QAAQ,QAAQ,QAAQ,UAC3C,KAAA;EACN;EACA,IAAA,iBAAA;GAAc,OAAA,MAAM,SAAS,SAAS,KAAA;EAAS;EAC/C,IAAA,gBAAA;GAAa,OAAA,MAAM,SAAS,KAAK,KAAA;EAAS;EAC1C,IAAA,UAAA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;EAQM,EAAA,CAAA;CAEG,CAAA;AAEjB"}
@@ -111,7 +111,7 @@ function AttachmentCard(props) {
111
111
  return local.unavailable;
112
112
  },
113
113
  get "class"() {
114
- return cn("flex max-w-64 items-center gap-2.5 rounded-md border border-border bg-surface-sunken px-2.5 py-2 text-start", "transition-colors ease-out outline-none", local.unavailable ? "cursor-not-allowed opacity-60" : "hover:border-input hover:bg-surface-hover", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "[&_svg]:size-4 [&_svg]:shrink-0", local.class);
114
+ return cn("flex max-w-64 items-center gap-2.5 rounded-md border border-border bg-surface-sunken px-2.5 py-2 text-start", "transition-colors ease-out outline-none", local.unavailable ? "cursor-not-allowed opacity-60" : "hover:border-input hover:bg-surface-hover", "focus-visible:border-ring focus-visible:focus-outline", "[&_svg]:size-4 [&_svg]:shrink-0", local.class);
115
115
  }
116
116
  }, rest], true);
117
117
  insert(_el$15, () => {
@@ -1 +1 @@
1
- {"version":3,"file":"thread-panel.js","names":["<span class=\"text-muted-foreground text-2xs\">\n {local.count} {local.count === 1 ? 'reply' : 'replies'}\n </span>","<div class=\"ms-auto flex shrink-0 items-center gap-1\">\n {local.headerActions}\n <Show when={local.onClose}>\n <Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>\n </Show>\n </div>","<Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>","<TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>","as={Button}","variant=\"ghost\"","size=\"icon-sm\"","onClick={() => local.onClose?.()}","<X />","<TooltipContent>Close thread</TooltipContent>","<Show when={local.root}>\n {(rootSlot) => (\n <div class=\"bg-muted/40 shrink-0 border-b border-border px-3 py-2\">{rootSlot()}</div>\n )}\n </Show>","<aside\n data-slot=\"thread-panel\"\n aria-label={`Thread: ${local.label}`}\n class={cn(\n 'bg-surface flex h-full w-96 max-w-full shrink-0 flex-col border-s border-border',\n local.class\n )}\n {...rest}\n >\n <header class=\"flex h-topbar shrink-0 items-center gap-2 border-b border-border px-3\">\n <div class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-sm font-semibold tracking-tight\">Thread</span>\n <Show when={local.count !== undefined}>\n <span class=\"text-muted-foreground text-2xs\">\n {local.count} {local.count === 1 ? 'reply' : 'replies'}\n </span>\n </Show>\n </div>\n <div class=\"ms-auto flex shrink-0 items-center gap-1\">\n {local.headerActions}\n <Show when={local.onClose}>\n <Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>\n </Show>\n </div>\n </header>\n\n <Show when={local.root}>\n {(rootSlot) => (\n <div class=\"bg-muted/40 shrink-0 border-b border-border px-3 py-2\">{rootSlot()}</div>\n )}\n </Show>\n\n {/* The replies carry their own inline padding: a row brings only `px-1`, so\n a bubble at its widest otherwise meets the panel's edge. `px-2` plus the\n row's `px-1` lands on the `px-3` line the header and root use. */}\n <div\n class=\"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2\"\n role=\"region\"\n aria-label=\"Thread replies\"\n tabindex=\"0\"\n >\n {local.children}\n </div>\n\n <Show when={local.composer}>\n {(composerSlot) => <div class=\"shrink-0 border-t border-border p-2\">{composerSlot()}</div>}\n </Show>\n </aside>","<Show when={local.composer}>\n {(composerSlot) => <div class=\"shrink-0 border-t border-border p-2\">{composerSlot()}</div>}\n </Show>","type=\"button\"","<button\n type=\"button\"\n disabled={local.unavailable}\n class={cn(\n 'flex max-w-64 items-center gap-2.5 rounded-md border border-border bg-surface-sunken px-2.5 py-2 text-start',\n 'transition-colors ease-out outline-none',\n local.unavailable\n ? 'cursor-not-allowed opacity-60'\n : 'hover:border-input hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-xs font-medium\">{local.name}</span>\n <Show when={local.detail}>\n {(detailSlot) => (\n <span class=\"text-muted-foreground truncate text-2xs\">{detailSlot()}</span>\n )}\n </Show>\n </span>\n </button>","<Show when={local.detail}>\n {(detailSlot) => (\n <span class=\"text-muted-foreground truncate text-2xs\">{detailSlot()}</span>\n )}\n </Show>","LucideX","_$spread","_$insert"],"sources":["../../../src/components/conversation/thread-panel.tsx"],"sourcesContent":["import { X as LucideX } from '@lucide/solid'\nimport type { ComponentProps, JSX } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button } from '../ui/button'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst X = fastIcon(LucideX)\n\n/**\n * ThreadPanel.\n *\n * The replies to one message, shown beside the transcript rather than in it. Keeping\n * a thread out of the main flow is what stops a busy side conversation from burying\n * the conversation everyone is having.\n *\n * The root message is repeated at the top — with `pinned` — because a thread read out\n * of context is a set of answers to a question the reader can no longer see.\n *\n * The panel is a `complementary` landmark with a label, so it is reachable by\n * landmark navigation rather than by tabbing through the transcript to find it.\n */\nexport type ThreadPanelProps = ComponentProps<'aside'> & {\n /** The thread's title, usually the root message's author. */\n label: string\n count?: number\n /** The root message, drawn above the replies. */\n root?: JSX.Element\n composer?: JSX.Element\n /** Host actions, such as marking the thread unread, before the close control. */\n headerActions?: JSX.Element\n onClose?: () => void\n}\n\nexport function ThreadPanel(props: ThreadPanelProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'label',\n 'count',\n 'root',\n 'composer',\n 'headerActions',\n 'onClose',\n 'children'\n )\n\n return (\n <aside\n data-slot=\"thread-panel\"\n aria-label={`Thread: ${local.label}`}\n class={cn(\n 'bg-surface flex h-full w-96 max-w-full shrink-0 flex-col border-s border-border',\n local.class\n )}\n {...rest}\n >\n <header class=\"flex h-topbar shrink-0 items-center gap-2 border-b border-border px-3\">\n <div class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-sm font-semibold tracking-tight\">Thread</span>\n <Show when={local.count !== undefined}>\n <span class=\"text-muted-foreground text-2xs\">\n {local.count} {local.count === 1 ? 'reply' : 'replies'}\n </span>\n </Show>\n </div>\n <div class=\"ms-auto flex shrink-0 items-center gap-1\">\n {local.headerActions}\n <Show when={local.onClose}>\n <Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>\n </Show>\n </div>\n </header>\n\n <Show when={local.root}>\n {(rootSlot) => (\n <div class=\"bg-muted/40 shrink-0 border-b border-border px-3 py-2\">{rootSlot()}</div>\n )}\n </Show>\n\n {/* The replies carry their own inline padding: a row brings only `px-1`, so\n a bubble at its widest otherwise meets the panel's edge. `px-2` plus the\n row's `px-1` lands on the `px-3` line the header and root use. */}\n <div\n class=\"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2\"\n role=\"region\"\n aria-label=\"Thread replies\"\n tabindex=\"0\"\n >\n {local.children}\n </div>\n\n <Show when={local.composer}>\n {(composerSlot) => <div class=\"shrink-0 border-t border-border p-2\">{composerSlot()}</div>}\n </Show>\n </aside>\n )\n}\n\n/**\n * An attachment card.\n *\n * A file is not a link: the reader wants to know what it is and how big it is before\n * deciding to open it, so the media type and size are on the card rather than behind\n * a click. `unavailable` is a real state — an artifact can be deleted, or live on a\n * device this one is not authorized for — and it is drawn as text rather than as a\n * dead link.\n */\nexport type AttachmentCardProps = ComponentProps<'button'> & {\n name: string\n /** A short description of the type and size, e.g. \"image/png · 24,120 bytes\". */\n detail?: string\n /** Draw the card as unavailable, with the reason as the detail. */\n unavailable?: boolean\n icon?: JSX.Element\n}\n\nexport function AttachmentCard(props: AttachmentCardProps) {\n const local = props\n const rest = omit(props, 'class', 'name', 'detail', 'unavailable', 'icon')\n\n return (\n <button\n type=\"button\"\n disabled={local.unavailable}\n class={cn(\n 'flex max-w-64 items-center gap-2.5 rounded-md border border-border bg-surface-sunken px-2.5 py-2 text-start',\n 'transition-colors ease-out outline-none',\n local.unavailable\n ? 'cursor-not-allowed opacity-60'\n : 'hover:border-input hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-xs font-medium\">{local.name}</span>\n <Show when={local.detail}>\n {(detailSlot) => (\n <span class=\"text-muted-foreground truncate text-2xs\">{detailSlot()}</span>\n )}\n </Show>\n </span>\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AASA,IAAM,IAAI,SAASgB,GAAO;AA2B1B,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,SACA,SACA,QACA,YACA,iBACA,WACA,UACF;CAGE,IAAA,OAAA,OA0DO;CAjDL,IAAA,QAAA,KAAA;CACE,IAAA,QAAA,MAAA;CAQA,IAAA,QAAA,MAAA;;;CA4BF,IAAA,QAAA,MAAA;CA9CF,IAAA,QAAA,MAAA;CAOEC,OAAA,MAAA,CAAA;EANA,aAAA;EACA,IAAA,eAAA;GAAY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AM;CAAQ,CACZ;CArDPA,OAAA,MAuDEN,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,MAAM;EAAQ;EAA1BA,WACI,wBAAiB;GAAsE,IAAA,SAAA,QAAA;GAAtEM,OAAA,QAAkD,YAAoB;GAAtE,OAAA;EAAsE,EAAA,CAAA;CACrF,CAAA,GAzDRP,KA0DO;CA3DT,OACEA;AA4DJ;AAoBA,SAAgB,eAAe,OAA4B;CACzD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,QAAQ,UAAU,eAAe,MAAM;CAGvE,IAAA,SAAA,QAwBQ;CARN,IAAA,SAAA,OAAA;CACE,IAAA,SAAA,OAAA;CAJFM,OAAA,QAAA,CAAA;EAZAJ,MAAAA;EACA,IAAA,WAAA;GAAU,OAAA,MAAM;EAAW;EAC3B,IAAA,UAAA;GAAO,OAAA,GACL,+GACA,2CACA,MAAM,cACF,kCACA,6CACJ,oFACA,mCACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CAbNK,OAAA,cAeE;EAAC,OAAA,MAAM;CAAI,GAfbJ,MAwBQ;CAPJI,OAAA,cAA2C;EAAC,OAAA,MAAM;CAAI,CAAO;CAD/DA,OAAA,QAEEH,gBAAAA,MAAAA;EAAM,IAAA,OAAA;GAAM,OAAA,MAAM;EAAM;EAAxBA,WACI,sBACA;GAA0E,IAAA,SAAA,QAAA;GAA1EG,OAAA,QAAuD,UAAmB;GAA1E,OAAA;EAA0E,EAAA,CAAA;CAExE,CAAA,GANR,IAOM;CAxBV,OACEJ;AA0BJ"}
1
+ {"version":3,"file":"thread-panel.js","names":["<span class=\"text-muted-foreground text-2xs\">\n {local.count} {local.count === 1 ? 'reply' : 'replies'}\n </span>","<div class=\"ms-auto flex shrink-0 items-center gap-1\">\n {local.headerActions}\n <Show when={local.onClose}>\n <Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>\n </Show>\n </div>","<Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>","<TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>","as={Button}","variant=\"ghost\"","size=\"icon-sm\"","onClick={() => local.onClose?.()}","<X />","<TooltipContent>Close thread</TooltipContent>","<Show when={local.root}>\n {(rootSlot) => (\n <div class=\"bg-muted/40 shrink-0 border-b border-border px-3 py-2\">{rootSlot()}</div>\n )}\n </Show>","<aside\n data-slot=\"thread-panel\"\n aria-label={`Thread: ${local.label}`}\n class={cn(\n 'bg-surface flex h-full w-96 max-w-full shrink-0 flex-col border-s border-border',\n local.class\n )}\n {...rest}\n >\n <header class=\"flex h-topbar shrink-0 items-center gap-2 border-b border-border px-3\">\n <div class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-sm font-semibold tracking-tight\">Thread</span>\n <Show when={local.count !== undefined}>\n <span class=\"text-muted-foreground text-2xs\">\n {local.count} {local.count === 1 ? 'reply' : 'replies'}\n </span>\n </Show>\n </div>\n <div class=\"ms-auto flex shrink-0 items-center gap-1\">\n {local.headerActions}\n <Show when={local.onClose}>\n <Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>\n </Show>\n </div>\n </header>\n\n <Show when={local.root}>\n {(rootSlot) => (\n <div class=\"bg-muted/40 shrink-0 border-b border-border px-3 py-2\">{rootSlot()}</div>\n )}\n </Show>\n\n {/* The replies carry their own inline padding: a row brings only `px-1`, so\n a bubble at its widest otherwise meets the panel's edge. `px-2` plus the\n row's `px-1` lands on the `px-3` line the header and root use. */}\n <div\n class=\"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2\"\n role=\"region\"\n aria-label=\"Thread replies\"\n tabindex=\"0\"\n >\n {local.children}\n </div>\n\n <Show when={local.composer}>\n {(composerSlot) => <div class=\"shrink-0 border-t border-border p-2\">{composerSlot()}</div>}\n </Show>\n </aside>","<Show when={local.composer}>\n {(composerSlot) => <div class=\"shrink-0 border-t border-border p-2\">{composerSlot()}</div>}\n </Show>","type=\"button\"","<button\n type=\"button\"\n disabled={local.unavailable}\n class={cn(\n 'flex max-w-64 items-center gap-2.5 rounded-md border border-border bg-surface-sunken px-2.5 py-2 text-start',\n 'transition-colors ease-out outline-none',\n local.unavailable\n ? 'cursor-not-allowed opacity-60'\n : 'hover:border-input hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:focus-outline',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-xs font-medium\">{local.name}</span>\n <Show when={local.detail}>\n {(detailSlot) => (\n <span class=\"text-muted-foreground truncate text-2xs\">{detailSlot()}</span>\n )}\n </Show>\n </span>\n </button>","<Show when={local.detail}>\n {(detailSlot) => (\n <span class=\"text-muted-foreground truncate text-2xs\">{detailSlot()}</span>\n )}\n </Show>","LucideX","_$spread","_$insert"],"sources":["../../../src/components/conversation/thread-panel.tsx"],"sourcesContent":["import { X as LucideX } from '@lucide/solid'\nimport type { ComponentProps, JSX } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button } from '../ui/button'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst X = fastIcon(LucideX)\n\n/**\n * ThreadPanel.\n *\n * The replies to one message, shown beside the transcript rather than in it. Keeping\n * a thread out of the main flow is what stops a busy side conversation from burying\n * the conversation everyone is having.\n *\n * The root message is repeated at the top — with `pinned` — because a thread read out\n * of context is a set of answers to a question the reader can no longer see.\n *\n * The panel is a `complementary` landmark with a label, so it is reachable by\n * landmark navigation rather than by tabbing through the transcript to find it.\n */\nexport type ThreadPanelProps = ComponentProps<'aside'> & {\n /** The thread's title, usually the root message's author. */\n label: string\n count?: number\n /** The root message, drawn above the replies. */\n root?: JSX.Element\n composer?: JSX.Element\n /** Host actions, such as marking the thread unread, before the close control. */\n headerActions?: JSX.Element\n onClose?: () => void\n}\n\nexport function ThreadPanel(props: ThreadPanelProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'label',\n 'count',\n 'root',\n 'composer',\n 'headerActions',\n 'onClose',\n 'children'\n )\n\n return (\n <aside\n data-slot=\"thread-panel\"\n aria-label={`Thread: ${local.label}`}\n class={cn(\n 'bg-surface flex h-full w-96 max-w-full shrink-0 flex-col border-s border-border',\n local.class\n )}\n {...rest}\n >\n <header class=\"flex h-topbar shrink-0 items-center gap-2 border-b border-border px-3\">\n <div class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-sm font-semibold tracking-tight\">Thread</span>\n <Show when={local.count !== undefined}>\n <span class=\"text-muted-foreground text-2xs\">\n {local.count} {local.count === 1 ? 'reply' : 'replies'}\n </span>\n </Show>\n </div>\n <div class=\"ms-auto flex shrink-0 items-center gap-1\">\n {local.headerActions}\n <Show when={local.onClose}>\n <Tooltip>\n <TooltipTrigger\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Close thread\"\n onClick={() => local.onClose?.()}\n >\n <X />\n </TooltipTrigger>\n <TooltipContent>Close thread</TooltipContent>\n </Tooltip>\n </Show>\n </div>\n </header>\n\n <Show when={local.root}>\n {(rootSlot) => (\n <div class=\"bg-muted/40 shrink-0 border-b border-border px-3 py-2\">{rootSlot()}</div>\n )}\n </Show>\n\n {/* The replies carry their own inline padding: a row brings only `px-1`, so\n a bubble at its widest otherwise meets the panel's edge. `px-2` plus the\n row's `px-1` lands on the `px-3` line the header and root use. */}\n <div\n class=\"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2\"\n role=\"region\"\n aria-label=\"Thread replies\"\n tabindex=\"0\"\n >\n {local.children}\n </div>\n\n <Show when={local.composer}>\n {(composerSlot) => <div class=\"shrink-0 border-t border-border p-2\">{composerSlot()}</div>}\n </Show>\n </aside>\n )\n}\n\n/**\n * An attachment card.\n *\n * A file is not a link: the reader wants to know what it is and how big it is before\n * deciding to open it, so the media type and size are on the card rather than behind\n * a click. `unavailable` is a real state — an artifact can be deleted, or live on a\n * device this one is not authorized for — and it is drawn as text rather than as a\n * dead link.\n */\nexport type AttachmentCardProps = ComponentProps<'button'> & {\n name: string\n /** A short description of the type and size, e.g. \"image/png · 24,120 bytes\". */\n detail?: string\n /** Draw the card as unavailable, with the reason as the detail. */\n unavailable?: boolean\n icon?: JSX.Element\n}\n\nexport function AttachmentCard(props: AttachmentCardProps) {\n const local = props\n const rest = omit(props, 'class', 'name', 'detail', 'unavailable', 'icon')\n\n return (\n <button\n type=\"button\"\n disabled={local.unavailable}\n class={cn(\n 'flex max-w-64 items-center gap-2.5 rounded-md border border-border bg-surface-sunken px-2.5 py-2 text-start',\n 'transition-colors ease-out outline-none',\n local.unavailable\n ? 'cursor-not-allowed opacity-60'\n : 'hover:border-input hover:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:focus-outline',\n '[&_svg]:size-4 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-xs font-medium\">{local.name}</span>\n <Show when={local.detail}>\n {(detailSlot) => (\n <span class=\"text-muted-foreground truncate text-2xs\">{detailSlot()}</span>\n )}\n </Show>\n </span>\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;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A,QAAA;GAA1EG,OAAA,QAAuD,UAAmB;GAA1E,OAAA;EAA0E,EAAA,CAAA;CAExE,CAAA,GANR,IAOM;CAxBV,OACEJ;AA0BJ"}
@@ -19,7 +19,7 @@ function SkipLink(props) {
19
19
  spread(_el$, [{
20
20
  "data-slot": "skip-link",
21
21
  get "class"() {
22
- return cn("fixed top-0 start-2 z-(--z-toast) -translate-y-full", "inline-flex items-center rounded-md border border-border bg-background", "px-control-md py-2 text-sm font-medium text-foreground shadow-lg", "underline decoration-2 underline-offset-2 outline-none transition-transform duration-150", "focus:translate-y-0 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "motion-reduce:transition-none", local.class);
22
+ return cn("fixed top-0 start-2 z-(--z-toast) -translate-y-full", "inline-flex items-center rounded-md border border-border bg-background", "px-control-md py-2 text-sm font-medium text-foreground shadow-lg", "underline decoration-2 underline-offset-2 outline-none transition-transform duration-150", "focus:translate-y-0 focus-visible:border-ring focus-visible:focus-outline", "motion-reduce:transition-none", local.class);
23
23
  },
24
24
  get href() {
25
25
  return local.href ?? "#main-content";
@@ -1 +1 @@
1
- {"version":3,"file":"skip-link.js","names":["<a\n data-slot=\"skip-link\"\n class={cn(\n 'fixed top-0 start-2 z-(--z-toast) -translate-y-full',\n 'inline-flex items-center rounded-md border border-border bg-background',\n 'px-control-md py-2 text-sm font-medium text-foreground shadow-lg',\n 'underline decoration-2 underline-offset-2 outline-none transition-transform duration-150',\n 'focus:translate-y-0 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'motion-reduce:transition-none',\n local.class\n )}\n href={local.href ?? '#main-content'}\n tabindex={local.tabindex ?? 0}\n {...rest}\n >\n {label() ?? 'Skip to main content'}\n </a>","resolveChildren","_$spread","_$insert"],"sources":["../../../../src/components/layout/app-shell/skip-link.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { children as resolveChildren, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * A keyboard-first link to the main content region.\n *\n * Place it before the shell's navigation and set the destination element's\n * `id` to match `href`. The link stays translated above the viewport until it\n * receives focus, then moves into view. Its text remains available to assistive\n * technology while it is visually hidden.\n */\nexport function SkipLink(props: ComponentProps<'a'>) {\n const local = props\n const rest = omit(props, 'class', 'children', 'href', 'tabindex')\n\n const label = resolveChildren(() => local.children)\n return (\n <a\n data-slot=\"skip-link\"\n class={cn(\n 'fixed top-0 start-2 z-(--z-toast) -translate-y-full',\n 'inline-flex items-center rounded-md border border-border bg-background',\n 'px-control-md py-2 text-sm font-medium text-foreground shadow-lg',\n 'underline decoration-2 underline-offset-2 outline-none transition-transform duration-150',\n 'focus:translate-y-0 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'motion-reduce:transition-none',\n local.class\n )}\n href={local.href ?? '#main-content'}\n tabindex={local.tabindex ?? 0}\n {...rest}\n >\n {label() ?? 'Skip to main content'}\n </a>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAgB,SAAS,OAA4B;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,YAAY,QAAQ,UAAU;CAEhE,MAAM,QAAQC,eAAsB,MAAM,QAAQ;CAEhD,IAAA,OAAA,OAgBG;CAHDC,OAAA,MAAA,CAAA;EAZA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,uDACA,0EACA,oEACA,4FACA,wGACA,iCACA,MAAM,KACR;EAAC;EACD,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQ;EAAe;EACnC,IAAA,WAAA;GAAU,OAAA,MAAM,YAAY;EAAC;CACrB,GAAJ,IAAA,GAAA,IAAA;CAbNC,OAAA,YAeE;EAAC,OAAA,MAAM,KAAK;CAAsB,CACjC;CAjBL,OACEH;AAkBJ"}
1
+ {"version":3,"file":"skip-link.js","names":["<a\n data-slot=\"skip-link\"\n class={cn(\n 'fixed top-0 start-2 z-(--z-toast) -translate-y-full',\n 'inline-flex items-center rounded-md border border-border bg-background',\n 'px-control-md py-2 text-sm font-medium text-foreground shadow-lg',\n 'underline decoration-2 underline-offset-2 outline-none transition-transform duration-150',\n 'focus:translate-y-0 focus-visible:border-ring focus-visible:focus-outline',\n 'motion-reduce:transition-none',\n local.class\n )}\n href={local.href ?? '#main-content'}\n tabindex={local.tabindex ?? 0}\n {...rest}\n >\n {label() ?? 'Skip to main content'}\n </a>","resolveChildren","_$spread","_$insert"],"sources":["../../../../src/components/layout/app-shell/skip-link.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { children as resolveChildren, omit } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * A keyboard-first link to the main content region.\n *\n * Place it before the shell's navigation and set the destination element's\n * `id` to match `href`. The link stays translated above the viewport until it\n * receives focus, then moves into view. Its text remains available to assistive\n * technology while it is visually hidden.\n */\nexport function SkipLink(props: ComponentProps<'a'>) {\n const local = props\n const rest = omit(props, 'class', 'children', 'href', 'tabindex')\n\n const label = resolveChildren(() => local.children)\n return (\n <a\n data-slot=\"skip-link\"\n class={cn(\n 'fixed top-0 start-2 z-(--z-toast) -translate-y-full',\n 'inline-flex items-center rounded-md border border-border bg-background',\n 'px-control-md py-2 text-sm font-medium text-foreground shadow-lg',\n 'underline decoration-2 underline-offset-2 outline-none transition-transform duration-150',\n 'focus:translate-y-0 focus-visible:border-ring focus-visible:focus-outline',\n 'motion-reduce:transition-none',\n local.class\n )}\n href={local.href ?? '#main-content'}\n tabindex={local.tabindex ?? 0}\n {...rest}\n >\n {label() ?? 'Skip to main content'}\n </a>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAgB,SAAS,OAA4B;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,YAAY,QAAQ,UAAU;CAEhE,MAAM,QAAQC,eAAsB,MAAM,QAAQ;CAEhD,IAAA,OAAA,OAgBG;CAHDC,OAAA,MAAA,CAAA;EAZA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,uDACA,0EACA,oEACA,4FACA,6EACA,iCACA,MAAM,KACR;EAAC;EACD,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQ;EAAe;EACnC,IAAA,WAAA;GAAU,OAAA,MAAM,YAAY;EAAC;CACrB,GAAJ,IAAA,GAAA,IAAA;CAbNC,OAAA,YAeE;EAAC,OAAA,MAAM,KAAK;CAAsB,CACjC;CAjBL,OACEH;AAkBJ"}
@@ -124,7 +124,7 @@ var sideRailItemClass = [
124
124
  "group/rail-item flex h-rail-item min-w-0 w-full items-center gap-2.5 rounded-md px-3 text-sm font-medium",
125
125
  "group-data-[collapsed=true]/rail:justify-center group-data-[collapsed=true]/rail:px-0",
126
126
  "transition-[color,background-color,transform] ease-out outline-none select-none",
127
- "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle",
127
+ "focus-visible:border-ring focus-visible:focus-outline-inset",
128
128
  "hover:scale-[1.02] active:scale-[0.97] group-data-[collapsed=true]/rail:hover:scale-100 group-data-[collapsed=true]/rail:active:scale-[0.98]",
129
129
  "[&_svg]:size-5 [&_svg]:shrink-0"
130
130
  ].join(" ");