@adea-ai/ui 0.162.6 → 0.162.7

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 (364) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.js +5 -5
  2. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  3. package/dist/components/composites/accent-picker/accent-picker.js +3 -3
  4. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  5. package/dist/components/composites/accent-picker/custom-color-popover.js +2 -2
  6. package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
  7. package/dist/components/composites/account-menu/account-menu.js +22 -22
  8. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  9. package/dist/components/composites/action-button/action-button.js +2 -2
  10. package/dist/components/composites/action-button/action-button.js.map +1 -1
  11. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +3 -3
  12. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  13. package/dist/components/composites/appearance-editor/appearance-choices.js +10 -10
  14. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  15. package/dist/components/composites/appearance-editor/appearance-editor.js +13 -13
  16. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-rows.js +12 -12
  18. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  19. package/dist/components/composites/appearance-editor/font-settings-group.js +13 -13
  20. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  21. package/dist/components/composites/appearance-editor/theme-preview.js +1 -1
  22. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  23. package/dist/components/composites/catalog-browser/catalog-browser-group.js +9 -9
  24. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  25. package/dist/components/composites/catalog-browser/catalog-browser.js +10 -10
  26. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  27. package/dist/components/composites/catalog-browser/catalog-detail.js +1 -1
  28. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
  29. package/dist/components/composites/chain-of-thought/chain-of-thought.js +5 -5
  30. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  31. package/dist/components/composites/chat/chat.js +7 -7
  32. package/dist/components/composites/chat/chat.js.map +1 -1
  33. package/dist/components/composites/checkpoint/checkpoint.js +5 -5
  34. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  35. package/dist/components/composites/confirmation/confirmation.js +13 -13
  36. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  37. package/dist/components/composites/context/context.js +7 -7
  38. package/dist/components/composites/context/context.js.map +1 -1
  39. package/dist/components/composites/file-tree/build-file-tree.js +1 -1
  40. package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
  41. package/dist/components/composites/file-tree/file-tree.js +9 -9
  42. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  43. package/dist/components/composites/help-center/help-center.js +5 -5
  44. package/dist/components/composites/help-center/help-center.js.map +1 -1
  45. package/dist/components/composites/icon-picker/icon-picker.js +10 -10
  46. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  47. package/dist/components/composites/icon-picker/image-data-url.js.map +1 -1
  48. package/dist/components/composites/icon-picker/shell-icons.js +117 -117
  49. package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
  50. package/dist/components/composites/inline-citation/inline-citation.js +7 -7
  51. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  52. package/dist/components/composites/list-row/list-row-control.js +1 -1
  53. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  54. package/dist/components/composites/list-row/list-row.js +2 -2
  55. package/dist/components/composites/list-row/list-row.js.map +1 -1
  56. package/dist/components/composites/message-scroller/message-scroller.js +7 -7
  57. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  58. package/dist/components/composites/message-scroller/scroll-anchor.js +1 -1
  59. package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -1
  60. package/dist/components/composites/model-selector/model-selector.js +12 -12
  61. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  62. package/dist/components/composites/plan/plan.js +5 -5
  63. package/dist/components/composites/plan/plan.js.map +1 -1
  64. package/dist/components/composites/prompt-input/prompt-input.js +3 -3
  65. package/dist/components/composites/prompt-input/prompt-input.js.map +1 -1
  66. package/dist/components/composites/queue/queue.js +13 -13
  67. package/dist/components/composites/queue/queue.js.map +1 -1
  68. package/dist/components/composites/reasoning/reasoning.js +5 -5
  69. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  70. package/dist/components/composites/scene-controls/scene-controls.js +16 -16
  71. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  72. package/dist/components/composites/settings/settings-layout.js +2 -2
  73. package/dist/components/composites/settings/settings-layout.js.map +1 -1
  74. package/dist/components/composites/settings/settings-navigation.js +2 -2
  75. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  76. package/dist/components/composites/settings/settings.js +5 -5
  77. package/dist/components/composites/settings/settings.js.map +1 -1
  78. package/dist/components/composites/sources/sources.js +5 -5
  79. package/dist/components/composites/sources/sources.js.map +1 -1
  80. package/dist/components/composites/stack-trace/parse-stack-trace.js +2 -2
  81. package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -1
  82. package/dist/components/composites/stack-trace/stack-trace.js +10 -10
  83. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  84. package/dist/components/composites/stat/stat.js +6 -6
  85. package/dist/components/composites/stat/stat.js.map +1 -1
  86. package/dist/components/composites/subagent/subagent.js +5 -5
  87. package/dist/components/composites/subagent/subagent.js.map +1 -1
  88. package/dist/components/composites/suggestion/suggestion.js +2 -2
  89. package/dist/components/composites/suggestion/suggestion.js.map +1 -1
  90. package/dist/components/composites/task/task.js +5 -5
  91. package/dist/components/composites/task/task.js.map +1 -1
  92. package/dist/components/composites/terminal/ansi.js +1 -1
  93. package/dist/components/composites/terminal/ansi.js.map +1 -1
  94. package/dist/components/composites/terminal/terminal.js +18 -18
  95. package/dist/components/composites/terminal/terminal.js.map +1 -1
  96. package/dist/components/composites/test-results/test-results.js +17 -17
  97. package/dist/components/composites/test-results/test-results.js.map +1 -1
  98. package/dist/components/composites/tool/tool.js +5 -5
  99. package/dist/components/composites/tool/tool.js.map +1 -1
  100. package/dist/components/composites/tree/tree.js +6 -6
  101. package/dist/components/composites/tree/tree.js.map +1 -1
  102. package/dist/components/composites/update-dialog/channel-control.js +1 -1
  103. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  104. package/dist/components/composites/update-dialog/update-dialog.js +23 -23
  105. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  106. package/dist/components/composites/workspace-mark/workspace-mark.js +2 -2
  107. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  108. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +6 -6
  109. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  110. package/dist/components/composites/workspace-switcher/workspace-switcher.js +11 -11
  111. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  112. package/dist/components/conversation/atomic/chat-composer.js +1 -1
  113. package/dist/components/conversation/busy-send-button.js +10 -10
  114. package/dist/components/conversation/busy-send-button.js.map +1 -1
  115. package/dist/components/conversation/chat-composer.js +1 -1
  116. package/dist/components/conversation/composer-core.js +1 -1
  117. package/dist/components/conversation/composer-menu.js +2 -2
  118. package/dist/components/conversation/composer-menu.js.map +1 -1
  119. package/dist/components/conversation/conversation-avatar.js +7 -7
  120. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  121. package/dist/components/conversation/conversation-pane.js +1 -1
  122. package/dist/components/conversation/conversation-pane.js.map +1 -1
  123. package/dist/components/conversation/conversation-surface.js +5 -5
  124. package/dist/components/conversation/conversation-surface.js.map +1 -1
  125. package/dist/components/conversation/internal/chat-composer-shell.js +9 -9
  126. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  127. package/dist/components/conversation/message-composer.js +9 -9
  128. package/dist/components/conversation/message-composer.js.map +1 -1
  129. package/dist/components/conversation/message-row.js +13 -13
  130. package/dist/components/conversation/message-row.js.map +1 -1
  131. package/dist/components/conversation/paste-token-editor.js +1 -1
  132. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  133. package/dist/components/conversation/scroll-follow.js +1 -1
  134. package/dist/components/conversation/thread-panel.js +5 -5
  135. package/dist/components/conversation/thread-panel.js.map +1 -1
  136. package/dist/components/conversation/transcript-composition.js +5 -5
  137. package/dist/components/conversation/transcript-composition.js.map +1 -1
  138. package/dist/components/layout/app-shell/app-shell.js +1 -1
  139. package/dist/components/layout/app-shell/app-shell.js.map +1 -1
  140. package/dist/components/layout/app-shell/skip-link.js +1 -1
  141. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  142. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +2 -2
  143. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  144. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -1
  145. package/dist/components/layout/floating-preview/floating-preview.js +7 -7
  146. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  147. package/dist/components/layout/orbit-layout/orbit-layout.js +1 -1
  148. package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
  149. package/dist/components/layout/page/page.js +2 -2
  150. package/dist/components/layout/page/page.js.map +1 -1
  151. package/dist/components/layout/panel/panel.js +1 -1
  152. package/dist/components/layout/panel/panel.js.map +1 -1
  153. package/dist/components/layout/pixel-pane/pixel-pane.js +1 -1
  154. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +5 -5
  155. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  156. package/dist/components/layout/shell-rail/shell-rail.js +5 -5
  157. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  158. package/dist/components/layout/shell-top-bar/shell-top-bar.js +2 -2
  159. package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
  160. package/dist/components/layout/side-rail/side-rail.js +2 -2
  161. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  162. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +1 -1
  163. package/dist/components/layout/sidebar-nav/sidebar-nav.js +5 -5
  164. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  165. package/dist/components/layout/split-layout/pane-focus.js.map +1 -1
  166. package/dist/components/layout/split-layout/resize-controller-core-retry.js +1 -1
  167. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  168. package/dist/components/layout/split-layout/resize-controller-core.js +1 -1
  169. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  170. package/dist/components/layout/split-layout/split-layout.js +7 -7
  171. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  172. package/dist/components/layout/status-bar/status-bar.js +1 -1
  173. package/dist/components/layout/status-bar/status-bar.js.map +1 -1
  174. package/dist/components/layout/top-bar/top-bar.js +5 -5
  175. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  176. package/dist/components/layout/virtual-window/virtual-window.js +1 -1
  177. package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
  178. package/dist/components/motion/presence.js +1 -1
  179. package/dist/components/theme/appearance-panel.js +3 -3
  180. package/dist/components/theme/appearance-panel.js.map +1 -1
  181. package/dist/components/theme/lazy.js +3 -3
  182. package/dist/components/theme/lazy.js.map +1 -1
  183. package/dist/components/theme/script-projection.js +1 -1
  184. package/dist/components/theme/theme-catalogue-source.js +1 -1
  185. package/dist/components/theme/theme-document.js.map +1 -1
  186. package/dist/components/theme/theme-mode-toggle.js +7 -7
  187. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  188. package/dist/components/theme/theme-picker.js +2 -2
  189. package/dist/components/theme/theme-picker.js.map +1 -1
  190. package/dist/components/theme/theme-provider-value.js +1 -1
  191. package/dist/components/theme/theme-provider-value.js.map +1 -1
  192. package/dist/components/theme/theme-provider.js +1 -1
  193. package/dist/components/theme/theme-toggle.js +7 -7
  194. package/dist/components/theme/theme-toggle.js.map +1 -1
  195. package/dist/components/ui/accordion/accordion.js +13 -13
  196. package/dist/components/ui/accordion/accordion.js.map +1 -1
  197. package/dist/components/ui/alert/alert.js +12 -12
  198. package/dist/components/ui/alert/alert.js.map +1 -1
  199. package/dist/components/ui/alert-dialog/alert-dialog.js +14 -14
  200. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  201. package/dist/components/ui/annotation-surface/annotation-surface.js +2 -2
  202. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  203. package/dist/components/ui/aspect-ratio/aspect-ratio.js +1 -1
  204. package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
  205. package/dist/components/ui/attachment/attachment.js +16 -16
  206. package/dist/components/ui/attachment/attachment.js.map +1 -1
  207. package/dist/components/ui/avatar/avatar.js +1 -1
  208. package/dist/components/ui/avatar/avatar.js.map +1 -1
  209. package/dist/components/ui/badge/badge.js +2 -2
  210. package/dist/components/ui/badge/badge.js.map +1 -1
  211. package/dist/components/ui/board/board.js +2 -2
  212. package/dist/components/ui/board/board.js.map +1 -1
  213. package/dist/components/ui/breadcrumb/breadcrumb.js +7 -7
  214. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  215. package/dist/components/ui/bubble/bubble.js +2 -2
  216. package/dist/components/ui/bubble/bubble.js.map +1 -1
  217. package/dist/components/ui/button/button.js +2 -2
  218. package/dist/components/ui/button-group/button-group.js +2 -2
  219. package/dist/components/ui/button-group/button-group.js.map +1 -1
  220. package/dist/components/ui/calendar/calendar.js +8 -8
  221. package/dist/components/ui/calendar/calendar.js.map +1 -1
  222. package/dist/components/ui/callout/callout.js +2 -2
  223. package/dist/components/ui/callout/callout.js.map +1 -1
  224. package/dist/components/ui/card/card.js +2 -2
  225. package/dist/components/ui/card/card.js.map +1 -1
  226. package/dist/components/ui/carousel/carousel.js +8 -8
  227. package/dist/components/ui/carousel/carousel.js.map +1 -1
  228. package/dist/components/ui/chart/chart.js +2 -2
  229. package/dist/components/ui/chart/chart.js.map +1 -1
  230. package/dist/components/ui/checkbox/checkbox.js +6 -6
  231. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  232. package/dist/components/ui/code-block/code-block.js +6 -6
  233. package/dist/components/ui/code-block/code-block.js.map +1 -1
  234. package/dist/components/ui/collapsible/collapsible.js +7 -7
  235. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  236. package/dist/components/ui/combobox/combobox.js +21 -21
  237. package/dist/components/ui/combobox/combobox.js.map +1 -1
  238. package/dist/components/ui/combobox/value-combobox.js +1 -1
  239. package/dist/components/ui/command/command.js +23 -23
  240. package/dist/components/ui/command/command.js.map +1 -1
  241. package/dist/components/ui/context-menu/context-menu.js +2 -2
  242. package/dist/components/ui/detail-panel/detail-panel.js +5 -5
  243. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  244. package/dist/components/ui/dialog/dialog-layer.js +2 -2
  245. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  246. package/dist/components/ui/dialog/dialog.js +21 -21
  247. package/dist/components/ui/dialog/dialog.js.map +1 -1
  248. package/dist/components/ui/diff-block/diff-block.js +2 -2
  249. package/dist/components/ui/diff-block/diff-block.js.map +1 -1
  250. package/dist/components/ui/drawer/drawer.js +14 -14
  251. package/dist/components/ui/drawer/drawer.js.map +1 -1
  252. package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -3
  253. package/dist/components/ui/dropdown-menu/menu-parts.js +10 -10
  254. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  255. package/dist/components/ui/empty/empty-state.js +5 -5
  256. package/dist/components/ui/empty/empty-state.js.map +1 -1
  257. package/dist/components/ui/empty/empty.js +1 -1
  258. package/dist/components/ui/empty/empty.js.map +1 -1
  259. package/dist/components/ui/entity-icon/entity-icon.js +2 -2
  260. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  261. package/dist/components/ui/field/field.js +14 -14
  262. package/dist/components/ui/field/field.js.map +1 -1
  263. package/dist/components/ui/field/number-field.js +2 -2
  264. package/dist/components/ui/field/number-field.js.map +1 -1
  265. package/dist/components/ui/hover-card/hover-card.js +10 -10
  266. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  267. package/dist/components/ui/input/input-control.js +1 -1
  268. package/dist/components/ui/input/input-control.js.map +1 -1
  269. package/dist/components/ui/input/input.js +2 -2
  270. package/dist/components/ui/input/input.js.map +1 -1
  271. package/dist/components/ui/input-group/input-group.js +2 -2
  272. package/dist/components/ui/input-group/input-group.js.map +1 -1
  273. package/dist/components/ui/input-group/secret-input-group.js +2 -2
  274. package/dist/components/ui/input-otp/input-otp.js +2 -2
  275. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  276. package/dist/components/ui/item/item.js +2 -2
  277. package/dist/components/ui/item/item.js.map +1 -1
  278. package/dist/components/ui/kbd/kbd.js +2 -2
  279. package/dist/components/ui/kbd/kbd.js.map +1 -1
  280. package/dist/components/ui/label/label.js +1 -1
  281. package/dist/components/ui/label/label.js.map +1 -1
  282. package/dist/components/ui/marker/marker.js +2 -2
  283. package/dist/components/ui/marker/marker.js.map +1 -1
  284. package/dist/components/ui/menubar/menubar.js +7 -7
  285. package/dist/components/ui/menubar/menubar.js.map +1 -1
  286. package/dist/components/ui/message/message.js +3 -3
  287. package/dist/components/ui/message/message.js.map +1 -1
  288. package/dist/components/ui/modal-dialog/modal-dialog.js +2 -2
  289. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  290. package/dist/components/ui/native-select/native-select.js +5 -5
  291. package/dist/components/ui/native-select/native-select.js.map +1 -1
  292. package/dist/components/ui/navigation-menu/navigation-menu.js +18 -18
  293. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  294. package/dist/components/ui/pagination/pagination.js +28 -28
  295. package/dist/components/ui/pagination/pagination.js.map +1 -1
  296. package/dist/components/ui/popover/popover.js +15 -15
  297. package/dist/components/ui/popover/popover.js.map +1 -1
  298. package/dist/components/ui/progress/progress.js +5 -5
  299. package/dist/components/ui/progress/progress.js.map +1 -1
  300. package/dist/components/ui/questionnaire/questionnaire.js +10 -10
  301. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  302. package/dist/components/ui/radio-group/radio-group.js +9 -9
  303. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  304. package/dist/components/ui/resizable/resizable.js +11 -11
  305. package/dist/components/ui/resizable/resizable.js.map +1 -1
  306. package/dist/components/ui/scroll-area/scroll-area.js +1 -1
  307. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  308. package/dist/components/ui/select/select.js +21 -21
  309. package/dist/components/ui/select/select.js.map +1 -1
  310. package/dist/components/ui/separator/separator.js +5 -5
  311. package/dist/components/ui/separator/separator.js.map +1 -1
  312. package/dist/components/ui/sheet/sheet.js +6 -6
  313. package/dist/components/ui/sheet/sheet.js.map +1 -1
  314. package/dist/components/ui/skeleton/skeleton.js +1 -1
  315. package/dist/components/ui/skeleton/skeleton.js.map +1 -1
  316. package/dist/components/ui/slider/slider.js +5 -5
  317. package/dist/components/ui/slider/slider.js.map +1 -1
  318. package/dist/components/ui/spinner/spinner.js +5 -5
  319. package/dist/components/ui/spinner/spinner.js.map +1 -1
  320. package/dist/components/ui/status-chip/status-chip.js +2 -2
  321. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  322. package/dist/components/ui/switch/switch.js +4 -4
  323. package/dist/components/ui/switch/switch.js.map +1 -1
  324. package/dist/components/ui/table/table.js +1 -1
  325. package/dist/components/ui/table/table.js.map +1 -1
  326. package/dist/components/ui/tabs/tabs.js +7 -7
  327. package/dist/components/ui/tabs/tabs.js.map +1 -1
  328. package/dist/components/ui/text-link/text-link.js +1 -1
  329. package/dist/components/ui/text-link/text-link.js.map +1 -1
  330. package/dist/components/ui/textarea/textarea.js +2 -2
  331. package/dist/components/ui/textarea/textarea.js.map +1 -1
  332. package/dist/components/ui/toast/toast.js +7 -7
  333. package/dist/components/ui/toast/toast.js.map +1 -1
  334. package/dist/components/ui/toggle/toggle.js +6 -6
  335. package/dist/components/ui/toggle/toggle.js.map +1 -1
  336. package/dist/components/ui/toggle-group/toggle-group.js +7 -8
  337. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  338. package/dist/components/ui/tooltip/deferred-tooltip.js +6 -6
  339. package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
  340. package/dist/components/ui/tooltip/lazy-tooltip.js +2 -2
  341. package/dist/components/ui/tooltip/tooltip.js +10 -10
  342. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  343. package/dist/components/ui/trace/trace.js +19 -19
  344. package/dist/components/ui/trace/trace.js.map +1 -1
  345. package/dist/components/ui/typography/typography.js +2 -2
  346. package/dist/lib/accent-presets.js +1 -1
  347. package/dist/lib/accent-roles.js +2 -2
  348. package/dist/lib/async-action.js +1 -1
  349. package/dist/lib/create-poll.js +1 -1
  350. package/dist/lib/create-poll.js.map +1 -1
  351. package/dist/lib/external-link.js +1 -1
  352. package/dist/lib/external-link.js.map +1 -1
  353. package/dist/lib/fast-icon.js +1 -1
  354. package/dist/lib/theme-css.js +1 -1
  355. package/dist/lib/theme-engine-light.js +1 -1
  356. package/dist/lib/theme-projection.js +2 -2
  357. package/dist/lib/theme-records.js +1 -1
  358. package/dist/lib/themes.js +1 -1
  359. package/dist/lib/themes.js.map +1 -1
  360. package/dist/lib/tooltip-focus-gate.js.map +1 -1
  361. package/dist/lib/utils.js +1 -1
  362. package/dist/vite/source-parser.js +1 -1
  363. package/dist/vite/tailwind-sources.js +1 -1
  364. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"shell-top-bar.js","names":["<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>","<Separator\n orientation=\"vertical\"\n data-slot=\"shell-top-bar-divider\"\n aria-hidden=\"true\"\n class=\"data-[orientation=vertical]:h-5\"\n />","orientation=\"vertical\"","class=\"data-[orientation=vertical]:h-5\"","<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>","<div class=\"min-w-0 flex-1\" aria-hidden=\"true\" />","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 )}","_$setAttribute"],"sources":["../../../../src/components/layout/shell-top-bar/shell-top-bar.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { children, Show, omit } 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' | 'draggable'> &\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 = props\n const rest = omit(\n 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,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,cACA,iBACA,aACA,eACA,wBACA,gBACA,cACA,UACA,WACA,aACA,cACA,gBACA,OACF;CAKA,MAAM,aAAa,eAAe,MAAM,UAAU;CAClD,MAAM,gBAAgB,eAAe,MAAM,aAAa;CACxD,MAAM,YAAY,eAAe,MAAM,SAAS;CAChD,MAAM,aAAa,eAAe,MAAM,UAAU;CAClD,MAAM,SAAS,eAAe,MAAM,MAAM;CAC1C,MAAM,UAAU,eAAe,MAAM,OAAO;CAG1C,IAAA,OAAA,OAiFQ;CA9DN,IAAA,QAAA,KAAA;;;;CAnBF,IAAA,QAAA,MAAA;;;;;CAiBE,OAAA,MAAA,CAAA;EAhBA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAIL,0JACA,kBAAkB,KAAK,GAEvB,MAAM,aAAa,iCAAiC,mCACpD,MAAM,KACR;EAAC;EAC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AA;GAEM,OAAA,KAAA,IADJC,QAAgD,IADlD,KAAA;EAEM;CAAC,EAAA,CAAD,GAhERD,KAiFQ;CAjFR,OAAA,aAiEE;;GAAY,OAAA,CAAA,CAAA,OAAO;EAOb,CAAA;EAPN,aAAA;GAOM,OAAA,KAAA,WANJ;IAKK,IAAA,SAAA,QAAA;IALL,OAAA,QAIG,MACE;IALL,OAAA;GAKK,EAAA,CAAA,IANP,KAAA;EAOM;CAAC,EAAA,CAAD,GAxERA,KAiFQ;CAjFR,OAAA,aAyEE;;GAAY,OAAA,CAAA,CAAA,QAAQ;EAOd,CAAA;EAPN,aAAA;GAOM,OAAA,KAAA,WANJ;IAKK,IAAA,SAAA,QAAA;IALL,OAAA,QAIG,OACE;IALL,OAAA;GAKK,EAAA,CAAA,IANP,KAAA;EAOM;CAAC,EAAA,CAAD,GAhFRA,MAiFQ;CA5DJ,aAAA;;GAAmB,GAAA,MAAM,cAAc,SAAS;GAChDE,GAAAA,YAAO,GACL,sIAGA,MAAM,gBACH,MAAM,uBACH,4FACA,6FACR,CAAC;EATsD;CAAvD,IAAA,EAAA,GAAA,KAAA,QAAA;EAAuD,MAAA,KAAA,KAAAC,aAAA,OAAA,qBAAA,CAAA;EACvD,UAAA,OAAA,GAAA,KAAA,CAQC;CATsD,CAAA;CAtB7D,OACEH;AAmFJ"}
