@adea-ai/ui 0.152.2 → 0.152.4

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 (237) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.js.map +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.map +1 -1
  4. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  5. package/dist/components/composites/action-button/action-button.js.map +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.js.map +1 -1
  8. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  9. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  10. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  11. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  12. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  13. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  14. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
  15. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  16. package/dist/components/composites/chat/chat.js.map +1 -1
  17. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  18. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  19. package/dist/components/composites/context/context.js.map +1 -1
  20. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  21. package/dist/components/composites/help-center/help-center.js.map +1 -1
  22. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  23. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  24. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  25. package/dist/components/composites/list-row/list-row.js.map +1 -1
  26. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  27. package/dist/components/composites/model-selector/model-selector.js +3 -0
  28. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  29. package/dist/components/composites/plan/plan.js.map +1 -1
  30. package/dist/components/composites/queue/queue.js.map +1 -1
  31. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  32. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  33. package/dist/components/composites/settings/settings-layout.js.map +1 -1
  34. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  35. package/dist/components/composites/settings/settings.js.map +1 -1
  36. package/dist/components/composites/sources/sources.js.map +1 -1
  37. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  38. package/dist/components/composites/stat/stat.js.map +1 -1
  39. package/dist/components/composites/subagent/subagent.js.map +1 -1
  40. package/dist/components/composites/suggestion/suggestion.js.map +1 -1
  41. package/dist/components/composites/task/task.js.map +1 -1
  42. package/dist/components/composites/terminal/terminal.js.map +1 -1
  43. package/dist/components/composites/test-results/test-results.js.map +1 -1
  44. package/dist/components/composites/tool/tool.js.map +1 -1
  45. package/dist/components/composites/tree/tree.js.map +1 -1
  46. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  47. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  48. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  49. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  50. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  51. package/dist/components/conversation/atomic/chat-composer.js.map +1 -1
  52. package/dist/components/conversation/busy-send-button.js.map +1 -1
  53. package/dist/components/conversation/chat-composer.js.map +1 -1
  54. package/dist/components/conversation/composer-menu.js.map +1 -1
  55. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  56. package/dist/components/conversation/conversation-pane.js.map +1 -1
  57. package/dist/components/conversation/conversation-surface.js.map +1 -1
  58. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  59. package/dist/components/conversation/message-composer.js.map +1 -1
  60. package/dist/components/conversation/message-row.js.map +1 -1
  61. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  62. package/dist/components/conversation/thread-panel.js.map +1 -1
  63. package/dist/components/conversation/transcript-composition.js.map +1 -1
  64. package/dist/components/layout/app-shell/app-shell.js.map +1 -1
  65. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  66. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  67. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -1
  68. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  69. package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
  70. package/dist/components/layout/page/page.js.map +1 -1
  71. package/dist/components/layout/panel/panel.js.map +1 -1
  72. package/dist/components/layout/pixel-pane/pixel-pane.js.map +1 -1
  73. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  74. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  75. package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
  76. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  77. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
  78. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  79. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  80. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  81. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  82. package/dist/components/layout/status-bar/status-bar.js.map +1 -1
  83. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  84. package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
  85. package/dist/components/motion/presence.js.map +1 -1
  86. package/dist/components/theme/appearance-panel.js.map +1 -1
  87. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  88. package/dist/components/theme/theme-picker.js.map +1 -1
  89. package/dist/components/theme/theme-provider.js.map +1 -1
  90. package/dist/components/theme/theme-toggle.js.map +1 -1
  91. package/dist/components/ui/accordion/accordion.js.map +1 -1
  92. package/dist/components/ui/alert/alert.js.map +1 -1
  93. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  94. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  95. package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
  96. package/dist/components/ui/attachment/attachment.js.map +1 -1
  97. package/dist/components/ui/avatar/avatar.js.map +1 -1
  98. package/dist/components/ui/badge/badge.js.map +1 -1
  99. package/dist/components/ui/board/board.js.map +1 -1
  100. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  101. package/dist/components/ui/bubble/bubble.js.map +1 -1
  102. package/dist/components/ui/button/button.js.map +1 -1
  103. package/dist/components/ui/button-group/button-group.js.map +1 -1
  104. package/dist/components/ui/calendar/calendar.js.map +1 -1
  105. package/dist/components/ui/callout/callout.js.map +1 -1
  106. package/dist/components/ui/card/card.js.map +1 -1
  107. package/dist/components/ui/carousel/carousel.js.map +1 -1
  108. package/dist/components/ui/chart/chart.js.map +1 -1
  109. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  110. package/dist/components/ui/code-block/code-block.js.map +1 -1
  111. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  112. package/dist/components/ui/combobox/combobox.js.map +1 -1
  113. package/dist/components/ui/combobox/value-combobox.js.map +1 -1
  114. package/dist/components/ui/command/command.js.map +1 -1
  115. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  116. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  117. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  118. package/dist/components/ui/dialog/dialog.js.map +1 -1
  119. package/dist/components/ui/diff-block/diff-block.js.map +1 -1
  120. package/dist/components/ui/drawer/drawer.js.map +1 -1
  121. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  122. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  123. package/dist/components/ui/empty/empty-state.js.map +1 -1
  124. package/dist/components/ui/empty/empty.js.map +1 -1
  125. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  126. package/dist/components/ui/field/field.js.map +1 -1
  127. package/dist/components/ui/field/number-field.js.map +1 -1
  128. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  129. package/dist/components/ui/input/input-control.js.map +1 -1
  130. package/dist/components/ui/input/input.js.map +1 -1
  131. package/dist/components/ui/input-group/input-group.js.map +1 -1
  132. package/dist/components/ui/input-group/secret-input-group.js.map +1 -1
  133. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  134. package/dist/components/ui/item/item.js.map +1 -1
  135. package/dist/components/ui/kbd/kbd.js.map +1 -1
  136. package/dist/components/ui/label/label.js.map +1 -1
  137. package/dist/components/ui/marker/marker.js.map +1 -1
  138. package/dist/components/ui/menubar/menubar.js.map +1 -1
  139. package/dist/components/ui/message/message.js.map +1 -1
  140. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  141. package/dist/components/ui/native-select/native-select.js.map +1 -1
  142. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  143. package/dist/components/ui/pagination/pagination.js.map +1 -1
  144. package/dist/components/ui/popover/popover.js.map +1 -1
  145. package/dist/components/ui/progress/progress.js.map +1 -1
  146. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  147. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  148. package/dist/components/ui/resizable/resizable.js.map +1 -1
  149. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  150. package/dist/components/ui/select/select.js.map +1 -1
  151. package/dist/components/ui/separator/separator.js.map +1 -1
  152. package/dist/components/ui/sheet/sheet.js.map +1 -1
  153. package/dist/components/ui/skeleton/skeleton.js.map +1 -1
  154. package/dist/components/ui/slider/slider.js.map +1 -1
  155. package/dist/components/ui/spinner/spinner.js.map +1 -1
  156. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  157. package/dist/components/ui/switch/switch.js.map +1 -1
  158. package/dist/components/ui/table/table.js.map +1 -1
  159. package/dist/components/ui/tabs/tabs.js.map +1 -1
  160. package/dist/components/ui/text-link/text-link.js.map +1 -1
  161. package/dist/components/ui/textarea/textarea.js.map +1 -1
  162. package/dist/components/ui/toast/toast.js.map +1 -1
  163. package/dist/components/ui/toggle/toggle.js.map +1 -1
  164. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  165. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  166. package/dist/components/ui/trace/trace.js.map +1 -1
  167. package/dist/components/ui/typography/typography.js.map +1 -1
  168. package/dist/r/about-dialog.json +1 -1
  169. package/dist/r/accordion.json +1 -1
  170. package/dist/r/account-menu.json +1 -1
  171. package/dist/r/alert.json +1 -1
  172. package/dist/r/appearance-editor.json +1 -1
  173. package/dist/r/attachment.json +1 -1
  174. package/dist/r/breadcrumb.json +1 -1
  175. package/dist/r/calendar.json +1 -1
  176. package/dist/r/carousel.json +1 -1
  177. package/dist/r/catalog-browser.json +1 -1
  178. package/dist/r/chain-of-thought.json +1 -1
  179. package/dist/r/chat.json +1 -1
  180. package/dist/r/checkbox.json +1 -1
  181. package/dist/r/checkpoint.json +1 -1
  182. package/dist/r/code-block.json +1 -1
  183. package/dist/r/combobox.json +1 -1
  184. package/dist/r/command.json +1 -1
  185. package/dist/r/confirmation.json +1 -1
  186. package/dist/r/context.json +1 -1
  187. package/dist/r/conversation.json +1 -1
  188. package/dist/r/detail-panel.json +1 -1
  189. package/dist/r/dialog.json +1 -1
  190. package/dist/r/dropdown-menu.json +1 -1
  191. package/dist/r/empty.json +1 -1
  192. package/dist/r/file-tree.json +1 -1
  193. package/dist/r/floating-preview.json +1 -1
  194. package/dist/r/help-center.json +1 -1
  195. package/dist/r/icon-picker.json +1 -1
  196. package/dist/r/inline-citation.json +1 -1
  197. package/dist/r/lib.json +1 -1
  198. package/dist/r/message-scroller.json +1 -1
  199. package/dist/r/model-selector.json +1 -1
  200. package/dist/r/native-select.json +1 -1
  201. package/dist/r/navigation-menu.json +1 -1
  202. package/dist/r/pagination.json +1 -1
  203. package/dist/r/pixel-resize-handle.json +1 -1
  204. package/dist/r/plan.json +1 -1
  205. package/dist/r/questionnaire.json +1 -1
  206. package/dist/r/queue.json +1 -1
  207. package/dist/r/radio-group.json +1 -1
  208. package/dist/r/reasoning.json +1 -1
  209. package/dist/r/registry.json +65 -65
  210. package/dist/r/resizable.json +1 -1
  211. package/dist/r/scene-controls.json +1 -1
  212. package/dist/r/select.json +1 -1
  213. package/dist/r/settings.json +1 -1
  214. package/dist/r/sheet.json +1 -1
  215. package/dist/r/shell-rail.json +1 -1
  216. package/dist/r/sidebar-nav.json +1 -1
  217. package/dist/r/sources.json +1 -1
  218. package/dist/r/spinner.json +1 -1
  219. package/dist/r/split-layout.json +1 -1
  220. package/dist/r/src/components/composites/model-selector/model-selector.tsx +4 -1
  221. package/dist/r/stack-trace.json +1 -1
  222. package/dist/r/stat.json +1 -1
  223. package/dist/r/subagent.json +1 -1
  224. package/dist/r/task.json +1 -1
  225. package/dist/r/terminal.json +1 -1
  226. package/dist/r/test-results.json +1 -1
  227. package/dist/r/theming.json +1 -1
  228. package/dist/r/toast.json +1 -1
  229. package/dist/r/tool.json +1 -1
  230. package/dist/r/top-bar.json +1 -1
  231. package/dist/r/trace.json +1 -1
  232. package/dist/r/tree.json +1 -1
  233. package/dist/r/update-dialog.json +1 -1
  234. package/dist/r/workspace-switcher.json +1 -1
  235. package/package.json +11 -11
  236. package/registry.json +65 -65
  237. package/src/components/composites/model-selector/model-selector.tsx +4 -1
