@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":"pixel-resize-handle.js","names":["GripVertical","createSignal","onCleanup","cn","resizeGripClass","resizeGripIconClass","resizeSeparatorClass","PixelResizeHandleProps","side","value","minimum","maximum","step","label","controls","class","grip","onChange","onCommit","PixelResizeHandle","props","Math","max","min","round","isRight","bounded","next","commit","interacting","drag","setDrag","pointerId","startX","startValue","handle","HTMLElement","endPointer","shouldCommit","current","undefined","hasPointerCapture","releasePointerCapture","endKeyboard","wasInteracting","move","KEY_DIRECTION","Record","ArrowLeft","ArrowRight","_el$","_tmpl$","_el$2","firstChild","$$keyup","event","includes","key","$$keydown","preventDefault","direction","addEventListener","$$pointerup","$$pointermove","delta","clientX","$$pointerdown","button","isPrimary","currentTarget","focus","setPointerCapture","_$insert","_c$","_$memo","_el$3","_tmpl$2","_$createComponent","_$effect","_$className","chip","_el$4","_tmpl$3","rung","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","_v$7","_v$8","_v$9","_v$0","_v$1","e","t","_$setStyleProperty","a","_$setAttribute","o","i","n","s","h","r","d","l","_$delegateEvents","_$memo","_$createComponent","_$className","_$setStyleProperty","_$setAttribute","_$delegateEvents"],"sources":["../../../../src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx"],"sourcesContent":["import { GripVertical } from 'lucide-solid'\nimport { createSignal, onCleanup } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from '#lib/resize-separator'\n\nexport type PixelResizeHandleProps = {\n /** Which physical edge of the ruler the resizable surface is attached to. */\n side: 'left' | 'right'\n /** Current width in CSS pixels. */\n value: number\n minimum: number\n maximum: number\n step?: number\n label?: string\n controls?: string\n class?: string\n /**\n * The grip drawn on the edge: the quieter rung by default, or the bordered\n * chip for hosts that want the heavier affordance.\n */\n grip?: 'chip' | 'rung'\n onChange(value: number): void\n onCommit?(value: number): void\n}\n\n/**\n * PixelResizeHandle.\n *\n * A keyboard- and pointer-operable edge ruler for a host-owned pane. Keep the\n * pane's actual width and any persistence in its layout owner; this component\n * reports a bounded pixel value and draws the grip at the matching left or\n * right edge.\n *\n * The ruler is a single separator positioned inside a box as wide as the\n * maximum, so it needs no panel-group geometry (and none of the split-layout\n * code that comes with one): arrow keys move it by `step` along its visual\n * edge, Home and End jump to the bounds, and a pointer drag is captured on the\n * handle so cancellation and lost capture end the gesture.\n */\nexport function PixelResizeHandle(props: PixelResizeHandleProps) {\n const maximum = () => Math.max(1, props.maximum)\n const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))\n const value = () => Math.min(maximum(), Math.max(minimum(), Math.round(props.value)))\n const isRight = () => props.side === 'right'\n const bounded = (next: number) => Math.min(maximum(), Math.max(minimum(), Math.round(next)))\n const commit = () => props.onCommit?.(value())\n let interacting = false\n const [drag, setDrag] = createSignal<{\n pointerId: number\n startX: number\n startValue: number\n handle: HTMLElement\n }>()\n const endPointer = (shouldCommit: boolean) => {\n const current = drag()\n if (!current) return\n setDrag(undefined)\n if (current.handle.hasPointerCapture(current.pointerId))\n current.handle.releasePointerCapture(current.pointerId)\n if (shouldCommit) commit()\n }\n const endKeyboard = () => {\n const wasInteracting = interacting\n interacting = false\n if (wasInteracting) commit()\n }\n onCleanup(() => {\n endKeyboard()\n endPointer(false)\n })\n const move = (next: number) => {\n if (next !== value()) props.onChange(next)\n }\n // Arrow keys describe physical movement of the handle: on a right-edge pane\n // moving the handle left widens the pane.\n const KEY_DIRECTION: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }\n\n return (\n <div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabIndex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n move(bounded(current.startValue + delta))\n }}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAgBmB,kBAAkBC,OAA+B;CAC/D,MAAMT,gBAAgBU,KAAKC,IAAI,GAAGF,MAAMT,OAAO;CAC/C,MAAMD,gBAAgBW,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAI,GAAGF,MAAMV,OAAO,CAAC;CACpE,MAAMD,cAAcY,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAIZ,QAAQ,GAAGW,KAAKG,MAAMJ,MAAMX,KA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IAAAa,IAAAX,IAAA;GAAAC,SAAAH,IAAAe,KAAAC,aAAAhD,OAAA,cAAAgC,IAAAe,IAAAZ,IAAA;GAAAC,SAAAJ,IAAAiB,KAAAD,aAAAhD,OAAA,iBAAAgC,IAAAiB,IAAAb,IAAA;GAAAC,SAAAL,IAAAkB,KAAAF,aAAAhD,OAAA,iBAAAgC,IAAAkB,IAAAb,IAAA;GAAAC,SAAAN,IAAAmB,KAAAH,aAAAhD,OAAA,iBAAAgC,IAAAmB,IAAAb,IAAA;GAAAC,SAAAP,IAAAoB,KAAAJ,aAAAhD,OAAA,iBAAAgC,IAAAoB,IAAAb,IAAA;GAAAC,SAAAR,IAAAqB,KAAAL,aAAAhD,OAAA,kBAAAgC,IAAAqB,IAAAb,IAAA;GAAAC,SAAAT,IAAAsB,KAAAN,aAAAhD,OAAA,iBAAAgC,IAAAsB,IAAAb,IAAA;GAAAC,SAAAV,IAAAuB,KAAAT,iBAAA9C,OAAA,QAAAgC,IAAAuB,IAAAb,IAAA;GAAAC,SAAAX,IAAAwB,KAAA7B,UAAA3B,OAAAgC,IAAAwB,IAAAb,IAAA;GAAA,OAAAX;EAAA,GAAA;GAAAY,GAAAxD,KAAAA;GAAAyD,GAAAzD,KAAAA;GAAA2D,GAAA3D,KAAAA;GAAA6D,GAAA7D,KAAAA;GAAA8D,GAAA9D,KAAAA;GAAA+D,GAAA/D,KAAAA;GAAAgE,GAAAhE,KAAAA;GAAAiE,GAAAjE,KAAAA;GAAAkE,GAAAlE,KAAAA;GAAAmE,GAAAnE,KAAAA;GAAAoE,GAAApE,KAAAA;EAAA,CAAA;EAAA,OAAAU;CAAA,EAAA,CAAA;AAsET;AAAC2D,eAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"pixel-resize-handle.js","names":["GripVertical","createSignal","onCleanup","cn","resizeGripClass","resizeGripIconClass","resizeSeparatorClass","side","value","minimum","maximum","step","label","controls","class","grip","onChange","onCommit","PixelResizeHandle","props","Math","max","min","round","isRight","bounded","next","commit","interacting","drag","setDrag","pointerId","startX","startValue","handle","endPointer","shouldCommit","current","undefined","hasPointerCapture","releasePointerCapture","endKeyboard","wasInteracting","move","KEY_DIRECTION","ArrowLeft","ArrowRight","_el$","_tmpl$","_el$2","firstChild","$$keyup","event","includes","key","$$keydown","preventDefault","direction","addEventListener","$$pointerup","$$pointermove","delta","clientX","$$pointerdown","button","isPrimary","currentTarget","focus","setPointerCapture","_$insert","_c$","_$memo","_el$3","_tmpl$2","_$createComponent","_$effect","_$className","chip","_el$4","_tmpl$3","rung","_p$","_v$","_v$2","_v$3","_v$4","_v$5","_v$6","_v$7","_v$8","_v$9","_v$0","_v$1","e","t","_$setStyleProperty","a","_$setAttribute","o","i","n","s","h","r","d","l","_$delegateEvents"],"sources":["../../../../src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx"],"sourcesContent":["import { GripVertical } from 'lucide-solid'\nimport { createSignal, onCleanup } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { resizeGripClass, resizeGripIconClass, resizeSeparatorClass } from '#lib/resize-separator'\n\nexport type PixelResizeHandleProps = {\n /** Which physical edge of the ruler the resizable surface is attached to. */\n side: 'left' | 'right'\n /** Current width in CSS pixels. */\n value: number\n minimum: number\n maximum: number\n step?: number\n label?: string\n controls?: string\n class?: string\n /**\n * The grip drawn on the edge: the quieter rung by default, or the bordered\n * chip for hosts that want the heavier affordance.\n */\n grip?: 'chip' | 'rung'\n onChange(value: number): void\n onCommit?(value: number): void\n}\n\n/**\n * PixelResizeHandle.\n *\n * A keyboard- and pointer-operable edge ruler for a host-owned pane. Keep the\n * pane's actual width and any persistence in its layout owner; this component\n * reports a bounded pixel value and draws the grip at the matching left or\n * right edge.\n *\n * The ruler is a single separator positioned inside a box as wide as the\n * maximum, so it needs no panel-group geometry (and none of the split-layout\n * code that comes with one): arrow keys move it by `step` along its visual\n * edge, Home and End jump to the bounds, and a pointer drag is captured on the\n * handle so cancellation and lost capture end the gesture.\n */\nexport function PixelResizeHandle(props: PixelResizeHandleProps) {\n const maximum = () => Math.max(1, props.maximum)\n const minimum = () => Math.min(maximum(), Math.max(0, props.minimum))\n const value = () => Math.min(maximum(), Math.max(minimum(), Math.round(props.value)))\n const isRight = () => props.side === 'right'\n const bounded = (next: number) => Math.min(maximum(), Math.max(minimum(), Math.round(next)))\n const commit = () => props.onCommit?.(value())\n let interacting = false\n const [drag, setDrag] = createSignal<{\n pointerId: number\n startX: number\n startValue: number\n handle: HTMLElement\n }>()\n const endPointer = (shouldCommit: boolean) => {\n const current = drag()\n if (!current) return\n setDrag(undefined)\n if (current.handle.hasPointerCapture(current.pointerId))\n current.handle.releasePointerCapture(current.pointerId)\n if (shouldCommit) commit()\n }\n const endKeyboard = () => {\n const wasInteracting = interacting\n interacting = false\n if (wasInteracting) commit()\n }\n onCleanup(() => {\n endKeyboard()\n endPointer(false)\n })\n const move = (next: number) => {\n if (next !== value()) props.onChange(next)\n }\n // Arrow keys describe physical movement of the handle: on a right-edge pane\n // moving the handle left widens the pane.\n const KEY_DIRECTION: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }\n\n return (\n <div\n class={cn(\n 'pointer-events-none absolute inset-y-0',\n {\n 'left-0': props.side === 'left',\n 'right-0': props.side === 'right',\n },\n props.class\n )}\n style={{ width: `${maximum()}px` }}\n >\n <div\n role=\"separator\"\n tabIndex={0}\n aria-orientation=\"vertical\"\n aria-label={props.label ?? `Resize ${props.side} pane`}\n aria-controls={props.controls}\n aria-valuemin={minimum()}\n aria-valuemax={maximum()}\n aria-valuenow={value()}\n aria-valuetext={`${value()} pixels`}\n data-dragging={drag() ? '' : undefined}\n style={{ left: `${isRight() ? maximum() - value() : value()}px` }}\n class={cn(\n resizeSeparatorClass(props.grip ?? 'rung'),\n 'pointer-events-auto absolute inset-y-0 w-px cursor-pointer'\n )}\n onPointerDown={(event) => {\n if (event.button !== 0 || !event.isPrimary) return\n const handle = event.currentTarget\n endPointer(false)\n interacting = false\n handle.focus()\n handle.setPointerCapture(event.pointerId)\n setDrag({\n pointerId: event.pointerId,\n startX: event.clientX,\n startValue: value(),\n handle,\n })\n }}\n onPointerMove={(event) => {\n const current = drag()\n if (!current || event.pointerId !== current.pointerId) return\n if (!current.handle.hasPointerCapture(current.pointerId)) {\n endPointer(false)\n return\n }\n const delta = (event.clientX - current.startX) * (isRight() ? -1 : 1)\n move(bounded(current.startValue + delta))\n }}\n onPointerUp={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(true)\n }}\n onPointerCancel={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onLostPointerCapture={(event) => {\n if (event.pointerId === drag()?.pointerId) endPointer(false)\n }}\n onBlur={() => {\n endKeyboard()\n endPointer(false)\n }}\n onKeyDown={(event) => {\n const current = drag()\n if (current && !current.handle.hasPointerCapture(current.pointerId)) endPointer(false)\n if (drag()) {\n event.preventDefault()\n return\n }\n const direction = KEY_DIRECTION[event.key]\n if (direction !== undefined) {\n event.preventDefault()\n interacting = true\n move(bounded(value() + direction * (isRight() ? -1 : 1) * (props.step ?? 16)))\n } else if (event.key === 'Home' || event.key === 'End') {\n event.preventDefault()\n interacting = true\n move(event.key === 'Home' ? minimum() : maximum())\n }\n }}\n onKeyUp={(event) => {\n if (['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) endKeyboard()\n }}\n >\n {props.grip === 'chip' ? (\n <div class={resizeGripClass.chip}>\n <GripVertical class={resizeGripIconClass} />\n </div>\n ) : (\n <div data-slot=\"resizable-grip\" class={resizeGripClass.rung} />\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAgBkB,kBAAkBC,OAA+B;CAC/D,MAAMT,gBAAgBU,KAAKC,IAAI,GAAGF,MAAMT,OAAO;CAC/C,MAAMD,gBAAgBW,KAAKE,IAAIZ,QAAQ,GAAGU,KAAKC,IAAI,GAAGF,MAAMV,OAAO,CAAC;CACpE,MAA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ponentProps","JSX","children","For","Show","splitProps","cn","Kbd","KbdGroup","Separator","SideRail","SideRailContent","SideRailFooter","SideRailHeader","SideRailItem","ShellRailProps","Omit","mark","Element","onSearch","searchLabel","searchKeyshortcuts","searchKeys","footer","ShellRail","props","local","rest","content","_$createComponent","_$mergeProps","collapsed","aria-label","class","_el$","_tmpl$","_$insert","when","_el$2","_tmpl$2","as","type","label","keyshortcuts","shortcut","join","onClick","length","size","each","key","_$memo","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/layout/shell-rail/shell-rail.tsx"],"sourcesContent":["import { Search } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { children, For, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Kbd, KbdGroup } from '../../ui/kbd'\nimport { Separator } from '../../ui/separator'\nimport {\n SideRail,\n SideRailContent,\n SideRailFooter,\n SideRailHeader,\n SideRailItem,\n} from '../side-rail'\n\n/**\n * ShellRail.\n *\n * The side rail both applications put at the window's leading edge: always the\n * collapsed icon column, with the app's mark at the top, a search entry point\n * under it, the app's destinations in the middle and a footer for account and\n * settings.\n *\n * The rail is never the thing the sidebar toggle collapses. The toggle belongs\n * to the sidebar beside the rail, which is why this component takes no\n * `collapsed` prop: a rail that could be expanded would be a second sidebar,\n * and the two apps would drift on which of them the toggle meant.\n *\n * Destinations are the caller's: pass `SideRailItem`s (or a `SideRailSection`)\n * as children. The mark, the search row and the footer are slots with the\n * geometry decided here, so the rail's rhythm cannot differ between apps.\n */\nexport type ShellRailProps = Omit<ComponentProps<'nav'>, 'children'> & {\n /** The app's mark. Decorative: the rail names itself through `aria-label`. */\n mark: JSX.Element\n /** Opens search. Omit to leave the search row out. */\n onSearch?: () => void\n /** The search row's accessible name. */\n searchLabel?: string\n /** The chord as it is announced, e.g. `Meta+K Control+K`. */\n searchKeyshortcuts?: string\n /** The cap labels drawn under the icon, in press order, e.g. `['⌘', 'K']`. */\n searchKeys?: readonly string[]\n /** Destinations between the search row and the footer. */\n children?: JSX.Element\n /** Account, plugins, settings. Pinned to the rail's foot. */\n footer?: JSX.Element\n}\n\nexport function ShellRail(props: ShellRailProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'mark',\n 'onSearch',\n 'searchLabel',\n 'searchKeyshortcuts',\n 'searchKeys',\n 'children',\n 'footer',\n 'aria-label',\n ])\n\n // Resolve the footer once: reading a JSX prop twice builds two copies.\n const footer = children(() => local.footer)\n const content = children(() => local.children)\n\n return (\n <SideRail\n collapsed\n data-slot=\"shell-rail\"\n aria-label={local['aria-label'] ?? 'Global navigation'}\n class={cn('relative z-(--z-sticky) min-w-0', local.class)}\n {...rest}\n >\n <SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>\n\n <SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>\n\n <Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</Side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OAAA2B,gBAEhC9B,QAAM,EAAA,eAAA,OAAA,CAAA;SAAA;QAAA,CAAA,GAAA,IAAA;QAAAqC,OAAAE,OAAAT,gBAIRzB,MAAI;SAAA,IAACiC,OAAI;UAAA,OAAEX,MAAMJ,YAAYyB;SAAM;SAAA,IAAA7C,WAAA;UAAA,OAAA2B,gBACjCrB,UAAQ;WACPwC,MAAI;WAAA,SAAA;WAAA,aAAA;WAAA,IAAA9C,WAAA;YAAA,OAAA2B,gBAIH1B,KAAG;aAAA,IAAC8C,OAAI;cAAA,OAAEvB,MAAMJ;aAAU;aAAApB,WAAIgD,QAAGrB,gBAAMtB,KAAG;cAACyC,MAAI;cAAA9C,UAAYgD;aAAG,CAAA;YAAO,CAAA;WAAA;UAAA,CAAA;SAAA;QAAA,CAAA,GAAA,IAAA;QAAA,OAAAZ;OAAA,EAAA,CAAA,GAAAT,gBAI3EpB,WAAS,EAAA,SAAA,OAAA,CAAA,CAAA;MAAA;KAAA,CAAA,GAAA0C,WAEXvB,QAAQ,CAAC,CAAA;IAAA;GAAA,CAAA;GAAAC,gBAGXzB,MAAI;IAAA,IAACiC,OAAI;KAAA,OAAEd,OAAO;IAAC;IAAA,IAAArB,WAAA;KAAA,OAAA2B,gBACjBjB,gBAAc;MAAA,aAAA;MAAA,IAAAV,WAAA;OAAA,OAAgCqB,OAAO;MAAC;KAAA,CAAA;IAAA;GAAA,CAAA;EAAA;CAAA,EAAA,CAAA,CAAA;AAI/D"}
1
+ {"version":3,"file":"shell-rail.js","names":["Search","children","For","Show","splitProps","cn","Kbd","KbdGroup","Separator","SideRail","SideRailContent","SideRailFooter","SideRailHeader","SideRailItem","mark","onSearch","searchLabel","searchKeyshortcuts","searchKeys","footer","ShellRail","props","local","rest","content","_$createComponent","_$mergeProps","collapsed","class","_el$","_tmpl$","_$insert","when","_el$2","_tmpl$2","as","type","label","keyshortcuts","shortcut","join","onClick","length","size","each","key","_$memo"],"sources":["../../../../src/components/layout/shell-rail/shell-rail.tsx"],"sourcesContent":["import { Search } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { children, For, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Kbd, KbdGroup } from '../../ui/kbd'\nimport { Separator } from '../../ui/separator'\nimport {\n SideRail,\n SideRailContent,\n SideRailFooter,\n SideRailHeader,\n SideRailItem,\n} from '../side-rail'\n\n/**\n * ShellRail.\n *\n * The side rail both applications put at the window's leading edge: always the\n * collapsed icon column, with the app's mark at the top, a search entry point\n * under it, the app's destinations in the middle and a footer for account and\n * settings.\n *\n * The rail is never the thing the sidebar toggle collapses. The toggle belongs\n * to the sidebar beside the rail, which is why this component takes no\n * `collapsed` prop: a rail that could be expanded would be a second sidebar,\n * and the two apps would drift on which of them the toggle meant.\n *\n * Destinations are the caller's: pass `SideRailItem`s (or a `SideRailSection`)\n * as children. The mark, the search row and the footer are slots with the\n * geometry decided here, so the rail's rhythm cannot differ between apps.\n */\nexport type ShellRailProps = Omit<ComponentProps<'nav'>, 'children'> & {\n /** The app's mark. Decorative: the rail names itself through `aria-label`. */\n mark: JSX.Element\n /** Opens search. Omit to leave the search row out. */\n onSearch?: () => void\n /** The search row's accessible name. */\n searchLabel?: string\n /** The chord as it is announced, e.g. `Meta+K Control+K`. */\n searchKeyshortcuts?: string\n /** The cap labels drawn under the icon, in press order, e.g. `['⌘', 'K']`. */\n searchKeys?: readonly string[]\n /** Destinations between the search row and the footer. */\n children?: JSX.Element\n /** Account, plugins, settings. Pinned to the rail's foot. */\n footer?: JSX.Element\n}\n\nexport function ShellRail(props: ShellRailProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'mark',\n 'onSearch',\n 'searchLabel',\n 'searchKeyshortcuts',\n 'searchKeys',\n 'children',\n 'footer',\n 'aria-label',\n ])\n\n // Resolve the footer once: reading a JSX prop twice builds two copies.\n const footer = children(() => local.footer)\n const content = children(() => local.children)\n\n return (\n <SideRail\n collapsed\n data-slot=\"shell-rail\"\n aria-label={local['aria-label'] ?? 'Global navigation'}\n class={cn('relative z-(--z-sticky) min-w-0', local.class)}\n {...rest}\n >\n <SideRailHeader data-slot=\"shell-rail-header\" class=\"h-auto justify-center px-0 pt-1\">\n <span\n data-slot=\"shell-rail-mark\"\n aria-hidden=\"true\"\n class=\"flex h-rail-item items-center justify-center\"\n >\n {local.mark}\n </span>\n </SideRailHeader>\n\n <SideRailContent data-slot=\"shell-rail-content\" class=\"pt-0.5\">\n <Show when={local.onSearch}>\n <div data-slot=\"shell-rail-search\" class=\"flex min-w-0 flex-col gap-0.5\">\n <SideRailItem\n as=\"button\"\n type=\"button\"\n label={local.searchLabel ?? 'Search'}\n aria-label={local.searchLabel ?? 'Search'}\n keyshortcuts={local.searchKeyshortcuts}\n shortcut={local.searchKeys?.join('')}\n onClick={() => local.onSearch?.()}\n >\n <Search aria-hidden=\"true\" />\n </SideRailItem>\n {/* The chord is drawn as key caps under the icon: the one row that\n advertises a shortcut. The accessible chord stays on the row. */}\n <Show when={local.searchKeys?.length}>\n <KbdGroup\n size=\"compact\"\n class=\"justify-center pb-1\"\n data-slot=\"shell-rail-search-keys\"\n >\n <For each={local.searchKeys}>{(key) => <Kbd size=\"compact\">{key}</Kbd>}</For>\n </KbdGroup>\n </Show>\n </div>\n <Separator class=\"my-1\" />\n </Show>\n {content()}\n </SideRailContent>\n\n <Show when={footer()}>\n <SideRailFooter data-slot=\"shell-rail-footer\">{footer()}</SideRailFooter>\n </Show>\n </SideRail>\n )\n}\n"],"mappings":";;;;;;;;;;AAgDA,SAAgBoB,UAAUC,OAAuB;CAC/C,MAAM,CAACC,OAAOC,QAAQnB,WAAWiB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAY,CACb;CAGD,MAAMF,SAASlB,eAAeqB,MAAMH,MAAM;CAC1C,MAAMK,UAAUvB,eAAeqB,MAAMrB,QAAQ;CAE7C,OAAAwB,gBACGhB,UAAQiB,WAAA;EACPC,WAAS;EAAA,aAAA;EAAA,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,MAAMJ;aAAU;aAAAjB,WAAI4C,QAAGpB,gBAAMnB,KAAG;cAACqC,MAAI;cAAA1C,UAAY4C;aAAG,CAAA;YAAO,CAAA;WAAA;UAAA,CAAA;SAAA;QAAA,CAAA,GAAA,IAAA;QAAA,OAAAZ;OAAA,EAAA,CAAA,GAAAR,gBAI3EjB,WAAS,EAAA,SAAA,OAAA,CAAA,CAAA;MAAA;KAAA,CAAA,GAAAsC,WAEXtB,QAAQ,CAAC,CAAA;IAAA;GAAA,CAAA;GAAAC,gBAGXtB,MAAI;IAAA,IAAC6B,OAAI;KAAA,OAAEb,OAAO;IAAC;IAAA,IAAAlB,WAAA;KAAA,OAAAwB,gBACjBd,gBAAc;MAAA,aAAA;MAAA,IAAAV,WAAA;OAAA,OAAgCkB,OAAO;MAAC;KAAA,CAAA;IAAA;GAAA,CAAA;EAAA;CAAA,EAAA,CAAA,CAAA;AAI/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"shell-top-bar.js","names":["ComponentProps","JSX","children","Show","splitProps","cn","Separator","windowChromeClass","WindowChromeProps","ShellTopBarProps","Omit","navigation","Element","sidebarToggle","workspace","sidebarOpen","alignSidebarAtNarrow","sidebarWidth","breadcrumb","search","actions","ShellTopBar","props","local","rest","_el$","_tmpl$8","_el$2","firstChild","_$spread","_$mergeProps","class","macosInset","style","_$memo","undefined","_$insert","_$createComponent","when","_el$3","_tmpl$","_el$4","_tmpl$2","_el$5","_tmpl$3","orientation","_el$6","_tmpl$4","_tmpl$5","_el$8","_tmpl$6","_el$9","_tmpl$7","_$effect","_p$","_v$","_v$2","e","_$setAttribute","t","_$className","_$mergeProps","_$memo","_$createComponent","_$setAttribute","_$className"],"sources":["../../../../src/components/layout/shell-top-bar/shell-top-bar.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { children, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Separator } from '../../ui/separator'\nimport { windowChromeClass, type WindowChromeProps } from '../top-bar/window-chrome'\n\n/**\n * ShellTopBar.\n *\n * The window's top bar as both applications draw it. It has two halves with a\n * vertical divider between them:\n *\n * - **Leading**: history arrows, the sidebar toggle and the workspace\n * switcher, in that order. This is the part that belongs to the window.\n * - **Content**: breadcrumbs, search and the view's actions. This is the part\n * that belongs to the view, and it always sits to the right of the divider.\n *\n * ## Why the divider tracks the sidebar\n *\n * When the host marks an inline sidebar open, the divider lands on the sidebar's\n * trailing edge, so the bar reads as the rail and sidebar's header on one side\n * and the content's header on the other. The bar spans the rail and the sidebar\n * (they sit under it), so the leading half is as wide as `--rail-width` plus the\n * sidebar's width less the bar's own start padding. The host publishes the width\n * as `--shell-sidebar-width` on an ancestor; the fallback of 17rem matches the\n * default sidebar. The default behavior keeps the leading half with its controls\n * below 48rem. A host that keeps the sidebar inline at narrow widths opts into\n * `alignSidebarAtNarrow` so the divider still tracks it.\n *\n * ## Narrow windows\n *\n * The bar is its own container. Below 34rem the search drops to a row of its\n * own so the leading controls, the breadcrumb and the actions keep their room;\n * the breadcrumb is the first thing to truncate.\n *\n * The bar never spills past its window. When the leading controls are wider than\n * the window (a 320px viewport at 200% text), they wrap onto a second row inside\n * the leading half instead of being cut off or pushing the page sideways, and\n * the actions are capped to the bar and scroll if they are still too wide.\n *\n * On a frameless desktop window the bar is the drag region (`draggable`) and\n * every control opts back out; `macosInset` and `windowsInset` reserve the\n * native window controls.\n */\nexport type ShellTopBarProps = Omit<ComponentProps<'header'>, 'children'> &\n WindowChromeProps & {\n /** History arrows. Rendered first, left of the sidebar toggle. */\n navigation?: JSX.Element\n sidebarToggle?: JSX.Element\n workspace?: JSX.Element\n /**\n * Whether the sidebar is open. Its width applies at wide widths by default.\n */\n sidebarOpen?: boolean\n /**\n * Also align the open sidebar below the default 48rem breakpoint. Use this\n * when the host keeps the sidebar inline at narrow widths; drawer layouts keep\n * the default controls-only leading half.\n */\n alignSidebarAtNarrow?: boolean\n /**\n * The open sidebar's width in pixels. Published as `--shell-sidebar-width` on\n * the bar so the divider tracks a resizable sidebar; leave it unset to use an\n * ancestor's variable or the 17rem default.\n */\n sidebarWidth?: number\n /** Breadcrumbs or the view's title. Takes the free space and truncates first. */\n breadcrumb?: JSX.Element\n search?: JSX.Element\n /** The view's actions, at the trailing edge. */\n actions?: JSX.Element\n }\n\nexport function ShellTopBar(props: ShellTopBarProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'navigation',\n 'sidebarToggle',\n 'workspace',\n 'sidebarOpen',\n 'alignSidebarAtNarrow',\n 'sidebarWidth',\n 'breadcrumb',\n 'search',\n 'actions',\n 'draggable',\n 'macosInset',\n 'windowsInset',\n 'glass',\n ])\n\n // Resolve each slot once: a JSX prop is a getter that builds its elements on\n // every read, so testing it with `Show` and then rendering it would build\n // (and run the refs of) two copies.\n const navigation = children(() => local.navigation)\n const sidebarToggle = children(() => local.sidebarToggle)\n const workspace = children(() => local.workspace)\n const breadcrumb = children(() => local.breadcrumb)\n const search = children(() => local.search)\n const actions = children(() => local.actions)\n\n return (\n <header\n data-slot=\"shell-top-bar\"\n class={cn(\n /* Rows are one pixel short of the top bar height so the bottom border keeps\n the bar at exactly --topbar-height, like the shared TopBar: docked\n panels and sidebar headers measure from that edge. */\n '@container/shell-top-bar relative z-(--z-sticky) flex min-h-topbar shrink-0 flex-wrap items-center border-b border-border bg-card text-card-foreground',\n windowChromeClass(local),\n /* The leading half subtracts the start inset from its width. */\n local.macosInset ? '[--shell-top-bar-inset:84px]' : '[--shell-top-bar-inset:0.75rem]',\n local.class\n )}\n style={\n local.sidebarWidth === undefined\n ? undefined\n : { '--shell-sidebar-width': `${local.sidebarWidth}px` }\n }\n {...rest}\n >\n <div\n data-slot=\"shell-top-bar-leading\"\n data-sidebar-open={local.sidebarOpen ? 'true' : 'false'}\n class={cn(\n 'window-no-drag flex min-h-[calc(var(--topbar-height)-1px)] max-w-full min-w-0 shrink-0 flex-wrap items-center gap-x-2 gap-y-1 pe-3',\n /* Open sidebar: preserve wide-only alignment unless the host opts into\n the same geometry below the breakpoint. */\n local.sidebarOpen &&\n (local.alignSidebarAtNarrow\n ? 'w-[calc(var(--rail-width)+var(--shell-sidebar-width,17rem)-var(--shell-top-bar-inset))]'\n : 'md:w-[calc(var(--rail-width)+var(--shell-sidebar-width,17rem)-var(--shell-top-bar-inset))]')\n )}\n >\n <Show when={navigation()}>\n <div data-slot=\"shell-top-bar-navigation\" class=\"flex shrink-0 items-center gap-2\">\n {navigation()}\n </div>\n </Show>\n <Show when={sidebarToggle()}>\n <div data-slot=\"shell-top-bar-toggle\" class=\"flex shrink-0 items-center\">\n {sidebarToggle()}\n </div>\n </Show>\n <Show when={workspace()}>\n <div data-slot=\"shell-top-bar-workspace\" class=\"flex min-w-0 items-center\">\n {workspace()}\n </div>\n </Show>\n </div>\n <Separator\n orientation=\"vertical\"\n data-slot=\"shell-top-bar-divider\"\n aria-hidden=\"true\"\n class=\"data-[orientation=vertical]:h-5\"\n />\n <Show when={breadcrumb()}>\n <div\n data-slot=\"shell-top-bar-breadcrumb\"\n class=\"window-no-drag flex h-[calc(var(--topbar-height)-1px)] min-w-0 flex-1 items-center truncate ps-3 text-sm [&_:is(a,button)]:window-no-drag\"\n >\n {breadcrumb()}\n </div>\n </Show>\n <Show when={!breadcrumb()}>\n <div class=\"min-w-0 flex-1\" aria-hidden=\"true\" />\n </Show>\n <Show when={search()}>\n <div\n data-slot=\"shell-top-bar-search\"\n class=\"window-no-drag min-w-0 max-w-md shrink basis-72 px-3 @max-[34rem]/shell-top-bar:order-last @max-[34rem]/shell-top-bar:max-w-none @max-[34rem]/shell-top-bar:basis-full @max-[34rem]/shell-top-bar:pb-2\"\n >\n {search()}\n </div>\n </Show>\n <Show when={actions()}>\n <div\n data-slot=\"shell-top-bar-actions\"\n class=\"window-no-drag flex h-[calc(var(--topbar-height)-1px)] max-w-full min-w-0 shrink-0 items-center gap-2 overflow-x-auto overflow-y-hidden ps-1 @max-[34rem]/shell-top-bar:mb-0.5\"\n >\n {actions()}\n </div>\n </Show>\n </header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AAMP,uBACH,4FACA,6FACR;GAACuC,QAAAD,IAAAG,KAAAC,aAAA/B,OAAA,qBAAA2B,IAAAG,IAAAF,GAAA;GAAAC,SAAAF,IAAAK,KAAAC,UAAAjC,OAAA2B,IAAAK,IAAAH,IAAA;GAAA,OAAAF;EAAA,GAAA;GAAAG,GAAAtB,KAAAA;GAAAwB,GAAAxB,KAAAA;EAAA,CAAA;EAAA,OAAAV;CAAA,EAAA,CAAA;AAqDT"}
1
+ {"version":3,"file":"shell-top-bar.js","names":["children","Show","splitProps","cn","Separator","windowChromeClass","navigation","sidebarToggle","workspace","sidebarOpen","alignSidebarAtNarrow","sidebarWidth","breadcrumb","search","actions","ShellTopBar","props","local","rest","_el$","_tmpl$8","_el$2","firstChild","_$spread","_$mergeProps","class","macosInset","style","_$memo","undefined","_$insert","_$createComponent","when","_el$3","_tmpl$","_el$4","_tmpl$2","_el$5","_tmpl$3","orientation","_el$6","_tmpl$4","_tmpl$5","_el$8","_tmpl$6","_el$9","_tmpl$7","_$effect","_p$","_v$","_v$2","e","_$setAttribute","t","_$className"],"sources":["../../../../src/components/layout/shell-top-bar/shell-top-bar.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { children, Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Separator } from '../../ui/separator'\nimport { windowChromeClass, type WindowChromeProps } from '../top-bar/window-chrome'\n\n/**\n * ShellTopBar.\n *\n * The window's top bar as both applications draw it. It has two halves with a\n * vertical divider between them:\n *\n * - **Leading**: history arrows, the sidebar toggle and the workspace\n * switcher, in that order. This is the part that belongs to the window.\n * - **Content**: breadcrumbs, search and the view's actions. This is the part\n * that belongs to the view, and it always sits to the right of the divider.\n *\n * ## Why the divider tracks the sidebar\n *\n * When the host marks an inline sidebar open, the divider lands on the sidebar's\n * trailing edge, so the bar reads as the rail and sidebar's header on one side\n * and the content's header on the other. The bar spans the rail and the sidebar\n * (they sit under it), so the leading half is as wide as `--rail-width` plus the\n * sidebar's width less the bar's own start padding. The host publishes the width\n * as `--shell-sidebar-width` on an ancestor; the fallback of 17rem matches the\n * default sidebar. The default behavior keeps the leading half with its controls\n * below 48rem. A host that keeps the sidebar inline at narrow widths opts into\n * `alignSidebarAtNarrow` so the divider still tracks it.\n *\n * ## Narrow windows\n *\n * The bar is its own container. Below 34rem the search drops to a row of its\n * own so the leading controls, the breadcrumb and the actions keep their room;\n * the breadcrumb is the first thing to truncate.\n *\n * The bar never spills past its window. When the leading controls are wider than\n * the window (a 320px viewport at 200% text), they wrap onto a second row inside\n * the leading half instead of being cut off or pushing the page sideways, and\n * the actions are capped to the bar and scroll if they are still too wide.\n *\n * On a frameless desktop window the bar is the drag region (`draggable`) and\n * every control opts back out; `macosInset` and `windowsInset` reserve the\n * native window controls.\n */\nexport type ShellTopBarProps = Omit<ComponentProps<'header'>, 'children'> &\n WindowChromeProps & {\n /** History arrows. Rendered first, left of the sidebar toggle. */\n navigation?: JSX.Element\n sidebarToggle?: JSX.Element\n workspace?: JSX.Element\n /**\n * Whether the sidebar is open. Its width applies at wide widths by default.\n */\n sidebarOpen?: boolean\n /**\n * Also align the open sidebar below the default 48rem breakpoint. Use this\n * when the host keeps the sidebar inline at narrow widths; drawer layouts keep\n * the default controls-only leading half.\n */\n alignSidebarAtNarrow?: boolean\n /**\n * The open sidebar's width in pixels. Published as `--shell-sidebar-width` on\n * the bar so the divider tracks a resizable sidebar; leave it unset to use an\n * ancestor's variable or the 17rem default.\n */\n sidebarWidth?: number\n /** Breadcrumbs or the view's title. Takes the free space and truncates first. */\n breadcrumb?: JSX.Element\n search?: JSX.Element\n /** The view's actions, at the trailing edge. */\n actions?: JSX.Element\n }\n\nexport function ShellTopBar(props: ShellTopBarProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'navigation',\n 'sidebarToggle',\n 'workspace',\n 'sidebarOpen',\n 'alignSidebarAtNarrow',\n 'sidebarWidth',\n 'breadcrumb',\n 'search',\n 'actions',\n 'draggable',\n 'macosInset',\n 'windowsInset',\n 'glass',\n ])\n\n // Resolve each slot once: a JSX prop is a getter that builds its elements on\n // every read, so testing it with `Show` and then rendering it would build\n // (and run the refs of) two copies.\n const navigation = children(() => local.navigation)\n const sidebarToggle = children(() => local.sidebarToggle)\n const workspace = children(() => local.workspace)\n const breadcrumb = children(() => local.breadcrumb)\n const search = children(() => local.search)\n const actions = children(() => local.actions)\n\n return (\n <header\n data-slot=\"shell-top-bar\"\n class={cn(\n /* Rows are one pixel short of the top bar height so the bottom border keeps\n the bar at exactly --topbar-height, like the shared TopBar: docked\n panels and sidebar headers measure from that edge. */\n '@container/shell-top-bar relative z-(--z-sticky) flex min-h-topbar shrink-0 flex-wrap items-center border-b border-border bg-card text-card-foreground',\n windowChromeClass(local),\n /* The leading half subtracts the start inset from its width. */\n local.macosInset ? '[--shell-top-bar-inset:84px]' : '[--shell-top-bar-inset:0.75rem]',\n local.class\n )}\n style={\n local.sidebarWidth === undefined\n ? undefined\n : { '--shell-sidebar-width': `${local.sidebarWidth}px` }\n }\n {...rest}\n >\n <div\n data-slot=\"shell-top-bar-leading\"\n data-sidebar-open={local.sidebarOpen ? 'true' : 'false'}\n class={cn(\n 'window-no-drag flex min-h-[calc(var(--topbar-height)-1px)] max-w-full min-w-0 shrink-0 flex-wrap items-center gap-x-2 gap-y-1 pe-3',\n /* Open sidebar: preserve wide-only alignment unless the host opts into\n the same geometry below the breakpoint. */\n local.sidebarOpen &&\n (local.alignSidebarAtNarrow\n ? 'w-[calc(var(--rail-width)+var(--shell-sidebar-width,17rem)-var(--shell-top-bar-inset))]'\n : 'md:w-[calc(var(--rail-width)+var(--shell-sidebar-width,17rem)-var(--shell-top-bar-inset))]')\n )}\n >\n <Show when={navigation()}>\n <div data-slot=\"shell-top-bar-navigation\" class=\"flex shrink-0 items-center gap-2\">\n {navigation()}\n </div>\n </Show>\n <Show when={sidebarToggle()}>\n <div data-slot=\"shell-top-bar-toggle\" class=\"flex shrink-0 items-center\">\n {sidebarToggle()}\n </div>\n </Show>\n <Show when={workspace()}>\n <div data-slot=\"shell-top-bar-workspace\" class=\"flex min-w-0 items-center\">\n {workspace()}\n </div>\n </Show>\n </div>\n <Separator\n orientation=\"vertical\"\n data-slot=\"shell-top-bar-divider\"\n aria-hidden=\"true\"\n class=\"data-[orientation=vertical]:h-5\"\n />\n <Show when={breadcrumb()}>\n <div\n data-slot=\"shell-top-bar-breadcrumb\"\n class=\"window-no-drag flex h-[calc(var(--topbar-height)-1px)] min-w-0 flex-1 items-center truncate ps-3 text-sm [&_:is(a,button)]:window-no-drag\"\n >\n {breadcrumb()}\n </div>\n </Show>\n <Show when={!breadcrumb()}>\n <div class=\"min-w-0 flex-1\" aria-hidden=\"true\" />\n </Show>\n <Show when={search()}>\n <div\n data-slot=\"shell-top-bar-search\"\n class=\"window-no-drag min-w-0 max-w-md shrink basis-72 px-3 @max-[34rem]/shell-top-bar:order-last @max-[34rem]/shell-top-bar:max-w-none @max-[34rem]/shell-top-bar:basis-full @max-[34rem]/shell-top-bar:pb-2\"\n >\n {search()}\n </div>\n </Show>\n <Show when={actions()}>\n <div\n data-slot=\"shell-top-bar-actions\"\n class=\"window-no-drag flex h-[calc(var(--topbar-height)-1px)] max-w-full min-w-0 shrink-0 items-center gap-2 overflow-x-auto overflow-y-hidden ps-1 @max-[34rem]/shell-top-bar:mb-0.5\"\n >\n {actions()}\n </div>\n </Show>\n </header>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAyEA,SAAgBe,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAO,CACR;CAKD,MAAMV,aAAaN,eAAeiB,MAAMX,UAAU;CAClD,MAAMC,gBAAgBP,eAAeiB,MAAMV,aAAa;CACxD,MAAMC,YAAYR,eAAeiB,MAAMT,SAAS;CAChD,MAAMI,aAAaZ,eAAeiB,MAAML,UAAU;CAClD,MAA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","createMemo","createSignal","splitProps","useContext","Portal","tooltipTip","cn","SideRailContext","SideRailProps","T","class","collapsed","SideRail","props","local","rest","value","width","_$createComponent","Provider","children","_$mergeProps","as","aria-label","data-collapsed","SideRailHeader","_el$","_tmpl$","_$spread","SideRailContent","_el$2","_tmpl$2","SideRailFooter","_el$3","_tmpl$3","SideRailSection","label","_el$4","_tmpl$5","_$insert","when","_el$5","_tmpl$4","sideRailItemClass","join","sideRailItemStateClass","active","idle","TIP_GAP_PX","TipPosition","top","left","height","createRailTip","rail","row","setRow","HTMLElement","position","setPosition","show","element","rect","getBoundingClientRect","right","hide","RailTip","icon","Element","shortcut","keyed","_el$6","_tmpl$7","_el$7","firstChild","_el$8","_tmpl$6","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","e","_$className","t","_$setStyleProperty","a","o","i","undefined","SideRailItemProps","badge","trailing","keyshortcuts","SideRailItem","tip","ref","r$","_ref$","aria-current","aria-keyshortcuts","data-active","onPointerEnter","onPointerLeave","onFocus","onBlur","Record","_el$9","_tmpl$8","_el$0","_tmpl$9","_el$1","_tmpl$0","_$memo","_el$10","_tmpl$1","_el$11","_tmpl$10","SideRailButton","Omit","_el$12","_tmpl$11","_el$13","_el$14","nextSibling","_ref$2","_$use","_el$15","_$createComponent","_$mergeProps","_$className","_$setStyleProperty","_$memo","_$use"],"sources":["../../../../src/components/layout/side-rail/side-rail.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport type { ComponentProps, JSX, ValidComponent } from 'solid-js'\nimport { Show, createMemo, createSignal, splitProps, useContext } from 'solid-js'\nimport { Portal } from 'solid-js/web'\nimport { tooltipTip } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { SideRailContext } from './side-rail-context'\n\n/**\n * SideRail.\n *\n * The narrow, persistent column of top-level destinations at the window's leading\n * edge: the app mark, the primary sections, and a footer for account and settings.\n * It is the one piece of chrome that is always on screen, which is why it is a\n * component rather than something each view arranges.\n *\n * Two forms, one component. Collapsed it is an icon column; expanded it carries\n * labels. Both widths come from `--rail-width` (56px) and `--rail-width-expanded`\n * (236px), so an app cannot pick its own and end up a few pixels out of step with\n * the app beside it.\n *\n * The rail does not own its collapsed state; the app does. That state has to\n * survive a reload and usually lives with the rest of the window preferences, and\n * a rail that kept it privately could not be restored.\n */\nexport type SideRailProps<T extends ValidComponent = 'nav'> = PolymorphicProps<\n T,\n {\n class?: string\n collapsed?: boolean\n 'aria-label'?: string\n }\n>\n\nexport function SideRail<T extends ValidComponent = 'nav'>(props: SideRailProps<T>) {\n const [local, rest] = splitProps(props as SideRailProps, [\n 'class',\n 'collapsed',\n 'aria-label',\n 'children',\n ])\n\n const collapsed = createMemo(() => local.collapsed ?? false)\n const value = {\n collapsed,\n width: createMemo(() => (collapsed() ? 'var(--rail-width)' : 'var(--rail-width-expanded)')),\n }\n\n return (\n <SideRailContext.Provider value={value}>\n <Polymorphic\n as=\"nav\"\n aria-label={local['aria-label'] ?? 'Primary'}\n /* Rendered in both states, with a real value, so the descendant selectors\n below can key on true *and* false — an absent attribute would leave the\n expanded form matching neither. */\n data-collapsed={collapsed() ? 'true' : 'false'}\n class={cn(\n 'group/rail bg-sidebar text-sidebar-foreground flex h-full shrink-0 flex-col border-e border-sidebar-border',\n 'transition-[width] duration-150 ease-out',\n { 'w-rail': collapsed(), 'w-rail-expanded': !collapsed() },\n local.class\n )}\n {...(rest as ComponentProps<'nav'>)}\n >\n {local.children}\n </Polymorphic>\n </SideRailContext.Provider>\n )\n}\n\n/** The header slot: the app mark, and the product name when there is room. */\nexport function SideRailHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"side-rail-header\"\n class={cn(\n 'h-topbar flex shrink-0 items-center gap-2.5 px-3 group-data-[collapsed=true]/rail:justify-center group-data-[collapsed=true]/rail:px-0',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** The scrolling middle. Keeps the header and the footer pinned. */\nexport function SideRailContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"side-rail-content\"\n class={cn(\n 'flex min-h-0 flex-1 flex-col gap-0.5 overflow-x-hidden overflow-y-auto px-2 py-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** The pinned footer: account, settings, help. */\nexport function SideRailFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"side-rail-footer\"\n class={cn(\n 'flex shrink-0 flex-col gap-0.5 border-t border-sidebar-border px-2 py-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A titled group of rail destinations. The title hides when collapsed. */\nexport function SideRailSection(props: ComponentProps<'div'> & { label?: string }) {\n const [local, rest] = splitProps(props, ['class', 'label', 'children'])\n\n return (\n <div data-slot=\"side-rail-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <Show when={local.label}>\n <div class=\"text-sidebar-muted-foreground px-2 pt-2 pb-1 text-2xs font-medium tracking-wide uppercase group-data-[collapsed=true]/rail:hidden\">\n {local.label}\n </div>\n </Show>\n {local.children}\n </div>\n )\n}\n\nconst sideRailItemClass = [\n 'group/rail-item flex h-rail-item min-w-0 w-full items-center gap-2.5 rounded-md px-3 text-sm font-medium',\n 'group-data-[collapsed=true]/rail:justify-center group-data-[collapsed=true]/rail:px-0',\n 'transition-[color,background-color,transform] ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n /*\n * The donor's row scales up slightly under the pointer and down under a press.\n * It is a CSS transform rather than a motion-library gesture because the two are\n * the same thing here and the transform costs nothing at runtime: no wrapper\n * element, no listener, and it works on whatever element a caller renders the row\n * as — an anchor, a button, a router's own link.\n *\n * The collapsed rail opts out: a 1.02 scale on a 56px column pushes the row past\n * the rail's own edge, which reads as a glitch rather than as feedback.\n */\n 'hover:scale-[1.02] active:scale-[0.97] group-data-[collapsed=true]/rail:hover:scale-100 group-data-[collapsed=true]/rail:active:scale-[0.98]',\n '[&_svg]:size-5 [&_svg]:shrink-0',\n].join(' ')\n\n/*\n * The rail's states are accent-driven: the icon carries `--primary` on hover and\n * on the active destination, and both states draw the accent's own tint rather\n * than a neutral fill, so the rail reads as the app's accent chroma instead of a\n * grey column. The active label stays on `sidebar-foreground` because the accent\n * presets guarantee their 3:1 interaction minimum against the surface, not the\n * 4.5:1 small text owes; the icon is a graphic and rides the accent.\n */\nconst sideRailItemStateClass = {\n active: 'bg-primary-subtle text-sidebar-foreground [&_svg]:text-primary',\n idle: 'text-sidebar-muted-foreground hover:bg-primary-subtle/60 hover:text-primary',\n}\n\nconst TIP_GAP_PX = 8\n\ntype TipPosition = { top: number; left: number; height: number }\n\n/** The collapsed rail's tip state for one row; see `SideRailItem` for its treatment. */\nfunction createRailTip() {\n const rail = useContext(SideRailContext)\n const [row, setRow] = createSignal<HTMLElement>()\n const [position, setPosition] = createSignal<TipPosition | null>(null)\n return {\n setRow,\n position,\n show: () => {\n const element = row()\n if (!element || !rail?.collapsed()) return\n const rect = element.getBoundingClientRect()\n setPosition({ top: rect.top, left: rect.right + TIP_GAP_PX, height: rect.height })\n },\n hide: () => setPosition(null),\n }\n}\n\nfunction RailTip(props: {\n position: TipPosition | null\n icon: JSX.Element\n label: string\n active?: boolean\n shortcut?: string\n}) {\n return (\n /* The portal can finish an effect after the tooltip closes; capture its position. */\n <Show when={props.position} keyed>\n {(position) => (\n <Portal>\n <div\n aria-hidden=\"true\"\n data-slot=\"side-rail-tip\"\n class={cn(\n tooltipTip,\n 'pointer-events-none fixed z-(--z-tooltip) flex items-center gap-2.5 ps-3 pe-3 whitespace-nowrap'\n )}\n style={{\n top: `${position.top}px`,\n left: `${position.left}px`,\n height: `${position.height}px`,\n }}\n >\n <span\n class={cn('flex size-5 shrink-0 items-center justify-center [&_svg]:size-5', {\n 'text-primary': props.active,\n })}\n >\n {props.icon}\n </span>\n {props.label}\n <Show when={props.shortcut}>\n <span class=\"text-muted-foreground shrink-0 font-code text-code leading-none\">\n {props.shortcut}\n </span>\n </Show>\n </div>\n </Portal>\n )}\n </Show>\n )\n}\n\n/**\n * A rail destination.\n *\n * ## The tooltip is the rail's hover affordance, not a generic bubble\n *\n * Collapsed, the row has no text, so the label has to come from somewhere. This\n * ports the donor's treatment rather than using a standard tooltip, because the\n * details are what make it read as part of the rail:\n *\n * - It is **flush with the row**: positioned at the row's own top and given the\n * row's own height, so it continues the row outward instead of floating near\n * it. A centred bubble with an arrow reads as a separate object.\n * - It **repeats the icon**, which anchors it to the row it belongs to.\n * - It carries the **keyboard chord**, which is the one piece of information a\n * collapsed rail otherwise cannot show.\n * - It opens on **hover and on focus**, so a keyboard user gets the same label a\n * pointer user does.\n * - It is `pointer-events-none` and `aria-hidden`: the row already carries the\n * name (as a visually hidden span when collapsed), so this is decoration and\n * must never be the accessible name.\n *\n * ## The chord on the row\n *\n * Expanded, the row shows its chord on hover and on focus — and the chord is\n * declared once to assistive technology through `aria-keyshortcuts` rather than\n * being read out as glyphs. The visible badge is `aria-hidden` for that reason.\n */\nexport type SideRailItemProps<T extends ValidComponent = 'a'> = PolymorphicProps<\n T,\n {\n class?: string\n /** Marks the item as the current destination. */\n active?: boolean\n /**\n * The item's accessible name. Required, and always in the accessibility tree:\n * collapsed it moves into the tooltip and a visually hidden span rather than\n * being deleted.\n */\n label: string\n /**\n * A count or a dot. Expanded, it trails the label at the row's end; collapsed,\n * it moves onto the icon's corner, so the rail never loses it.\n */\n badge?: JSX.Element\n /** An indicator pinned to the trailing edge in the expanded form. */\n trailing?: JSX.Element\n /** The chord as it should be drawn, e.g. `⌘1`. Shown on hover and focus. */\n shortcut?: string\n /**\n * The same chord in the ARIA grammar, e.g. `Meta+1`. Declared to assistive\n * technology instead of the display glyphs, which are not a keyboard shortcut\n * a screen reader can parse. Supply it whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n }\n>\n\nexport function SideRailItem<T extends ValidComponent = 'a'>(props: SideRailItemProps<T>) {\n const [local, rest] = splitProps(props as SideRailItemProps, [\n 'as',\n 'class',\n 'active',\n 'label',\n 'badge',\n 'trailing',\n 'shortcut',\n 'keyshortcuts',\n 'children',\n ])\n\n const tip = createRailTip()\n\n return (\n <>\n <Polymorphic\n as={local.as ?? 'a'}\n ref={tip.setRow}\n aria-current={local.active ? 'page' : undefined}\n aria-keyshortcuts={local.keyshortcuts}\n data-active={local.active ? '' : undefined}\n class={cn(\n sideRailItemClass,\n 'relative',\n local.active ? sideRailItemStateClass.active : sideRailItemStateClass.idle,\n local.class\n )}\n onPointerEnter={tip.show}\n onPointerLeave={tip.hide}\n onFocus={tip.show}\n onBlur={tip.hide}\n {...(rest as Record<string, unknown>)}\n >\n <span class=\"flex size-5 shrink-0 items-center justify-center [&_svg]:size-5\">\n {local.children}\n </span>\n\n <span class=\"min-w-0 flex-1 truncate text-start group-data-[collapsed=true]/rail:sr-only\">\n {local.label}\n </span>\n\n {/*\n * One element, two placements, because the badge is caller content and a DOM\n * node cannot be in two places. Expanded, it is a trailing count in the row's\n * flow, after the label — over the icon it would cover the glyph the row is\n * recognised by. Collapsed, there is no label to trail, so it leaves the flow\n * and pins to the icon's top-end corner: anchored to the row's centre (where\n * the centred icon sits) and pushed out by 14px, the icon's half-width plus\n * the 4px overhang, so a wider count grows back over the icon rather than past\n * the rail's edge.\n */}\n <Show when={local.badge}>\n <span\n data-slot=\"side-rail-badge\"\n class=\"flex shrink-0 items-center justify-center group-data-[collapsed=true]/rail:absolute group-data-[collapsed=true]/rail:end-1/2 group-data-[collapsed=true]/rail:top-1/2 group-data-[collapsed=true]/rail:-me-3.5 group-data-[collapsed=true]/rail:-mt-3.5\"\n >\n {local.badge}\n </span>\n </Show>\n\n <Show when={local.shortcut && local.trailing === undefined}>\n <span\n aria-hidden=\"true\"\n class=\"text-sidebar-muted-foreground shrink-0 font-code text-code leading-none opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"\n >\n {local.shortcut}\n </span>\n </Show>\n\n <Show when={local.trailing}>\n <span class=\"ms-auto shrink-0\">{local.trailing}</span>\n </Show>\n </Polymorphic>\n\n <RailTip\n position={tip.position()}\n icon={local.children}\n label={local.label}\n active={local.active}\n shortcut={local.shortcut}\n />\n </>\n )\n}\n\n/** A non-navigating rail control: a collapse toggle, a \"new\" action. */\nexport function SideRailButton(\n props: Omit<ComponentProps<'button'>, 'type'> & {\n label: string\n shortcut?: string\n active?: boolean\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'label', 'shortcut', 'children', 'active'])\n const tip = createRailTip()\n\n return (\n <>\n <button\n type=\"button\"\n ref={tip.setRow}\n aria-label={local.label}\n data-active={local.active ? 'true' : undefined}\n onPointerEnter={tip.show}\n onPointerLeave={tip.hide}\n onFocus={tip.show}\n onBlur={tip.hide}\n class={cn(\n sideRailItemClass,\n local.active ? sideRailItemStateClass.active : sideRailItemStateClass.idle,\n 'disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n <span class=\"flex size-5 shrink-0 items-center justify-center [&_svg]:size-5\">\n {local.children}\n </span>\n <span class=\"min-w-0 flex-1 truncate text-start group-data-[collapsed=true]/rail:sr-only\">\n {local.label}\n </span>\n <Show when={local.shortcut}>\n <span\n aria-hidden=\"true\"\n class=\"text-sidebar-muted-foreground shrink-0 font-code text-code leading-none opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"\n >\n {local.shortcut}\n </span>\n </Show>\n </button>\n\n <RailTip position={tip.position()} icon={local.children} label={local.label} />\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,SAAgBkB,SAA2CC,OAAyB;CAClF,MAAM,CAACC,OAAOC,QAAQb,WAAWW,OAAwB;EACvD;EACA;EACA;EACA;CAAU,CACX;CAED,MAAMF,YAAYX,iBAAiBc,MAAMH,aAAa,KAAK;CAC3D,MAAMK,QAAQ;EACZL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AAA,CAAA,CAAA;AAGjF"}
1
+ {"version":3,"file":"side-rail.js","names":["Polymorphic","Show","createMemo","createSignal","splitProps","useContext","Portal","tooltipTip","cn","SideRailContext","class","collapsed","SideRail","props","local","rest","value","width","_$createComponent","Provider","children","_$mergeProps","as","SideRailHeader","_el$","_tmpl$","_$spread","SideRailContent","_el$2","_tmpl$2","SideRailFooter","_el$3","_tmpl$3","SideRailSection","label","_el$4","_tmpl$5","_$insert","when","_el$5","_tmpl$4","sideRailItemClass","join","sideRailItemStateClass","active","idle","TIP_GAP_PX","top","left","height","createRailTip","rail","row","setRow","position","setPosition","show","element","rect","getBoundingClientRect","right","hide","RailTip","icon","shortcut","keyed","_el$6","_tmpl$7","_el$7","firstChild","_el$8","_tmpl$6","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","e","_$className","t","_$setStyleProperty","a","o","i","undefined","badge","trailing","keyshortcuts","SideRailItem","tip","ref","r$","_ref$","onPointerEnter","onPointerLeave","onFocus","onBlur","_el$9","_tmpl$8","_el$0","_tmpl$9","_el$1","_tmpl$0","_$memo","_el$10","_tmpl$1","_el$11","_tmpl$10","SideRailButton","_el$12","_tmpl$11","_el$13","_el$14","nextSibling","_ref$2","_$use","_el$15"],"sources":["../../../../src/components/layout/side-rail/side-rail.tsx"],"sourcesContent":["import { Polymorphic, type PolymorphicProps } from '@kobalte/core/polymorphic'\nimport type { ComponentProps, JSX, ValidComponent } from 'solid-js'\nimport { Show, createMemo, createSignal, splitProps, useContext } from 'solid-js'\nimport { Portal } from 'solid-js/web'\nimport { tooltipTip } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { SideRailContext } from './side-rail-context'\n\n/**\n * SideRail.\n *\n * The narrow, persistent column of top-level destinations at the window's leading\n * edge: the app mark, the primary sections, and a footer for account and settings.\n * It is the one piece of chrome that is always on screen, which is why it is a\n * component rather than something each view arranges.\n *\n * Two forms, one component. Collapsed it is an icon column; expanded it carries\n * labels. Both widths come from `--rail-width` (56px) and `--rail-width-expanded`\n * (236px), so an app cannot pick its own and end up a few pixels out of step with\n * the app beside it.\n *\n * The rail does not own its collapsed state; the app does. That state has to\n * survive a reload and usually lives with the rest of the window preferences, and\n * a rail that kept it privately could not be restored.\n */\nexport type SideRailProps<T extends ValidComponent = 'nav'> = PolymorphicProps<\n T,\n {\n class?: string\n collapsed?: boolean\n 'aria-label'?: string\n }\n>\n\nexport function SideRail<T extends ValidComponent = 'nav'>(props: SideRailProps<T>) {\n const [local, rest] = splitProps(props as SideRailProps, [\n 'class',\n 'collapsed',\n 'aria-label',\n 'children',\n ])\n\n const collapsed = createMemo(() => local.collapsed ?? false)\n const value = {\n collapsed,\n width: createMemo(() => (collapsed() ? 'var(--rail-width)' : 'var(--rail-width-expanded)')),\n }\n\n return (\n <SideRailContext.Provider value={value}>\n <Polymorphic\n as=\"nav\"\n aria-label={local['aria-label'] ?? 'Primary'}\n /* Rendered in both states, with a real value, so the descendant selectors\n below can key on true *and* false — an absent attribute would leave the\n expanded form matching neither. */\n data-collapsed={collapsed() ? 'true' : 'false'}\n class={cn(\n 'group/rail bg-sidebar text-sidebar-foreground flex h-full shrink-0 flex-col border-e border-sidebar-border',\n 'transition-[width] duration-150 ease-out',\n { 'w-rail': collapsed(), 'w-rail-expanded': !collapsed() },\n local.class\n )}\n {...(rest as ComponentProps<'nav'>)}\n >\n {local.children}\n </Polymorphic>\n </SideRailContext.Provider>\n )\n}\n\n/** The header slot: the app mark, and the product name when there is room. */\nexport function SideRailHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"side-rail-header\"\n class={cn(\n 'h-topbar flex shrink-0 items-center gap-2.5 px-3 group-data-[collapsed=true]/rail:justify-center group-data-[collapsed=true]/rail:px-0',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** The scrolling middle. Keeps the header and the footer pinned. */\nexport function SideRailContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"side-rail-content\"\n class={cn(\n 'flex min-h-0 flex-1 flex-col gap-0.5 overflow-x-hidden overflow-y-auto px-2 py-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** The pinned footer: account, settings, help. */\nexport function SideRailFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"side-rail-footer\"\n class={cn(\n 'flex shrink-0 flex-col gap-0.5 border-t border-sidebar-border px-2 py-2',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A titled group of rail destinations. The title hides when collapsed. */\nexport function SideRailSection(props: ComponentProps<'div'> & { label?: string }) {\n const [local, rest] = splitProps(props, ['class', 'label', 'children'])\n\n return (\n <div data-slot=\"side-rail-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <Show when={local.label}>\n <div class=\"text-sidebar-muted-foreground px-2 pt-2 pb-1 text-2xs font-medium tracking-wide uppercase group-data-[collapsed=true]/rail:hidden\">\n {local.label}\n </div>\n </Show>\n {local.children}\n </div>\n )\n}\n\nconst sideRailItemClass = [\n 'group/rail-item flex h-rail-item min-w-0 w-full items-center gap-2.5 rounded-md px-3 text-sm font-medium',\n 'group-data-[collapsed=true]/rail:justify-center group-data-[collapsed=true]/rail:px-0',\n 'transition-[color,background-color,transform] ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n /*\n * The donor's row scales up slightly under the pointer and down under a press.\n * It is a CSS transform rather than a motion-library gesture because the two are\n * the same thing here and the transform costs nothing at runtime: no wrapper\n * element, no listener, and it works on whatever element a caller renders the row\n * as — an anchor, a button, a router's own link.\n *\n * The collapsed rail opts out: a 1.02 scale on a 56px column pushes the row past\n * the rail's own edge, which reads as a glitch rather than as feedback.\n */\n 'hover:scale-[1.02] active:scale-[0.97] group-data-[collapsed=true]/rail:hover:scale-100 group-data-[collapsed=true]/rail:active:scale-[0.98]',\n '[&_svg]:size-5 [&_svg]:shrink-0',\n].join(' ')\n\n/*\n * The rail's states are accent-driven: the icon carries `--primary` on hover and\n * on the active destination, and both states draw the accent's own tint rather\n * than a neutral fill, so the rail reads as the app's accent chroma instead of a\n * grey column. The active label stays on `sidebar-foreground` because the accent\n * presets guarantee their 3:1 interaction minimum against the surface, not the\n * 4.5:1 small text owes; the icon is a graphic and rides the accent.\n */\nconst sideRailItemStateClass = {\n active: 'bg-primary-subtle text-sidebar-foreground [&_svg]:text-primary',\n idle: 'text-sidebar-muted-foreground hover:bg-primary-subtle/60 hover:text-primary',\n}\n\nconst TIP_GAP_PX = 8\n\ntype TipPosition = { top: number; left: number; height: number }\n\n/** The collapsed rail's tip state for one row; see `SideRailItem` for its treatment. */\nfunction createRailTip() {\n const rail = useContext(SideRailContext)\n const [row, setRow] = createSignal<HTMLElement>()\n const [position, setPosition] = createSignal<TipPosition | null>(null)\n return {\n setRow,\n position,\n show: () => {\n const element = row()\n if (!element || !rail?.collapsed()) return\n const rect = element.getBoundingClientRect()\n setPosition({ top: rect.top, left: rect.right + TIP_GAP_PX, height: rect.height })\n },\n hide: () => setPosition(null),\n }\n}\n\nfunction RailTip(props: {\n position: TipPosition | null\n icon: JSX.Element\n label: string\n active?: boolean\n shortcut?: string\n}) {\n return (\n /* The portal can finish an effect after the tooltip closes; capture its position. */\n <Show when={props.position} keyed>\n {(position) => (\n <Portal>\n <div\n aria-hidden=\"true\"\n data-slot=\"side-rail-tip\"\n class={cn(\n tooltipTip,\n 'pointer-events-none fixed z-(--z-tooltip) flex items-center gap-2.5 ps-3 pe-3 whitespace-nowrap'\n )}\n style={{\n top: `${position.top}px`,\n left: `${position.left}px`,\n height: `${position.height}px`,\n }}\n >\n <span\n class={cn('flex size-5 shrink-0 items-center justify-center [&_svg]:size-5', {\n 'text-primary': props.active,\n })}\n >\n {props.icon}\n </span>\n {props.label}\n <Show when={props.shortcut}>\n <span class=\"text-muted-foreground shrink-0 font-code text-code leading-none\">\n {props.shortcut}\n </span>\n </Show>\n </div>\n </Portal>\n )}\n </Show>\n )\n}\n\n/**\n * A rail destination.\n *\n * ## The tooltip is the rail's hover affordance, not a generic bubble\n *\n * Collapsed, the row has no text, so the label has to come from somewhere. This\n * ports the donor's treatment rather than using a standard tooltip, because the\n * details are what make it read as part of the rail:\n *\n * - It is **flush with the row**: positioned at the row's own top and given the\n * row's own height, so it continues the row outward instead of floating near\n * it. A centred bubble with an arrow reads as a separate object.\n * - It **repeats the icon**, which anchors it to the row it belongs to.\n * - It carries the **keyboard chord**, which is the one piece of information a\n * collapsed rail otherwise cannot show.\n * - It opens on **hover and on focus**, so a keyboard user gets the same label a\n * pointer user does.\n * - It is `pointer-events-none` and `aria-hidden`: the row already carries the\n * name (as a visually hidden span when collapsed), so this is decoration and\n * must never be the accessible name.\n *\n * ## The chord on the row\n *\n * Expanded, the row shows its chord on hover and on focus — and the chord is\n * declared once to assistive technology through `aria-keyshortcuts` rather than\n * being read out as glyphs. The visible badge is `aria-hidden` for that reason.\n */\nexport type SideRailItemProps<T extends ValidComponent = 'a'> = PolymorphicProps<\n T,\n {\n class?: string\n /** Marks the item as the current destination. */\n active?: boolean\n /**\n * The item's accessible name. Required, and always in the accessibility tree:\n * collapsed it moves into the tooltip and a visually hidden span rather than\n * being deleted.\n */\n label: string\n /**\n * A count or a dot. Expanded, it trails the label at the row's end; collapsed,\n * it moves onto the icon's corner, so the rail never loses it.\n */\n badge?: JSX.Element\n /** An indicator pinned to the trailing edge in the expanded form. */\n trailing?: JSX.Element\n /** The chord as it should be drawn, e.g. `⌘1`. Shown on hover and focus. */\n shortcut?: string\n /**\n * The same chord in the ARIA grammar, e.g. `Meta+1`. Declared to assistive\n * technology instead of the display glyphs, which are not a keyboard shortcut\n * a screen reader can parse. Supply it whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n }\n>\n\nexport function SideRailItem<T extends ValidComponent = 'a'>(props: SideRailItemProps<T>) {\n const [local, rest] = splitProps(props as SideRailItemProps, [\n 'as',\n 'class',\n 'active',\n 'label',\n 'badge',\n 'trailing',\n 'shortcut',\n 'keyshortcuts',\n 'children',\n ])\n\n const tip = createRailTip()\n\n return (\n <>\n <Polymorphic\n as={local.as ?? 'a'}\n ref={tip.setRow}\n aria-current={local.active ? 'page' : undefined}\n aria-keyshortcuts={local.keyshortcuts}\n data-active={local.active ? '' : undefined}\n class={cn(\n sideRailItemClass,\n 'relative',\n local.active ? sideRailItemStateClass.active : sideRailItemStateClass.idle,\n local.class\n )}\n onPointerEnter={tip.show}\n onPointerLeave={tip.hide}\n onFocus={tip.show}\n onBlur={tip.hide}\n {...(rest as Record<string, unknown>)}\n >\n <span class=\"flex size-5 shrink-0 items-center justify-center [&_svg]:size-5\">\n {local.children}\n </span>\n\n <span class=\"min-w-0 flex-1 truncate text-start group-data-[collapsed=true]/rail:sr-only\">\n {local.label}\n </span>\n\n {/*\n * One element, two placements, because the badge is caller content and a DOM\n * node cannot be in two places. Expanded, it is a trailing count in the row's\n * flow, after the label — over the icon it would cover the glyph the row is\n * recognised by. Collapsed, there is no label to trail, so it leaves the flow\n * and pins to the icon's top-end corner: anchored to the row's centre (where\n * the centred icon sits) and pushed out by 14px, the icon's half-width plus\n * the 4px overhang, so a wider count grows back over the icon rather than past\n * the rail's edge.\n */}\n <Show when={local.badge}>\n <span\n data-slot=\"side-rail-badge\"\n class=\"flex shrink-0 items-center justify-center group-data-[collapsed=true]/rail:absolute group-data-[collapsed=true]/rail:end-1/2 group-data-[collapsed=true]/rail:top-1/2 group-data-[collapsed=true]/rail:-me-3.5 group-data-[collapsed=true]/rail:-mt-3.5\"\n >\n {local.badge}\n </span>\n </Show>\n\n <Show when={local.shortcut && local.trailing === undefined}>\n <span\n aria-hidden=\"true\"\n class=\"text-sidebar-muted-foreground shrink-0 font-code text-code leading-none opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"\n >\n {local.shortcut}\n </span>\n </Show>\n\n <Show when={local.trailing}>\n <span class=\"ms-auto shrink-0\">{local.trailing}</span>\n </Show>\n </Polymorphic>\n\n <RailTip\n position={tip.position()}\n icon={local.children}\n label={local.label}\n active={local.active}\n shortcut={local.shortcut}\n />\n </>\n )\n}\n\n/** A non-navigating rail control: a collapse toggle, a \"new\" action. */\nexport function SideRailButton(\n props: Omit<ComponentProps<'button'>, 'type'> & {\n label: string\n shortcut?: string\n active?: boolean\n }\n) {\n const [local, rest] = splitProps(props, ['class', 'label', 'shortcut', 'children', 'active'])\n const tip = createRailTip()\n\n return (\n <>\n <button\n type=\"button\"\n ref={tip.setRow}\n aria-label={local.label}\n data-active={local.active ? 'true' : undefined}\n onPointerEnter={tip.show}\n onPointerLeave={tip.hide}\n onFocus={tip.show}\n onBlur={tip.hide}\n class={cn(\n sideRailItemClass,\n local.active ? sideRailItemStateClass.active : sideRailItemStateClass.idle,\n 'disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n <span class=\"flex size-5 shrink-0 items-center justify-center [&_svg]:size-5\">\n {local.children}\n </span>\n <span class=\"min-w-0 flex-1 truncate text-start group-data-[collapsed=true]/rail:sr-only\">\n {local.label}\n </span>\n <Show when={local.shortcut}>\n <span\n aria-hidden=\"true\"\n class=\"text-sidebar-muted-foreground shrink-0 font-code text-code leading-none opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"\n >\n {local.shortcut}\n </span>\n </Show>\n </button>\n\n <RailTip position={tip.position()} icon={local.children} label={local.label} />\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,SAAgBY,SAA2CC,OAAyB;CAClF,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAwB;EACvD;EACA;EACA;EACA;CAAU,CACX;CAED,MAAMF,YAAYT,iBAAiBY,MAAMH,aAAa,KAAK;CAC3D,MAAMK,QAAQ;EACZL;EACAM,OAAOf,iBAAkBS,UAAU,IAAI,sBAAsB,4BAA6B;CAC5F;CAEA,OA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PixelResizeHandleProps","SidebarNavResizeHandleProps","Omit","SidebarNavResizeHandle","props","_$createComponent","_$mergeProps","side","label","_$createComponent","_$mergeProps"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx"],"sourcesContent":["import { PixelResizeHandle, type PixelResizeHandleProps } from '../pixel-resize-handle'\n\nexport type SidebarNavResizeHandleProps = Omit<PixelResizeHandleProps, 'side'>\n\n/** Keep the established left-sidebar API as a thin adapter over the shared edge ruler. */\nexport function SidebarNavResizeHandle(props: SidebarNavResizeHandleProps) {\n return <PixelResizeHandle {...props} side=\"left\" label={props.label ?? 'Resize navigation'} />\n}\n"],"mappings":";;;;AAKA,SAAgBI,uBAAuBC,OAAoC;CACzE,OAAAC,gBAAQN,mBAAiBO,WAAKF,OAAK;EAAEG,MAAI;EAAA,IAAQC,QAAK;GAAA,OAAEJ,MAAMI,SAAS;EAAmB;CAAA,CAAA,CAAA;AAC5F"}
1
+ {"version":3,"file":"sidebar-nav-resize-handle.js","names":["PixelResizeHandle","SidebarNavResizeHandle","props","_$createComponent","_$mergeProps","side","label"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx"],"sourcesContent":["import { PixelResizeHandle, type PixelResizeHandleProps } from '../pixel-resize-handle'\n\nexport type SidebarNavResizeHandleProps = Omit<PixelResizeHandleProps, 'side'>\n\n/** Keep the established left-sidebar API as a thin adapter over the shared edge ruler. */\nexport function SidebarNavResizeHandle(props: SidebarNavResizeHandleProps) {\n return <PixelResizeHandle {...props} side=\"left\" label={props.label ?? 'Resize navigation'} />\n}\n"],"mappings":";;;;AAKA,SAAgBC,uBAAuBC,OAAoC;CACzE,OAAAC,gBAAQH,mBAAiBI,WAAKF,OAAK;EAAEG,MAAI;EAAA,IAAQC,QAAK;GAAA,OAAEJ,MAAMI,SAAS;EAAmB;CAAA,CAAA,CAAA;AAC5F"}
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-nav.js","names":["PolymorphicProps","Polymorphic","ChevronRight","ComponentProps","JSX","ValidComponent","Show","createSignal","splitProps","callHandler","cn","sidebarNavItemClass","sidebarNavItemStateClass","SidebarNavProps","T","class","SidebarNav","props","local","rest","_$createComponent","_$mergeProps","as","aria-label","children","SidebarNavHeader","_el$","_tmpl$","_$spread","SidebarNavTitleProps","SidebarNavTitle","SidebarNavContent","_el$2","_tmpl$2","SidebarNavFooter","_el$3","_tmpl$3","SidebarNavSectionTriggerProps","Omit","onReorder","direction","onClick","onKeyDown","SidebarNavSectionProps","label","collapsible","defaultOpen","active","open","onOpenChange","triggerProps","count","action","Element","actionVisibility","headingAs","SidebarNavSection","uncontrolledOpen","setUncontrolledOpen","setOpen","next","undefined","trigger","triggerRest","heading","when","_el$4","_tmpl$4","_$insert","_el$5","_tmpl$5","_el$6","_tmpl$9","_el$7","firstChild","_$memo","fallback","_el$8","_tmpl$6","aria-expanded","aria-current","event","defaultPrevented","altKey","key","preventDefault","stopPropagation","_el$9","_tmpl$7","_$effect","_$className","_el$0","_tmpl$8","_p$","_v$","_v$2","e","_$setAttribute","t","SidebarNavRowProps","actions","SidebarNavRow","_el$1","_tmpl$1","_el$10","_tmpl$0","SidebarNavLabel","_el$11","_tmpl$10","SidebarNavItemProps","nested","trailing","SidebarNavItem","data-active","idle","_el$12","_tmpl$11","SidebarNavButton","_el$13","_tmpl$12","_$createComponent","_$mergeProps","_$memo","_$className","_$setAttribute"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav.tsx"],"sourcesContent":["import type { PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { Polymorphic } from '@kobalte/core/polymorphic'\nimport { ChevronRight } from 'lucide-solid'\nimport type { ComponentProps, JSX, ValidComponent } from 'solid-js'\nimport { Show, createSignal, splitProps } from 'solid-js'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { sidebarNavItemClass, sidebarNavItemStateClass } from './sidebar-nav-classes'\n\n/**\n * SidebarNav.\n *\n * The secondary navigation column: the list of things inside the destination\n * the rail selected — projects, sessions, files, threads. It is a different\n * object from the rail, not a wider version of it, which is why it is a separate\n * component rather than the rail with labels on.\n *\n * Rows share one recipe with the rail's, so a row in a sidebar and a row in a\n * rail read as the same kind of thing at the same density. That recipe is\n * exactly KiroCrew's nav row: `text-sm font-medium`, `gap-2.5`, `px-3 py-2`,\n * `rounded-md`, `transition-colors`.\n *\n * The width comes from `--sidebar-width`. Sections collapse by default only when\n * the caller says so, because a section that starts collapsed and holds the\n * user's own work is a hidden default.\n */\nexport type SidebarNavProps<T extends ValidComponent = 'nav'> = PolymorphicProps<\n T,\n { class?: string; 'aria-label'?: string }\n>\n\nexport function SidebarNav<T extends ValidComponent = 'nav'>(props: SidebarNavProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavProps, ['class', 'aria-label', 'children'])\n\n return (\n <Polymorphic\n as=\"nav\"\n aria-label={local['aria-label'] ?? 'Section'}\n class={cn(\n 'bg-sidebar text-sidebar-foreground flex h-full w-sidebar min-w-0 max-w-full shrink-0 flex-col border-e border-sidebar-border',\n local.class\n )}\n {...(rest as ComponentProps<'nav'>)}\n >\n {local.children}\n </Polymorphic>\n )\n}\n\nexport function SidebarNavHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-header\"\n class={cn('flex h-topbar shrink-0 items-center justify-between gap-2 px-3', local.class)}\n {...rest}\n />\n )\n}\n\nexport type SidebarNavTitleProps<T extends ValidComponent = 'div'> = PolymorphicProps<\n T,\n { class?: string }\n>\n\nexport function SidebarNavTitle<T extends ValidComponent = 'div'>(props: SidebarNavTitleProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavTitleProps, ['class'])\n return (\n <Polymorphic\n as=\"div\"\n data-slot=\"sidebar-nav-title\"\n class={cn('truncate text-sm font-semibold tracking-tight', local.class)}\n {...(rest as ComponentProps<'div'>)}\n />\n )\n}\n\n/** The scrolling middle of the sidebar. */\nexport function SidebarNavContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-content\"\n class={cn(\n /* A stable gutter keeps rows from shifting sideways when the list\n grows past the fold and the scrollbar appears. */\n 'flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2 [scrollbar-gutter:stable]',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SidebarNavFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-footer\"\n class={cn('flex shrink-0 items-center gap-1 border-t border-sidebar-border p-2', local.class)}\n {...rest}\n />\n )\n}\n\n/** Props forwarded to a collapsible section's disclosure button. */\nexport type SidebarNavSectionTriggerProps = Omit<\n ComponentProps<'button'>,\n 'type' | 'aria-expanded' | 'onClick' | 'onKeyDown' | 'children' | 'class' | 'style'\n> & {\n /** Called for Alt+ArrowUp/Down; the host owns ordering and row identity. */\n onReorder?: (direction: 'up' | 'down') => void\n /** Runs before the section toggle and may cancel it with `preventDefault()`. */\n onClick?: ComponentProps<'button'>['onClick']\n /** Runs before shared Alt+Arrow handling and may cancel it with `preventDefault()`. */\n onKeyDown?: ComponentProps<'button'>['onKeyDown']\n}\n\n/**\n * A titled, collapsible group. Collapsible because a list of projects\n * inevitably outgrows the column, and the user needs to put the ones they are\n * not using away *without* them disappearing into a menu.\n *\n * The disclosure is a plain `aria-expanded` button rather than Kobalte's\n * Collapsible: the disclosure pattern needs no focus or keyboard management,\n * only that attribute and the conditional children, so a primitive would add\n * context and a wrapper without adding behaviour.\n */\nexport type SidebarNavSectionProps = ComponentProps<'div'> & {\n label: string\n /** Render a disclosure control instead of a plain heading. */\n collapsible?: boolean\n defaultOpen?: boolean\n /** Mark the current project/group without changing its disclosure state. */\n active?: boolean\n /** Controlled disclosure state. When supplied, the host owns changes. */\n open?: boolean\n /** Called for user-initiated disclosure changes. */\n onOpenChange?: (open: boolean) => void\n /** Native props and reorder callbacks for the disclosure control. */\n triggerProps?: SidebarNavSectionTriggerProps\n /** Count shown beside the label. */\n count?: number\n /** A control at the trailing edge of the heading row. */\n action?: JSX.Element\n /**\n * When the trailing action shows. `hover` (default) reveals it on hover or\n * focus; `always` keeps it visible, for a section whose primary action is\n * creating its first item.\n */\n actionVisibility?: 'hover' | 'always'\n /** Semantic heading element for a host's section hierarchy. */\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport function SidebarNavSection(props: SidebarNavSectionProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'collapsible',\n 'defaultOpen',\n 'active',\n 'open',\n 'onOpenChange',\n 'triggerProps',\n 'count',\n 'action',\n 'actionVisibility',\n 'headingAs',\n 'children',\n ])\n const [uncontrolledOpen, setUncontrolledOpen] = createSignal(local.defaultOpen ?? true)\n const open = () => local.open ?? uncontrolledOpen()\n const setOpen = (next: boolean) => {\n if (local.open === undefined) setUncontrolledOpen(next)\n local.onOpenChange?.(next)\n }\n\n const [trigger, triggerRest] = splitProps(local.triggerProps ?? {}, [\n 'onClick',\n 'onKeyDown',\n 'onReorder',\n ])\n\n const heading = (\n <>\n <Show when={local.collapsible}>\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 shrink-0 text-muted-foreground transition-transform ease-out', {\n 'rotate-90': open(),\n })}\n />\n </Show>\n <span class=\"min-w-0 flex-1 truncate text-start\">{local.label}</span>\n <Show when={local.count !== undefined}>\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{local.count}</span>\n </Show>\n </>\n )\n\n return (\n <div data-slot=\"sidebar-nav-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <div\n data-slot=\"sidebar-nav-section-header\"\n data-active={local.active ? '' : undefined}\n class={cn(\n 'group/section-header flex items-center gap-1 rounded-md px-2 py-1.5',\n { '[@media(any-pointer:coarse)]:py-0': local.collapsible },\n local.active ? 'bg-primary-subtle text-foreground' : 'hover:bg-sidebar-accent/60'\n )}\n >\n <Polymorphic\n as={local.headingAs ?? 'div'}\n aria-label={local.headingAs ? local.label : undefined}\n class={cn(\n 'flex min-w-0 flex-1 items-center gap-1.5 text-2xs font-medium tracking-wide uppercase',\n local.active ? 'text-foreground' : 'text-sidebar-muted-foreground'\n )}\n >\n <Show when={local.collapsible} fallback={heading}>\n <button\n {...(triggerRest as ComponentProps<'button'>)}\n type=\"button\"\n aria-expanded={open()}\n aria-current={local.active ? 'page' : triggerRest['aria-current']}\n onClick={(event) => {\n callHandler(trigger.onClick, event)\n if (event.defaultPrevented) return\n setOpen(!open())\n }}\n onKeyDown={(event) => {\n callHandler(trigger.onKeyDown, event)\n if (event.defaultPrevented || !event.altKey) return\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') return\n event.preventDefault()\n event.stopPropagation()\n trigger.onReorder?.(event.key === 'ArrowUp' ? 'up' : 'down')\n }}\n class={cn(\n 'flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle [@media(any-pointer:coarse)]:min-h-11',\n /* WCAG 2.5.8: the row's vertical padding sits on the header, so\n the bare label would be a ~16px target. Stretch the button\n across that padding; the row's height does not change. A\n coarse pointer already gets min-h-11 on an unpadded row. */\n '-my-1.5 py-1.5 [@media(any-pointer:coarse)]:my-0 [@media(any-pointer:coarse)]:py-0',\n local.active ? 'text-foreground' : 'text-sidebar-muted-foreground'\n )}\n >\n {heading}\n </button>\n </Show>\n </Polymorphic>\n <Show when={local.action}>\n <span\n data-slot=\"sidebar-nav-section-action\"\n class={cn('shrink-0', {\n 'opacity-0 transition-opacity ease-out group-hover/section-header:opacity-100 focus-within:opacity-100 [@media(any-pointer:coarse)]:opacity-100':\n local.actionVisibility !== 'always',\n })}\n >\n {local.action}\n </span>\n </Show>\n </div>\n <Show when={!local.collapsible || open()}>\n <div class=\"flex flex-col gap-0.5\">{local.children}</div>\n </Show>\n </div>\n )\n}\n\nexport type SidebarNavRowProps = ComponentProps<'div'> & {\n /** Adjacent controls, outside the navigation item's interactive element. */\n actions?: JSX.Element\n}\n\n/**\n * A navigation item and its adjacent controls. Actions stay outside the item\n * to avoid nested buttons; touch, keyboard focus, and expanded menus expose\n * them without requiring a pointer hover. A narrow lane or enlarged text\n * may move actions onto a second line rather than clipping the label or controls.\n */\nexport function SidebarNavRow(props: SidebarNavRowProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'actions'])\n return (\n <div\n data-slot=\"sidebar-nav-row\"\n class={cn(\n 'group/sidebar-nav-row flex min-w-0 flex-wrap items-center gap-0.5 [&>[data-slot=sidebar-nav-item]]:flex-1 [&>[data-slot=sidebar-nav-item]]:basis-36',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <Show when={local.actions}>\n <span\n data-slot=\"sidebar-nav-row-actions\"\n class=\"ms-auto flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity ease-out group-hover/sidebar-nav-row:opacity-100 group-focus-within/sidebar-nav-row:opacity-100 has-[[aria-haspopup=menu][aria-expanded=true]]:opacity-100 has-[[aria-haspopup=true][aria-expanded=true]]:opacity-100 [@media(any-pointer:coarse)]:opacity-100\"\n >\n {local.actions}\n </span>\n </Show>\n </div>\n )\n}\n\n/** Row text may truncate visually; its complete content remains the accessible name. */\nexport function SidebarNavLabel(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n data-slot=\"sidebar-nav-label\"\n class={cn('min-w-0 flex-1 truncate text-start', local.class)}\n {...rest}\n />\n )\n}\n\nexport type SidebarNavItemProps<T extends ValidComponent = 'a'> = PolymorphicProps<\n T,\n {\n class?: string\n active?: boolean\n /** Indent one level, for a child row such as a branch under a project. */\n nested?: boolean\n /** Trailing slot: a count, a status dot, a hover action. */\n trailing?: JSX.Element\n }\n>\n\nexport function SidebarNavItem<T extends ValidComponent = 'a'>(props: SidebarNavItemProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavItemProps, [\n 'class',\n 'active',\n 'nested',\n 'trailing',\n 'children',\n ])\n\n return (\n <Polymorphic\n as=\"a\"\n data-slot=\"sidebar-nav-item\"\n aria-current={local.active ? 'page' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n sidebarNavItemClass,\n local.active ? sidebarNavItemStateClass.active : sidebarNavItemStateClass.idle,\n { 'ps-8': local.nested },\n local.class\n )}\n {...(rest as ComponentProps<'a'>)}\n >\n {local.children}\n <Show when={local.trailing}>\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{local.trailing}</span>\n </Show>\n </Polymorphic>\n )\n}\n\n/** A row that is a button rather than a destination — \"New project\". */\nexport function SidebarNavButton(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <button\n type=\"button\"\n class={cn(\n sidebarNavItemClass,\n sidebarNavItemStateClass.idle,\n 'w-full disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAgBgB,WAA6CC,OAA2B;CACtF,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAA0B;EAAC;EAAS;EAAc;CAAU,CAAC;CAE9F,OAAAG,gBACGnB,aAAWoB,WAAA;EACVC,IAAE;EAAA,KAAA,gBAAA;GAAA,OACUJ,MAAM,iBAAiB;EAAS;EAAA,KAAA,WAAA;GAAA,OACrCR,GACL,gIACAQ,MAAMH,KACR;EAAC;CAAA,GACII,MAA6B,EAAA,IAAAK,WAAA;EAAA,OAEjCN,MAAMM;CAAQ,EAAA,CAAA,CAAA;AAGrB;AAEA,SAAgBC,iBAAiBR,OAA8B;CAC7D,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO,CAAC,OAAO,CAAC;CACjD,cAAA;EAAA,IAAAS,OAAAC,OAAA;EAAAC,OAAAF,MAAAL,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWX,GAAG,kE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AA;AAI9E;;AAGA,SAAgBE,iBAAiBpG,OAAiC;CAChE,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAAqG,SAAAC,SAAA;EAAA3F,OAAA0F,QAAAjG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWX,GACLC,qBACAC,yBAAyBsG,MACzB,2DACAhG,MAAMH,KACR;EAAC,EAAA,GACGI,IAAI,GAAA,OAAA,IAAA;EAAAiD,OAAAkD,cAEPpG,MAAMM,QAAQ;EAAA,OAAA8F;CAAA,EAAA,CAAA;AAGrB"}
1
+ {"version":3,"file":"sidebar-nav.js","names":["Polymorphic","ChevronRight","Show","createSignal","splitProps","callHandler","cn","sidebarNavItemClass","sidebarNavItemStateClass","class","SidebarNav","props","local","rest","_$createComponent","_$mergeProps","as","children","SidebarNavHeader","_el$","_tmpl$","_$spread","SidebarNavTitle","SidebarNavContent","_el$2","_tmpl$2","SidebarNavFooter","_el$3","_tmpl$3","onReorder","onClick","onKeyDown","label","collapsible","defaultOpen","active","open","onOpenChange","triggerProps","count","action","actionVisibility","headingAs","SidebarNavSection","uncontrolledOpen","setUncontrolledOpen","setOpen","next","undefined","trigger","triggerRest","heading","when","_el$4","_tmpl$4","_$insert","_el$5","_tmpl$5","_el$6","_tmpl$9","_el$7","firstChild","_$memo","fallback","_el$8","_tmpl$6","event","defaultPrevented","altKey","key","preventDefault","stopPropagation","_el$9","_tmpl$7","_$effect","_$className","_el$0","_tmpl$8","_p$","_v$","_v$2","e","_$setAttribute","t","actions","SidebarNavRow","_el$1","_tmpl$1","_el$10","_tmpl$0","SidebarNavLabel","_el$11","_tmpl$10","nested","trailing","SidebarNavItem","idle","_el$12","_tmpl$11","SidebarNavButton","_el$13","_tmpl$12"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav.tsx"],"sourcesContent":["import type { PolymorphicProps } from '@kobalte/core/polymorphic'\nimport { Polymorphic } from '@kobalte/core/polymorphic'\nimport { ChevronRight } from 'lucide-solid'\nimport type { ComponentProps, JSX, ValidComponent } from 'solid-js'\nimport { Show, createSignal, splitProps } from 'solid-js'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { sidebarNavItemClass, sidebarNavItemStateClass } from './sidebar-nav-classes'\n\n/**\n * SidebarNav.\n *\n * The secondary navigation column: the list of things inside the destination\n * the rail selected — projects, sessions, files, threads. It is a different\n * object from the rail, not a wider version of it, which is why it is a separate\n * component rather than the rail with labels on.\n *\n * Rows share one recipe with the rail's, so a row in a sidebar and a row in a\n * rail read as the same kind of thing at the same density. That recipe is\n * exactly KiroCrew's nav row: `text-sm font-medium`, `gap-2.5`, `px-3 py-2`,\n * `rounded-md`, `transition-colors`.\n *\n * The width comes from `--sidebar-width`. Sections collapse by default only when\n * the caller says so, because a section that starts collapsed and holds the\n * user's own work is a hidden default.\n */\nexport type SidebarNavProps<T extends ValidComponent = 'nav'> = PolymorphicProps<\n T,\n { class?: string; 'aria-label'?: string }\n>\n\nexport function SidebarNav<T extends ValidComponent = 'nav'>(props: SidebarNavProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavProps, ['class', 'aria-label', 'children'])\n\n return (\n <Polymorphic\n as=\"nav\"\n aria-label={local['aria-label'] ?? 'Section'}\n class={cn(\n 'bg-sidebar text-sidebar-foreground flex h-full w-sidebar min-w-0 max-w-full shrink-0 flex-col border-e border-sidebar-border',\n local.class\n )}\n {...(rest as ComponentProps<'nav'>)}\n >\n {local.children}\n </Polymorphic>\n )\n}\n\nexport function SidebarNavHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-header\"\n class={cn('flex h-topbar shrink-0 items-center justify-between gap-2 px-3', local.class)}\n {...rest}\n />\n )\n}\n\nexport type SidebarNavTitleProps<T extends ValidComponent = 'div'> = PolymorphicProps<\n T,\n { class?: string }\n>\n\nexport function SidebarNavTitle<T extends ValidComponent = 'div'>(props: SidebarNavTitleProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavTitleProps, ['class'])\n return (\n <Polymorphic\n as=\"div\"\n data-slot=\"sidebar-nav-title\"\n class={cn('truncate text-sm font-semibold tracking-tight', local.class)}\n {...(rest as ComponentProps<'div'>)}\n />\n )\n}\n\n/** The scrolling middle of the sidebar. */\nexport function SidebarNavContent(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-content\"\n class={cn(\n /* A stable gutter keeps rows from shifting sideways when the list\n grows past the fold and the scrollbar appears. */\n 'flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2 [scrollbar-gutter:stable]',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function SidebarNavFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"sidebar-nav-footer\"\n class={cn('flex shrink-0 items-center gap-1 border-t border-sidebar-border p-2', local.class)}\n {...rest}\n />\n )\n}\n\n/** Props forwarded to a collapsible section's disclosure button. */\nexport type SidebarNavSectionTriggerProps = Omit<\n ComponentProps<'button'>,\n 'type' | 'aria-expanded' | 'onClick' | 'onKeyDown' | 'children' | 'class' | 'style'\n> & {\n /** Called for Alt+ArrowUp/Down; the host owns ordering and row identity. */\n onReorder?: (direction: 'up' | 'down') => void\n /** Runs before the section toggle and may cancel it with `preventDefault()`. */\n onClick?: ComponentProps<'button'>['onClick']\n /** Runs before shared Alt+Arrow handling and may cancel it with `preventDefault()`. */\n onKeyDown?: ComponentProps<'button'>['onKeyDown']\n}\n\n/**\n * A titled, collapsible group. Collapsible because a list of projects\n * inevitably outgrows the column, and the user needs to put the ones they are\n * not using away *without* them disappearing into a menu.\n *\n * The disclosure is a plain `aria-expanded` button rather than Kobalte's\n * Collapsible: the disclosure pattern needs no focus or keyboard management,\n * only that attribute and the conditional children, so a primitive would add\n * context and a wrapper without adding behaviour.\n */\nexport type SidebarNavSectionProps = ComponentProps<'div'> & {\n label: string\n /** Render a disclosure control instead of a plain heading. */\n collapsible?: boolean\n defaultOpen?: boolean\n /** Mark the current project/group without changing its disclosure state. */\n active?: boolean\n /** Controlled disclosure state. When supplied, the host owns changes. */\n open?: boolean\n /** Called for user-initiated disclosure changes. */\n onOpenChange?: (open: boolean) => void\n /** Native props and reorder callbacks for the disclosure control. */\n triggerProps?: SidebarNavSectionTriggerProps\n /** Count shown beside the label. */\n count?: number\n /** A control at the trailing edge of the heading row. */\n action?: JSX.Element\n /**\n * When the trailing action shows. `hover` (default) reveals it on hover or\n * focus; `always` keeps it visible, for a section whose primary action is\n * creating its first item.\n */\n actionVisibility?: 'hover' | 'always'\n /** Semantic heading element for a host's section hierarchy. */\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport function SidebarNavSection(props: SidebarNavSectionProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'collapsible',\n 'defaultOpen',\n 'active',\n 'open',\n 'onOpenChange',\n 'triggerProps',\n 'count',\n 'action',\n 'actionVisibility',\n 'headingAs',\n 'children',\n ])\n const [uncontrolledOpen, setUncontrolledOpen] = createSignal(local.defaultOpen ?? true)\n const open = () => local.open ?? uncontrolledOpen()\n const setOpen = (next: boolean) => {\n if (local.open === undefined) setUncontrolledOpen(next)\n local.onOpenChange?.(next)\n }\n\n const [trigger, triggerRest] = splitProps(local.triggerProps ?? {}, [\n 'onClick',\n 'onKeyDown',\n 'onReorder',\n ])\n\n const heading = (\n <>\n <Show when={local.collapsible}>\n <ChevronRight\n aria-hidden=\"true\"\n class={cn('size-3.5 shrink-0 text-muted-foreground transition-transform ease-out', {\n 'rotate-90': open(),\n })}\n />\n </Show>\n <span class=\"min-w-0 flex-1 truncate text-start\">{local.label}</span>\n <Show when={local.count !== undefined}>\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{local.count}</span>\n </Show>\n </>\n )\n\n return (\n <div data-slot=\"sidebar-nav-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <div\n data-slot=\"sidebar-nav-section-header\"\n data-active={local.active ? '' : undefined}\n class={cn(\n 'group/section-header flex items-center gap-1 rounded-md px-2 py-1.5',\n { '[@media(any-pointer:coarse)]:py-0': local.collapsible },\n local.active ? 'bg-primary-subtle text-foreground' : 'hover:bg-sidebar-accent/60'\n )}\n >\n <Polymorphic\n as={local.headingAs ?? 'div'}\n aria-label={local.headingAs ? local.label : undefined}\n class={cn(\n 'flex min-w-0 flex-1 items-center gap-1.5 text-2xs font-medium tracking-wide uppercase',\n local.active ? 'text-foreground' : 'text-sidebar-muted-foreground'\n )}\n >\n <Show when={local.collapsible} fallback={heading}>\n <button\n {...(triggerRest as ComponentProps<'button'>)}\n type=\"button\"\n aria-expanded={open()}\n aria-current={local.active ? 'page' : triggerRest['aria-current']}\n onClick={(event) => {\n callHandler(trigger.onClick, event)\n if (event.defaultPrevented) return\n setOpen(!open())\n }}\n onKeyDown={(event) => {\n callHandler(trigger.onKeyDown, event)\n if (event.defaultPrevented || !event.altKey) return\n if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') return\n event.preventDefault()\n event.stopPropagation()\n trigger.onReorder?.(event.key === 'ArrowUp' ? 'up' : 'down')\n }}\n class={cn(\n 'flex min-w-0 flex-1 items-center gap-1.5 rounded-sm text-2xs font-medium tracking-wide uppercase outline-none transition-colors ease-out hover:text-sidebar-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle [@media(any-pointer:coarse)]:min-h-11',\n /* WCAG 2.5.8: the row's vertical padding sits on the header, so\n the bare label would be a ~16px target. Stretch the button\n across that padding; the row's height does not change. A\n coarse pointer already gets min-h-11 on an unpadded row. */\n '-my-1.5 py-1.5 [@media(any-pointer:coarse)]:my-0 [@media(any-pointer:coarse)]:py-0',\n local.active ? 'text-foreground' : 'text-sidebar-muted-foreground'\n )}\n >\n {heading}\n </button>\n </Show>\n </Polymorphic>\n <Show when={local.action}>\n <span\n data-slot=\"sidebar-nav-section-action\"\n class={cn('shrink-0', {\n 'opacity-0 transition-opacity ease-out group-hover/section-header:opacity-100 focus-within:opacity-100 [@media(any-pointer:coarse)]:opacity-100':\n local.actionVisibility !== 'always',\n })}\n >\n {local.action}\n </span>\n </Show>\n </div>\n <Show when={!local.collapsible || open()}>\n <div class=\"flex flex-col gap-0.5\">{local.children}</div>\n </Show>\n </div>\n )\n}\n\nexport type SidebarNavRowProps = ComponentProps<'div'> & {\n /** Adjacent controls, outside the navigation item's interactive element. */\n actions?: JSX.Element\n}\n\n/**\n * A navigation item and its adjacent controls. Actions stay outside the item\n * to avoid nested buttons; touch, keyboard focus, and expanded menus expose\n * them without requiring a pointer hover. A narrow lane or enlarged text\n * may move actions onto a second line rather than clipping the label or controls.\n */\nexport function SidebarNavRow(props: SidebarNavRowProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'actions'])\n return (\n <div\n data-slot=\"sidebar-nav-row\"\n class={cn(\n 'group/sidebar-nav-row flex min-w-0 flex-wrap items-center gap-0.5 [&>[data-slot=sidebar-nav-item]]:flex-1 [&>[data-slot=sidebar-nav-item]]:basis-36',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <Show when={local.actions}>\n <span\n data-slot=\"sidebar-nav-row-actions\"\n class=\"ms-auto flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity ease-out group-hover/sidebar-nav-row:opacity-100 group-focus-within/sidebar-nav-row:opacity-100 has-[[aria-haspopup=menu][aria-expanded=true]]:opacity-100 has-[[aria-haspopup=true][aria-expanded=true]]:opacity-100 [@media(any-pointer:coarse)]:opacity-100\"\n >\n {local.actions}\n </span>\n </Show>\n </div>\n )\n}\n\n/** Row text may truncate visually; its complete content remains the accessible name. */\nexport function SidebarNavLabel(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n data-slot=\"sidebar-nav-label\"\n class={cn('min-w-0 flex-1 truncate text-start', local.class)}\n {...rest}\n />\n )\n}\n\nexport type SidebarNavItemProps<T extends ValidComponent = 'a'> = PolymorphicProps<\n T,\n {\n class?: string\n active?: boolean\n /** Indent one level, for a child row such as a branch under a project. */\n nested?: boolean\n /** Trailing slot: a count, a status dot, a hover action. */\n trailing?: JSX.Element\n }\n>\n\nexport function SidebarNavItem<T extends ValidComponent = 'a'>(props: SidebarNavItemProps<T>) {\n const [local, rest] = splitProps(props as SidebarNavItemProps, [\n 'class',\n 'active',\n 'nested',\n 'trailing',\n 'children',\n ])\n\n return (\n <Polymorphic\n as=\"a\"\n data-slot=\"sidebar-nav-item\"\n aria-current={local.active ? 'page' : undefined}\n data-active={local.active ? '' : undefined}\n class={cn(\n sidebarNavItemClass,\n local.active ? sidebarNavItemStateClass.active : sidebarNavItemStateClass.idle,\n { 'ps-8': local.nested },\n local.class\n )}\n {...(rest as ComponentProps<'a'>)}\n >\n {local.children}\n <Show when={local.trailing}>\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{local.trailing}</span>\n </Show>\n </Polymorphic>\n )\n}\n\n/** A row that is a button rather than a destination — \"New project\". */\nexport function SidebarNavButton(props: ComponentProps<'button'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <button\n type=\"button\"\n class={cn(\n sidebarNavItemClass,\n sidebarNavItemStateClass.idle,\n 'w-full disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAgBU,WAA6CC,OAA2B;CACtF,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAA0B;EAAC;EAAS;EAAc;CAAU,CAAC;CAE9F,OAAAG,gBACGd,aAAWe,WAAA;EACVC,IAAE;EAAA,KAAA,gBAAA;GAAA,OACUJ,MAAM,iBAAiB;EAAS;EAAA,KAAA,WAAA;GAAA,OACrCN,GACL,gIACAM,MAAMH,KACR;EAAC;CAAA,GACII,MAA6B,EAAA,IAAAI,WAAA;EAAA,OAEjCL,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AQ,GAAAH,gBACdZ,MAAI;GAAA,IAACkD,OAAI;IAAA,OAAExC,MAAMkF;GAAQ;GAAA,IAAA7E,WAAA;IAAA,IAAAgF,SAAAC,SAAA;IAAA3C,OAAA0C,cACgCrF,MAAMkF,QAAQ;IAAA,OAAAG;GAAA;EAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAI9E;;AAGA,SAAgBE,iBAAiBxF,OAAiC;CAChE,MAAM,CAACC,OAAOC,QAAQT,WAAWO,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,cAAA;EAAA,IAAAyF,SAAAC,SAAA;EAAAhF,OAAA+E,QAAArF,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWT,GACLC,qBACAC,yBAAyBwF,MACzB,2DACApF,MAAMH,KACR;EAAC,EAAA,GACGI,IAAI,GAAA,OAAA,IAAA;EAAA0C,OAAA6C,cAEPxF,MAAMK,QAAQ;EAAA,OAAAmF;CAAA,EAAA,CAAA;AAGrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"resize-controller-core-retry.js","names":["createSignal","Accessor","JSX","clampSplitRatio","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutResizeControllerProps","branch","L","rect","CSSProperties","domId","id","root","HTMLDivElement","labelForSeparator","class","onResize","splitId","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","Number","isFinite","next","Math","abs","stopDrag","handle","HTMLElement","event","PointerEvent","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","_v$8","_v$9","bottom","right","_v$0","e","_$style","t","_$setAttribute","a","o","i","n","s","h","r","d","_$className","_$delegateEvents","_$style","_$setAttribute","_$className","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core-retry.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n clampSplitRatio,\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n /**\n * The separator's look. SplitLayout passes it so this chunk and its retry\n * copy import nothing the eager entry has not already loaded.\n */\n class: string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n if (!Number.isFinite(ratio)) return\n const next = clampSplitRatio(ratio)\n if (Math.abs(next - props.branch().ratio) > 0.000001) props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={Math.round(MIN_SPLIT_RATIO * 100)}\n aria-valuemax={Math.round(MAX_SPLIT_RATIO * 100)}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n class={props.class}\n />\n </div>\n )\n}\n"],"mappings":";;;;;AAwBA,IAA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AAA1D,KAAAA;GAAA2D,GAAA3D,KAAAA;GAAA4D,GAAA5D,KAAAA;GAAA6D,GAAA7D,KAAAA;GAAA8D,GAAA9D,KAAAA;EAAA,CAAA;EAAA,OAAAI;CAAA,EAAA,CAAA;AAI1B;AAAC4D,eAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"resize-controller-core-retry.js","names":["createSignal","clampSplitRatio","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","branch","rect","domId","id","root","labelForSeparator","class","onResize","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","Number","isFinite","next","Math","abs","stopDrag","handle","event","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","_v$8","_v$9","bottom","right","_v$0","e","_$style","t","_$setAttribute","a","o","i","n","s","h","r","d","_$className","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core-retry.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n clampSplitRatio,\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n /**\n * The separator's look. SplitLayout passes it so this chunk and its retry\n * copy import nothing the eager entry has not already loaded.\n */\n class: string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n if (!Number.isFinite(ratio)) return\n const next = clampSplitRatio(ratio)\n if (Math.abs(next - props.branch().ratio) > 0.000001) props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={Math.round(MIN_SPLIT_RATIO * 100)}\n aria-valuemax={Math.round(MAX_SPLIT_RATIO * 100)}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n class={props.class}\n />\n </div>\n )\n}\n"],"mappings":";;;;;AAwBA,IAAMc,iBAAiB;;AAGvB,SAAwBC,4BACtBC,OACA;CACA,MAAM,CAACC,WAAWC,gBAAgBlB,aAA6B;CAC/D,IAAImB;CACJ,MAAMC,mBAAmBJ,MAAMX,OAAO,CAAC,CAACgB,cAAc;CAEtD,MAAMC,YAAYT,UAAkB;EAGlC,MAAMJ,OAAOO,MAAMP,KAAK;EACxB,IAAI,CAACA,MAAMc,eAAed,KAAKe,eAAe,CAAC,CAACC,WAAW,GAAG;EAC9D,IAAI,CAACC,OAAOC,SAASd,KAAK,GAAG;EAC7B,MAAMe,OAAO3B,gBAAgBY,KAAK;EAClC,IAAIgB,KAAKC,IAAIF,OAAOZ,MAAMX,OAAO,CAAC,CAACQ,KAAK,IAAI,MAAUG,MAAMJ,SAASI,MAAMX,OAAO,CAAC,CAACG,IAAIoB,IAAI;CAC9F;CACA,MAAMG,YAAYC,QAAqB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AAAqB,IAAAlB,IAAA;GAAAC,SAAAJ,IAAAsB,KAAAF,aAAAhD,OAAA,oBAAA4B,IAAAsB,IAAAlB,IAAA;GAAAC,SAAAL,IAAAuB,KAAAH,aAAAhD,OAAA,iBAAA4B,IAAAuB,IAAAlB,IAAA;GAAAI,SAAAT,IAAAwB,KAAAJ,aAAAhD,OAAA,iBAAA4B,IAAAwB,IAAAf,IAAA;GAAAE,SAAAX,IAAAyB,KAAAL,aAAAhD,OAAA,iBAAA4B,IAAAyB,IAAAd,IAAA;GAAAC,SAAAZ,IAAA0B,KAAAN,aAAAhD,OAAA,iBAAA4B,IAAA0B,IAAAd,IAAA;GAAAZ,IAAA2B,IAAAT,MAAA9C,OAAAyC,MAAAb,IAAA2B,CAAA;GAAAX,SAAAhB,IAAA4B,KAAAC,UAAAzD,OAAA4B,IAAA4B,IAAAZ,IAAA;GAAA,OAAAhB;EAAA,GAAA;GAAAiB,GAAAnD,KAAAA;GAAAqD,GAAArD,KAAAA;GAAAuD,GAAAvD,KAAAA;GAAAwD,GAAAxD,KAAAA;GAAAyD,GAAAzD,KAAAA;GAAA0D,GAAA1D,KAAAA;GAAA2D,GAAA3D,KAAAA;GAAA4D,GAAA5D,KAAAA;GAAA6D,GAAA7D,KAAAA;GAAA8D,GAAA9D,KAAAA;EAAA,CAAA;EAAA,OAAAI;CAAA,EAAA,CAAA;AAI1B;AAAC4D,eAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"resize-controller-core.js","names":["createSignal","Accessor","JSX","clampSplitRatio","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutResizeControllerProps","branch","L","rect","CSSProperties","domId","id","root","HTMLDivElement","labelForSeparator","class","onResize","splitId","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","Number","isFinite","next","Math","abs","stopDrag","handle","HTMLElement","event","PointerEvent","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","_v$8","_v$9","bottom","right","_v$0","e","_$style","t","_$setAttribute","a","o","i","n","s","h","r","d","_$className","_$delegateEvents","_$style","_$setAttribute","_$className","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n clampSplitRatio,\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n /**\n * The separator's look. SplitLayout passes it so this chunk and its retry\n * copy import nothing the eager entry has not already loaded.\n */\n class: string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n if (!Number.isFinite(ratio)) return\n const next = clampSplitRatio(ratio)\n if (Math.abs(next - props.branch().ratio) > 0.000001) props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={Math.round(MIN_SPLIT_RATIO * 100)}\n aria-valuemax={Math.round(MAX_SPLIT_RATIO * 100)}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n class={props.class}\n />\n </div>\n )\n}\n"],"mappings":";;;;;AAwBA,IAAMuB,iBAAiB;;AAGvB,SAAwBC,4BACtBC,OACA;CACA,MAAM,CAACC,WAAWC,gBAAgB3B,aAA6B;CAC/D,IAAI4B;CACJ,MAAMC,mBAAmBJ,MAAMf,OAAO,CAAC,CAACoB,cAAc;CAEtD,MAAMC,YAAYT,UAAkB;EAGlC,MAAMN,OAAOS,MAAMT,KAAK;EACxB,IAAI,CAACA,MAAMgB,eAAehB,KAAKiB,eAAe,CAAC,CAACC,WAAW,GAAG;EAC9D,IAAI,CAACC,OAAOC,SAASd,KAAK,GAAG;EAC7B,MAAMe,OAAOlC,gBAAgBmB,KAAK;EAClC,IAAIgB,KAAKC,IAAIF,OAAOZ,MAAMf,OAAO,CAAC,CAACY,KAAK,IAAI,MAAUG,MAAML,SAASK,MAAMf,OAAO,CAAC,CAACK,IAAIsB,IAAI;CAC9F;CACA,MAAMG,YAAYC,QAAqBE,UAAwB;EAC7D,IAAIf,kBAAkBe,MAAME,WAAW;EACvCjB,gBAAgBkB,KAAAA;EAChBL,OAAOM,gBAAgB,eAAe;EACtC,IAAIN,OAAOO,kBAAkBL,MAAME,SAAS,GAAGJ,OAAOQ,sBAAsBN,MAAME,SAAS;CAC7F;CAEA,cAAA;EAAA,IAAAK,OAAAC,OAAA,GAAAC,QAAAF,KAAAG;EAAAC,IAES3B,cAAYuB,IAAA;EAAAE,MAAAG,iBAAA,uBAuDQZ,UAAUH,SAASG,MAAMa,eAAeb,KAAK,CAAC;EAAAS,MAAAG,iBAAA,kBADnDZ,UAAUH,SAASG,MA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A;GAAAZ,IAAA2B,IAAAT,MAAA9C,OAAAyC,MAAAb,IAAA2B,CAAA;GAAAX,SAAAhB,IAAA4B,KAAAC,UAAAzD,OAAA4B,IAAA4B,IAAAZ,IAAA;GAAA,OAAAhB;EAAA,GAAA;GAAAiB,GAAAnD,KAAAA;GAAAqD,GAAArD,KAAAA;GAAAuD,GAAAvD,KAAAA;GAAAwD,GAAAxD,KAAAA;GAAAyD,GAAAzD,KAAAA;GAAA0D,GAAA1D,KAAAA;GAAA2D,GAAA3D,KAAAA;GAAA4D,GAAA5D,KAAAA;GAAA6D,GAAA7D,KAAAA;GAAA8D,GAAA9D,KAAAA;EAAA,CAAA;EAAA,OAAAI;CAAA,EAAA,CAAA;AAI1B;AAAC4D,eAAA;CAAA;CAAA;CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"resize-controller-core.js","names":["createSignal","clampSplitRatio","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","branch","rect","domId","id","root","labelForSeparator","class","onResize","ratio","KEYBOARD_DELTA","SplitLayoutResizeController","props","container","setContainer","activePointer","horizontal","direction","resizeTo","isConnected","getClientRects","length","Number","isFinite","next","Math","abs","stopDrag","handle","event","pointerId","undefined","removeAttribute","hasPointerCapture","releasePointerCapture","_el$","_tmpl$","_el$2","firstChild","_$use","addEventListener","currentTarget","$$pointerup","$$pointermove","element","box","getBoundingClientRect","size","width","height","clientX","left","clientY","top","$$pointerdown","button","setPointerCapture","setAttribute","preventDefault","$$keydown","forward","backward","current","key","_$effect","_p$","_v$","_v$2","_v$3","_v$4","_v$5","map","leaf","join","_v$6","round","_v$7","_v$8","_v$9","bottom","right","_v$0","e","_$style","t","_$setAttribute","a","o","i","n","s","h","r","d","_$className","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/resize-controller-core.tsx"],"sourcesContent":["import { createSignal, type Accessor, type JSX } from 'solid-js'\nimport {\n clampSplitRatio,\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n} from './model'\n\nexport type SplitLayoutResizeControllerProps<L extends SplitLayoutLeaf> = {\n branch: Accessor<SplitLayoutBranch<L>>\n rect: Accessor<JSX.CSSProperties>\n domId: (id: string) => string\n root: () => HTMLDivElement | undefined\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n /**\n * The separator's look. SplitLayout passes it so this chunk and its retry\n * copy import nothing the eager entry has not already loaded.\n */\n class: string\n onResize: (splitId: string, ratio: number) => void\n}\n\nconst KEYBOARD_DELTA = 0.05\n\n/** The divider stays behind the first real split while the pane owners remain mounted. */\nexport default function SplitLayoutResizeController<L extends SplitLayoutLeaf>(\n props: SplitLayoutResizeControllerProps<L>\n) {\n const [container, setContainer] = createSignal<HTMLDivElement>()\n let activePointer: number | undefined\n const horizontal = () => props.branch().direction === 'row'\n\n const resizeTo = (ratio: number) => {\n // A hidden or detached host reports no usable geometry; that is not\n // user resize intent.\n const root = props.root()\n if (!root?.isConnected || root.getClientRects().length === 0) return\n if (!Number.isFinite(ratio)) return\n const next = clampSplitRatio(ratio)\n if (Math.abs(next - props.branch().ratio) > 0.000001) props.onResize(props.branch().id, next)\n }\n const stopDrag = (handle: HTMLElement, event: PointerEvent) => {\n if (activePointer !== event.pointerId) return\n activePointer = undefined\n handle.removeAttribute('data-dragging')\n if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId)\n }\n\n return (\n <div\n ref={setContainer}\n style={props.rect()}\n class=\"pointer-events-none absolute min-h-0 min-w-0\"\n >\n <div\n role=\"separator\"\n tabIndex={0}\n data-split-layout-handle=\"\"\n data-orientation={horizontal() ? 'horizontal' : 'vertical'}\n aria-label={\n props.labelForSeparator?.(props.branch()) ??\n (horizontal() ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={horizontal() ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(props.branch())\n .map((leaf) => props.domId(leaf.id))\n .join(' ')}\n aria-valuemin={Math.round(MIN_SPLIT_RATIO * 100)}\n aria-valuemax={Math.round(MAX_SPLIT_RATIO * 100)}\n aria-valuenow={Math.round(props.branch().ratio * 100)}\n style={\n horizontal()\n ? { left: `${props.branch().ratio * 100}%`, top: 0, bottom: 0, width: '1px' }\n : { top: `${props.branch().ratio * 100}%`, left: 0, right: 0, height: '1px' }\n }\n onKeyDown={(event) => {\n const forward = horizontal() ? 'ArrowRight' : 'ArrowDown'\n const backward = horizontal() ? 'ArrowLeft' : 'ArrowUp'\n const current = props.branch().ratio\n let next: number\n if (event.key === forward) next = current + KEYBOARD_DELTA\n else if (event.key === backward) next = current - KEYBOARD_DELTA\n else if (event.key === 'Home') next = MIN_SPLIT_RATIO\n else if (event.key === 'End') next = MAX_SPLIT_RATIO\n else return\n event.preventDefault()\n resizeTo(next)\n }}\n onPointerDown={(event) => {\n if (event.button !== 0 || activePointer !== undefined) return\n activePointer = event.pointerId\n event.currentTarget.setPointerCapture(event.pointerId)\n event.currentTarget.setAttribute('data-dragging', '')\n event.preventDefault()\n }}\n onPointerMove={(event) => {\n const element = container()\n if (activePointer !== event.pointerId || !element) return\n const box = element.getBoundingClientRect()\n const size = horizontal() ? box.width : box.height\n if (size <= 0) return\n resizeTo((horizontal() ? event.clientX - box.left : event.clientY - box.top) / size)\n }}\n onPointerUp={(event) => stopDrag(event.currentTarget, event)}\n onPointerCancel={(event) => stopDrag(event.currentTarget, event)}\n onLostPointerCapture={(event) => stopDrag(event.currentTarget, event)}\n class={props.class}\n />\n </div>\n )\n}\n"],"mappings":";;;;;AAwBA,IAAMc,iBAAiB;;AAGvB,SAAwBC,4BACtBC,OACA;CACA,MAAM,CAACC,WAAWC,gBAAgBlB,aAA6B;CAC/D,IAAImB;CACJ,MAAMC,mBAAmBJ,MAAMX,OAAO,CAAC,CAACgB,cAAc;CAEtD,MAAMC,YAAYT,UAAkB;EAGlC,MAAMJ,OAAOO,MAAMP,KAAK;EACxB,IAAI,CAACA,MAAMc,eAAed,KAAKe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