1
+ {"version":3,"file":"shell-top-bar.js","names":["<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>","<Separator\n orientation=\"vertical\"\n data-slot=\"shell-top-bar-divider\"\n aria-hidden=\"true\"\n class=\"data-[orientation=vertical]:h-5\"\n />","orientation=\"vertical\"","class=\"data-[orientation=vertical]:h-5\"","<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>","<div class=\"min-w-0 flex-1\" aria-hidden=\"true\" />","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 )}","_$spread","_$insert","_$effect","_$setAttribute","_$className"],"sources":["../../../../src/components/layout/shell-top-bar/shell-top-bar.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { children, Show, omit } 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' | 'draggable'> &\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 = props\n const rest = omit(\n 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,SAAgB,YAAY,OAAyB;CACnD,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,cACA,iBACA,aACA,eACA,wBACA,gBACA,cACA,UACA,WACA,aACA,cACA,gBACA,OACF;CAKA,MAAM,aAAa,eAAe,MAAM,UAAU;CAClD,MAAM,gBAAgB,eAAe,MAAM,aAAa;CACxD,MAAM,YAAY,eAAe,MAAM,SAAS;CAChD,MAAM,aAAa,eAAe,MAAM,UAAU;CAClD,MAAM,SAAS,eAAe,MAAM,MAAM;CAC1C,MAAM,UAAU,eAAe,MAAM,OAAO;CAG1C,IAAA,OAAA,OAiFQ;CA9DN,IAAA,QAAA,KAAA;;;;CAnBF,IAAA,QAAA,MAAA;;;;;CAiBEO,OAAA,MAAA,CAAA;EAhBA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAIL,0JACA,kBAAkB,KAAK,GAEvB,MAAM,aAAa,iCAAiC,mCACpD,MAAM,KACR;EAAC;EACD,IAAA,QAAA;GACE,OAAA,MAAM,iBAAiB,KAAA,IACnB,KAAA,IACA,EAAE,yBAAyB,GAAG,MAAM,aAAa,IAAI;EAC3D;CACQ,GAAJ,IAAA,GAAA,IAAA;CAEJC,OAAA,cAaE;;G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CAAA;EAPN,aAAA;GAOM,OAAA,KAAA,WANJ;IAKK,IAAA,SAAA,QAAA;IALLA,OAAA,QAIG,MACE;IALL,OAAA;GAKK,EAAA,CAAA,IANP,KAAA;EAOM;CAAC,EAAA,CAAD,GAxERJ,KAiFQ;CAjFRI,OAAA,aAyEE;;GAAY,OAAA,CAAA,CAAA,QAAQ;EAOd,CAAA;EAPN,aAAA;GAOM,OAAA,KAAA,WANJ;IAKK,IAAA,SAAA,QAAA;IALLA,OAAA,QAIG,OACE;IALL,OAAA;GAKK,EAAA,CAAA,IANP,KAAA;EAOM;CAAC,EAAA,CAAD,GAhFRJ,MAiFQ;CA5DJK,aAAA;;GAAmB,GAAA,MAAM,cAAc,SAAS;GAChDH,GAAAA,YAAO,GACL,sIAGA,MAAM,gBACH,MAAM,uBACH,4FACA,6FACR,CAAC;EATsD;CAAvD,IAAA,EAAA,GAAA,KAAA,QAAA;EAAuD,MAAA,KAAA,KAAAI,aAAA,OAAA,qBAAA,CAAA;EACvDC,UAAA,OAAA,GAAA,KAAA,CAQC;CATsD,CAAA;CAtB7D,OACEP;AAmFJ"}
@@ -1,9 +1,9 @@
1
+ import { Dynamic, Portal, applyRef, className, createComponent, effect, insert, memo, mergeProps, readShallow, ref, setStyleProperty, spread, template } from "@solidjs/web";
2
+ import { Show, children, createMemo, createSignal, omit, useContext } from "solid-js";
1
3
  import { tooltipTip } from "../../../lib/overlay.js";
2
4
  import { cn } from "../../../lib/utils.js";
3
5
  import { KbdChord } from "../../ui/kbd/kbd.js";
4
6
  import { SideRailContext } from "./side-rail-context.js";
5
- import { Dynamic, Portal, applyRef, className, createComponent, effect, insert, memo, mergeProps, readShallow, ref, setStyleProperty, spread, template } from "@solidjs/web";
6
- import { Show, children, createMemo, createSignal, omit, useContext } from "solid-js";
7
7
  // src/components/layout/side-rail/side-rail.tsx
8
8
  var _tmpl$ = /* @__PURE__ */ template(`<div>`);
9
9
  var _tmpl$2 = /* @__PURE__ */ template(`<div><!><!>`);
@@ -1 +1 @@
1
- {"version":3,"file":"side-rail.js","names":["<Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />","<SideRailContext 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>","<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>","as=\"nav\"","<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 />","<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 />","<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 />","<Show when={local.label}>\n {(labelSlot) => (\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 {labelSlot()}\n </div>\n )}\n </Show>","<div data-slot=\"side-rail-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <Show when={local.label}>\n {(labelSlot) => (\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 {labelSlot()}\n </div>\n )}\n </Show>\n {local.children}\n </div>","<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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>\n </div>\n </Portal>\n )}\n </Show>","<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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>\n </div>\n </Portal>","<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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>\n </div>","<Show when={props.shortcut}>\n {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>","<KbdChord keys={shortcut()} class=\"shrink-0\" />","class=\"shrink-0\"","top: `${position.top}px`","left: `${position.left}px`","height: `${position.height}px`","class={cn('flex size-5 shrink-0 items-center justify-center [&_svg]:size-5', {\n 'text-primary': props.active,\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 {(badgeSlot) => (\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 {badgeSlot()}\n </span>\n )}\n </Show>\n\n <Show when={trailing() === undefined && local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>\n\n <Show when={trailing()}>\n {(trailingSlot) => <span class=\"ms-auto shrink-0\">{trailingSlot()}</span>}\n </Show>\n </Polymorphic>","ref={tip.setRow}","<Show when={local.badge}>\n {(badgeSlot) => (\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 {badgeSlot()}\n </span>\n )}\n </Show>","<Show when={trailing() === undefined && local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>","trailing() === undefined && local.shortcut","<KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"\n />","size=\"compact\"","class=\"shrink-0 opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"","<Show when={trailing()}>\n {(trailingSlot) => <span class=\"ms-auto shrink-0\">{trailingSlot()}</span>}\n </Show>","<RailTip\n position={tip.position()}\n icon={local.children}\n label={local.label}\n active={local.active}\n shortcut={local.shortcut}\n />","type=\"button\"","<Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>","<RailTip position={tip.position()} icon={local.children} label={local.label} />","_$readShallow","_$setStyleProperty","resolveChildren"],"sources":["../../../../src/components/layout/side-rail/side-rail.tsx"],"sourcesContent":["import type { ComponentProps, JSX, ValidComponent } from '@solidjs/web'\nimport {\n children as resolveChildren,\n Show,\n createMemo,\n createSignal,\n omit,\n useContext,\n} from 'solid-js'\nimport { Dynamic, Portal } from '@solidjs/web'\nimport { tooltipTip } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { KbdChord } from '../../ui/kbd'\nimport { SideRailContext } from './side-rail-context'\n\n/**\n * The props of `T` with `Props` laid over them, plus `as`: the shape of the\n * polymorphic props these components have always taken.\n */\nexport type PolymorphicProps<T extends ValidComponent, Props extends object = {}> = Omit<\n ComponentProps<T>,\n keyof Props | 'as'\n> &\n Props & { as?: T | keyof JSX.IntrinsicElements }\n\n/** Renders the caller's `as`, which arrives in the spread props, or the default tag. */\nfunction Polymorphic(props: Record<string, unknown> & { as?: ValidComponent }) {\n return <Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />\n}\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 = props as SideRailProps\n const rest = omit(props as SideRailProps, 'class', 'collapsed', 'aria-label', 'children')\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 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>\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 = props\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(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 {(labelSlot) => (\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 {labelSlot()}\n </div>\n )}\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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\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 = props as SideRailItemProps\n const rest = omit(\n 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 const trailing = resolveChildren(() => local.trailing)\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 {(badgeSlot) => (\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 {badgeSlot()}\n </span>\n )}\n </Show>\n\n <Show when={trailing() === undefined && local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>\n\n <Show when={trailing()}>\n {(trailingSlot) => <span class=\"ms-auto shrink-0\">{trailingSlot()}</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 = props\n const rest = omit(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 {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>\n </button>\n\n <RailTip position={tip.position()} icon={local.children} label={local.label} />\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,SAAS,YAAY,OAA0D;CAC7E,OAAOA,gBAAAA,SAAAA,WAAAA,EAAS,IAAA,YAAA;EAAW,OAAA,MAAM,MAAM;CAAK,EAA0B,SAAxB;EAAI,OAAA,KAAK,OAAO,IAAI;CAAC,CAAG,CAAA;AACxE;AA4BA,SAAgB,SAA2C,OAAyB;CAClF,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAwB,SAAS,aAAa,cAAc,UAAU;CAExF,MAAM,YAAY,iBA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AJ,IAAA,GAAA,IAAA;EAbJ,IAAA,SAAK,IAAI;EAAT,OAAA,WAAA,cAAA,MAAA,QAAA,MAAe,IAAfT,UAAAA;;EAAe,GAAfA,MAAe,IAAf,IAAS,SAATA;EAeA,OAAA,cACE;GAAC,OAAA,MAAM;EAAQ,CACX;EACN,OAAA,cACE;GAAC,OAAA,MAAM;EAAK,CACR;EAtBR,OAAA,QAuBEU,gBAAAA,MAAAA;GAAM,IAAA,OAAA;IAAM,OAAA,MAAM;GAAQ;GAA1BA,WACI,aACAN,gBAAAA,UAAAA;IACE,IAAA,OAAA;KAAM,OAAA,SAAS;IAAC;IAChBC,MAAK;IACLC,OAAM;GACP,CAAA;EAEC,CAAA,GA/BR,IAgCQ;EAhCR,OAAA;CAgCQ,EAAA,CAAA,GAERK,gBAAAA,SAAAA;EAAS,IAAA,WAAA;GAAU,OAAA,IAAI,SAAS;EAAC;EAAE,IAAA,OAAA;GAAM,OAAA,MAAM;EAAQ;EAAE,IAAA,QAAA;GAAO,OAAA,MAAM;EAAK;CAAG,CAAA,CAlC/E;AAqCL"}
1
+ {"version":3,"file":"side-rail.js","names":["<Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />","<SideRailContext 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>","<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>","as=\"nav\"","<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 />","<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 />","<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 />","<Show when={local.label}>\n {(labelSlot) => (\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 {labelSlot()}\n </div>\n )}\n </Show>","<div data-slot=\"side-rail-section\" class={cn('flex flex-col gap-0.5', local.class)} {...rest}>\n <Show when={local.label}>\n {(labelSlot) => (\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 {labelSlot()}\n </div>\n )}\n </Show>\n {local.children}\n </div>","<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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>\n </div>\n </Portal>\n )}\n </Show>","<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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>\n </div>\n </Portal>","<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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>\n </div>","<Show when={props.shortcut}>\n {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\n </Show>","<KbdChord keys={shortcut()} class=\"shrink-0\" />","class=\"shrink-0\"","top: `${position.top}px`","left: `${position.left}px`","height: `${position.height}px`","class={cn('flex size-5 shrink-0 items-center justify-center [&_svg]:size-5', {\n 'text-primary': props.active,\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 {(badgeSlot) => (\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 {badgeSlot()}\n </span>\n )}\n </Show>\n\n <Show when={trailing() === undefined && local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>\n\n <Show when={trailing()}>\n {(trailingSlot) => <span class=\"ms-auto shrink-0\">{trailingSlot()}</span>}\n </Show>\n </Polymorphic>","ref={tip.setRow}","<Show when={local.badge}>\n {(badgeSlot) => (\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 {badgeSlot()}\n </span>\n )}\n </Show>","<Show when={trailing() === undefined && local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>","trailing() === undefined && local.shortcut","<KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"\n />","size=\"compact\"","class=\"shrink-0 opacity-0 transition-opacity group-hover/rail-item:opacity-100 group-focus-visible/rail-item:opacity-100 group-data-[collapsed=true]/rail:hidden\"","<Show when={trailing()}>\n {(trailingSlot) => <span class=\"ms-auto shrink-0\">{trailingSlot()}</span>}\n </Show>","<RailTip\n position={tip.position()}\n icon={local.children}\n label={local.label}\n active={local.active}\n shortcut={local.shortcut}\n />","type=\"button\"","<Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>","<RailTip position={tip.position()} icon={local.children} label={local.label} />","_$spread","_$insert","_$effect","_$readShallow","_$className","_$setStyleProperty","resolveChildren"],"sources":["../../../../src/components/layout/side-rail/side-rail.tsx"],"sourcesContent":["import type { ComponentProps, JSX, ValidComponent } from '@solidjs/web'\nimport {\n children as resolveChildren,\n Show,\n createMemo,\n createSignal,\n omit,\n useContext,\n} from 'solid-js'\nimport { Dynamic, Portal } from '@solidjs/web'\nimport { tooltipTip } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { KbdChord } from '../../ui/kbd'\nimport { SideRailContext } from './side-rail-context'\n\n/**\n * The props of `T` with `Props` laid over them, plus `as`: the shape of the\n * polymorphic props these components have always taken.\n */\nexport type PolymorphicProps<T extends ValidComponent, Props extends object = {}> = Omit<\n ComponentProps<T>,\n keyof Props | 'as'\n> &\n Props & { as?: T | keyof JSX.IntrinsicElements }\n\n/** Renders the caller's `as`, which arrives in the spread props, or the default tag. */\nfunction Polymorphic(props: Record<string, unknown> & { as?: ValidComponent }) {\n return <Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />\n}\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 = props as SideRailProps\n const rest = omit(props as SideRailProps, 'class', 'collapsed', 'aria-label', 'children')\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 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>\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 = props\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(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 {(labelSlot) => (\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 {labelSlot()}\n </div>\n )}\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 {(shortcut) => <KbdChord keys={shortcut()} class=\"shrink-0\" />}\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 = props as SideRailItemProps\n const rest = omit(\n 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 const trailing = resolveChildren(() => local.trailing)\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 {(badgeSlot) => (\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 {badgeSlot()}\n </span>\n )}\n </Show>\n\n <Show when={trailing() === undefined && local.shortcut}>\n {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>\n\n <Show when={trailing()}>\n {(trailingSlot) => <span class=\"ms-auto shrink-0\">{trailingSlot()}</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 = props\n const rest = omit(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 {(shortcut) => (\n <KbdChord\n keys={shortcut()}\n size=\"compact\"\n class=\"shrink-0 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 )}\n </Show>\n </button>\n\n <RailTip position={tip.position()} icon={local.children} label={local.label} />\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,SAAS,YAAY,OAA0D;CAC7E,OAAOA,gBAAAA,SAAAA,WAAAA,EAAS,IAAA,YAAA;EAAW,OAAA,MAAM,MAAM;CAAK,EAA0B,SAAxB;EAAI,OAAA,KAAK,OAAO,IAAI;CAAC,CAAG,CAAA;AACxE;AA4BA,SAAgB,SAA2C,OAAyB;CAClF,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAwB,SAAS,aAAa,cAAc,UAAU;CAExF,MAAM,YAAY,iBAAiB,MAAM,aAAa,KAAK;CAC3D,MAAM,QAAQ;EACZ;EACA,OAAO,iBAAkB,UAAU,IAAI,sBAAsB,4BAA6B;CAC5F;CAEA,OACEC,gBAAAA,iBAAAA;EAAwB;EAAxB,IAAA,WAAA;GACEC,OAAAA,gBAAAA,aAAAA,WAAAA;IACEC,IAAG;IACH,IAAA,eAAA;KAAY,OAAA,MAAM,iBAAiB;IAAS;IAI5C,IAAA,mBAAA;KAAgB,OAAA,UAAU,IAAI,SAAS;IAAO;IAC9C,IAAA,UAAA;KAAO,OAAA,GACL,8GACA,4CACA;MAAE,UAAU,UAAU;MAAG,mBAAmB,CAAC,UAAU;KAAE,GACzD,MAAM,KACR;IAAC;GAIU,GAHN,MAbP,EAAA,IAAA,WAAA;IAeG,OAAA,MAAM;GACI,EAAA,CAAA,CAAA;EACE;;AAErB;;AAGA,SAAgB,eAAe,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AA,SAAAA;EAAS,IAAA,WAAA;GAAU,OAAA,IAAI,SAAS;EAAC;EAAE,IAAA,OAAA;GAAM,OAAA,MAAM;EAAQ;EAAE,IAAA,QAAA;GAAO,OAAA,MAAM;EAAK;CAAG,CAAA,CAlC/E;AAqCL"}
@@ -1,5 +1,5 @@
1
- import { PixelResizeHandle } from "../pixel-resize-handle/pixel-resize-handle.js";
2
1
  import { createComponent, mergeProps } from "@solidjs/web";
2
+ import { PixelResizeHandle } from "../pixel-resize-handle/pixel-resize-handle.js";
3
3
  // src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx
4
4
  /** Keep the established left-sidebar API as a thin adapter over the shared edge ruler. */
5
5
  function SidebarNavResizeHandle(props) {
@@ -1,10 +1,10 @@
1
+ import { Dynamic, className, createComponent, effect, insert, memo, mergeProps, readShallow, setAttribute, spread, template } from "@solidjs/web";
2
+ import { ChevronRight as ChevronRight$1 } from "@lucide/solid";
3
+ import { Show, createSignal, omit } from "solid-js";
1
4
  import { callHandler } from "../../../lib/events.js";
2
5
  import { cn } from "../../../lib/utils.js";
3
6
  import { sidebarNavItemClass, sidebarNavItemStateClass } from "./sidebar-nav-classes.js";
4
7
  import { fastIcon } from "../../../lib/fast-icon.js";
5
- import { Dynamic, className, createComponent, effect, insert, memo, mergeProps, readShallow, setAttribute, spread, template } from "@solidjs/web";
6
- import { ChevronRight } from "@lucide/solid";
7
- import { Show, createSignal, omit } from "solid-js";
8
8
  // src/components/layout/sidebar-nav/sidebar-nav.tsx
9
9
  var _tmpl$ = /* @__PURE__ */ template(`<div>`);
10
10
  var _tmpl$2 = /* @__PURE__ */ template(`<span class="min-w-0 flex-1 truncate text-start">`);
@@ -25,7 +25,7 @@ function Polymorphic(props) {
25
25
  return omit(props, "as");
26
26
  }));
27
27
  }
28
- var ChevronRight$1 = fastIcon(ChevronRight);
28
+ var ChevronRight = fastIcon(ChevronRight$1);
29
29
  function SidebarNav(props) {
30
30
  const local = props;
31
31
  const rest = omit(props, "class", "aria-label", "children");
@@ -104,7 +104,7 @@ function SidebarNavSection(props) {
104
104
  memo(() => {
105
105
  return memo(() => {
106
106
  return !!local.collapsible;
107
- })() ? createComponent(ChevronRight$1, {
107
+ })() ? createComponent(ChevronRight, {
108
108
  "aria-hidden": "true",
109
109
  get "class"() {
110
110
  return cn("size-3.5 shrink-0 text-muted-foreground transition-transform ease-out", { "rotate-90": open() });
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-nav.js","names":["<Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />","<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>","as=\"nav\"","<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 />","<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 />","as=\"div\"","<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 />","<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 />","<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>","<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 />","<Show when={local.count !== undefined}>\n {/* A string: this Solid 2 build inserts a dynamic `0` as empty text. */}\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{String(local.count)}</span>\n </Show>","<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() ? 'true' : 'false'}\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>","local.headingAs ? local.label : undefined","<Show when={local.collapsible} fallback={heading}>\n <button\n {...(triggerRest as ComponentProps<'button'>)}\n type=\"button\"\n aria-expanded={open() ? 'true' : 'false'}\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>","type=\"button\"","onClick={(event) => {\n callHandler(trigger.onClick, event)\n if (event.defaultPrevented) return\n setOpen(!open())\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 }}","<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() ? 'true' : 'false'}\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 {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\n </Show>\n </div>","<Show when={local.action}>\n {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\n </Show>","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 )}","<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() ? 'true' : 'false'}\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 {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\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>","<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 {(actionsSlot) => (\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 {actionsSlot()}\n </span>\n )}\n </Show>\n </div>","<Show when={local.actions}>\n {(actionsSlot) => (\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 {actionsSlot()}\n </span>\n )}\n </Show>","<span\n data-slot=\"sidebar-nav-label\"\n class={cn('min-w-0 flex-1 truncate text-start', local.class)}\n {...rest}\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 {(trailingSlot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{trailingSlot()}</span>\n )}\n </Show>\n </Polymorphic>","as=\"a\"","local.children","<Show when={local.trailing}>\n {(trailingSlot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{trailingSlot()}</span>\n )}\n </Show>","<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>","ChevronRight","LucideChevronRight","_$readShallow","_$setAttribute"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav.tsx"],"sourcesContent":["import { ChevronRight as LucideChevronRight } from '@lucide/solid'\nimport type { ComponentProps, JSX, ValidComponent } from '@solidjs/web'\nimport { Dynamic } from '@solidjs/web'\nimport { Show, createSignal, omit } from 'solid-js'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { sidebarNavItemClass, sidebarNavItemStateClass } from './sidebar-nav-classes'\nimport { fastIcon } from '#lib/fast-icon'\n\n/**\n * The props of `T` with `Props` laid over them, plus `as`: the shape of the\n * polymorphic props these components have always taken.\n */\nexport type PolymorphicProps<T extends ValidComponent, Props extends object = {}> = Omit<\n ComponentProps<T>,\n keyof Props | 'as'\n> &\n Props & { as?: T | keyof JSX.IntrinsicElements }\n\n/** Renders the caller's `as`, which arrives in the spread props, or the default tag. */\nfunction Polymorphic(props: Record<string, unknown> & { as?: ValidComponent }) {\n return <Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />\n}\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronRight = fastIcon(LucideChevronRight)\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 = props as SidebarNavProps\n const rest = omit(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 = props\n const rest = omit(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 = props as SidebarNavTitleProps\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(\n 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 = local.triggerProps ?? {}\n const triggerRest = omit(local.triggerProps ?? {}, 'onClick', 'onKeyDown', 'onReorder')\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 {/* A string: this Solid 2 build inserts a dynamic `0` as empty text. */}\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{String(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() ? 'true' : 'false'}\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 {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\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 = props\n const rest = omit(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 {(actionsSlot) => (\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 {actionsSlot()}\n </span>\n )}\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 = props\n const rest = omit(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 = props as SidebarNavItemProps\n const rest = omit(\n 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 {(trailingSlot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{trailingSlot()}</span>\n )}\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 = props\n const rest = omit(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":";;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,YAAY,OAA0D;CAC7E,OAAOA,gBAAAA,SAAAA,WAAAA,EAAS,IAAA,YAAA;EAA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A,QAAwD,YAAqB;IAA7E,OAAA;GAA6E,EAAA,CAAA;EAE3E,CAAA,CALP;CAMY,EAAA,CAAA,CAAA;AAEjB;;AAGA,SAAgB,iBAAiB,OAAiC;CAChE,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,UAAU;CAG1C,IAAA,SAAA,QAWQ;CAHN,OAAA,QAAA,CAAA;EAPAb,MAAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,qBACA,yBAAyB,MACzB,2DACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CARN,OAAA,cAUE;EAAC,OAAA,MAAM;CAAQ,CACT;CAZV,OACEc;AAaJ"}
1
+ {"version":3,"file":"sidebar-nav.js","names":["<Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />","<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>","as=\"nav\"","<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 />","<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 />","as=\"div\"","<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 />","<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 />","<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>","<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 />","<Show when={local.count !== undefined}>\n {/* A string: this Solid 2 build inserts a dynamic `0` as empty text. */}\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{String(local.count)}</span>\n </Show>","<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() ? 'true' : 'false'}\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>","local.headingAs ? local.label : undefined","<Show when={local.collapsible} fallback={heading}>\n <button\n {...(triggerRest as ComponentProps<'button'>)}\n type=\"button\"\n aria-expanded={open() ? 'true' : 'false'}\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>","type=\"button\"","onClick={(event) => {\n callHandler(trigger.onClick, event)\n if (event.defaultPrevented) return\n setOpen(!open())\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 }}","<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() ? 'true' : 'false'}\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 {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\n </Show>\n </div>","<Show when={local.action}>\n {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\n </Show>","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 )}","<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() ? 'true' : 'false'}\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 {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\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>","<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 {(actionsSlot) => (\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 {actionsSlot()}\n </span>\n )}\n </Show>\n </div>","<Show when={local.actions}>\n {(actionsSlot) => (\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 {actionsSlot()}\n </span>\n )}\n </Show>","<span\n data-slot=\"sidebar-nav-label\"\n class={cn('min-w-0 flex-1 truncate text-start', local.class)}\n {...rest}\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 {(trailingSlot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{trailingSlot()}</span>\n )}\n </Show>\n </Polymorphic>","as=\"a\"","local.children","<Show when={local.trailing}>\n {(trailingSlot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{trailingSlot()}</span>\n )}\n </Show>","<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>","LucideChevronRight","_$spread","_$insert","_$effect","_$readShallow","_$className","_$setAttribute"],"sources":["../../../../src/components/layout/sidebar-nav/sidebar-nav.tsx"],"sourcesContent":["import { ChevronRight as LucideChevronRight } from '@lucide/solid'\nimport type { ComponentProps, JSX, ValidComponent } from '@solidjs/web'\nimport { Dynamic } from '@solidjs/web'\nimport { Show, createSignal, omit } from 'solid-js'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { sidebarNavItemClass, sidebarNavItemStateClass } from './sidebar-nav-classes'\nimport { fastIcon } from '#lib/fast-icon'\n\n/**\n * The props of `T` with `Props` laid over them, plus `as`: the shape of the\n * polymorphic props these components have always taken.\n */\nexport type PolymorphicProps<T extends ValidComponent, Props extends object = {}> = Omit<\n ComponentProps<T>,\n keyof Props | 'as'\n> &\n Props & { as?: T | keyof JSX.IntrinsicElements }\n\n/** Renders the caller's `as`, which arrives in the spread props, or the default tag. */\nfunction Polymorphic(props: Record<string, unknown> & { as?: ValidComponent }) {\n return <Dynamic component={props.as ?? 'div'} {...omit(props, 'as')} />\n}\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronRight = fastIcon(LucideChevronRight)\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 = props as SidebarNavProps\n const rest = omit(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 = props\n const rest = omit(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 = props as SidebarNavTitleProps\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(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 = props\n const rest = omit(\n 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 = local.triggerProps ?? {}\n const triggerRest = omit(local.triggerProps ?? {}, 'onClick', 'onKeyDown', 'onReorder')\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 {/* A string: this Solid 2 build inserts a dynamic `0` as empty text. */}\n <span class=\"shrink-0 tabular-nums text-muted-foreground\">{String(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() ? 'true' : 'false'}\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 {(actionSlot) => (\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 {actionSlot()}\n </span>\n )}\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 = props\n const rest = omit(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 {(actionsSlot) => (\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 {actionsSlot()}\n </span>\n )}\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 = props\n const rest = omit(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 = props as SidebarNavItemProps\n const rest = omit(\n 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 {(trailingSlot) => (\n <span class=\"ms-auto flex shrink-0 items-center gap-1\">{trailingSlot()}</span>\n )}\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 = props\n const rest = omit(props, 'class', 'children')\n\n return (\n <button\n type=\"button\"\n class={cn(\n sidebarNavItemClass,\n sidebarNavItemStateClass.idle,\n 'w-full disabled:p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KACR;EAAC;CASU,GARN,MAXP,EAAA,IAAA,WAAA;EAYC,OAAA,CACEC,WAAAA;GAAM,OAAA,MAAA;EAAO,CAAA,GACdC,gBAAAA,MAAAA;GAAM,IAAA,OAAA;IAAM,OAAA,MAAM;GAAQ;GAA1BA,WACI,wBACA;IAA6E,IAAA,SAAA,SAAA;IAA7EI,OAAA,QAAwD,YAAqB;IAA7E,OAAA;GAA6E,EAAA,CAAA;EAE3E,CAAA,CALP;CAMY,EAAA,CAAA,CAAA;AAEjB;;AAGA,SAAgB,iBAAiB,OAAiC;CAChE,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,UAAU;CAG1C,IAAA,SAAA,QAWQ;CAHND,OAAA,QAAA,CAAA;EAPAhB,MAAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,qBACA,yBAAyB,MACzB,2DACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CARNiB,OAAA,cAUE;EAAC,OAAA,MAAM;CAAQ,CACT;CAZV,OACEH;AAaJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"pane-focus.js","names":[],"sources":["../../../../src/components/layout/split-layout/pane-focus.ts"],"sourcesContent":["// How a pane takes focus: on hover (the pointer moving onto it activates it, so the keys typed\n// next go to it) or on click. The choice is a device preference kept in `localStorage`, shared by\n// every pane surface: SplitLayout reads it by default, and a host's own pane (a floating window,\n// for instance) calls `focusPaneOnHover` from its `pointermove` to behave the same way.\n\nexport type PaneFocusMode = 'hover' | 'click'\n\nconst STORAGE_KEY = 'adea:pane-focus-mode:v1'\n\n// One shared copy, because the preference reaches the page from more than one bundle.\ntype PaneFocusState = { value: PaneFocusMode | undefined; listeners: Set<() => void> }\nconst STATE_KEY = Symbol.for('adea.ui.pane-focus-mode')\nconst state: PaneFocusState = ((globalThis as Record<symbol, unknown>)[STATE_KEY] ??= {\n value: undefined,\n listeners: new Set<() => void>(),\n}) as PaneFocusState\n\nfunction storage(): Pick<Storage, 'getItem' | 'setItem' | 'removeItem'> | undefined {\n try {\n return typeof localStorage === 'undefined' ? undefined : localStorage\n } catch {\n return undefined\n }\n}\n\n/** How panes take focus: on hover unless the person chose click. */\nexport function paneFocusMode(): PaneFocusMode {\n if (state.value === undefined) {\n let saved: string | null = null\n try {\n saved = storage()?.getItem(STORAGE_KEY) ?? null\n } catch {\n // Unreadable storage means the default.\n }\n state.value = saved === 'click' ? 'click' : 'hover'\n }\n return state.value\n}\n\nexport function setPaneFocusMode(value: PaneFocusMode): void {\n state.value = value\n try {\n if (value === 'hover') storage()?.removeItem(STORAGE_KEY)\n else storage()?.setItem(STORAGE_KEY, value)\n } catch {\n // The choice still applies for this session.\n }\n for (const listener of state.listeners) listener()\n}\n\n/** Calls `listener` after the choice changes; returns the way to stop. */\nexport function subscribePaneFocusMode(listener: () => void): () => void {\n state.listeners.add(listener)\n return () => state.listeners.delete(listener)\n}\n\n/** A pane's own element that takes the keys when hover activates it (a terminal's input, say). */\nexport const PANE_FOCUS_TARGET = '[data-pane-focus-target]'\n\n// Focus inside an open overlay is never taken by a pane the pointer passes over.\nconst OVERLAY = '[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"]'\nconst EDITABLE = 'input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]'\n\n// The element each pane last had focus in, so hovering back returns the keys to it.\nconst lastFocused = new WeakMap<HTMLElement, HTMLElement>()\n\n/** Remembers where focus is inside `pane`; call from the pane's `focusin`. */\nexport function rememberPaneFocus(pane: HTMLElement, target: EventTarget | null): void {\n if (target instanceof HTMLElement && target !== pane && pane.contains(target))\n lastFocused.set(pane, target)\n}\n\ntype PointerLike = Pick<PointerEvent, 'pointerType' | 'buttons' | 'movementX' | 'movementY'>\n\n/**\n * Whether the pointer moving over `pane` should activate it. Only a real mouse move with no button\n * held counts: a touch, a pen tap, a drag, a selection or content shifting under a still pointer\n * does not. Focus already inside the pane, inside an open overlay, or in a text field that is in\n * no pane (no `[data-pane-id]` ancestor) and outside `scope` stays where it is.\n */\nexport function hoverTakesFocus(event: PointerLike, pane: HTMLElement, scope?: Element): boolean {\n if (event.pointerType !== 'mouse' || event.buttons !== 0) return false\n if (event.movementX === 0 && event.movementY === 0) return false\n const active = pane.ownerDocument.activeElement\n if (!active || active === pane.ownerDocument.body) return true\n if (pane.contains(active)) return false\n if (active.closest(OVERLAY)) return false\n const inPane = active.closest('[data-pane-id]') !== null || (scope?.contains(active) ?? false)\n return inPane || !active.matches(EDITABLE)\n}\n\n/**\n * Moves focus into `pane` as a hover activation: back to the element it last had focus in, else\n * its `data-pane-focus-target`, else the pane itself. The pane's `focusin` then marks it active.\n * Returns whether focus moved.\n */\nexport function focusPaneOnHover(\n event: PointerLike,\n pane: HTMLElement,\n options: { scope?: Element; mode?: PaneFocusMode } = {}\n): boolean {\n if ((options.mode ?? paneFocusMode()) !== 'hover') return false\n if (!hoverTakesFocus(event, pane, options.scope)) return false\n const remembered = lastFocused.get(pane)\n const target =\n (remembered?.isConnected && pane.contains(remembered) ? remembered : undefined) ??\n pane.querySelector<HTMLElement>(PANE_FOCUS_TARGET) ??\n pane\n target.focus({ preventScroll: true })\n return pane.contains(pane.ownerDocument.activeElement)\n}\n"],"mappings":";AAOA,IAAM,cAAc;AAIpB,IAAM,YAAY,OAAO,IAAI,yBAAyB;AACtD,IAAM,QAAyB,WAAwC,eAAe;CACpF,OAAO,KAAA;CACP,2BAAW,IAAI,IAAgB;AACjC;AAEA,SAAS,UAA2E;CAClF,IAAI;EACF,OAAO,OAAO,iBAAiB,cAAc,KAAA,IAAY;CAC3D,QAAQ;EACN;CACF;AACF;;AAGA,SAAgB,gBAA+B;CAC7C,IAAI,MAAM,UAAU,KAAA,GAAW;EAC7B,IAAI,QAAuB;EAC3B,IAAI;GACF,QAAQ,QAAQ,CAAC,EAAE,QAAQ,WAAW,KAAK;EAC7C,QAAQ,CAER;EACA,MAAM,QAAQ,UAAU,UAAU,UAAU;CAC9C;CACA,OAAO,MAAM;AACf;AA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AAK,SAAS,UAAU,IAAI,aAAa,KAAA,MACrE,KAAK,cAAA,0BAA4C,KACjD,KAAA,CACK,MAAM,EAAE,eAAe,KAAK,CAAC;CACpC,OAAO,KAAK,SAAS,KAAK,cAAc,aAAa;AACvD"}
1
+ {"version":3,"file":"pane-focus.js","names":[],"sources":["../../../../src/components/layout/split-layout/pane-focus.ts"],"sourcesContent":["// How a pane takes focus: on hover (the pointer moving onto it activates it, so the keys typed\n// next go to it) or on click. The choice is a device preference kept in `localStorage`, shared by\n// every pane surface: SplitLayout reads it by default, and a host's own pane (a floating window,\n// for instance) calls `focusPaneOnHover` from its `pointermove` to behave the same way.\n\nexport type PaneFocusMode = 'hover' | 'click'\n\nconst STORAGE_KEY = 'adea:pane-focus-mode:v1'\n\n// One shared copy, because the preference reaches the page from more than one bundle.\ntype PaneFocusState = { value: PaneFocusMode | undefined; listeners: Set<() => void> }\nconst STATE_KEY = Symbol.for('adea.ui.pane-focus-mode')\nconst state: PaneFocusState = ((globalThis as Record<symbol, unknown>)[STATE_KEY] ??= {\n value: undefined,\n listeners: new Set<() => void>(),\n}) as PaneFocusState\n\nfunction storage(): Pick<Storage, 'getItem' | 'setItem' | 'removeItem'> | undefined {\n try {\n return typeof localStorage === 'undefined' ? undefined : localStorage\n } catch {\n return undefined\n }\n}\n\n/** How panes take focus: on hover unless the person chose click. */\nexport function paneFocusMode(): PaneFocusMode {\n if (state.value === undefined) {\n let saved: string | null = null\n try {\n saved = storage()?.getItem(STORAGE_KEY) ?? null\n } catch {\n // Unreadable storage means the default.\n }\n state.value = saved === 'click' ? 'click' : 'hover'\n }\n return state.value\n}\n\nexport function setPaneFocusMode(value: PaneFocusMode): void {\n state.value = value\n try {\n if (value === 'hover') storage()?.removeItem(STORAGE_KEY)\n else storage()?.setItem(STORAGE_KEY, value)\n } catch {\n // The choice still applies for this session.\n }\n for (const listener of state.listeners) listener()\n}\n\n/** Calls `listener` after the choice changes; returns the way to stop. */\nexport function subscribePaneFocusMode(listener: () => void): () => void {\n state.listeners.add(listener)\n return () => state.listeners.delete(listener)\n}\n\n/** A pane's own element that takes the keys when hover activates it (a terminal's input, say). */\nexport const PANE_FOCUS_TARGET = '[data-pane-focus-target]'\n\n// Focus inside an open overlay is never taken by a pane the pointer passes over.\nconst OVERLAY = '[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"]'\nconst EDITABLE = 'input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]'\n\n// The element each pane last had focus in, so hovering back returns the keys to it.\nconst lastFocused = new WeakMap<HTMLElement, HTMLElement>()\n\n/** Remembers where focus is inside `pane`; call from the pane's `focusin`. */\nexport function rememberPaneFocus(pane: HTMLElement, target: EventTarget | null): void {\n if (target instanceof HTMLElement && target !== pane && pane.contains(target))\n lastFocused.set(pane, target)\n}\n\ntype PointerLike = Pick<PointerEvent, 'pointerType' | 'buttons' | 'movementX' | 'movementY'>\n\n/**\n * Whether the pointer moving over `pane` should activate it. Only a real mouse move with no button\n * held counts: a touch, a pen tap, a drag, a selection or content shifting under a still pointer\n * does not. Focus already inside the pane, inside an open overlay, or in a text field that is in\n * no pane (no `[data-pane-id]` ancestor) and outside `scope` stays where it is.\n */\nexport function hoverTakesFocus(event: PointerLike, pane: HTMLElement, scope?: Element): boolean {\n if (event.pointerType !== 'mouse' || event.buttons !== 0) return false\n if (event.movementX === 0 && event.movementY === 0) return false\n const active = pane.ownerDocument.activeElement\n if (!active || active === pane.ownerDocument.body) return true\n if (pane.contains(active)) return false\n if (active.closest(OVERLAY)) return false\n const inPane = active.closest('[data-pane-id]') !== null || (scope?.contains(active) ?? false)\n return inPane || !active.matches(EDITABLE)\n}\n\n/**\n * Moves focus into `pane` as a hover activation: back to the element it last had focus in, else\n * its `data-pane-focus-target`, else the pane itself. The pane's `focusin` then marks it active.\n * Returns whether focus moved.\n */\nexport function focusPaneOnHover(\n event: PointerLike,\n pane: HTMLElement,\n options: { scope?: Element; mode?: PaneFocusMode } = {}\n): boolean {\n if ((options.mode ?? paneFocusMode()) !== 'hover') return false\n if (!hoverTakesFocus(event, pane, options.scope)) return false\n const remembered = lastFocused.get(pane)\n const target =\n (remembered?.isConnected && pane.contains(remembered) ? remembered : undefined) ??\n pane.querySelector<HTMLElement>(PANE_FOCUS_TARGET) ??\n pane\n target.focus({ preventScroll: true })\n return pane.contains(pane.ownerDocument.activeElement)\n}\n"],"mappings":";AAOA,IAAM,cAAc;AAIpB,IAAM,YAAY,OAAO,IAAI,yBAAyB;AACtD,IAAM,QAA0B,WAAuC,eAAe;CACpF,OAAO,KAAA;CACP,2BAAW,IAAI,IAAgB;AACjC;AAEA,SAAS,UAA2E;CAClF,IAAI;EACF,OAAO,OAAO,iBAAiB,cAAc,KAAA,IAAY;CAC3D,QAAQ;EACN;CACF;AACF;;AAGA,SAAgB,gBAA+B;CAC7C,IAAI,MAAM,UAAU,KAAA,GAAW;EAC7B,IAAI,QAAuB;EAC3B,IAAI;GACF,QAAQ,QAAQ,CAAC,EAAE,QAAQ,WAAW,KAAK;EAC7C,QAAQ,CAER;EACA,MAAM,QAAQ,UAAU,UAAU,UAAU;CAC9C;CACA,OAAO,MAAM;AACf;AAEA,SAAgB,iBAAiB,OAA4B;CAC3D,MAAM,QAAQ;CACd,IAAI;EACF,IAAI,UAAU,SAAS,QAAQ,CAAC,EAAE,WAAW,WAAW;OACnD,QAAQ,CAAC,EAAE,QAAQ,aAAa,KAAK;CAC5C,QAAQ,CAER;CACA,KAAK,MAAM,YAAY,MAAM,WAAW,SAAS;AACnD;;AAGA,SAAgB,uBAAuB,UAAkC;CACvE,MAAM,UAAU,IAAI,QAAQ;CAC5B,aAAa,MAAM,UAAU,OAAO,QAAQ;AAC9C;;AAGA,IAAa,oBAAoB;AAGjC,IAAM,UAAU;AAChB,IAAM,WAAW;AAGjB,IAAM,8BAAc,IAAI,QAAkC;;AAG1D,SAAgB,kBAAkB,MAAmB,QAAkC;CACrF,IAAI,kBAAkB,eAAe,WAAW,QAAQ,KAAK,SAAS,MAAM,GAC1E,YAAY,IAAI,MAAM,MAAM;AAChC;;;;;;;AAUA,SAAgB,gBAAgB,OAAoB,MAAmB,OAA0B;CAC/F,IAAI,MAAM,gBAAgB,WAAW,MAAM,YAAY,GAAG,OAAO;CACjE,IAAI,MAAM,cAAc,KAAK,MAAM,cAAc,GAAG,OAAO;CAC3D,MAAM,SAAS,KAAK,cAAc;CAClC,IAAI,CAAC,UAAU,WAAW,KAAK,cAAc,MAAM,OAAO;CAC1D,IAAI,KAAK,SAAS,MAAM,GAAG,OAAO;CAClC,IAAI,OAAO,QAAQ,OAAO,GAAG,OAAO;CAEpC,OADe,OAAO,QAAQ,gBAAgB,MAAM,SAAS,OAAO,SAAS,MAAM,KAAK,UACvE,CAAC,OAAO,QAAQ,QAAQ;AAC3C;;;;;;AAOA,SAAgB,iBACd,OACA,MACA,UAAqD,CAAC,GAC7C;CACT,KAAK,QAAQ,QAAQ,cAAc,OAAO,SAAS,OAAO;CAC1D,IAAI,CAAC,gBAAgB,OAAO,MAAM,QAAQ,KAAK,GAAG,OAAO;CACzD,MAAM,aAAa,YAAY,IAAI,IAAI;CAKvC,EAHG,YAAY,eAAe,KAAK,SAAS,UAAU,IAAI,aAAa,KAAA,MACrE,KAAK,cAAA,0BAA4C,KACjD,KAAA,CACK,MAAM,EAAE,eAAe,KAAK,CAAC;CACpC,OAAO,KAAK,SAAS,KAAK,cAAc,aAAa;AACvD"}
@@ -1,6 +1,6 @@
1
- import { MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, clampSplitRatio, listLeaves } from "./tree.js";
2
1
  import { className, delegateEvents, effect, readShallow, ref, setAttribute, style, template } from "@solidjs/web";
3
2
  import { createSignal, onCleanup } from "solid-js";
3
+ import { MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, clampSplitRatio, listLeaves } from "./tree.js";
4
4
  // src/components/layout/split-layout/resize-controller-core-retry.tsx
5
5
  var _tmpl$ = /* @__PURE__ */ template(`<div class="pointer-events-none absolute min-h-0 min-w-0"><div role=separator tabindex=0 data-split-layout-handle>`);
6
6
  var KEYBOARD_DELTA = .05;