@@ -1 +1 @@
1
- {"version":3,"file":"transcript-composition.js","names":["Accessor","Component","ComponentProps","For","Show","createComponent","createMemo","createSignal","createUniqueId","splitProps","ChevronDown","cn","Button","applyTranscriptRunningState","createTranscriptGrouper","sameElements","sameFields","TranscriptDisplayItem","TranscriptRow","TranscriptTurnItem","planTranscriptFold","TranscriptFoldMode","TranscriptMounting","TranscriptFoldState","TranscriptDisplayKind","GroupedTranscript","TranscriptFoldPlan","TranscriptCompositionFold","Readonly","key","mode","mounting","callCount","TranscriptCompositionRowContext","index","displayKind","group","size","turn","id","complete","interim","fold","TranscriptCompositionRendererProps","row","T","context","TranscriptCompositionProps","Omit","rows","renderRow","running","resetKey","foldMode","foldState","onFoldStateChange","state","disclosure","ReadonlyMap","onDisclosureChange","expanded","density","TurnPresentation","NonNullable","GroupPresentation","FoldGroup","RowRecord","foldControl","TranscriptLayout","controls","RowHandle","get","set","next","last","DisclosureSignal","encodeId","value","encodeURIComponent","transcriptDisclosureKey","firstRowId","String","panelId","instanceId","rowId","buttonId","segmentKey","sameFoldGroup","a","b","sameRecord","firstRow","item","kind","appendTurnItem","indices","into","push","forEach","startIndex","length","appendDisplayItem","undefined","turnId","items","map","find","child","buildDisclosures","records","defaultMode","scope","flushScope","record","hasInterimTurn","some","hasConclusion","conclusion","plan","foldable","entries","flatMap","entry","anchorId","control","opensTurn","foldLabel","count","subject","TranscriptRowEntry","props","prefix","onToggle","current","disclosureKey","collapsed","disabled","groupIndex","groupSize","renderable","renderHostRow","controlLabel","controlRows","join","_el$","_tmpl$","_el$2","firstChild","_$insert","_$createComponent","when","children","type","variant","aria-label","aria-controls","aria-expanded","aria-disabled","onClick","_el$3","_tmpl$2","_$memo","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","e","_$setAttribute","t","o","i","hidden","n","TranscriptComposition","local","rest","grouper","internalFoldState","setInternalFoldState","rowHandles","Map","disclosureSignals","lastResetKey","localDisclosure","signal","disclosureExpanded","grouped","layout","identity","clear","indexByRow","display","handles","live","Set","result","add","handle","keys","has","delete","allControlIds","updateFoldState","updateDisclosure","_el$4","_tmpl$4","_el$6","_$spread","_$mergeProps","data-fold-state","data-density","class","_el$5","_tmpl$3","each","_$className","createComponent","_$createComponent","_$memo","_$setAttribute","_$mergeProps","_$className"],"sources":["../../../src/components/conversation/transcript-composition.tsx"],"sourcesContent":["import type { Accessor, Component, ComponentProps } from 'solid-js'\nimport {\n For,\n Show,\n createComponent,\n createMemo,\n createSignal,\n createUniqueId,\n splitProps,\n} from 'solid-js'\nimport { ChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { Button } from '../ui/button'\nimport {\n applyTranscriptRunningState,\n createTranscriptGrouper,\n sameElements,\n sameFields,\n type TranscriptDisplayItem,\n type TranscriptRow,\n type TranscriptTurnItem,\n} from './transcript-grouping'\nimport {\n planTranscriptFold,\n type TranscriptFoldMode,\n type TranscriptMounting,\n} from './transcript-folding'\n\nexport type TranscriptFoldState = 'default' | 'collapsed' | 'expanded'\nexport type TranscriptDisplayKind = 'single' | 'group' | 'turn'\n\nexport type {\n GroupedTranscript,\n TranscriptDisplayItem,\n TranscriptRow,\n TranscriptTurnItem,\n} from './transcript-grouping'\nexport type {\n TranscriptFoldMode,\n TranscriptFoldPlan,\n TranscriptMounting,\n} from './transcript-folding'\n\nexport type TranscriptCompositionFold = Readonly<{\n /** Stable host persistence key. Use with `transcriptDisclosureKey` to seed a store. */\n key: string\n mode: TranscriptFoldMode\n mounting: TranscriptMounting\n /** Distinct host-classified request IDs in this contiguous fold segment. */\n callCount: number\n}>\n\nexport type TranscriptCompositionRowContext = Readonly<{\n /** Original index in the caller's row array, including rows hidden by the host. */\n index: number\n /** The row's current position in the generic display composition. */\n displayKind: TranscriptDisplayKind\n group?: Readonly<{ index: number; size: number }>\n turn?: Readonly<{\n /** Derived from the first stable row ID; presentation bookkeeping only. */\n id: string\n /** A presentation state, never proof of successful runtime completion. */\n complete: boolean\n interim: boolean\n }>\n fold?: TranscriptCompositionFold\n}>\n\nexport type TranscriptCompositionRendererProps<T> = Readonly<{\n /** Reactive Solid prop; a row component keeps its DOM owner stable as values update. */\n row: TranscriptRow<T>\n context: TranscriptCompositionRowContext\n}>\n\nexport type TranscriptCompositionProps<T> = Omit<ComponentProps<'div'>, 'children'> & {\n /** Ordered, already redacted rows with host-supplied semantic classifications. */\n rows: readonly TranscriptRow<T>[]\n /** Render one host row. Permission, session, event and protocol authority stay outside this component. */\n renderRow: Component<TranscriptCompositionRendererProps<T>>\n /** The host's current run state. Live rows stay mounted and expanded until settled. */\n running?: boolean\n /** Reset scope for row identity and disclosure. It is not inferred from display content. */\n resetKey?: string | number | null\n /** Default settled fold policy. `tools` keeps prose visible; `prose` retains a proven conclusion. */\n foldMode?: TranscriptFoldMode\n /** Global command state. `collapsed` keeps hidden content mounted; prose folds only before a host-marked conclusion. */\n foldState?: TranscriptFoldState\n onFoldStateChange?: (state: TranscriptFoldState) => void\n /** Optional controlled disclosure map keyed by `transcriptDisclosureKey`. */\n disclosure?: ReadonlyMap<string, boolean>\n onDisclosureChange?: (key: string, expanded: boolean) => void\n /**\n * Row rhythm. `compact` (default) packs rows 4px apart; `comfortable` spaces\n * them 12px apart and stacks each row's rendered parts, for a chat stream\n * whose rows are separate messages rather than one running log.\n */\n density?: 'compact' | 'comfortable'\n}\n\ntype TurnPresentation = NonNullable<TranscriptCompositionRowContext['turn']>\ntype GroupPresentation = NonNullable<TranscriptCompositionRowContext['group']>\n\ntype FoldGroup<T> = Readonly<{\n key: string\n mode: TranscriptFoldMode\n callCount: number\n rows: readonly TranscriptRow<T>[]\n}>\n\ntype RowRecord<T> = {\n row: TranscriptRow<T>\n index: number\n displayKind: TranscriptDisplayKind\n group?: GroupPresentation\n turn?: TurnPresentation\n fold?: TranscriptCompositionFold\n foldControl?: FoldGroup<T>\n}\n\ntype TranscriptLayout<T> = Readonly<{\n rows: readonly RowRecord<T>[]\n controls: readonly FoldGroup<T>[]\n}>\n\ntype RowHandle<T> = {\n key: string\n get: Accessor<RowRecord<T>>\n set: (next: RowRecord<T>) => void\n last: RowRecord<T>\n}\n\ntype DisclosureSignal = Readonly<{\n get: Accessor<boolean | undefined>\n set: (next: boolean | undefined) => void\n}>\n\nconst encodeId = (value: string): string => encodeURIComponent(value)\n\n/** Stable, transcript-scoped key for host-owned disclosure restoration. */\nexport function transcriptDisclosureKey(\n resetKey: string | number | null | undefined,\n mode: TranscriptFoldMode,\n firstRowId: string\n): string {\n return `transcript:${encodeId(String(resetKey ?? ''))}:${mode}:${encodeId(firstRowId)}`\n}\n\nfunction panelId(instanceId: string, resetKey: string, rowId: string): string {\n return `${instanceId}-row-${encodeId(resetKey)}-${encodeId(rowId)}`\n}\n\nfunction buttonId(instanceId: string, resetKey: string, segmentKey: string): string {\n return `${instanceId}-fold-${encodeId(resetKey)}-${encodeId(segmentKey)}`\n}\n\nfunction sameFoldGroup<T>(a?: FoldGroup<T>, b?: FoldGroup<T>): boolean {\n // The key encodes the mode, so mode needs no comparison of its own.\n return (\n a === b ||\n (!!a && !!b && a.key === b.key && a.callCount === b.callCount && sameElements(a.rows, b.rows))\n )\n}\n\nfunction sameRecord<T>(a: RowRecord<T>, b: RowRecord<T>): boolean {\n return (\n a.row === b.row &&\n a.index === b.index &&\n a.displayKind === b.displayKind &&\n sameFields(a.group, b.group) &&\n sameFields(a.turn, b.turn) &&\n sameFields(a.fold, b.fold) &&\n sameFoldGroup(a.foldControl, b.foldControl)\n )\n}\n\nfunction firstRow<T>(item: TranscriptTurnItem<T>): TranscriptRow<T> | undefined {\n return item.kind === 'single' ? item.row : item.rows[0]\n}\n\nfunction appendTurnItem<T>(\n item: TranscriptTurnItem<T>,\n displayKind: 'single' | 'group' | 'turn',\n turn: TurnPresentation | undefined,\n indices: ReadonlyMap<TranscriptRow<T>, number>,\n into: RowRecord<T>[]\n): void {\n if (item.kind === 'single') {\n into.push({\n row: item.row,\n index: indices.get(item.row) ?? item.index,\n displayKind,\n turn,\n })\n return\n }\n item.rows.forEach((row, index) => {\n into.push({\n row,\n index: indices.get(row) ?? item.startIndex + index,\n displayKind,\n group: { index, size: item.rows.length },\n turn,\n })\n })\n}\n\nfunction appendDisplayItem<T>(\n item: TranscriptDisplayItem<T>,\n indices: ReadonlyMap<TranscriptRow<T>, number>,\n into: RowRecord<T>[]\n): void {\n if (item.kind !== 'turn') {\n appendTurnItem(item, item.kind, undefined, indices, into)\n return\n }\n const turnId = item.items.map(firstRow).find((row) => row)?.id ?? 'empty-turn'\n const turn: TurnPresentation = {\n id: turnId,\n complete: item.complete,\n interim: !!item.interim,\n }\n for (const child of item.items) appendTurnItem(child, 'turn', turn, indices, into)\n}\n\nfunction buildDisclosures<T>(\n records: readonly RowRecord<T>[],\n defaultMode: TranscriptFoldMode,\n foldState: TranscriptFoldState,\n resetKey: string\n): FoldGroup<T>[] {\n const controls: FoldGroup<T>[] = []\n let scope: RowRecord<T>[] = []\n const flushScope = () => {\n if (!scope.length) return\n const rows = scope.map((record) => record.row)\n const hasInterimTurn = scope.some((record) => record.turn?.interim)\n const hasConclusion = scope.some((record) => record.row.conclusion)\n const mode: TranscriptFoldMode = hasInterimTurn\n ? 'interim'\n : foldState === 'default'\n ? defaultMode\n : foldState === 'collapsed'\n ? hasConclusion\n ? 'prose'\n : 'tools'\n : 'interim'\n const plan = planTranscriptFold(rows, { mode })\n const foldable = plan.entries.flatMap((entry, index) =>\n entry.mounting === 'always' ? [] : [{ record: scope[index]!, mounting: entry.mounting }]\n )\n if (foldable.length) {\n const anchorId = scope[0]?.row.id ?? foldable[0]!.record.row.id\n const control: FoldGroup<T> = {\n key: transcriptDisclosureKey(resetKey, mode, anchorId),\n mode,\n callCount: plan.callCount,\n rows: foldable.map(({ record }) => record.row),\n }\n controls.push(control)\n foldable.forEach(({ record, mounting }, index) => {\n record.fold = {\n key: control.key,\n mode: control.mode,\n mounting: foldState === 'collapsed' ? 'hide-when-collapsed' : mounting,\n callCount: control.callCount,\n }\n if (index === 0) record.foldControl = control\n })\n }\n scope = []\n }\n\n for (const record of records) {\n if (record.row.opensTurn && scope.length) flushScope()\n scope.push(record)\n }\n flushScope()\n return controls\n}\n\nfunction foldLabel(mode: TranscriptFoldMode, count: number, expanded: boolean): string {\n const subject =\n mode === 'tools'\n ? count === 1\n ? '1 tool call'\n : count > 1\n ? `${count} tool calls`\n : 'tool details'\n : mode === 'prose'\n ? 'earlier activity'\n : 'interim activity'\n return `${expanded ? 'Hide' : 'Show'} ${subject}`\n}\n\nfunction TranscriptRowEntry<T>(props: {\n record: Accessor<RowRecord<T>>\n renderRow: Component<TranscriptCompositionRendererProps<T>>\n prefix: string\n resetKey: Accessor<string>\n expanded: (key: string) => Accessor<boolean>\n running: Accessor<boolean>\n foldState: Accessor<TranscriptFoldState>\n onToggle: (key: string, expanded: boolean) => void\n}) {\n const current = props.record\n const id = () => panelId(props.prefix, props.resetKey(), current().row.id)\n const foldControl = () => current().foldControl\n const disclosureKey = () => current().fold?.key\n const expanded = () => {\n const key = disclosureKey()\n return key ? props.expanded(key)() : true\n }\n const collapsed = () => !!current().fold && !expanded()\n const disabled = () => props.running() || props.foldState() !== 'default'\n const context = (): TranscriptCompositionRowContext => ({\n index: current().index,\n displayKind: current().displayKind,\n group: current().group,\n turn: current().turn,\n fold: current().fold,\n })\n const groupIndex = () => current().group?.index\n const groupSize = () => current().group?.size\n const renderable = () => current().fold?.mounting !== 'unmount-when-collapsed' || !collapsed()\n const renderHostRow = () =>\n createComponent(props.renderRow, {\n get row() {\n return current().row\n },\n get context() {\n return context()\n },\n })\n const controlLabel = () => {\n const control = foldControl()\n return control ? foldLabel(control.mode, control.callCount, expanded()) : ''\n }\n const controlRows = () =>\n foldControl()\n ?.rows.map((row) => panelId(props.prefix, props.resetKey(), row.id))\n .join(' ')\n\n return (\n <div\n data-slot=\"transcript-row\"\n data-display-kind={current().displayKind}\n data-group-index={groupIndex()}\n data-group-size={groupSize()}\n class=\"flex min-w-0 flex-col gap-1\"\n >\n <Show when={foldControl()}>\n {(control) => (\n <Button\n id={buttonId(props.prefix, props.resetKey(), control().key)}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"w-full justify-start\"\n aria-label={controlLabel()}\n aria-controls={controlRows()}\n aria-expanded={expanded()}\n aria-disabled={disabled() || undefined}\n onClick={() => props.onToggle(control().key, !expanded())}\n >\n <ChevronDown aria-hidden=\"true\" class=\"size-4 shrink-0\" />\n <span>{controlLabel()}</span>\n </Button>\n )}\n </Show>\n <div\n id={id()}\n data-slot=\"transcript-row-content\"\n class=\"group-data-[density=comfortable]/transcript:flex group-data-[density=comfortable]/transcript:flex-col\"\n hidden={collapsed()}\n aria-hidden={collapsed() || undefined}\n >\n <Show when={renderable() ? current() : undefined}>\n {(record) => {\n record()\n return renderHostRow()\n }}\n </Show>\n </div>\n </div>\n )\n}\n\n/**\n * Compose host-classified rows into stable turns, contiguous groups and disclosures.\n * Row render owners are keyed by `id` in a single list, so loose rows keep their DOM\n * owners when the grouping threshold promotes them into a turn. The caller owns row\n * identity, protocol meaning, redaction, permissions and durable conversation state.\n */\nexport function TranscriptComposition<T>(props: TranscriptCompositionProps<T>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'rows',\n 'renderRow',\n 'running',\n 'resetKey',\n 'foldMode',\n 'foldState',\n 'onFoldStateChange',\n 'density',\n 'disclosure',\n 'onDisclosureChange',\n ])\n const instanceId = createUniqueId()\n const grouper = createTranscriptGrouper<T>()\n const [internalFoldState, setInternalFoldState] = createSignal<TranscriptFoldState>('default')\n const rowHandles = new Map<string, RowHandle<T>>()\n const disclosureSignals = new Map<string, DisclosureSignal>()\n let lastResetKey = String(local.resetKey ?? '')\n\n const resetKey = () => String(local.resetKey ?? '')\n const foldState = () => local.foldState ?? internalFoldState()\n const running = () => !!local.running\n const localDisclosure = (key: string): DisclosureSignal => {\n let signal = disclosureSignals.get(key)\n if (!signal) {\n const [get, set] = createSignal<boolean | undefined>(undefined)\n signal = { get, set }\n disclosureSignals.set(key, signal)\n }\n return signal\n }\n const disclosureExpanded = (key: string): Accessor<boolean> => {\n const signal = localDisclosure(key)\n return () => {\n if (running()) return true\n if (foldState() === 'collapsed') return false\n if (foldState() === 'expanded') return true\n return local.disclosure?.get(key) ?? signal.get() ?? false\n }\n }\n const grouped = createMemo(() => grouper(local.rows))\n const layout = createMemo<TranscriptLayout<T>>(() => {\n const identity = resetKey()\n if (identity !== lastResetKey) {\n rowHandles.clear()\n disclosureSignals.clear()\n lastResetKey = identity\n }\n const indexByRow = new Map(local.rows.map((row, index) => [row, index]))\n const display = applyTranscriptRunningState(grouped(), running())\n const records: RowRecord<T>[] = []\n display.forEach((item) => appendDisplayItem(item, indexByRow, records))\n const controls = buildDisclosures(records, local.foldMode ?? 'tools', foldState(), identity)\n return { rows: records, controls }\n })\n const handles = createMemo(() => {\n const live = new Set<string>()\n const identity = resetKey()\n const result = layout().rows.map((record) => {\n const key = `${identity}\\u001f${record.row.id}`\n live.add(key)\n let handle = rowHandles.get(key)\n if (!handle) {\n const [get, set] = createSignal(record)\n handle = { key, get, set, last: record }\n rowHandles.set(key, handle)\n } else if (!sameRecord(handle.last, record)) {\n handle.last = record\n handle.set(record)\n }\n return handle\n })\n for (const key of rowHandles.keys()) if (!live.has(key)) rowHandles.delete(key)\n return result\n })\n const allControlIds = () =>\n layout()\n .controls.flatMap((control) =>\n control.rows.map((row) => panelId(instanceId, resetKey(), row.id))\n )\n .join(' ')\n const updateFoldState = () => {\n if (running()) return\n const current = foldState()\n const next: TranscriptFoldState =\n current === 'default' ? 'collapsed' : current === 'collapsed' ? 'expanded' : 'default'\n if (local.foldState === undefined) setInternalFoldState(next)\n local.onFoldStateChange?.(next)\n }\n const updateDisclosure = (key: string, expanded: boolean) => {\n if (running() || foldState() !== 'default') return\n if (local.disclosure) {\n local.onDisclosureChange?.(key, expanded)\n return\n }\n localDisclosure(key).set(expanded)\n local.onDisclosureChange?.(key, expanded)\n }\n\n return (\n <div\n data-slot=\"transcript-composition\"\n data-fold-state={foldState()}\n data-density={local.density ?? 'compact'}\n class={cn('group/transcript flex w-full min-w-0 flex-col gap-1', local.class)}\n {...rest}\n >\n <Show when={local.onFoldStateChange}>\n <div class=\"flex justify-end\">\n <Button\n id={`${instanceId}-fold-all`}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-controls={allControlIds() || undefined}\n aria-disabled={running() || undefined}\n onClick={updateFoldState}\n >\n {foldState() === 'default'\n ? 'Collapse all activity'\n : foldState() === 'collapsed'\n ? 'Expand all activity'\n : 'Restore default folding'}\n </Button>\n </div>\n </Show>\n <div\n data-slot=\"transcript-rows\"\n class={cn('flex min-w-0 flex-col', local.density === 'comfortable' ? 'gap-3' : 'gap-1')}\n >\n <For each={handles()}>\n {(handle) => (\n <TranscriptRowEntry\n record={handle.get}\n renderRow={local.renderRow}\n prefix={instanceId}\n resetKey={resetKey}\n expanded={disclosureExpanded}\n running={running}\n foldState={foldState}\n onToggle={updateDisclosure}\n />\n )}\n </For>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAwIA,IAAM4E,YAAYC,UAA0BC,mBAAmBD,KAAK;;AAGpE,SAAgBE,wBACd3B,UACAtB,MACAkD,YACQ;CACR,OAAO,cAAcJ,SAASK,OAAO7B,YAAY,EAAE,CAAC,EAAC,GAAItB,KAAI,GAAI8C,SAASI,UAAU;AACtF;AAEA,SAASE,QAAQC,YAAoB/B,UAAkBgC,OAAuB;CAC5E,OAAO,GAAGD,WAAU,OAAQP,SAASxB,QAAQ,EAAC,GAAIwB,SAASQ,KAAK;AAClE;AAEA,SAASC,SAASF,YAAoB/B,UAAkBkC,YAA4B;CAClF,OAAO,GAAGH,WAAU,QAASP,SAASxB,QAAQ,EAAC,GAAIwB,SAASU,UAAU;AACxE;AAEA,SAASC,cAAiBC,GAAkBC,GAA2B;CAErE,OACED,MAAMC,KACL,CAAC,CAACD,KAAK,CAAC,CAACC,KAAKD,EAAE3D,QAAQ4D,EAAE5D,OAAO2D,EAAExD,cAAcyD,EAAEzD,aAAajB,aAAayE,EAAEvC,MAAMwC,EAAExC,IAAI;AAEhG;AAEA,SAASyC,WAAcF,GAAiBC,GAA0B;CAChE,OACED,EAAE5C,QAAQ6C,EAAE7C,OACZ4C,EAAEtD,UAAUuD,EAAEvD,SACdsD,EAAErD,gBAAgBsD,EAAEtD,eACpBnB,WAAWwE,EAAEpD,OAAOqD,EAAErD,KAAK,KAC3BpB,WAAWwE,EAAElD,MAAMmD,EAAEnD,IAAI,KACzBtB,WAAWwE,EAAE9C,MAAM+C,EAAE/C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tB,0BACAA,UAAU,MAAM,cACd,wBACA;KAAyB;IAAA,CAAA,CAAA;IAAA,OAAAkK;GAAA;EAAA,CAAA,GAAAN,KAAA;EAAA9D,OAAA8D,OAAA7D,gBAQlClJ,KAAG;GAAA,IAACuN,OAAI;IAAA,OAAEtB,QAAQ;GAAC;GAAA7C,WAChBkD,WAAMpD,gBACLpB,oBAAkB;IAAA,IACjBhB,SAAM;KAAA,OAAEwF,OAAOlI;IAAG;IAAA,IAClBrB,YAAS;KAAA,OAAEgI,MAAMhI;IAAS;IAC1BiF,QAAQhD;IACE/B;IACVQ,UAAUiI;IACD1I;IACEG;IACX8E,UAAU2E;GAAgB,CAAA;EAE7B,CAAA,CAAA;EAAA7C,aAAAyD,UAAAT,OAdIvM,GAAG,yBAAyBuK,MAAMrH,YAAY,gBAAgB,UAAU,OAAO,CAAC,CAAA;EAAA,OAAAmJ;CAAA,EAAA,CAAA;AAmB/F"}
1
+ {"version":3,"file":"transcript-composition.js","names":["For","Show","createComponent","createMemo","createSignal","createUniqueId","splitProps","ChevronDown","cn","Button","applyTranscriptRunningState","createTranscriptGrouper","sameElements","sameFields","planTranscriptFold","key","mode","mounting","callCount","index","displayKind","group","size","turn","id","complete","interim","fold","row","context","rows","renderRow","running","resetKey","foldMode","foldState","onFoldStateChange","disclosure","onDisclosureChange","expanded","density","foldControl","controls","get","set","next","last","encodeId","value","encodeURIComponent","transcriptDisclosureKey","firstRowId","String","panelId","instanceId","rowId","buttonId","segmentKey","sameFoldGroup","a","b","sameRecord","firstRow","item","kind","appendTurnItem","indices","into","push","forEach","startIndex","length","appendDisplayItem","undefined","items","map","find","child","buildDisclosures","records","defaultMode","scope","flushScope","record","hasInterimTurn","some","hasConclusion","conclusion","plan","foldable","entries","flatMap","entry","control","opensTurn","foldLabel","count","subject","TranscriptRowEntry","props","prefix","onToggle","current","disclosureKey","collapsed","disabled","groupIndex","groupSize","renderable","renderHostRow","controlLabel","controlRows","join","_el$","_tmpl$","_el$2","firstChild","_$insert","_$createComponent","when","children","type","variant","onClick","_el$3","_tmpl$2","_$memo","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","e","_$setAttribute","t","o","i","hidden","n","TranscriptComposition","local","rest","grouper","internalFoldState","setInternalFoldState","rowHandles","Map","disclosureSignals","lastResetKey","localDisclosure","signal","disclosureExpanded","grouped","layout","identity","clear","indexByRow","display","handles","live","Set","result","add","handle","keys","has","delete","allControlIds","updateFoldState","updateDisclosure","_el$4","_tmpl$4","_el$6","_$spread","_$mergeProps","class","_el$5","_tmpl$3","each","_$className"],"sources":["../../../src/components/conversation/transcript-composition.tsx"],"sourcesContent":["import type { Accessor, Component, ComponentProps } from 'solid-js'\nimport {\n For,\n Show,\n createComponent,\n createMemo,\n createSignal,\n createUniqueId,\n splitProps,\n} from 'solid-js'\nimport { ChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { Button } from '../ui/button'\nimport {\n applyTranscriptRunningState,\n createTranscriptGrouper,\n sameElements,\n sameFields,\n type TranscriptDisplayItem,\n type TranscriptRow,\n type TranscriptTurnItem,\n} from './transcript-grouping'\nimport {\n planTranscriptFold,\n type TranscriptFoldMode,\n type TranscriptMounting,\n} from './transcript-folding'\n\nexport type TranscriptFoldState = 'default' | 'collapsed' | 'expanded'\nexport type TranscriptDisplayKind = 'single' | 'group' | 'turn'\n\nexport type {\n GroupedTranscript,\n TranscriptDisplayItem,\n TranscriptRow,\n TranscriptTurnItem,\n} from './transcript-grouping'\nexport type {\n TranscriptFoldMode,\n TranscriptFoldPlan,\n TranscriptMounting,\n} from './transcript-folding'\n\nexport type TranscriptCompositionFold = Readonly<{\n /** Stable host persistence key. Use with `transcriptDisclosureKey` to seed a store. */\n key: string\n mode: TranscriptFoldMode\n mounting: TranscriptMounting\n /** Distinct host-classified request IDs in this contiguous fold segment. */\n callCount: number\n}>\n\nexport type TranscriptCompositionRowContext = Readonly<{\n /** Original index in the caller's row array, including rows hidden by the host. */\n index: number\n /** The row's current position in the generic display composition. */\n displayKind: TranscriptDisplayKind\n group?: Readonly<{ index: number; size: number }>\n turn?: Readonly<{\n /** Derived from the first stable row ID; presentation bookkeeping only. */\n id: string\n /** A presentation state, never proof of successful runtime completion. */\n complete: boolean\n interim: boolean\n }>\n fold?: TranscriptCompositionFold\n}>\n\nexport type TranscriptCompositionRendererProps<T> = Readonly<{\n /** Reactive Solid prop; a row component keeps its DOM owner stable as values update. */\n row: TranscriptRow<T>\n context: TranscriptCompositionRowContext\n}>\n\nexport type TranscriptCompositionProps<T> = Omit<ComponentProps<'div'>, 'children'> & {\n /** Ordered, already redacted rows with host-supplied semantic classifications. */\n rows: readonly TranscriptRow<T>[]\n /** Render one host row. Permission, session, event and protocol authority stay outside this component. */\n renderRow: Component<TranscriptCompositionRendererProps<T>>\n /** The host's current run state. Live rows stay mounted and expanded until settled. */\n running?: boolean\n /** Reset scope for row identity and disclosure. It is not inferred from display content. */\n resetKey?: string | number | null\n /** Default settled fold policy. `tools` keeps prose visible; `prose` retains a proven conclusion. */\n foldMode?: TranscriptFoldMode\n /** Global command state. `collapsed` keeps hidden content mounted; prose folds only before a host-marked conclusion. */\n foldState?: TranscriptFoldState\n onFoldStateChange?: (state: TranscriptFoldState) => void\n /** Optional controlled disclosure map keyed by `transcriptDisclosureKey`. */\n disclosure?: ReadonlyMap<string, boolean>\n onDisclosureChange?: (key: string, expanded: boolean) => void\n /**\n * Row rhythm. `compact` (default) packs rows 4px apart; `comfortable` spaces\n * them 12px apart and stacks each row's rendered parts, for a chat stream\n * whose rows are separate messages rather than one running log.\n */\n density?: 'compact' | 'comfortable'\n}\n\ntype TurnPresentation = NonNullable<TranscriptCompositionRowContext['turn']>\ntype GroupPresentation = NonNullable<TranscriptCompositionRowContext['group']>\n\ntype FoldGroup<T> = Readonly<{\n key: string\n mode: TranscriptFoldMode\n callCount: number\n rows: readonly TranscriptRow<T>[]\n}>\n\ntype RowRecord<T> = {\n row: TranscriptRow<T>\n index: number\n displayKind: TranscriptDisplayKind\n group?: GroupPresentation\n turn?: TurnPresentation\n fold?: TranscriptCompositionFold\n foldControl?: FoldGroup<T>\n}\n\ntype TranscriptLayout<T> = Readonly<{\n rows: readonly RowRecord<T>[]\n controls: readonly FoldGroup<T>[]\n}>\n\ntype RowHandle<T> = {\n key: string\n get: Accessor<RowRecord<T>>\n set: (next: RowRecord<T>) => void\n last: RowRecord<T>\n}\n\ntype DisclosureSignal = Readonly<{\n get: Accessor<boolean | undefined>\n set: (next: boolean | undefined) => void\n}>\n\nconst encodeId = (value: string): string => encodeURIComponent(value)\n\n/** Stable, transcript-scoped key for host-owned disclosure restoration. */\nexport function transcriptDisclosureKey(\n resetKey: string | number | null | undefined,\n mode: TranscriptFoldMode,\n firstRowId: string\n): string {\n return `transcript:${encodeId(String(resetKey ?? ''))}:${mode}:${encodeId(firstRowId)}`\n}\n\nfunction panelId(instanceId: string, resetKey: string, rowId: string): string {\n return `${instanceId}-row-${encodeId(resetKey)}-${encodeId(rowId)}`\n}\n\nfunction buttonId(instanceId: string, resetKey: string, segmentKey: string): string {\n return `${instanceId}-fold-${encodeId(resetKey)}-${encodeId(segmentKey)}`\n}\n\nfunction sameFoldGroup<T>(a?: FoldGroup<T>, b?: FoldGroup<T>): boolean {\n // The key encodes the mode, so mode needs no comparison of its own.\n return (\n a === b ||\n (!!a && !!b && a.key === b.key && a.callCount === b.callCount && sameElements(a.rows, b.rows))\n )\n}\n\nfunction sameRecord<T>(a: RowRecord<T>, b: RowRecord<T>): boolean {\n return (\n a.row === b.row &&\n a.index === b.index &&\n a.displayKind === b.displayKind &&\n sameFields(a.group, b.group) &&\n sameFields(a.turn, b.turn) &&\n sameFields(a.fold, b.fold) &&\n sameFoldGroup(a.foldControl, b.foldControl)\n )\n}\n\nfunction firstRow<T>(item: TranscriptTurnItem<T>): TranscriptRow<T> | undefined {\n return item.kind === 'single' ? item.row : item.rows[0]\n}\n\nfunction appendTurnItem<T>(\n item: TranscriptTurnItem<T>,\n displayKind: 'single' | 'group' | 'turn',\n turn: TurnPresentation | undefined,\n indices: ReadonlyMap<TranscriptRow<T>, number>,\n into: RowRecord<T>[]\n): void {\n if (item.kind === 'single') {\n into.push({\n row: item.row,\n index: indices.get(item.row) ?? item.index,\n displayKind,\n turn,\n })\n return\n }\n item.rows.forEach((row, index) => {\n into.push({\n row,\n index: indices.get(row) ?? item.startIndex + index,\n displayKind,\n group: { index, size: item.rows.length },\n turn,\n })\n })\n}\n\nfunction appendDisplayItem<T>(\n item: TranscriptDisplayItem<T>,\n indices: ReadonlyMap<TranscriptRow<T>, number>,\n into: RowRecord<T>[]\n): void {\n if (item.kind !== 'turn') {\n appendTurnItem(item, item.kind, undefined, indices, into)\n return\n }\n const turnId = item.items.map(firstRow).find((row) => row)?.id ?? 'empty-turn'\n const turn: TurnPresentation = {\n id: turnId,\n complete: item.complete,\n interim: !!item.interim,\n }\n for (const child of item.items) appendTurnItem(child, 'turn', turn, indices, into)\n}\n\nfunction buildDisclosures<T>(\n records: readonly RowRecord<T>[],\n defaultMode: TranscriptFoldMode,\n foldState: TranscriptFoldState,\n resetKey: string\n): FoldGroup<T>[] {\n const controls: FoldGroup<T>[] = []\n let scope: RowRecord<T>[] = []\n const flushScope = () => {\n if (!scope.length) return\n const rows = scope.map((record) => record.row)\n const hasInterimTurn = scope.some((record) => record.turn?.interim)\n const hasConclusion = scope.some((record) => record.row.conclusion)\n const mode: TranscriptFoldMode = hasInterimTurn\n ? 'interim'\n : foldState === 'default'\n ? defaultMode\n : foldState === 'collapsed'\n ? hasConclusion\n ? 'prose'\n : 'tools'\n : 'interim'\n const plan = planTranscriptFold(rows, { mode })\n const foldable = plan.entries.flatMap((entry, index) =>\n entry.mounting === 'always' ? [] : [{ record: scope[index]!, mounting: entry.mounting }]\n )\n if (foldable.length) {\n const anchorId = scope[0]?.row.id ?? foldable[0]!.record.row.id\n const control: FoldGroup<T> = {\n key: transcriptDisclosureKey(resetKey, mode, anchorId),\n mode,\n callCount: plan.callCount,\n rows: foldable.map(({ record }) => record.row),\n }\n controls.push(control)\n foldable.forEach(({ record, mounting }, index) => {\n record.fold = {\n key: control.key,\n mode: control.mode,\n mounting: foldState === 'collapsed' ? 'hide-when-collapsed' : mounting,\n callCount: control.callCount,\n }\n if (index === 0) record.foldControl = control\n })\n }\n scope = []\n }\n\n for (const record of records) {\n if (record.row.opensTurn && scope.length) flushScope()\n scope.push(record)\n }\n flushScope()\n return controls\n}\n\nfunction foldLabel(mode: TranscriptFoldMode, count: number, expanded: boolean): string {\n const subject =\n mode === 'tools'\n ? count === 1\n ? '1 tool call'\n : count > 1\n ? `${count} tool calls`\n : 'tool details'\n : mode === 'prose'\n ? 'earlier activity'\n : 'interim activity'\n return `${expanded ? 'Hide' : 'Show'} ${subject}`\n}\n\nfunction TranscriptRowEntry<T>(props: {\n record: Accessor<RowRecord<T>>\n renderRow: Component<TranscriptCompositionRendererProps<T>>\n prefix: string\n resetKey: Accessor<string>\n expanded: (key: string) => Accessor<boolean>\n running: Accessor<boolean>\n foldState: Accessor<TranscriptFoldState>\n onToggle: (key: string, expanded: boolean) => void\n}) {\n const current = props.record\n const id = () => panelId(props.prefix, props.resetKey(), current().row.id)\n const foldControl = () => current().foldControl\n const disclosureKey = () => current().fold?.key\n const expanded = () => {\n const key = disclosureKey()\n return key ? props.expanded(key)() : true\n }\n const collapsed = () => !!current().fold && !expanded()\n const disabled = () => props.running() || props.foldState() !== 'default'\n const context = (): TranscriptCompositionRowContext => ({\n index: current().index,\n displayKind: current().displayKind,\n group: current().group,\n turn: current().turn,\n fold: current().fold,\n })\n const groupIndex = () => current().group?.index\n const groupSize = () => current().group?.size\n const renderable = () => current().fold?.mounting !== 'unmount-when-collapsed' || !collapsed()\n const renderHostRow = () =>\n createComponent(props.renderRow, {\n get row() {\n return current().row\n },\n get context() {\n return context()\n },\n })\n const controlLabel = () => {\n const control = foldControl()\n return control ? foldLabel(control.mode, control.callCount, expanded()) : ''\n }\n const controlRows = () =>\n foldControl()\n ?.rows.map((row) => panelId(props.prefix, props.resetKey(), row.id))\n .join(' ')\n\n return (\n <div\n data-slot=\"transcript-row\"\n data-display-kind={current().displayKind}\n data-group-index={groupIndex()}\n data-group-size={groupSize()}\n class=\"flex min-w-0 flex-col gap-1\"\n >\n <Show when={foldControl()}>\n {(control) => (\n <Button\n id={buttonId(props.prefix, props.resetKey(), control().key)}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"w-full justify-start\"\n aria-label={controlLabel()}\n aria-controls={controlRows()}\n aria-expanded={expanded()}\n aria-disabled={disabled() || undefined}\n onClick={() => props.onToggle(control().key, !expanded())}\n >\n <ChevronDown aria-hidden=\"true\" class=\"size-4 shrink-0\" />\n <span>{controlLabel()}</span>\n </Button>\n )}\n </Show>\n <div\n id={id()}\n data-slot=\"transcript-row-content\"\n class=\"group-data-[density=comfortable]/transcript:flex group-data-[density=comfortable]/transcript:flex-col\"\n hidden={collapsed()}\n aria-hidden={collapsed() || undefined}\n >\n <Show when={renderable() ? current() : undefined}>\n {(record) => {\n record()\n return renderHostRow()\n }}\n </Show>\n </div>\n </div>\n )\n}\n\n/**\n * Compose host-classified rows into stable turns, contiguous groups and disclosures.\n * Row render owners are keyed by `id` in a single list, so loose rows keep their DOM\n * owners when the grouping threshold promotes them into a turn. The caller owns row\n * identity, protocol meaning, redaction, permissions and durable conversation state.\n */\nexport function TranscriptComposition<T>(props: TranscriptCompositionProps<T>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'rows',\n 'renderRow',\n 'running',\n 'resetKey',\n 'foldMode',\n 'foldState',\n 'onFoldStateChange',\n 'density',\n 'disclosure',\n 'onDisclosureChange',\n ])\n const instanceId = createUniqueId()\n const grouper = createTranscriptGrouper<T>()\n const [internalFoldState, setInternalFoldState] = createSignal<TranscriptFoldState>('default')\n const rowHandles = new Map<string, RowHandle<T>>()\n const disclosureSignals = new Map<string, DisclosureSignal>()\n let lastResetKey = String(local.resetKey ?? '')\n\n const resetKey = () => String(local.resetKey ?? '')\n const foldState = () => local.foldState ?? internalFoldState()\n const running = () => !!local.running\n const localDisclosure = (key: string): DisclosureSignal => {\n let signal = disclosureSignals.get(key)\n if (!signal) {\n const [get, set] = createSignal<boolean | undefined>(undefined)\n signal = { get, set }\n disclosureSignals.set(key, signal)\n }\n return signal\n }\n const disclosureExpanded = (key: string): Accessor<boolean> => {\n const signal = localDisclosure(key)\n return () => {\n if (running()) return true\n if (foldState() === 'collapsed') return false\n if (foldState() === 'expanded') return true\n return local.disclosure?.get(key) ?? signal.get() ?? false\n }\n }\n const grouped = createMemo(() => grouper(local.rows))\n const layout = createMemo<TranscriptLayout<T>>(() => {\n const identity = resetKey()\n if (identity !== lastResetKey) {\n rowHandles.clear()\n disclosureSignals.clear()\n lastResetKey = identity\n }\n const indexByRow = new Map(local.rows.map((row, index) => [row, index]))\n const display = applyTranscriptRunningState(grouped(), running())\n const records: RowRecord<T>[] = []\n display.forEach((item) => appendDisplayItem(item, indexByRow, records))\n const controls = buildDisclosures(records, local.foldMode ?? 'tools', foldState(), identity)\n return { rows: records, controls }\n })\n const handles = createMemo(() => {\n const live = new Set<string>()\n const identity = resetKey()\n const result = layout().rows.map((record) => {\n const key = `${identity}\\u001f${record.row.id}`\n live.add(key)\n let handle = rowHandles.get(key)\n if (!handle) {\n const [get, set] = createSignal(record)\n handle = { key, get, set, last: record }\n rowHandles.set(key, handle)\n } else if (!sameRecord(handle.last, record)) {\n handle.last = record\n handle.set(record)\n }\n return handle\n })\n for (const key of rowHandles.keys()) if (!live.has(key)) rowHandles.delete(key)\n return result\n })\n const allControlIds = () =>\n layout()\n .controls.flatMap((control) =>\n control.rows.map((row) => panelId(instanceId, resetKey(), row.id))\n )\n .join(' ')\n const updateFoldState = () => {\n if (running()) return\n const current = foldState()\n const next: TranscriptFoldState =\n current === 'default' ? 'collapsed' : current === 'collapsed' ? 'expanded' : 'default'\n if (local.foldState === undefined) setInternalFoldState(next)\n local.onFoldStateChange?.(next)\n }\n const updateDisclosure = (key: string, expanded: boolean) => {\n if (running() || foldState() !== 'default') return\n if (local.disclosure) {\n local.onDisclosureChange?.(key, expanded)\n return\n }\n localDisclosure(key).set(expanded)\n local.onDisclosureChange?.(key, expanded)\n }\n\n return (\n <div\n data-slot=\"transcript-composition\"\n data-fold-state={foldState()}\n data-density={local.density ?? 'compact'}\n class={cn('group/transcript flex w-full min-w-0 flex-col gap-1', local.class)}\n {...rest}\n >\n <Show when={local.onFoldStateChange}>\n <div class=\"flex justify-end\">\n <Button\n id={`${instanceId}-fold-all`}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-controls={allControlIds() || undefined}\n aria-disabled={running() || undefined}\n onClick={updateFoldState}\n >\n {foldState() === 'default'\n ? 'Collapse all activity'\n : foldState() === 'collapsed'\n ? 'Expand all activity'\n : 'Restore default folding'}\n </Button>\n </div>\n </Show>\n <div\n data-slot=\"transcript-rows\"\n class={cn('flex min-w-0 flex-col', local.density === 'comfortable' ? 'gap-3' : 'gap-1')}\n >\n <For each={handles()}>\n {(handle) => (\n <TranscriptRowEntry\n record={handle.get}\n renderRow={local.renderRow}\n prefix={instanceId}\n resetKey={resetKey}\n expanded={disclosureExpanded}\n running={running}\n foldState={foldState}\n onToggle={updateDisclosure}\n />\n )}\n </For>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAwIA,IAAM+C,YAAYC,UAA0BC,mBAAmBD,KAAK;;AAGpE,SAAgBE,wBACdjB,UACAjB,MACAmC,YACQ;CACR,OAAO,cAAcJ,SAASK,OAAOnB,YAAY,EAAE,CAAC,EAAC,GAAIjB,KAAI,GAAI+B,SAASI,UAAU;AACtF;AAEA,SAASE,QAAQC,YAAoBrB,UAAkBsB,OAAuB;CAC5E,OAAO,GAAGD,WAAU,OAAQP,SAASd,QAAQ,EAAC,GAAIc,SAASQ,KAAK;AAClE;AAEA,SAASC,SAASF,YAAoBrB,UAAkBwB,YAA4B;CAClF,OAAO,GAAGH,WAAU,QAASP,SAASd,QAAQ,EAAC,GAAIc,SAASU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,GAAA,OAAA,IAAA;EAAA3B,OAAAwD,OAAAvD,gBAEPrH,MAAI;GAAA,IAACsH,OAAI;IAAA,OAAEwB,MAAM3G;GAAiB;GAAA,IAAAoF,WAAA;IAAA,IAAA2D,QAAAC,QAAA;IAAA/D,OAAA8D,OAAA7D,gBAE9B7G,QAAM;KACLe,IAAI,GAAG8B,WAAU;KACjBmE,MAAI;KACJC,SAAO;KACPpG,MAAI;KAAA,KAAA,mBAAA;MAAA,OACWoJ,cAAc,KAAKjG,KAAAA;KAAS;KAAA,KAAA,mBAAA;MAAA,OAC5BzC,QAAQ,KAAKyC,KAAAA;KAAS;KACrCkD,SAASgD;KAAe,IAAAnD,WAAA;MAAA,OAEvBM,WAAA3F,UAAU,MAAM,SAAS,CAAA,CAAA,IACtB,0BACAA,UAAU,MAAM,cACd,wBACA;KAAyB;IAAA,CAAA,CAAA;IAAA,OAAAgJ;GAAA;EAAA,CAAA,GAAAJ,KAAA;EAAA1D,OAAA0D,OAAAzD,gBAQlCtH,KAAG;GAAA,IAACqL,OAAI;IAAA,OAAEpB,QAAQ;GAAC;GAAAzC,WAChB8C,WAAMhD,gBACLpB,oBAAkB;IAAA,IACjBf,SAAM;KAAA,OAAEmF,OAAO3H;IAAG;IAAA,IAClBZ,YAAS;KAAA,OAAEgH,MAAMhH;IAAS;IAC1BqE,QAAQ9C;IACErB;IACVM,UAAUmH;IACD1H;IACEG;IACXkE,UAAUuE;GAAgB,CAAA;EAE7B,CAAA,CAAA;EAAA7C,aAAAuD,UAAAP,OAdIvK,GAAG,yBAAyBuI,MAAMvG,YAAY,gBAAgB,UAAU,OAAO,CAAC,CAAA;EAAA,OAAAqI;CAAA,EAAA,CAAA;AAmB/F"}
@@ -1 +1 @@
1
- {"version":3,"file":"app-shell.js","names":["ComponentProps","JSX","splitProps","cn","AppShell","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","AppShellBody","_el$2","_tmpl$2","AppShellMain","_el$3","_tmpl$3","AppShellContent","children","Element","_el$4","_tmpl$4","_$mergeProps"],"sources":["../../../../src/components/layout/app-shell/app-shell.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * AppShell.\n *\n * The window's skeleton: a grid whose regions are the side rail, an optional\n * secondary sidebar, a top bar and the content area, with a status bar pinned\n * to the bottom.\n *\n * Its whole job is to be the *one* place that decides the geometry, so two\n * applications built on this library cannot disagree about how tall the top bar\n * is or where the content begins. Every dimension comes from a token — not from\n * a class on a child — which is why the regions do not accept a height.\n *\n * Both apps are desktop shells, so the arrangement is height-locked: the shell\n * fills the viewport, each region scrolls internally, and the document itself\n * never scrolls. That is what stops a wheel event over a pane from dragging the\n * whole window.\n *\n * <AppShell>\n * <SideRail>…</SideRail>\n * <AppShellBody>\n * <AppShellTopBar>…</AppShellTopBar>\n * <AppShellMain>…</AppShellMain>\n * </AppShellBody>\n * </AppShell>\n *\n * A second sidebar goes inside `AppShellBody` as a `SidebarNav`, or as a\n * `ResizablePanelGroup` when the user is allowed to resize the split.\n */\nexport function AppShell(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"app-shell\"\n class={cn(\n 'bg-background text-foreground flex h-screen w-screen overflow-hidden',\n 'data-[window-drag=true]:window-drag',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** The area to the right of the rail: top bar over content over status bar. */\nexport function AppShellBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"app-shell-body\"\n class={cn('flex min-h-0 min-w-0 flex-1 flex-col', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The main content area.\n *\n * `min-h-0 min-w-0` is load-bearing: a flex child defaults to its content size,\n * so without it a wide table or a long line makes the whole shell scroll\n * horizontally instead of the pane.\n */\nexport function AppShellMain(props: ComponentProps<'main'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <main\n data-slot=\"app-shell-main\"\n class={cn('flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden', local.class)}\n {...rest}\n />\n )\n}\n\n/** A resizable split between two or more panes, filling the body. */\nexport function AppShellContent(props: ComponentProps<'div'> & { children?: JSX.Element }) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"app-shell-content\"\n class={cn('flex min-h-0 min-w-0 flex-1 overflow-hidden', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgBI,SAASC,OAA8B;CACrD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GACL,wEACA,uCACAG,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;;AAGA,SAAgBK,aAAaR,OAA8B;CACzD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAS,QAAAC,QAAA;EAAAL,OAAAI,OAAAH,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,wCAAwCG,MAAMM,KAAK;EAAC,EAAA,GAC1DL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAO;CAAA,EAAA,CAAA;AAGd;;;;;;;;AASA,SAAgBE,aAAaX,OAA+B;CAC1D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAY,QAAAC,QAAA;EAAAR,OAAAO,OAAAN,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,wDAAwDG,MAAMM,KAAK;EAAC,EAAA,GAC1EL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAU;CAAA,EAAA,CAAA;AAGd;;AAGA,SAAgBE,gBAAgBd,OAA2D;CACzF,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAiB,QAAAC,QAAA;EAAAb,OAAAY,OAAAX,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,+CAA+CG,MAAMM,KAAK;EAAC,EAAA,GACjEL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAe;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"app-shell.js","names":["splitProps","cn","AppShell","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","AppShellBody","_el$2","_tmpl$2","AppShellMain","_el$3","_tmpl$3","AppShellContent","_el$4","_tmpl$4"],"sources":["../../../../src/components/layout/app-shell/app-shell.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * AppShell.\n *\n * The window's skeleton: a grid whose regions are the side rail, an optional\n * secondary sidebar, a top bar and the content area, with a status bar pinned\n * to the bottom.\n *\n * Its whole job is to be the *one* place that decides the geometry, so two\n * applications built on this library cannot disagree about how tall the top bar\n * is or where the content begins. Every dimension comes from a token — not from\n * a class on a child — which is why the regions do not accept a height.\n *\n * Both apps are desktop shells, so the arrangement is height-locked: the shell\n * fills the viewport, each region scrolls internally, and the document itself\n * never scrolls. That is what stops a wheel event over a pane from dragging the\n * whole window.\n *\n * <AppShell>\n * <SideRail>…</SideRail>\n * <AppShellBody>\n * <AppShellTopBar>…</AppShellTopBar>\n * <AppShellMain>…</AppShellMain>\n * </AppShellBody>\n * </AppShell>\n *\n * A second sidebar goes inside `AppShellBody` as a `SidebarNav`, or as a\n * `ResizablePanelGroup` when the user is allowed to resize the split.\n */\nexport function AppShell(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"app-shell\"\n class={cn(\n 'bg-background text-foreground flex h-screen w-screen overflow-hidden',\n 'data-[window-drag=true]:window-drag',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** The area to the right of the rail: top bar over content over status bar. */\nexport function AppShellBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"app-shell-body\"\n class={cn('flex min-h-0 min-w-0 flex-1 flex-col', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The main content area.\n *\n * `min-h-0 min-w-0` is load-bearing: a flex child defaults to its content size,\n * so without it a wide table or a long line makes the whole shell scroll\n * horizontally instead of the pane.\n */\nexport function AppShellMain(props: ComponentProps<'main'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <main\n data-slot=\"app-shell-main\"\n class={cn('flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden', local.class)}\n {...rest}\n />\n )\n}\n\n/** A resizable split between two or more panes, filling the body. */\nexport function AppShellContent(props: ComponentProps<'div'> & { children?: JSX.Element }) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"app-shell-content\"\n class={cn('flex min-h-0 min-w-0 flex-1 overflow-hidden', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgBE,SAASC,OAA8B;CACrD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GACL,wEACA,uCACAG,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;;AAGA,SAAgBK,aAAaR,OAA8B;CACzD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAS,QAAAC,QAAA;EAAAL,OAAAI,OAAAH,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,wCAAwCG,MAAMM,KAAK;EAAC,EAAA,GAC1DL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAO;CAAA,EAAA,CAAA;AAGd;;;;;;;;AASA,SAAgBE,aAAaX,OAA+B;CAC1D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAY,QAAAC,QAAA;EAAAR,OAAAO,OAAAN,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,wDAAwDG,MAAMM,KAAK;EAAC,EAAA,GAC1EL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAU;CAAA,EAAA,CAAA;AAGd;;AAGA,SAAgBE,gBAAgBd,OAA2D;CACzF,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAe,QAAAC,QAAA;EAAAX,OAAAU,OAAAT,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,+CAA+CG,MAAMM,KAAK;EAAC,EAAA,GACjEL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAa;CAAA,EAAA,CAAA;AAGd"}
@@ -1 +1 @@
1
- {"version":3,"file":"skip-link.js","names":["ComponentProps","splitProps","cn","SkipLink","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","href","tabIndex","_$insert","_c$","_$memo","children","undefined","_$mergeProps","_$memo"],"sources":["../../../../src/components/layout/app-shell/skip-link.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } 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, rest] = splitProps(props, ['class', 'children', 'href', 'tabIndex'])\n\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 {local.children === undefined ? 'Skip to main content' : local.children}\n </a>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAgBG,SAASC,OAA4B;CACnD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO;EAAC;EAAS;EAAY;EAAQ;CAAU,CAAC;CAEjF,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,WAAA;IAAA,OAGWR,GACL,uDACA,0EACA,oEACA,4FACA,wGACA,iCACAG,MAAMM,KACR;GAAC;GAAA,IACDC,OAAI;IAAA,OAAEP,MAAMO,QAAQ;GAAe;GAAA,IACnCC,WAAQ;IAAA,OAAER,MAAMQ,YAAY;GAAC;EAAA,GACzBP,IAAI,GAAA,OAAA,IAAA;EAAAQ,OAAAP,aAAA;GAAA,IAAAQ,MAAAC,WAEPX,MAAMY,aAAaC,KAAAA,CAAS;GAAA,aAA5BH,IAAA,IAA+B,yBAAyBV,MAAMY;EAAQ,EAAA,CAAA,CAAA;EAAA,OAAAV;CAAA,EAAA,CAAA;AAG7E"}
1
+ {"version":3,"file":"skip-link.js","names":["splitProps","cn","SkipLink","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","href","tabIndex","_$insert","_c$","_$memo","children","undefined"],"sources":["../../../../src/components/layout/app-shell/skip-link.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { splitProps } 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, rest] = splitProps(props, ['class', 'children', 'href', 'tabIndex'])\n\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 {local.children === undefined ? 'Skip to main content' : local.children}\n </a>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAgBE,SAASC,OAA4B;CACnD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO;EAAC;EAAS;EAAY;EAAQ;CAAU,CAAC;CAEjF,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,WAAA;IAAA,OAGWR,GACL,uDACA,0EACA,oEACA,4FACA,wGACA,iCACAG,MAAMM,KACR;GAAC;GAAA,IACDC,OAAI;IAAA,OAAEP,MAAMO,QAAQ;GAAe;GAAA,IACnCC,WAAQ;IAAA,OAAER,MAAMQ,YAAY;GAAC;EAAA,GACzBP,IAAI,GAAA,OAAA,IAAA;EAAAQ,OAAAP,aAAA;GAAA,IAAAQ,MAAAC,WAEPX,MAAMY,aAAaC,KAAAA,CAAS;GAAA,aAA5BH,IAAA,IAA+B,yBAAyBV,MAAMY;EAAQ,EAAA,CAAA,CAAA;EAAA,OAAAV;CAAA,EAAA,CAAA;AAG7E"}
@@ -1 +1 @@
1
- {"version":3,"file":"contextual-sidebar.js","names":["Accessor","JSX","Show","createEffect","createMemo","createSignal","createUniqueId","onCleanup","untrack","MD_BREAKPOINT","cn","SidebarNav","SidebarNavContent","SidebarNavFooter","SidebarNavHeader","SidebarNavTitle","PixelResizeHandle","MobileModule","MobileLoad","error","ContextualSidebarRenderContext","mobile","portalMount","HTMLElement","ContextualSidebarModeTransition","phase","from","to","desktopSidebar","ContextualSidebarProps","id","label","title","titleVisibility","open","onOpenChange","responsiveMode","onResponsiveModeTransition","event","width","minimum","maximum","step","wideViewportAtLoad","resizeLabel","resizeGrip","restoreFocusRef","onSidebarElement","element","sidebarClass","sheetClass","headerClass","contentClass","footerClass","headingAs","header","context","Element","content","footer","onWidthChange","onWidthCommit","ContextualSidebar","props","isMobile","setIsMobile","mobileLoad","setMobileLoad","mobileLoadGeneration","mobileLoadPending","mobileLoadSettled","responsiveModeInitialized","transitionGeneration","pendingMode","disposed","transition","next","closeStaleOpen","previous","changed","generation","undefined","const","loadMobile","queueMicrotask","then","module","mobileMount","setMobileMount","connected","mount","isConnected","mode","wasMobile","media","MediaQueryList","viewportListener","removeEventListener","shouldCloseStaleOpen","Boolean","mediaQuery","window","matchMedia","updateViewport","nextIsMobile","matches","wasNarrow","addEventListener","renderSidebar","navigationId","_$createComponent","as","aria-label","aria-hidden","inert","data-open","String","ref","node","class","children","when","side","value","grip","controls","onChange","onCommit","fallback","_$memo","_wide","keyed","loaded","MobileSidebar","_$createComponent","_$memo"],"sources":["../../../../src/components/layout/contextual-sidebar/contextual-sidebar.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport {\n Show,\n createEffect,\n createMemo,\n createSignal,\n createUniqueId,\n onCleanup,\n untrack,\n} from 'solid-js'\nimport { MD_BREAKPOINT } from '#lib/breakpoints'\nimport { cn } from '#lib/utils'\nimport {\n SidebarNav,\n SidebarNavContent,\n SidebarNavFooter,\n SidebarNavHeader,\n SidebarNavTitle,\n} from '../sidebar-nav'\nimport { PixelResizeHandle } from '../pixel-resize-handle'\n\ntype MobileModule = typeof import('./mobile-contextual-sidebar')\ntype MobileLoad = MobileModule | { error: unknown }\n\nexport type ContextualSidebarRenderContext = {\n /** Whether the slot is being rendered inside the modal mobile sheet. */\n mobile: boolean\n /** Mount nested popovers and menus inside the mobile dialog's accessibility tree. */\n portalMount(): HTMLElement | undefined\n}\n\nexport type ContextualSidebarModeTransition = {\n phase: 'before' | 'after'\n from: 'desktop' | 'mobile'\n to: 'desktop' | 'mobile'\n desktopSidebar: HTMLElement | undefined\n}\n\nexport type ContextualSidebarProps = {\n /** Stable host id prefix; generated when omitted. */\n id?: string\n /** Landmark name shared by the desktop and mobile navigation. */\n label: string\n /** Visible navigation title and mobile dialog title. */\n title: string\n /**\n * Where the title row shows. `always` (default) draws it on desktop and in\n * the mobile sheet; `mobile` keeps the desktop title for assistive\n * technology only and drops the desktop row, for hosts whose top bar\n * already names the context. A `header` slot keeps the row visible.\n */\n titleVisibility?: 'always' | 'mobile'\n /** Host-controlled expanded state for the desktop panel and mobile dialog. */\n open: boolean\n onOpenChange(open: boolean): void\n /**\n * Presentation mode. `auto` (default) uses the built-in viewport breakpoint;\n * hosts can select `desktop` or the shared mobile `Sheet` themselves.\n */\n responsiveMode?: 'auto' | 'desktop' | 'mobile'\n /**\n * Coordinate host layout before a runtime mode change and after its DOM settles.\n * A superseded transition or unmounted sidebar does not emit an after phase.\n * Initial mode resolution does not emit either phase.\n */\n onResponsiveModeTransition?(event: ContextualSidebarModeTransition): void\n /** Current host-owned pixel width, reflected by the resize handle. */\n width: number\n minimum: number\n maximum: number\n step?: number\n /** Pass the host's initial viewport seed to distinguish stale desktop state. */\n wideViewportAtLoad?: boolean\n resizeLabel?: string\n /**\n * The resize edge's grip: the quieter rung by default, or the bordered chip\n * for hosts that want the heavier affordance.\n */\n resizeGrip?: 'chip' | 'rung'\n /** Stable external opener used when the modal mobile sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n /** Called with the nav node so a host can project width onto its layout root. */\n onSidebarElement?: (element: HTMLElement | undefined, mobile: boolean) => void\n /** Host-owned layout classes applied to both nav instances. */\n sidebarClass?: string\n /** Host-owned responsive constraints for the modal sheet. */\n sheetClass?: string\n headerClass?: string\n contentClass?: string\n footerClass?: string\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n /** Optional action/content slot alongside the shared heading. */\n header?(context: ContextualSidebarRenderContext): JSX.Element\n /** View-specific navigation rows, projects, rooms, files, or sessions. */\n content(context: ContextualSidebarRenderContext): JSX.Element\n /** Optional view-specific footer, such as an archive affordance. */\n footer?(context: ContextualSidebarRenderContext): JSX.Element\n onWidthChange(width: number): void\n onWidthCommit?(width: number): void\n}\n\n/**\n * ContextualSidebar.\n *\n * Shared navigation geometry and interaction policy for an application's\n * contextual sidebar. The host keeps ownership of the actual grid width,\n * persisted preference, open state, and view-specific navigation content.\n */\nexport function ContextualSidebar(props: ContextualSidebarProps) {\n const [isMobile, setIsMobile] = createSignal(false)\n const [mobileLoad, setMobileLoad] = createSignal<MobileLoad>()\n let mobileLoadGeneration = 0\n let mobileLoadPending = false\n let mobileLoadSettled = false\n let responsiveModeInitialized = false\n let desktopSidebar: HTMLElement | undefined\n let transitionGeneration = 0\n let pendingMode: boolean | undefined\n let disposed = false\n onCleanup(() => {\n disposed = true\n transitionGeneration += 1\n })\n\n const transition = (next: boolean, closeStaleOpen: boolean) => {\n // The host may synchronously update its props from either callback, which\n // re-enters the responsive effect before this transition has finished.\n if (pendingMode === next) return\n const previous = untrack(isMobile)\n const changed = responsiveModeInitialized && previous !== next\n const generation =\n changed || pendingMode !== undefined ? ++transitionGeneration : transitionGeneration\n pendingMode = next\n const event = {\n from: previous ? ('mobile' as const) : ('desktop' as const),\n to: next ? ('mobile' as const) : ('desktop' as const),\n desktopSidebar,\n }\n try {\n if (changed) untrack(() => props.onResponsiveModeTransition?.({ ...event, phase: 'before' }))\n if (disposed || generation !== transitionGeneration) return\n if (closeStaleOpen) untrack(() => props.onOpenChange(false))\n if (disposed || generation !== transitionGeneration) return\n if (next) loadMobile()\n setIsMobile(next)\n if (changed) {\n queueMicrotask(() => {\n if (!disposed && generation === transitionGeneration && untrack(isMobile) === next)\n untrack(() => props.onResponsiveModeTransition?.({ ...event, phase: 'after' }))\n })\n }\n } finally {\n if (generation === transitionGeneration) pendingMode = undefined\n }\n }\n // Keep the resolved component mounted across viewport changes for Sheet cleanup.\n const loadMobile = () => {\n if (mobileLoadPending || mobileLoadSettled) return\n mobileLoadPending = true\n const generation = ++mobileLoadGeneration\n // Native module caching shares successful loads without keeping a rejected promise.\n void import('./mobile-contextual-sidebar').then(\n (module) => {\n if (generation === mobileLoadGeneration) {\n mobileLoadPending = false\n mobileLoadSettled = true\n setMobileLoad(module)\n }\n },\n (error: unknown) => {\n if (generation === mobileLoadGeneration) {\n mobileLoadPending = false\n mobileLoadSettled = true\n setMobileLoad({ error })\n }\n }\n )\n }\n const [mobileMount, setMobileMount] = createSignal<\n { element: HTMLElement; connected: boolean } | undefined\n >()\n const id = props.id ?? `contextual-sidebar-${createUniqueId()}`\n const resizeLabel = () => props.resizeLabel ?? `Resize ${props.label}`\n const portalMount = () => {\n const mount = mobileMount()\n return mount?.connected && mount.element.isConnected ? mount.element : undefined\n }\n\n const responsiveMode = createMemo(() => props.responsiveMode ?? 'auto')\n createEffect(() => {\n const mode = responsiveMode()\n const wasMobile = untrack(isMobile)\n let media: MediaQueryList | undefined\n let viewportListener: (() => void) | undefined\n\n onCleanup(() => {\n mobileLoadGeneration += 1\n mobileLoadPending = false\n if (media && viewportListener) media.removeEventListener('change', viewportListener)\n })\n\n if (mode === 'desktop') {\n transition(false, false)\n } else if (mode === 'mobile') {\n // An explicit host transition into mobile must not briefly open a Sheet\n // with stale desktop-expanded state. An initial wide-loaded seed still\n // marks an open value as stale, including in host-selected mobile mode.\n const shouldCloseStaleOpen = responsiveModeInitialized\n ? !wasMobile && untrack(() => props.open)\n : untrack(() => props.wideViewportAtLoad && props.open)\n transition(true, Boolean(shouldCloseStaleOpen))\n } else {\n const mediaQuery = window.matchMedia(`(max-width: ${MD_BREAKPOINT})`)\n media = mediaQuery\n const updateViewport = () => {\n const nextIsMobile = mediaQuery.matches\n const wasNarrow = untrack(isMobile)\n // Close before mounting a modal. A desktop-expanded host state is not\n // mobile intent, and opening the Sheet for one frame can steal focus.\n transition(nextIsMobile, nextIsMobile && !wasNarrow)\n }\n viewportListener = updateViewport\n\n // Preserve a narrow-boot open intent. Initial auto and mobile modes use\n // the viewport seed to clear stale state; runtime transitions close it.\n const shouldCloseStaleOpen =\n media.matches &&\n (!responsiveModeInitialized\n ? untrack(() => props.wideViewportAtLoad && props.open)\n : !wasMobile)\n transition(media.matches, Boolean(shouldCloseStaleOpen))\n if (!disposed) mediaQuery.addEventListener('change', updateViewport)\n }\n\n responsiveModeInitialized = true\n })\n\n const renderSidebar = (mobile: boolean) => {\n let element: HTMLElement | undefined\n const context: ContextualSidebarRenderContext = {\n mobile,\n portalMount: () => (mobile ? portalMount() : undefined),\n }\n const navigationId = `${id}-${mobile ? 'mobile' : 'desktop'}`\n\n onCleanup(() => {\n if (mobile && mobileMount()?.element === element) setMobileMount(undefined)\n if (!mobile && desktopSidebar === element) desktopSidebar = undefined\n element = undefined\n props.onSidebarElement?.(undefined, mobile)\n })\n\n return (\n <SidebarNav\n as=\"aside\"\n id={navigationId}\n aria-label={props.label}\n aria-hidden={!mobile && !props.open ? 'true' : undefined}\n inert={!mobile && !props.open}\n data-contextual-sidebar={mobile ? 'mobile' : 'desktop'}\n data-open={mobile ? undefined : String(props.open)}\n ref={(node) => {\n element = node\n if (!mobile) desktopSidebar = node\n if (mobile) {\n setMobileMount({ element: node, connected: node.isConnected })\n queueMicrotask(() => {\n if (node.isConnected && mobileMount()?.element === node)\n setMobileMount({ element: node, connected: true })\n })\n }\n props.onSidebarElement?.(node, mobile)\n }}\n class={cn('relative h-full w-full max-w-full', props.sidebarClass)}\n >\n <Show when={!mobile && props.open}>\n <PixelResizeHandle\n // The ruler spans the sidebar as a pointer-events-none overlay; lift\n // it above the neighbouring pane so the edge stays grabbable.\n class=\"z-(--z-docked)\"\n side=\"left\"\n value={props.width}\n minimum={props.minimum}\n maximum={props.maximum}\n step={props.step}\n label={resizeLabel()}\n grip={props.resizeGrip ?? 'rung'}\n controls={navigationId}\n onChange={props.onWidthChange}\n onCommit={props.onWidthCommit}\n />\n </Show>\n <Show when={!mobile || mobileMount()?.connected}>\n <Show\n when={mobile || props.titleVisibility !== 'mobile' || props.header}\n fallback={\n <SidebarNavTitle as={props.headingAs ?? 'h2'} class=\"sr-only\">\n {props.title}\n </SidebarNavTitle>\n }\n >\n <SidebarNavHeader class={cn(mobile && 'pe-12', props.headerClass)}>\n <SidebarNavTitle as={props.headingAs ?? 'h2'}>{props.title}</SidebarNavTitle>\n {props.header?.(context)}\n </SidebarNavHeader>\n </Show>\n <SidebarNavContent class={props.contentClass}>{props.content(context)}</SidebarNavContent>\n {props.footer ? (\n <SidebarNavFooter class={props.footerClass}>{props.footer(context)}</SidebarNavFooter>\n ) : null}\n </Show>\n </SidebarNav>\n )\n }\n\n return (\n <>\n <Show when={!isMobile()}>{(_wide) => renderSidebar(false)}</Show>\n <Show when={mobileLoad()} keyed>\n {(loaded) => {\n if ('error' in loaded) throw loaded.error\n return (\n <loaded.MobileSidebar\n open={isMobile() && props.open}\n onOpenChange={props.onOpenChange}\n label={props.label}\n sheetClass={props.sheetClass}\n restoreFocusRef={props.restoreFocusRef}\n renderSidebar={() => renderSidebar(true)}\n />\n )\n }}\n </Show>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA4GA,SAAgB8D,kBAAkBC,OAA+B;CAC/D,MAAM,CAACC,UAAUC,eAAe5D,aAAa,KAAK;CAClD,MAAM,CAAC6D,YAAYC,iBAAiB9D,aAAyB;CAC7D,IAAI+D,uBAAuB;CAC3B,IA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A,CAAA,KAAID,MAAM7B;IAAI;IAAA,IAC9BC,eAAY;KAAA,OAAE4B,MAAM5B;IAAY;IAAA,IAChCJ,QAAK;KAAA,OAAEgC,MAAMhC;IAAK;IAAA,IAClBmB,aAAU;KAAA,OAAEa,MAAMb;IAAU;IAAA,IAC5BJ,kBAAe;KAAA,OAAEiB,MAAMjB;IAAe;IACtC8D,qBAAqBA,cAAc,IAAI;GAAC,CAAA;EAG9C;CAAC,CAAA,CAAA;AAIT"}
1
+ {"version":3,"file":"contextual-sidebar.js","names":["Show","createEffect","createMemo","createSignal","createUniqueId","onCleanup","untrack","MD_BREAKPOINT","cn","SidebarNav","SidebarNavContent","SidebarNavFooter","SidebarNavHeader","SidebarNavTitle","PixelResizeHandle","error","mobile","portalMount","phase","from","to","desktopSidebar","id","label","title","titleVisibility","open","onOpenChange","responsiveMode","onResponsiveModeTransition","event","width","minimum","maximum","step","wideViewportAtLoad","resizeLabel","resizeGrip","restoreFocusRef","onSidebarElement","element","sidebarClass","sheetClass","headerClass","contentClass","footerClass","headingAs","header","context","content","footer","onWidthChange","onWidthCommit","ContextualSidebar","props","isMobile","setIsMobile","mobileLoad","setMobileLoad","mobileLoadGeneration","mobileLoadPending","mobileLoadSettled","responsiveModeInitialized","transitionGeneration","pendingMode","disposed","transition","next","closeStaleOpen","previous","changed","generation","undefined","loadMobile","queueMicrotask","then","module","mobileMount","setMobileMount","connected","mount","isConnected","mode","wasMobile","media","viewportListener","removeEventListener","shouldCloseStaleOpen","Boolean","mediaQuery","window","matchMedia","updateViewport","nextIsMobile","matches","wasNarrow","addEventListener","renderSidebar","navigationId","_$createComponent","as","inert","String","ref","node","children","when","side","value","grip","controls","onChange","onCommit","fallback","_$memo","_wide","keyed","loaded","MobileSidebar"],"sources":["../../../../src/components/layout/contextual-sidebar/contextual-sidebar.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport {\n Show,\n createEffect,\n createMemo,\n createSignal,\n createUniqueId,\n onCleanup,\n untrack,\n} from 'solid-js'\nimport { MD_BREAKPOINT } from '#lib/breakpoints'\nimport { cn } from '#lib/utils'\nimport {\n SidebarNav,\n SidebarNavContent,\n SidebarNavFooter,\n SidebarNavHeader,\n SidebarNavTitle,\n} from '../sidebar-nav'\nimport { PixelResizeHandle } from '../pixel-resize-handle'\n\ntype MobileModule = typeof import('./mobile-contextual-sidebar')\ntype MobileLoad = MobileModule | { error: unknown }\n\nexport type ContextualSidebarRenderContext = {\n /** Whether the slot is being rendered inside the modal mobile sheet. */\n mobile: boolean\n /** Mount nested popovers and menus inside the mobile dialog's accessibility tree. */\n portalMount(): HTMLElement | undefined\n}\n\nexport type ContextualSidebarModeTransition = {\n phase: 'before' | 'after'\n from: 'desktop' | 'mobile'\n to: 'desktop' | 'mobile'\n desktopSidebar: HTMLElement | undefined\n}\n\nexport type ContextualSidebarProps = {\n /** Stable host id prefix; generated when omitted. */\n id?: string\n /** Landmark name shared by the desktop and mobile navigation. */\n label: string\n /** Visible navigation title and mobile dialog title. */\n title: string\n /**\n * Where the title row shows. `always` (default) draws it on desktop and in\n * the mobile sheet; `mobile` keeps the desktop title for assistive\n * technology only and drops the desktop row, for hosts whose top bar\n * already names the context. A `header` slot keeps the row visible.\n */\n titleVisibility?: 'always' | 'mobile'\n /** Host-controlled expanded state for the desktop panel and mobile dialog. */\n open: boolean\n onOpenChange(open: boolean): void\n /**\n * Presentation mode. `auto` (default) uses the built-in viewport breakpoint;\n * hosts can select `desktop` or the shared mobile `Sheet` themselves.\n */\n responsiveMode?: 'auto' | 'desktop' | 'mobile'\n /**\n * Coordinate host layout before a runtime mode change and after its DOM settles.\n * A superseded transition or unmounted sidebar does not emit an after phase.\n * Initial mode resolution does not emit either phase.\n */\n onResponsiveModeTransition?(event: ContextualSidebarModeTransition): void\n /** Current host-owned pixel width, reflected by the resize handle. */\n width: number\n minimum: number\n maximum: number\n step?: number\n /** Pass the host's initial viewport seed to distinguish stale desktop state. */\n wideViewportAtLoad?: boolean\n resizeLabel?: string\n /**\n * The resize edge's grip: the quieter rung by default, or the bordered chip\n * for hosts that want the heavier affordance.\n */\n resizeGrip?: 'chip' | 'rung'\n /** Stable external opener used when the modal mobile sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n /** Called with the nav node so a host can project width onto its layout root. */\n onSidebarElement?: (element: HTMLElement | undefined, mobile: boolean) => void\n /** Host-owned layout classes applied to both nav instances. */\n sidebarClass?: string\n /** Host-owned responsive constraints for the modal sheet. */\n sheetClass?: string\n headerClass?: string\n contentClass?: string\n footerClass?: string\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n /** Optional action/content slot alongside the shared heading. */\n header?(context: ContextualSidebarRenderContext): JSX.Element\n /** View-specific navigation rows, projects, rooms, files, or sessions. */\n content(context: ContextualSidebarRenderContext): JSX.Element\n /** Optional view-specific footer, such as an archive affordance. */\n footer?(context: ContextualSidebarRenderContext): JSX.Element\n onWidthChange(width: number): void\n onWidthCommit?(width: number): void\n}\n\n/**\n * ContextualSidebar.\n *\n * Shared navigation geometry and interaction policy for an application's\n * contextual sidebar. The host keeps ownership of the actual grid width,\n * persisted preference, open state, and view-specific navigation content.\n */\nexport function ContextualSidebar(props: ContextualSidebarProps) {\n const [isMobile, setIsMobile] = createSignal(false)\n const [mobileLoad, setMobileLoad] = createSignal<MobileLoad>()\n let mobileLoadGeneration = 0\n let mobileLoadPending = false\n let mobileLoadSettled = false\n let responsiveModeInitialized = false\n let desktopSidebar: HTMLElement | undefined\n let transitionGeneration = 0\n let pendingMode: boolean | undefined\n let disposed = false\n onCleanup(() => {\n disposed = true\n transitionGeneration += 1\n })\n\n const transition = (next: boolean, closeStaleOpen: boolean) => {\n // The host may synchronously update its props from either callback, which\n // re-enters the responsive effect before this transition has finished.\n if (pendingMode === next) return\n const previous = untrack(isMobile)\n const changed = responsiveModeInitialized && previous !== next\n const generation =\n changed || pendingMode !== undefined ? ++transitionGeneration : transitionGeneration\n pendingMode = next\n const event = {\n from: previous ? ('mobile' as const) : ('desktop' as const),\n to: next ? ('mobile' as const) : ('desktop' as const),\n desktopSidebar,\n }\n try {\n if (changed) untrack(() => props.onResponsiveModeTransition?.({ ...event, phase: 'before' }))\n if (disposed || generation !== transitionGeneration) return\n if (closeStaleOpen) untrack(() => props.onOpenChange(false))\n if (disposed || generation !== transitionGeneration) return\n if (next) loadMobile()\n setIsMobile(next)\n if (changed) {\n queueMicrotask(() => {\n if (!disposed && generation === transitionGeneration && untrack(isMobile) === next)\n untrack(() => props.onResponsiveModeTransition?.({ ...event, phase: 'after' }))\n })\n }\n } finally {\n if (generation === transitionGeneration) pendingMode = undefined\n }\n }\n // Keep the resolved component mounted across viewport changes for Sheet cleanup.\n const loadMobile = () => {\n if (mobileLoadPending || mobileLoadSettled) return\n mobileLoadPending = true\n const generation = ++mobileLoadGeneration\n // Native module caching shares successful loads without keeping a rejected promise.\n void import('./mobile-contextual-sidebar').then(\n (module) => {\n if (generation === mobileLoadGeneration) {\n mobileLoadPending = false\n mobileLoadSettled = true\n setMobileLoad(module)\n }\n },\n (error: unknown) => {\n if (generation === mobileLoadGeneration) {\n mobileLoadPending = false\n mobileLoadSettled = true\n setMobileLoad({ error })\n }\n }\n )\n }\n const [mobileMount, setMobileMount] = createSignal<\n { element: HTMLElement; connected: boolean } | undefined\n >()\n const id = props.id ?? `contextual-sidebar-${createUniqueId()}`\n const resizeLabel = () => props.resizeLabel ?? `Resize ${props.label}`\n const portalMount = () => {\n const mount = mobileMount()\n return mount?.connected && mount.element.isConnected ? mount.element : undefined\n }\n\n const responsiveMode = createMemo(() => props.responsiveMode ?? 'auto')\n createEffect(() => {\n const mode = responsiveMode()\n const wasMobile = untrack(isMobile)\n let media: MediaQueryList | undefined\n let viewportListener: (() => void) | undefined\n\n onCleanup(() => {\n mobileLoadGeneration += 1\n mobileLoadPending = false\n if (media && viewportListener) media.removeEventListener('change', viewportListener)\n })\n\n if (mode === 'desktop') {\n transition(false, false)\n } else if (mode === 'mobile') {\n // An explicit host transition into mobile must not briefly open a Sheet\n // with stale desktop-expanded state. An initial wide-loaded seed still\n // marks an open value as stale, including in host-selected mobile mode.\n const shouldCloseStaleOpen = responsiveModeInitialized\n ? !wasMobile && untrack(() => props.open)\n : untrack(() => props.wideViewportAtLoad && props.open)\n transition(true, Boolean(shouldCloseStaleOpen))\n } else {\n const mediaQuery = window.matchMedia(`(max-width: ${MD_BREAKPOINT})`)\n media = mediaQuery\n const updateViewport = () => {\n const nextIsMobile = mediaQuery.matches\n const wasNarrow = untrack(isMobile)\n // Close before mounting a modal. A desktop-expanded host state is not\n // mobile intent, and opening the Sheet for one frame can steal focus.\n transition(nextIsMobile, nextIsMobile && !wasNarrow)\n }\n viewportListener = updateViewport\n\n // Preserve a narrow-boot open intent. Initial auto and mobile modes use\n // the viewport seed to clear stale state; runtime transitions close it.\n const shouldCloseStaleOpen =\n media.matches &&\n (!responsiveModeInitialized\n ? untrack(() => props.wideViewportAtLoad && props.open)\n : !wasMobile)\n transition(media.matches, Boolean(shouldCloseStaleOpen))\n if (!disposed) mediaQuery.addEventListener('change', updateViewport)\n }\n\n responsiveModeInitialized = true\n })\n\n const renderSidebar = (mobile: boolean) => {\n let element: HTMLElement | undefined\n const context: ContextualSidebarRenderContext = {\n mobile,\n portalMount: () => (mobile ? portalMount() : undefined),\n }\n const navigationId = `${id}-${mobile ? 'mobile' : 'desktop'}`\n\n onCleanup(() => {\n if (mobile && mobileMount()?.element === element) setMobileMount(undefined)\n if (!mobile && desktopSidebar === element) desktopSidebar = undefined\n element = undefined\n props.onSidebarElement?.(undefined, mobile)\n })\n\n return (\n <SidebarNav\n as=\"aside\"\n id={navigationId}\n aria-label={props.label}\n aria-hidden={!mobile && !props.open ? 'true' : undefined}\n inert={!mobile && !props.open}\n data-contextual-sidebar={mobile ? 'mobile' : 'desktop'}\n data-open={mobile ? undefined : String(props.open)}\n ref={(node) => {\n element = node\n if (!mobile) desktopSidebar = node\n if (mobile) {\n setMobileMount({ element: node, connected: node.isConnected })\n queueMicrotask(() => {\n if (node.isConnected && mobileMount()?.element === node)\n setMobileMount({ element: node, connected: true })\n })\n }\n props.onSidebarElement?.(node, mobile)\n }}\n class={cn('relative h-full w-full max-w-full', props.sidebarClass)}\n >\n <Show when={!mobile && props.open}>\n <PixelResizeHandle\n // The ruler spans the sidebar as a pointer-events-none overlay; lift\n // it above the neighbouring pane so the edge stays grabbable.\n class=\"z-(--z-docked)\"\n side=\"left\"\n value={props.width}\n minimum={props.minimum}\n maximum={props.maximum}\n step={props.step}\n label={resizeLabel()}\n grip={props.resizeGrip ?? 'rung'}\n controls={navigationId}\n onChange={props.onWidthChange}\n onCommit={props.onWidthCommit}\n />\n </Show>\n <Show when={!mobile || mobileMount()?.connected}>\n <Show\n when={mobile || props.titleVisibility !== 'mobile' || props.header}\n fallback={\n <SidebarNavTitle as={props.headingAs ?? 'h2'} class=\"sr-only\">\n {props.title}\n </SidebarNavTitle>\n }\n >\n <SidebarNavHeader class={cn(mobile && 'pe-12', props.headerClass)}>\n <SidebarNavTitle as={props.headingAs ?? 'h2'}>{props.title}</SidebarNavTitle>\n {props.header?.(context)}\n </SidebarNavHeader>\n </Show>\n <SidebarNavContent class={props.contentClass}>{props.content(context)}</SidebarNavContent>\n {props.footer ? (\n <SidebarNavFooter class={props.footerClass}>{props.footer(context)}</SidebarNavFooter>\n ) : null}\n </Show>\n </SidebarNav>\n )\n }\n\n return (\n <>\n <Show when={!isMobile()}>{(_wide) => renderSidebar(false)}</Show>\n <Show when={mobileLoad()} keyed>\n {(loaded) => {\n if ('error' in loaded) throw loaded.error\n return (\n <loaded.MobileSidebar\n open={isMobile() && props.open}\n onOpenChange={props.onOpenChange}\n label={props.label}\n sheetClass={props.sheetClass}\n restoreFocusRef={props.restoreFocusRef}\n renderSidebar={() => renderSidebar(true)}\n />\n )\n }}\n </Show>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA4GA,SAAgBqD,kBAAkBC,OAA+B;CAC/D,MAAM,CAACC,UAA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AoF,gBACGkB,OAAOC,eAAa;IAAA,IACnB5F,OAAI;KAAA,OAAEwF,WAAA,CAAA,CAAA3D,SAAS,CAAC,CAAA,CAAA,KAAID,MAAM5B;IAAI;IAAA,IAC9BC,eAAY;KAAA,OAAE2B,MAAM3B;IAAY;IAAA,IAChCJ,QAAK;KAAA,OAAE+B,MAAM/B;IAAK;IAAA,IAClBmB,aAAU;KAAA,OAAEY,MAAMZ;IAAU;IAAA,IAC5BJ,kBAAe;KAAA,OAAEgB,MAAMhB;IAAe;IACtC2D,qBAAqBA,cAAc,IAAI;GAAC,CAAA;EAG9C;CAAC,CAAA,CAAA;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-contextual-sidebar.js","names":["Accessor","JSX","cn","Sheet","SheetContent","MobileContextualSidebarProps","open","onOpenChange","label","sheetClass","restoreFocusRef","HTMLElement","renderSidebar","Element","MobileSidebar","props","_$createComponent","children","side","aria-label","class","_$createComponent"],"sources":["../../../../src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Sheet, SheetContent } from '../../ui/sheet'\n\nexport type MobileContextualSidebarProps = {\n open: boolean\n onOpenChange(open: boolean): void\n label: string\n sheetClass?: string\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n renderSidebar(): JSX.Element\n}\n\n/** Sheet wrappers are loaded only when a contextual sidebar enters mobile mode. */\nexport function MobileSidebar(props: MobileContextualSidebarProps) {\n return (\n <Sheet open={props.open} onOpenChange={props.onOpenChange}>\n <SheetContent\n side=\"start\"\n aria-label={props.label}\n // The sheet leaves the app rail visible beside it: at most 19rem, never\n // under 9rem, and otherwise the viewport less the rail's width.\n class={cn(\n 'w-[min(19rem,max(9rem,calc(100vw-var(--rail-width))))] max-w-[min(19rem,max(9rem,calc(100vw-var(--rail-width))))] gap-0 p-0',\n props.sheetClass\n )}\n restoreFocusRef={props.restoreFocusRef}\n >\n {props.renderSidebar()}\n </SheetContent>\n </Sheet>\n )\n}\n"],"mappings":";;;;;AAcA,SAAgBc,cAAcC,OAAqC;CACjE,OAAAC,gBACGb,OAAK;EAAA,IAACG,OAAI;GAAA,OAAES,MAAMT;EAAI;EAAA,IAAEC,eAAY;GAAA,OAAEQ,MAAMR;EAAY;EAAA,IAAAU,WAAA;GAAA,OAAAD,gBACtDZ,cAAY;IACXc,MAAI;IAAA,KAAA,gBAAA;KAAA,OACQH,MAAMP;IAAK;IAAA,KAAA,WAAA;KAAA,OAGhBN,GACL,+HACAa,MAAMN,UACR;IAAC;IAAA,IACDC,kBAAe;KAAA,OAAEK,MAAML;IAAe;IAAA,IAAAO,WAAA;KAAA,OAErCF,MAAMH,cAAc;IAAC;GAAA,CAAA;EAAA;CAAA,CAAA;AAI9B"}
1
+ {"version":3,"file":"mobile-contextual-sidebar.js","names":["cn","Sheet","SheetContent","open","onOpenChange","label","sheetClass","restoreFocusRef","renderSidebar","MobileSidebar","props","_$createComponent","children","side"],"sources":["../../../../src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Sheet, SheetContent } from '../../ui/sheet'\n\nexport type MobileContextualSidebarProps = {\n open: boolean\n onOpenChange(open: boolean): void\n label: string\n sheetClass?: string\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n renderSidebar(): JSX.Element\n}\n\n/** Sheet wrappers are loaded only when a contextual sidebar enters mobile mode. */\nexport function MobileSidebar(props: MobileContextualSidebarProps) {\n return (\n <Sheet open={props.open} onOpenChange={props.onOpenChange}>\n <SheetContent\n side=\"start\"\n aria-label={props.label}\n // The sheet leaves the app rail visible beside it: at most 19rem, never\n // under 9rem, and otherwise the viewport less the rail's width.\n class={cn(\n 'w-[min(19rem,max(9rem,calc(100vw-var(--rail-width))))] max-w-[min(19rem,max(9rem,calc(100vw-var(--rail-width))))] gap-0 p-0',\n props.sheetClass\n )}\n restoreFocusRef={props.restoreFocusRef}\n >\n {props.renderSidebar()}\n </SheetContent>\n </Sheet>\n )\n}\n"],"mappings":";;;;;AAcA,SAAgBS,cAAcC,OAAqC;CACjE,OAAAC,gBACGV,OAAK;EAAA,IAACE,OAAI;GAAA,OAAEO,MAAMP;EAAI;EAAA,IAAEC,eAAY;GAAA,OAAEM,MAAMN;EAAY;EAAA,IAAAQ,WAAA;GAAA,OAAAD,gBACtDT,cAAY;IACXW,MAAI;IAAA,KAAA,gBAAA;KAAA,OACQH,MAAML;IAAK;IAAA,KAAA,WAAA;KAAA,OAGhBL,GACL,+HACAU,MAAMJ,UACR;IAAC;IAAA,IACDC,kBAAe;KAAA,OAAEG,MAAMH;IAAe;IAAA,IAAAK,WAAA;KAAA,OAErCF,MAAMF,cAAc;IAAC;GAAA,CAAA;EAAA;CAAA,CAAA;AAI9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"floating-preview.js","names":["createEffect","createSignal","onCleanup","onMount","on","JSX","Move","X","ActionButton","ScrollArea","FloatingPreviewFrame","FloatingPreviewResizeDirection","FloatingPreviewSize","resolveFloatingPreviewFrame","resizeFloatingPreview","directions","direction","class","glyph","FloatingPreviewProps","label","source","onClose","actions","Element","children","FloatingPreview","props","frame","setFrame","x","y","width","height","bounds","HTMLDivElement","observer","ResizeObserver","gesture","id","start","measure","rect","getBoundingClientRect","current","position","container","const","defer","observe","disconnect","event","PointerEvent","button","preventDefault","stopPropagation","pointerId","clientX","clientY","currentTarget","HTMLElement","setPointerCapture","move","delta","end","undefined","keyboardMove","KeyboardEvent","key","keyboardResize","startsWith","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_ref$","_$use","_$insert","_$createComponent","type","variant","size","aria-label","tooltip","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onLostPointerCapture","onKeyDown","_c$","_$memo","onClick","role","tabIndex","map","className","_el$5","_tmpl$2","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","e","_$setAttribute","t","a","_$setStyleProperty","o","i","n","_$use","_$createComponent","_$memo","_$setAttribute","_$setStyleProperty"],"sources":["../../../../src/components/layout/floating-preview/floating-preview.tsx"],"sourcesContent":["import { createEffect, createSignal, onCleanup, onMount, on, type JSX } from 'solid-js'\nimport { Move, X } from 'lucide-solid'\nimport { ActionButton } from '../../composites/action-button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n type FloatingPreviewFrame,\n type FloatingPreviewResizeDirection,\n type FloatingPreviewSize,\n resolveFloatingPreviewFrame,\n resizeFloatingPreview,\n} from './model'\n\nconst directions: readonly {\n direction: FloatingPreviewResizeDirection\n class: string\n glyph: string\n}[] = [\n {\n direction: 'north',\n class: 'absolute -top-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'south',\n class: 'absolute -bottom-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'east',\n class: 'absolute -right-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'west',\n class: 'absolute -left-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'northwest',\n class: 'absolute -top-3 -left-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↖',\n },\n {\n direction: 'northeast',\n class: 'absolute -top-3 -right-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↗',\n },\n {\n direction: 'southwest',\n class: 'absolute -bottom-3 -left-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↙',\n },\n {\n direction: 'southeast',\n class: 'absolute -bottom-3 -right-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↘',\n },\n]\n\nexport type FloatingPreviewProps = {\n label: string\n source: FloatingPreviewSize\n onClose?: () => void\n actions?: JSX.Element\n children: JSX.Element\n}\n\n/** A host-bounded movable preview frame. Content and actions remain caller-owned. */\nexport function FloatingPreview(props: FloatingPreviewProps) {\n const [frame, setFrame] = createSignal<FloatingPreviewFrame>({ x: 0, y: 0, width: 1, height: 1 })\n // oxlint-disable-next-line no-unassigned-vars -- assigned through Solid's ref callback.\n let bounds: HTMLDivElement | undefined\n let observer: ResizeObserver | undefined\n let gesture:\n | {\n id: number\n x: number\n y: number\n start: FloatingPreviewFrame\n direction: FloatingPreviewResizeDirection | null\n }\n | undefined\n\n const measure = () => {\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n setFrame((current) =>\n resolveFloatingPreviewFrame({\n width: current.width > 1 ? current.width : null,\n position: current.width > 1 ? { x: current.x, y: current.y } : null,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n createEffect(\n on(\n () => [props.source.width, props.source.height] as const,\n () => measure(),\n { defer: true }\n )\n )\n onMount(() => {\n if (bounds) {\n observer = new ResizeObserver(measure)\n observer.observe(bounds)\n measure()\n }\n })\n onCleanup(() => observer?.disconnect())\n\n function start(event: PointerEvent, direction: FloatingPreviewResizeDirection | null) {\n if (event.button !== 0 || gesture) return\n event.preventDefault()\n event.stopPropagation()\n gesture = { id: event.pointerId, x: event.clientX, y: event.clientY, start: frame(), direction }\n ;(event.currentTarget as HTMLElement).setPointerCapture(event.pointerId)\n }\n function move(event: PointerEvent) {\n if (!gesture || gesture.id !== event.pointerId) return\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const container = { width: rect.width, height: rect.height }\n const delta = { x: event.clientX - gesture.x, y: event.clientY - gesture.y }\n setFrame(\n gesture.direction\n ? resizeFloatingPreview({\n start: gesture.start,\n direction: gesture.direction,\n delta,\n source: props.source,\n container,\n })\n : resolveFloatingPreviewFrame({\n width: gesture.start.width,\n position: { x: gesture.start.x + delta.x, y: gesture.start.y + delta.y },\n source: props.source,\n container,\n })\n )\n }\n function end(event: PointerEvent) {\n if (gesture?.id === event.pointerId) gesture = undefined\n }\n function keyboardMove(event: KeyboardEvent) {\n const delta = { x: 0, y: 0 }\n if (event.key === 'ArrowLeft') delta.x = -10\n else if (event.key === 'ArrowRight') delta.x = 10\n else if (event.key === 'ArrowUp') delta.y = -10\n else if (event.key === 'ArrowDown') delta.y = 10\n else return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const current = frame()\n setFrame(\n resolveFloatingPreviewFrame({\n width: current.width,\n position: { x: current.x + delta.x, y: current.y + delta.y },\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n function keyboardResize(event: KeyboardEvent, direction: FloatingPreviewResizeDirection) {\n if (!event.key.startsWith('Arrow')) return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const delta = {\n x: event.key === 'ArrowRight' ? 10 : event.key === 'ArrowLeft' ? -10 : 0,\n y: event.key === 'ArrowDown' ? 10 : event.key === 'ArrowUp' ? -10 : 0,\n }\n setFrame(\n resizeFloatingPreview({\n start: frame(),\n direction,\n delta,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n\n return (\n <div\n ref={bounds}\n class=\"pointer-events-none absolute inset-0 z-(--z-sticky) overflow-hidden\"\n aria-label={props.label}\n >\n <section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabIndex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AAYA,IAAMe,aAIA;CACJ;EACEC,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;AAAC;;AAYH,SAAgBQ,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,YAAY5B,aAAmC;EAAE6B,GAAG;EAAGC,GAAG;EAAGC,OAAO;EAAGC,QAAQ;CAAE,CAAC;CAEhG,IAAIC;CACJ,IAAIE;CACJ,IAAIE;CAUJ,MAAMG,gBAAgB;EACpB,M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I4E,OACd,GAAG/E,MAAM,CAAC,CAACI,MAAK,KAAI4E,OACnB,GAAGhF,MAAM,CAAC,CAACK,OAAM;GAAIsE,QAAAD,IAAAO,KAAAC,aAAAvC,MAAA,cAAA+B,IAAAO,IAAAN,GAAA;GAAAC,SAAAF,IAAAS,KAAAD,aAAArC,OAAA,cAAA6B,IAAAS,IAAAP,IAAA;GAAAC,SAAAH,IAAAU,KAAAC,iBAAAxC,OAAA,QAAA6B,IAAAU,IAAAP,IAAA;GAAAC,SAAAJ,IAAAY,KAAAD,iBAAAxC,OAAA,OAAA6B,IAAAY,IAAAR,IAAA;GAAAC,SAAAL,IAAAa,KAAAF,iBAAAxC,OAAA,SAAA6B,IAAAa,IAAAR,IAAA;GAAAC,SAAAN,IAAAc,KAAAH,iBAAAxC,OAAA,UAAA6B,IAAAc,IAAAR,IAAA;GAAA,OAAAN;EAAA,GAAA;GAAAO,GAAA5C,KAAAA;GAAA8C,GAAA9C,KAAAA;GAAA+C,GAAA/C,KAAAA;GAAAiD,GAAAjD,KAAAA;GAAAkD,GAAAlD,KAAAA;GAAAmD,GAAAnD,KAAAA;EAAA,CAAA;EAAA,OAAAM;CAAA,EAAA,CAAA;AA8DvC"}
1
+ {"version":3,"file":"floating-preview.js","names":["createEffect","createSignal","onCleanup","onMount","on","Move","X","ActionButton","ScrollArea","resolveFloatingPreviewFrame","resizeFloatingPreview","directions","direction","class","glyph","label","source","onClose","actions","children","FloatingPreview","props","frame","setFrame","x","y","width","height","bounds","observer","ResizeObserver","gesture","id","start","measure","rect","getBoundingClientRect","current","position","container","defer","observe","disconnect","event","button","preventDefault","stopPropagation","pointerId","clientX","clientY","currentTarget","setPointerCapture","move","delta","end","undefined","keyboardMove","key","keyboardResize","startsWith","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_ref$","_$use","_$insert","_$createComponent","type","variant","size","tooltip","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onLostPointerCapture","onKeyDown","_c$","_$memo","onClick","role","tabIndex","map","className","_el$5","_tmpl$2","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","e","_$setAttribute","t","a","_$setStyleProperty","o","i","n"],"sources":["../../../../src/components/layout/floating-preview/floating-preview.tsx"],"sourcesContent":["import { createEffect, createSignal, onCleanup, onMount, on, type JSX } from 'solid-js'\nimport { Move, X } from 'lucide-solid'\nimport { ActionButton } from '../../composites/action-button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n type FloatingPreviewFrame,\n type FloatingPreviewResizeDirection,\n type FloatingPreviewSize,\n resolveFloatingPreviewFrame,\n resizeFloatingPreview,\n} from './model'\n\nconst directions: readonly {\n direction: FloatingPreviewResizeDirection\n class: string\n glyph: string\n}[] = [\n {\n direction: 'north',\n class: 'absolute -top-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'south',\n class: 'absolute -bottom-3 right-6 left-6 h-control-xs w-auto cursor-ns-resize touch-none',\n glyph: '↕',\n },\n {\n direction: 'east',\n class: 'absolute -right-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'west',\n class: 'absolute -left-3 top-6 bottom-6 w-6 h-auto cursor-ew-resize touch-none',\n glyph: '↔',\n },\n {\n direction: 'northwest',\n class: 'absolute -top-3 -left-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↖',\n },\n {\n direction: 'northeast',\n class: 'absolute -top-3 -right-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↗',\n },\n {\n direction: 'southwest',\n class: 'absolute -bottom-3 -left-3 size-control-xs cursor-nesw-resize touch-none',\n glyph: '↙',\n },\n {\n direction: 'southeast',\n class: 'absolute -bottom-3 -right-3 size-control-xs cursor-nwse-resize touch-none',\n glyph: '↘',\n },\n]\n\nexport type FloatingPreviewProps = {\n label: string\n source: FloatingPreviewSize\n onClose?: () => void\n actions?: JSX.Element\n children: JSX.Element\n}\n\n/** A host-bounded movable preview frame. Content and actions remain caller-owned. */\nexport function FloatingPreview(props: FloatingPreviewProps) {\n const [frame, setFrame] = createSignal<FloatingPreviewFrame>({ x: 0, y: 0, width: 1, height: 1 })\n // oxlint-disable-next-line no-unassigned-vars -- assigned through Solid's ref callback.\n let bounds: HTMLDivElement | undefined\n let observer: ResizeObserver | undefined\n let gesture:\n | {\n id: number\n x: number\n y: number\n start: FloatingPreviewFrame\n direction: FloatingPreviewResizeDirection | null\n }\n | undefined\n\n const measure = () => {\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n setFrame((current) =>\n resolveFloatingPreviewFrame({\n width: current.width > 1 ? current.width : null,\n position: current.width > 1 ? { x: current.x, y: current.y } : null,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n createEffect(\n on(\n () => [props.source.width, props.source.height] as const,\n () => measure(),\n { defer: true }\n )\n )\n onMount(() => {\n if (bounds) {\n observer = new ResizeObserver(measure)\n observer.observe(bounds)\n measure()\n }\n })\n onCleanup(() => observer?.disconnect())\n\n function start(event: PointerEvent, direction: FloatingPreviewResizeDirection | null) {\n if (event.button !== 0 || gesture) return\n event.preventDefault()\n event.stopPropagation()\n gesture = { id: event.pointerId, x: event.clientX, y: event.clientY, start: frame(), direction }\n ;(event.currentTarget as HTMLElement).setPointerCapture(event.pointerId)\n }\n function move(event: PointerEvent) {\n if (!gesture || gesture.id !== event.pointerId) return\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const container = { width: rect.width, height: rect.height }\n const delta = { x: event.clientX - gesture.x, y: event.clientY - gesture.y }\n setFrame(\n gesture.direction\n ? resizeFloatingPreview({\n start: gesture.start,\n direction: gesture.direction,\n delta,\n source: props.source,\n container,\n })\n : resolveFloatingPreviewFrame({\n width: gesture.start.width,\n position: { x: gesture.start.x + delta.x, y: gesture.start.y + delta.y },\n source: props.source,\n container,\n })\n )\n }\n function end(event: PointerEvent) {\n if (gesture?.id === event.pointerId) gesture = undefined\n }\n function keyboardMove(event: KeyboardEvent) {\n const delta = { x: 0, y: 0 }\n if (event.key === 'ArrowLeft') delta.x = -10\n else if (event.key === 'ArrowRight') delta.x = 10\n else if (event.key === 'ArrowUp') delta.y = -10\n else if (event.key === 'ArrowDown') delta.y = 10\n else return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const current = frame()\n setFrame(\n resolveFloatingPreviewFrame({\n width: current.width,\n position: { x: current.x + delta.x, y: current.y + delta.y },\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n function keyboardResize(event: KeyboardEvent, direction: FloatingPreviewResizeDirection) {\n if (!event.key.startsWith('Arrow')) return\n event.preventDefault()\n const rect = bounds?.getBoundingClientRect()\n if (!rect) return\n const delta = {\n x: event.key === 'ArrowRight' ? 10 : event.key === 'ArrowLeft' ? -10 : 0,\n y: event.key === 'ArrowDown' ? 10 : event.key === 'ArrowUp' ? -10 : 0,\n }\n setFrame(\n resizeFloatingPreview({\n start: frame(),\n direction,\n delta,\n source: props.source,\n container: { width: rect.width, height: rect.height },\n })\n )\n }\n\n return (\n <div\n ref={bounds}\n class=\"pointer-events-none absolute inset-0 z-(--z-sticky) overflow-hidden\"\n aria-label={props.label}\n >\n <section\n class=\"pointer-events-auto absolute flex flex-col overflow-visible rounded-lg border border-border bg-card text-card-foreground shadow-lg\"\n aria-label={props.label}\n style={{\n left: `${frame().x}px`,\n top: `${frame().y}px`,\n width: `${frame().width}px`,\n height: `${frame().height}px`,\n }}\n >\n <header class=\"flex h-control-sm items-center gap-1 border-b border-border p-1\">\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"flex-1 cursor-move touch-none\"\n aria-label={`Move ${props.label}`}\n tooltip={`Move ${props.label}. Use arrow keys to adjust its position.`}\n onPointerDown={(event) => start(event, null)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={keyboardMove}\n >\n <>\n <Move aria-hidden=\"true\" />\n Move\n </>\n </ActionButton>\n <div class=\"flex items-center gap-1\">{props.actions}</div>\n {props.onClose && (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={`Close ${props.label}`}\n tooltip={`Close ${props.label}.`}\n onClick={props.onClose}\n >\n <X aria-hidden=\"true\" />\n </ActionButton>\n )}\n </header>\n <ScrollArea role=\"region\" aria-label={`${props.label} content`} class=\"flex-1\" tabIndex={0}>\n {props.children}\n </ScrollArea>\n {directions.map(({ direction, class: className, glyph }) => (\n <ActionButton\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n class={className}\n data-direction={direction}\n aria-label={`Resize ${props.label} ${direction}`}\n tooltip={`Resize ${props.label} from the ${direction} edge. Use arrow keys to resize.`}\n onPointerDown={(event) => start(event, direction)}\n onPointerMove={move}\n onPointerUp={end}\n onPointerCancel={end}\n onLostPointerCapture={end}\n onKeyDown={(event) => keyboardResize(event, direction)}\n >\n <span aria-hidden=\"true\">{glyph}</span>\n </ActionButton>\n ))}\n </section>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AAYA,IAAMW,aAIA;CACJ;EACEC,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;CACA;EACEF,WAAW;EACXC,OAAO;EACPC,OAAO;CACT;AAAC;;AAYH,SAAgBM,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,YAAYtB,aAAmC;EAAEuB,GAAG;EAAGC,GAAG;EAAGC,OAAO;EAAGC,QAAQ;CAAE,CAAC;CAEhG,IAAIC;CACJ,IAAI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AIsE,OACd,GAAGzE,MAAM,CAAC,CAACI,MAAK,KAAIsE,OACnB,GAAG1E,MAAM,CAAC,CAACK,OAAM;GAAIgE,QAAAD,IAAAO,KAAAC,aAAAtC,MAAA,cAAA8B,IAAAO,IAAAN,GAAA;GAAAC,SAAAF,IAAAS,KAAAD,aAAApC,OAAA,cAAA4B,IAAAS,IAAAP,IAAA;GAAAC,SAAAH,IAAAU,KAAAC,iBAAAvC,OAAA,QAAA4B,IAAAU,IAAAP,IAAA;GAAAC,SAAAJ,IAAAY,KAAAD,iBAAAvC,OAAA,OAAA4B,IAAAY,IAAAR,IAAA;GAAAC,SAAAL,IAAAa,KAAAF,iBAAAvC,OAAA,SAAA4B,IAAAa,IAAAR,IAAA;GAAAC,SAAAN,IAAAc,KAAAH,iBAAAvC,OAAA,UAAA4B,IAAAc,IAAAR,IAAA;GAAA,OAAAN;EAAA,GAAA;GAAAO,GAAA1C,KAAAA;GAAA4C,GAAA5C,KAAAA;GAAA6C,GAAA7C,KAAAA;GAAA+C,GAAA/C,KAAAA;GAAAgD,GAAAhD,KAAAA;GAAAiD,GAAAjD,KAAAA;EAAA,CAAA;EAAA,OAAAK;CAAA,EAAA,CAAA;AA8DvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"orbit-layout.js","names":["ComponentProps","createContext","createMemo","splitProps","useContext","Accessor","cn","OrbitRadius","OrbitLayoutMode","DEFAULT_ORBIT_RADIUS","OrbitRadiusContext","OrbitModeContext","resolveRadius","radius","Number","isFinite","Math","max","trim","OrbitLayoutProps","Omit","style","mode","OrbitLayout","props","local","rest","_$createComponent","Provider","value","children","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","OrbitItemProps","index","count","OrbitItem","inheritedRadius","inheritedMode","undefined","angle","trunc","rawIndex","PI","positionStyle","top","left","translate","_el$2","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/layout/orbit-layout/orbit-layout.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { createContext, createMemo, splitProps, useContext, type Accessor } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/** A CSS length or expression used to place an item away from the orbit center. */\nexport type OrbitRadius = number | string\nexport type OrbitLayoutMode = 'radial' | 'flow'\n\nconst DEFAULT_ORBIT_RADIUS = 'calc(50% - 2rem)'\nconst OrbitRadiusContext = createContext<Accessor<string>>()\nconst OrbitModeContext = createContext<Accessor<OrbitLayoutMode>>()\n\nfunction resolveRadius(radius: OrbitRadius | undefined): string {\n if (typeof radius === 'number') return `${Number.isFinite(radius) ? Math.max(0, radius) : 0}px`\n return radius?.trim() || DEFAULT_ORBIT_RADIUS\n}\n\n/**\n * OrbitLayout.\n *\n * Provides a positioned canvas and a shared radius for its OrbitItems. It does\n * not assign list semantics or alter DOM order: callers choose semantics, and\n * keyboard and screen-reader order remain the source order of the children.\n */\nexport type OrbitLayoutProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /** Responsive radius used by every OrbitItem unless that item overrides it. */\n radius?: OrbitRadius\n /** `flow` places items in source order; `radial` positions them around the host. */\n mode?: OrbitLayoutMode\n}\n\nexport function OrbitLayout(props: OrbitLayoutProps) {\n const [local, rest] = splitProps(props, ['class', 'radius', 'mode', 'style', 'children'])\n const radius = createMemo(() => resolveRadius(local.radius))\n const mode = createMemo(() => local.mode ?? 'radial')\n\n return (\n <OrbitRadiusContext.Provider value={radius}>\n <OrbitModeContext.Provider value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext.Provider>\n </OrbitRadiusContext.Provider>\n )\n}\n\n/**\n * OrbitItem.\n *\n * Positions one ordinary child around its OrbitLayout. This is geometry only:\n * the wrapper has no role, tabindex, or interaction of its own.\n */\nexport type OrbitItemProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /**\n * Zero-based position in the rendered sequence. Index 0 sits at three o'clock\n * (the positive x axis) and the sequence runs clockwise, because the y axis\n * points down the screen: with four items, 0 is east, 1 south, 2 west, 3 north.\n */\n index: number\n /** Number of items sharing this orbit. */\n count: number\n /** Per-item override for OrbitLayout's responsive radius. */\n radius?: OrbitRadius\n}\n\nexport function OrbitItem(props: OrbitItemProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'index',\n 'count',\n 'radius',\n 'style',\n 'children',\n ])\n const inheritedRadius = useContext(OrbitRadiusContext)\n const inheritedMode = useContext(OrbitModeContext)\n const mode = () => inheritedMode?.() ?? 'radial'\n const radius = () =>\n local.radius !== undefined\n ? resolveRadius(local.radius)\n : (inheritedRadius?.() ?? DEFAULT_ORBIT_RADIUS)\n const angle = createMemo(() => {\n const count = Number.isFinite(local.count) ? Math.max(1, Math.trunc(local.count)) : 1\n const rawIndex = Number.isFinite(local.index) ? Math.trunc(local.index) : 0\n const index = ((rawIndex % count) + count) % count\n return `${(index / count) * Math.PI * 2}rad`\n })\n const positionStyle = () =>\n mode() === 'flow'\n ? undefined\n : {\n top: `calc(50% + sin(${angle()}) * ${radius()})`,\n left: `calc(50% + cos(${angle()}) * ${radius()})`,\n translate: '-50% -50%',\n }\n\n return (\n <div\n {...rest}\n data-slot=\"orbit-item\"\n class={cn(mode() === 'flow' ? undefined : 'absolute', local.class)}\n style={positionStyle()}\n >\n {local.children}\n </div>\n )\n}\n"],"mappings":";;;;;AAQA,IAAMS,uBAAuB;AAC7B,IAAMC,qBAAqBT,cAAgC;AAC3D,IAAMU,mBAAmBV,cAAyC;AAElE,SAASW,cAAcC,QAAyC;CAC9D,IAAI,OAAOA,WAAW,UAAU,OAAO,GAAGC,OAAOC,SAASF,MAAM,IAAIG,KAAKC,IAAI,GAAGJ,MAAM,IAAI,EAAC;CAC3F,OAAOA,QAAQK,KAAK,KAAKT;AAC3B;AAkBA,SAAgBc,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQvB,WAAW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AAK,EAAC;CACzC,CAAC;CACD,MAAMC,sBACJ1B,KAAK,MAAM,SACPqB,KAAAA,IACA;EACEM,KAAK,kBAAkBL,MAAM,EAAC,MAAO/B,OAAO,EAAC;EAC7CqC,MAAM,kBAAkBN,MAAM,EAAC,MAAO/B,OAAO,EAAC;EAC9CsC,WAAW;CACb;CAEN,cAAA;EAAA,IAAAC,QAAApB,OAAA;EAAAC,OAAAmB,OAAAlB,WAEQR,MAAI;GAAA,aACE;GAAY,KAAA,WAAA;IAAA,OACfpB,GAAGgB,KAAK,MAAM,SAASqB,KAAAA,IAAY,YAAYlB,MAAMU,KAAK;GAAC;GAAA,IAClEd,QAAK;IAAA,OAAE2B,cAAc;GAAC;EAAA,CAAA,GAAA,OAAA,IAAA;EAAAZ,OAAAgB,aAErB3B,MAAMK,QAAQ;EAAA,OAAAsB;CAAA,EAAA,CAAA;AAGrB"}
1
+ {"version":3,"file":"orbit-layout.js","names":["createContext","createMemo","splitProps","useContext","cn","DEFAULT_ORBIT_RADIUS","OrbitRadiusContext","OrbitModeContext","resolveRadius","radius","Number","isFinite","Math","max","trim","style","mode","OrbitLayout","props","local","rest","_$createComponent","Provider","value","children","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","index","count","OrbitItem","inheritedRadius","inheritedMode","undefined","angle","trunc","PI","positionStyle","top","left","translate","_el$2"],"sources":["../../../../src/components/layout/orbit-layout/orbit-layout.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { createContext, createMemo, splitProps, useContext, type Accessor } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/** A CSS length or expression used to place an item away from the orbit center. */\nexport type OrbitRadius = number | string\nexport type OrbitLayoutMode = 'radial' | 'flow'\n\nconst DEFAULT_ORBIT_RADIUS = 'calc(50% - 2rem)'\nconst OrbitRadiusContext = createContext<Accessor<string>>()\nconst OrbitModeContext = createContext<Accessor<OrbitLayoutMode>>()\n\nfunction resolveRadius(radius: OrbitRadius | undefined): string {\n if (typeof radius === 'number') return `${Number.isFinite(radius) ? Math.max(0, radius) : 0}px`\n return radius?.trim() || DEFAULT_ORBIT_RADIUS\n}\n\n/**\n * OrbitLayout.\n *\n * Provides a positioned canvas and a shared radius for its OrbitItems. It does\n * not assign list semantics or alter DOM order: callers choose semantics, and\n * keyboard and screen-reader order remain the source order of the children.\n */\nexport type OrbitLayoutProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /** Responsive radius used by every OrbitItem unless that item overrides it. */\n radius?: OrbitRadius\n /** `flow` places items in source order; `radial` positions them around the host. */\n mode?: OrbitLayoutMode\n}\n\nexport function OrbitLayout(props: OrbitLayoutProps) {\n const [local, rest] = splitProps(props, ['class', 'radius', 'mode', 'style', 'children'])\n const radius = createMemo(() => resolveRadius(local.radius))\n const mode = createMemo(() => local.mode ?? 'radial')\n\n return (\n <OrbitRadiusContext.Provider value={radius}>\n <OrbitModeContext.Provider value={mode}>\n <div\n {...rest}\n data-slot=\"orbit-layout\"\n class={cn(mode() === 'flow' ? 'grid gap-3' : 'relative size-full', local.class)}\n >\n {local.children}\n </div>\n </OrbitModeContext.Provider>\n </OrbitRadiusContext.Provider>\n )\n}\n\n/**\n * OrbitItem.\n *\n * Positions one ordinary child around its OrbitLayout. This is geometry only:\n * the wrapper has no role, tabindex, or interaction of its own.\n */\nexport type OrbitItemProps = Omit<ComponentProps<'div'>, 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /**\n * Zero-based position in the rendered sequence. Index 0 sits at three o'clock\n * (the positive x axis) and the sequence runs clockwise, because the y axis\n * points down the screen: with four items, 0 is east, 1 south, 2 west, 3 north.\n */\n index: number\n /** Number of items sharing this orbit. */\n count: number\n /** Per-item override for OrbitLayout's responsive radius. */\n radius?: OrbitRadius\n}\n\nexport function OrbitItem(props: OrbitItemProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'index',\n 'count',\n 'radius',\n 'style',\n 'children',\n ])\n const inheritedRadius = useContext(OrbitRadiusContext)\n const inheritedMode = useContext(OrbitModeContext)\n const mode = () => inheritedMode?.() ?? 'radial'\n const radius = () =>\n local.radius !== undefined\n ? resolveRadius(local.radius)\n : (inheritedRadius?.() ?? DEFAULT_ORBIT_RADIUS)\n const angle = createMemo(() => {\n const count = Number.isFinite(local.count) ? Math.max(1, Math.trunc(local.count)) : 1\n const rawIndex = Number.isFinite(local.index) ? Math.trunc(local.index) : 0\n const index = ((rawIndex % count) + count) % count\n return `${(index / count) * Math.PI * 2}rad`\n })\n const positionStyle = () =>\n mode() === 'flow'\n ? undefined\n : {\n top: `calc(50% + sin(${angle()}) * ${radius()})`,\n left: `calc(50% + cos(${angle()}) * ${radius()})`,\n translate: '-50% -50%',\n }\n\n return (\n <div\n {...rest}\n data-slot=\"orbit-item\"\n class={cn(mode() === 'flow' ? undefined : 'absolute', local.class)}\n style={positionStyle()}\n >\n {local.children}\n </div>\n )\n}\n"],"mappings":";;;;;AAQA,IAAMK,uBAAuB;AAC7B,IAAMC,qBAAqBN,cAAgC;AAC3D,IAAMO,mBAAmBP,cAAyC;AAElE,SAASQ,cAAcC,QAAyC;CAC9D,IAAI,OAAOA,WAAW,UAAU,OAAO,GAAGC,OAAOC,SAASF,MAAM,IAAIG,KAAKC,IAAI,GAAGJ,MAAM,IAAI,EAAC;CAC3F,OAAOA,QAAQK,KAAK,KAAKT;AAC3B;AAkBA,SAAgBY,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQlB,WAAWgB,OAAO;EAAC;EAAS;EAAU;EAAQ;EAAS;CAAU,CAAC;CACxF,MAAMT,SAASR,iBAAiBO,cAAcW,MAAMV,MAAM,CAAC;CAC3D,MAAMO,OAAOf,iBAAiBkB,MAAMH,QAAQ,QAAQ;CAEpD,OAAAK,gBACGf,mBAAmBgB,UAAQ;EAACC,OAAOd;EAAM,IAAAe,WAAA;GAAA,OAAAH,gBACvCd,iBAAiBe,UAAQ;IAACC,OAAOP;IAAI,IAAAQ,WA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;IAAA,OACfhB,GAAGY,KAAK,MAAM,SAASoB,KAAAA,IAAY,YAAYjB,MAAMU,KAAK;GAAC;GAAA,IAClEd,QAAK;IAAA,OAAEyB,cAAc;GAAC;EAAA,CAAA,GAAA,OAAA,IAAA;EAAAV,OAAAc,aAErBzB,MAAMK,QAAQ;EAAA,OAAAoB;CAAA,EAAA,CAAA;AAGrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"page.js","names":["ComponentProps","JSX","Show","splitProps","cn","Heading","headingVariants","PageHeader","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","PageHeaderContent","_el$2","_tmpl$2","PageHeaderTitle","_el$3","_tmpl$3","size","PageHeaderDescription","_el$4","_tmpl$4","PageHeaderActions","_el$5","_tmpl$5","PageSection","title","description","action","Element","_el$6","_tmpl$9","_$insert","_$createComponent","when","children","_el$7","_tmpl$8","_el$8","firstChild","_el$9","_tmpl$6","_el$0","_tmpl$7","Page","_el$1","_tmpl$0","_$mergeProps","_$createComponent"],"sources":["../../../../src/components/layout/page/page.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Heading, headingVariants } from '../../ui/typography'\n\n/**\n * PageHeader.\n *\n * The title block at the top of a scrollable page: where the user is, what this\n * page is, and the actions that apply to the whole of it.\n *\n * The action slot is single and singular on purpose. A page header with four\n * equally-weighted buttons has not decided what the page is for; the design\n * system can only make that look tidy, not make it true. Put the primary action\n * here and the rest in an overflow menu or on the rows they belong to.\n */\nexport function PageHeader(props: ComponentProps<'header'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <header\n data-slot=\"page-header\"\n class={cn(\n 'flex shrink-0 flex-wrap items-start justify-between gap-x-4 gap-y-3 px-5 pt-5 pb-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"page-header-content\"\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderTitle(props: ComponentProps<'h1'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <h1\n data-slot=\"page-header-title\"\n class={cn(headingVariants({ size: 'page' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderDescription(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <p\n data-slot=\"page-header-description\"\n class={cn('max-w-prose text-sm text-muted-foreground text-pretty', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing action group. One primary action, at most. */\nexport function PageHeaderActions(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"page-header-actions\"\n class={cn('flex shrink-0 items-center gap-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * A section inside a page, with an optional title and a description.\n * Sections are separated by space rather than by rules — a page of boxed\n * sections reads as a dashboard, and most pages are not one.\n */\nexport function PageSection(\n props: ComponentProps<'section'> & { title?: string; description?: string; action?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'title', 'description', 'action', 'children'])\n\n return (\n <section\n data-slot=\"page-section\"\n class={cn('flex flex-col gap-3 px-5 py-4', local.class)}\n {...rest}\n >\n <Show when={local.title}>\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{local.title}</Heading>\n <Show when={local.description}>\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {local.description}\n </p>\n </Show>\n </div>\n <Show when={local.action}>\n <div class=\"flex shrink-0 items-center gap-2\">{local.action}</div>\n </Show>\n </div>\n </Show>\n {local.children}\n </section>\n )\n}\n\n/** The scroll container a page's header and sections sit in. */\nexport function Page(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"page\"\n class={cn('flex min-h-0 flex-1 flex-col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oC,OAAI;MAAA,OAAE7B,MAAMuB;KAAM;KAAA,IAAAO,WAAA;MAAA,IAAAO,QAAAC,QAAA;MAAAX,OAAAU,aACyBrC,MAAMuB,MAAM;MAAA,OAAAc;KAAA;IAAA,CAAA,GAAA,IAAA;IAAA,OAAAN;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAJ,OAAAF,aAIhEzB,MAAM8B,UAAQ,IAAA;EAAA,OAAAL;CAAA,EAAA,CAAA;AAGrB;;AAGA,SAAgBc,KAAKxC,OAA8B;CACjD,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAyC,QAAAC,QAAA;EAAArC,OAAAoC,OAAAnC,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWV,GAAG,gDAAgDK,MAAMM,KAAK;EAAC,EAAA,GAClEL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAuC;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"page.js","names":["Show","splitProps","cn","Heading","headingVariants","PageHeader","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","PageHeaderContent","_el$2","_tmpl$2","PageHeaderTitle","_el$3","_tmpl$3","size","PageHeaderDescription","_el$4","_tmpl$4","PageHeaderActions","_el$5","_tmpl$5","PageSection","title","description","action","_el$6","_tmpl$9","_$insert","_$createComponent","when","children","_el$7","_tmpl$8","_el$8","firstChild","_el$9","_tmpl$6","_el$0","_tmpl$7","Page","_el$1","_tmpl$0"],"sources":["../../../../src/components/layout/page/page.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Heading, headingVariants } from '../../ui/typography'\n\n/**\n * PageHeader.\n *\n * The title block at the top of a scrollable page: where the user is, what this\n * page is, and the actions that apply to the whole of it.\n *\n * The action slot is single and singular on purpose. A page header with four\n * equally-weighted buttons has not decided what the page is for; the design\n * system can only make that look tidy, not make it true. Put the primary action\n * here and the rest in an overflow menu or on the rows they belong to.\n */\nexport function PageHeader(props: ComponentProps<'header'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <header\n data-slot=\"page-header\"\n class={cn(\n 'flex shrink-0 flex-wrap items-start justify-between gap-x-4 gap-y-3 px-5 pt-5 pb-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"page-header-content\"\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderTitle(props: ComponentProps<'h1'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <h1\n data-slot=\"page-header-title\"\n class={cn(headingVariants({ size: 'page' }), local.class)}\n {...rest}\n />\n )\n}\n\nexport function PageHeaderDescription(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <p\n data-slot=\"page-header-description\"\n class={cn('max-w-prose text-sm text-muted-foreground text-pretty', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing action group. One primary action, at most. */\nexport function PageHeaderActions(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"page-header-actions\"\n class={cn('flex shrink-0 items-center gap-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * A section inside a page, with an optional title and a description.\n * Sections are separated by space rather than by rules — a page of boxed\n * sections reads as a dashboard, and most pages are not one.\n */\nexport function PageSection(\n props: ComponentProps<'section'> & { title?: string; description?: string; action?: JSX.Element }\n) {\n const [local, rest] = splitProps(props, ['class', 'title', 'description', 'action', 'children'])\n\n return (\n <section\n data-slot=\"page-section\"\n class={cn('flex flex-col gap-3 px-5 py-4', local.class)}\n {...rest}\n >\n <Show when={local.title}>\n <div class=\"flex items-baseline justify-between gap-3\">\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <Heading size=\"section\">{local.title}</Heading>\n <Show when={local.description}>\n <p class=\"max-w-prose text-sm text-muted-foreground text-pretty\">\n {local.description}\n </p>\n </Show>\n </div>\n <Show when={local.action}>\n <div class=\"flex shrink-0 items-center gap-2\">{local.action}</div>\n </Show>\n </div>\n </Show>\n {local.children}\n </section>\n )\n}\n\n/** The scroll container a page's header and sections sit in. */\nexport function Page(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"page\"\n class={cn('flex min-h-0 flex-1 flex-col overflow-y-auto', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,SAAgBK,WAAWC,OAAiC;CAC1D,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWV,GACL,sFACAK,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBK,kBAAkBR,OAA8B;CAC9D,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAS,QAAAC,QAAA;EAAAL,OAAAI,OAAAH,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWV,GAAG,+BAA+BK,MAAMM,KAAK;EAAC,EAAA,GACjDL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAO;CAAA,EAAA,CAAA;AAGd;AAEA,SAAgBE,gBAAgBX,OAA6B;CAC3D,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAY,QAAAC,QAAA;EAAAR,OAAAO,OAAAN,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWV,GAAGE,gBAAgB,EAAEgB,MAAM,OAAO,CAAC,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AA;MAAA,OAAY7B,MAAMqB;KAAK;IAAA,CAAA,GAAA,IAAA;IAAAK,OAAAM,OAAAL,gBACnClC,MAAI;KAAA,IAACmC,OAAI;MAAA,OAAE5B,MAAMsB;KAAW;KAAA,IAAAO,WAAA;MAAA,IAAAK,QAAAC,QAAA;MAAAT,OAAAQ,aAExBlC,MAAMsB,WAAW;MAAA,OAAAY;KAAA;IAAA,CAAA,GAAA,IAAA;IAAAR,OAAAI,OAAAH,gBAIvBlC,MAAI;KAAA,IAACmC,OAAI;MAAA,OAAE5B,MAAMuB;KAAM;KAAA,IAAAM,WAAA;MAAA,IAAAO,QAAAC,QAAA;MAAAX,OAAAU,aACyBpC,MAAMuB,MAAM;MAAA,OAAAa;KAAA;IAAA,CAAA,GAAA,IAAA;IAAA,OAAAN;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAJ,OAAAF,aAIhExB,MAAM6B,UAAQ,IAAA;EAAA,OAAAL;CAAA,EAAA,CAAA;AAGrB;;AAGA,SAAgBc,KAAKvC,OAA8B;CACjD,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAwC,QAAAC,QAAA;EAAApC,OAAAmC,OAAAlC,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWV,GAAG,gDAAgDK,MAAMM,KAAK;EAAC,EAAA,GAClEL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAsC;CAAA,EAAA,CAAA;AAGd"}
@@ -1 +1 @@
1
- {"version":3,"file":"panel.js","names":["ComponentProps","Show","splitProps","cn","Panel","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","PanelCard","_$createComponent","PanelHeader","_el$2","_tmpl$2","PanelTitle","_el$3","_tmpl$3","PanelDescription","_el$4","_tmpl$4","PanelActions","_el$5","_tmpl$5","PanelToolbar","_el$6","_tmpl$6","PanelBody","bare","_el$7","_tmpl$7","PanelFooter","_el$8","_tmpl$8","PanelPlaceholder","_el$9","_tmpl$9","_$insert","when","children","_$mergeProps","_$createComponent"],"sources":["../../../../src/components/layout/panel/panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Panel.\n *\n * A titled region inside the content area — an editor, an inspector, a list, a\n * terminal. It is the third level of surface after the shell and the sidebar,\n * and like them its parts are fixed: a header with a title and a toolbar, a\n * scrolling body, an optional footer.\n *\n * The body scrolls and the header does not, which is the whole reason this is a\n * component. A panel whose header scrolls away loses the name of what the user\n * is looking at, and every hand-built panel gets this wrong at least once.\n *\n * Component props are `title`-agnostic on purpose: the panel does not decide\n * how large its title is, so an inspector's title and an editor's title agree.\n */\nexport function Panel(props: ComponentProps<'section'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <section\n data-slot=\"panel\"\n class={cn(\n 'bg-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A panel whose surface is raised, for a panel floating over the canvas. */\nexport function PanelCard(props: ComponentProps<'section'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <Panel\n class={cn(\n 'bg-card m-2 h-[calc(100%-1rem)] rounded-xl border border-border shadow-xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelHeader(props: ComponentProps<'header'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <header\n data-slot=\"panel-header\"\n class={cn(\n 'flex min-h-(--topbar-height) shrink-0 items-center gap-2 border-b border-border px-3',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelTitle(props: ComponentProps<'h2'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <h2\n data-slot=\"panel-title\"\n class={cn('min-w-0 truncate text-sm font-semibold tracking-tight', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelDescription(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <p\n data-slot=\"panel-description\"\n class={cn('truncate text-xs text-muted-foreground', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing group in a panel header: buttons, tabs, a menu. */\nexport function PanelActions(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"panel-actions\"\n class={cn('ms-auto flex shrink-0 items-center gap-1', local.class)}\n {...rest}\n />\n )\n}\n\n/** A secondary row under the header: a toolbar, tabs, a filter bar. */\nexport function PanelToolbar(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"panel-toolbar\"\n class={cn(\n 'flex min-h-9 shrink-0 items-center gap-1.5 border-b border-border px-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * The scrolling region.\n *\n * `min-h-0` is required and easy to omit: a flex child's default `min-height`\n * is its content, so without it a long body pushes the panel past its parent\n * instead of scrolling.\n */\nexport function PanelBody(\n props: ComponentProps<'div'> & { /** Remove the default padding. */ bare?: boolean }\n) {\n const [local, rest] = splitProps(props, ['class', 'bare'])\n\n return (\n <div\n data-slot=\"panel-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto', { 'p-3': !local.bare }, local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelFooter(props: ComponentProps<'footer'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <footer\n data-slot=\"panel-footer\"\n class={cn('flex shrink-0 items-center gap-2 border-t border-border px-3 py-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The centered message a panel shows when it has no content. Distinct from\n * `Empty`, which is a full-page state with room for media and actions; this is\n * the in-pane version, sized for a column.\n */\nexport function PanelPlaceholder(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <div\n data-slot=\"panel-placeholder\"\n class={cn(\n 'text-muted-foreground flex h-full min-h-32 flex-col items-center justify-center gap-2 p-6 text-center text-sm',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children}>{local.children}</Show>\n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AiC;CAC3D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAA8B,QAAAC,QAAA;EAAA1B,OAAAyB,OAAAxB,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,qEAAqEG,MAAMM,KAAK;EAAC,EAAA,GACvFL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAA4B;CAAA,EAAA,CAAA;AAGd;;;;;;AAOA,SAAgBE,iBAAiBhC,OAA8B;CAC7D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAAiC,QAAAC,QAAA;EAAA7B,OAAA4B,OAAA3B,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GACL,iHACAG,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAiC,OAAAF,OAAAxB,gBAEPb,MAAI;GAAA,IAACwC,OAAI;IAAA,OAAEnC,MAAMoC;GAAQ;GAAA,IAAAA,WAAA;IAAA,OAAGpC,MAAMoC;GAAQ;EAAA,CAAA,CAAA;EAAA,OAAAJ;CAAA,EAAA,CAAA;AAGjD"}
1
+ {"version":3,"file":"panel.js","names":["Show","splitProps","cn","Panel","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","PanelCard","_$createComponent","PanelHeader","_el$2","_tmpl$2","PanelTitle","_el$3","_tmpl$3","PanelDescription","_el$4","_tmpl$4","PanelActions","_el$5","_tmpl$5","PanelToolbar","_el$6","_tmpl$6","PanelBody","bare","_el$7","_tmpl$7","PanelFooter","_el$8","_tmpl$8","PanelPlaceholder","_el$9","_tmpl$9","_$insert","when","children"],"sources":["../../../../src/components/layout/panel/panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Panel.\n *\n * A titled region inside the content area — an editor, an inspector, a list, a\n * terminal. It is the third level of surface after the shell and the sidebar,\n * and like them its parts are fixed: a header with a title and a toolbar, a\n * scrolling body, an optional footer.\n *\n * The body scrolls and the header does not, which is the whole reason this is a\n * component. A panel whose header scrolls away loses the name of what the user\n * is looking at, and every hand-built panel gets this wrong at least once.\n *\n * Component props are `title`-agnostic on purpose: the panel does not decide\n * how large its title is, so an inspector's title and an editor's title agree.\n */\nexport function Panel(props: ComponentProps<'section'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <section\n data-slot=\"panel\"\n class={cn(\n 'bg-surface flex h-full min-h-0 min-w-0 flex-1 flex-col overflow-hidden',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A panel whose surface is raised, for a panel floating over the canvas. */\nexport function PanelCard(props: ComponentProps<'section'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <Panel\n class={cn(\n 'bg-card m-2 h-[calc(100%-1rem)] rounded-xl border border-border shadow-xs',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelHeader(props: ComponentProps<'header'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <header\n data-slot=\"panel-header\"\n class={cn(\n 'flex min-h-(--topbar-height) shrink-0 items-center gap-2 border-b border-border px-3',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function PanelTitle(props: ComponentProps<'h2'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <h2\n data-slot=\"panel-title\"\n class={cn('min-w-0 truncate text-sm font-semibold tracking-tight', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelDescription(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <p\n data-slot=\"panel-description\"\n class={cn('truncate text-xs text-muted-foreground', local.class)}\n {...rest}\n />\n )\n}\n\n/** The trailing group in a panel header: buttons, tabs, a menu. */\nexport function PanelActions(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"panel-actions\"\n class={cn('ms-auto flex shrink-0 items-center gap-1', local.class)}\n {...rest}\n />\n )\n}\n\n/** A secondary row under the header: a toolbar, tabs, a filter bar. */\nexport function PanelToolbar(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"panel-toolbar\"\n class={cn(\n 'flex min-h-9 shrink-0 items-center gap-1.5 border-b border-border px-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * The scrolling region.\n *\n * `min-h-0` is required and easy to omit: a flex child's default `min-height`\n * is its content, so without it a long body pushes the panel past its parent\n * instead of scrolling.\n */\nexport function PanelBody(\n props: ComponentProps<'div'> & { /** Remove the default padding. */ bare?: boolean }\n) {\n const [local, rest] = splitProps(props, ['class', 'bare'])\n\n return (\n <div\n data-slot=\"panel-body\"\n class={cn('min-h-0 flex-1 overflow-y-auto', { 'p-3': !local.bare }, local.class)}\n {...rest}\n />\n )\n}\n\nexport function PanelFooter(props: ComponentProps<'footer'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <footer\n data-slot=\"panel-footer\"\n class={cn('flex shrink-0 items-center gap-2 border-t border-border px-3 py-2', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The centered message a panel shows when it has no content. Distinct from\n * `Empty`, which is a full-page state with room for media and actions; this is\n * the in-pane version, sized for a column.\n */\nexport function PanelPlaceholder(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <div\n data-slot=\"panel-placeholder\"\n class={cn(\n 'text-muted-foreground flex h-full min-h-32 flex-col items-center justify-center gap-2 p-6 text-center text-sm',\n local.class\n )}\n {...rest}\n >\n <Show when={local.children}>{local.children}</Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,SAAgBG,MAAMC,OAAkC;CACtD,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OA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K;EAAC,EAAA,GACvFL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAA4B;CAAA,EAAA,CAAA;AAGd;;;;;;AAOA,SAAgBE,iBAAiBhC,OAA8B;CAC7D,MAAM,CAACC,OAAOC,QAAQL,WAAWG,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAAiC,QAAAC,QAAA;EAAA7B,OAAA4B,OAAA3B,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GACL,iHACAG,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAiC,OAAAF,OAAAxB,gBAEPb,MAAI;GAAA,IAACwC,OAAI;IAAA,OAAEnC,MAAMoC;GAAQ;GAAA,IAAAA,WAAA;IAAA,OAAGpC,MAAMoC;GAAQ;EAAA,CAAA,CAAA;EAAA,OAAAJ;CAAA,EAAA,CAAA;AAGjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"pixel-pane.js","names":["ComponentProps","JSX","splitProps","cn","PixelPaneProps","width","PixelPane","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","undefined","style","fixedStyle","CSSProperties","basis","Math","max","round","declarations","trim","separator","endsWith","_$mergeProps"],"sources":["../../../../src/components/layout/pixel-pane/pixel-pane.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nexport type PixelPaneProps = ComponentProps<'div'> & {\n /**\n * The pane's width in CSS pixels, owned by the host. Without it the pane\n * takes the space the fixed panes leave.\n */\n width?: number\n}\n\n/**\n * PixelPane.\n *\n * One pane of a row whose widths the host keeps (for example beside a\n * `PixelResizeHandle`): a fixed pixel width, or the remaining space. It exists\n * so a consumer can give a pane a computed width without a style attribute of\n * its own, and so every such pane behaves the same way: it never grows past its\n * width, clips what does not fit, and gives way before the row overflows if the\n * host's widths briefly exceed the space (a window being resized).\n */\nexport function PixelPane(props: PixelPaneProps) {\n const [local, rest] = splitProps(props, ['width', 'class', 'style'])\n\n return (\n <div\n data-slot=\"pixel-pane\"\n {...rest}\n class={cn(\n 'min-h-0 min-w-0 overflow-hidden',\n local.width === undefined ? 'flex-1' : 'grow-0 shrink',\n local.class\n )}\n style={fixedStyle(local.style, local.width)}\n />\n )\n}\n\n/**\n * The pane's style with its width applied last, so the host's width wins over a\n * `flex-basis` of the caller's own. A string style stays a string and an object\n * style stays an object; both keep every declaration they came with.\n */\nfunction fixedStyle(\n style: JSX.CSSProperties | string | undefined,\n width: number | undefined\n): JSX.CSSProperties | string | undefined {\n if (width === undefined) return style\n const basis = `${Math.max(0, Math.round(width))}px`\n if (typeof style === 'string') {\n const declarations = style.trim()\n const separator = declarations === '' || declarations.endsWith(';') ? '' : ';'\n return `${declarations}${separator}flex-basis:${basis}`\n }\n return { ...style, 'flex-basis': basis }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,SAAgBM,UAAUC,OAAuB;CAC/C,MAAM,CAACC,OAAOC,QAAQP,WAAWK,OAAO;EAAC;EAAS;EAAS;CAAO,CAAC;CAEnE,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAGQJ,MAAI;GAAA,KAAA,WAAA;IAAA,OACDN,GACL,mCACAK,MAAMH,UAAUU,KAAAA,IAAY,WAAW,iBACvCP,MAAMM,KACR;GAAC;GAAA,IACDE,QAAK;IAAA,OAAEC,WAAWT,MAAMQ,OAAOR,MAAMH,KAAK;GAAC;EAAA,CAAA,GAAA,OAAA,KAAA;EAAA,OAAAK;CAAA,EAAA,CAAA;AAGjD;;;;;;AAOA,SAASO,WACPD,OACAX,OACwC;CACxC,IAAIA,UAAUU,KAAAA,GAAW,OAAOC;CAChC,MAAMG,QAAQ,GAAGC,KAAKC,IAAI,GAAGD,KAAKE,MAAMjB,KAAK,CAAC,EAAC;CAC/C,IAAI,OAAOW,UAAU,UAAU;EAC7B,MAAMO,eAAeP,MAAMQ,KAAK;EAEhC,OAAO,GAAGD,eADQA,iBAAiB,MAAMA,aAAaG,SAAS,GAAG,IAAI,KAAK,IACzC,aAAcP;CAClD;CACA,OAAO;EAAE,GAAGH;EAAO,cAAcG;CAAM;AACzC"}
1
+ {"version":3,"file":"pixel-pane.js","names":["splitProps","cn","width","PixelPane","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","undefined","style","fixedStyle","basis","Math","max","round","declarations","trim","endsWith"],"sources":["../../../../src/components/layout/pixel-pane/pixel-pane.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nexport type PixelPaneProps = ComponentProps<'div'> & {\n /**\n * The pane's width in CSS pixels, owned by the host. Without it the pane\n * takes the space the fixed panes leave.\n */\n width?: number\n}\n\n/**\n * PixelPane.\n *\n * One pane of a row whose widths the host keeps (for example beside a\n * `PixelResizeHandle`): a fixed pixel width, or the remaining space. It exists\n * so a consumer can give a pane a computed width without a style attribute of\n * its own, and so every such pane behaves the same way: it never grows past its\n * width, clips what does not fit, and gives way before the row overflows if the\n * host's widths briefly exceed the space (a window being resized).\n */\nexport function PixelPane(props: PixelPaneProps) {\n const [local, rest] = splitProps(props, ['width', 'class', 'style'])\n\n return (\n <div\n data-slot=\"pixel-pane\"\n {...rest}\n class={cn(\n 'min-h-0 min-w-0 overflow-hidden',\n local.width === undefined ? 'flex-1' : 'grow-0 shrink',\n local.class\n )}\n style={fixedStyle(local.style, local.width)}\n />\n )\n}\n\n/**\n * The pane's style with its width applied last, so the host's width wins over a\n * `flex-basis` of the caller's own. A string style stays a string and an object\n * style stays an object; both keep every declaration they came with.\n */\nfunction fixedStyle(\n style: JSX.CSSProperties | string | undefined,\n width: number | undefined\n): JSX.CSSProperties | string | undefined {\n if (width === undefined) return style\n const basis = `${Math.max(0, Math.round(width))}px`\n if (typeof style === 'string') {\n const declarations = style.trim()\n const separator = declarations === '' || declarations.endsWith(';') ? '' : ';'\n return `${declarations}${separator}flex-basis:${basis}`\n }\n return { ...style, 'flex-basis': basis }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,SAAgBG,UAAUC,OAAuB;CAC/C,MAAM,CAACC,OAAOC,QAAQN,WAAWI,OAAO;EAAC;EAAS;EAAS;CAAO,CAAC;CAEnE,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAGQJ,MAAI;GAAA,KAAA,WAAA;IAAA,OACDL,GACL,mCACAI,MAAMH,UAAUU,KAAAA,IAAY,WAAW,iBACvCP,MAAMM,KACR;GAAC;GAAA,IACDE,QAAK;IAAA,OAAEC,WAAWT,MAAMQ,OAAOR,MAAMH,KAAK;GAAC;EAAA,CAAA,GAAA,OAAA,KAAA;EAAA,OAAAK;CAAA,EAAA,CAAA;AAGjD;;;;;;AAOA,SAASO,WACPD,OACAX,OACwC;CACxC,IAAIA,UAAUU,KAAAA,GAAW,OAAOC;CAChC,MAAME,QAAQ,GAAGC,KAAKC,IAAI,GAAGD,KAAKE,MAAMhB,KAAK,CAAC,EAAC;CAC/C,IAAI,OAAOW,UAAU,UAAU;EAC7B,MAAMM,eAAeN,MAAMO,KAAK;EAEhC,OAAO,GAAGD,eADQA,iBAAiB,MAAMA,aAAaE,SAAS,GAAG,IAAI,KAAK,IACzC,aAAcN;CAClD;CACA,OAAO;EAAE,GAAGF;EAAO,cAAcE;CAAM;AACzC"}