@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":"top-bar.js","names":["<header\n data-slot=\"top-bar\"\n class={cn(\n 'h-topbar relative z-(--z-sticky) grid shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b border-border bg-card text-card-foreground md:grid-cols-[minmax(0,1fr)_clamp(240px,22vw,480px)_minmax(0,1fr)]',\n /* The bar is its own container so its children can move to a second\n row by the row's width in rem, which enlarged text shrinks. The\n first row keeps the bar's height (less the 1px bottom border); the\n second only exists when the centre has dropped onto it. */\n local.centerWidth === 'wide' &&\n '@container/top-bar h-auto grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] grid-rows-[minmax(calc(var(--topbar-height)-1px),auto)] gap-x-2 gap-y-0 md:grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] xl:grid-cols-[minmax(0,1fr)_clamp(240px,32vw,672px)_minmax(0,1fr)] [&>:nth-child(2)]:@max-[19rem]/top-bar:col-span-full [&>:nth-child(2)]:@max-[19rem]/top-bar:row-start-2 [&>:nth-child(2)]:@max-[19rem]/top-bar:pb-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-span-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-start-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:row-start-1',\n windowChromeClass(local),\n local.class\n )}\n {...rest}\n />","onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}","<div\n data-slot=\"top-bar-section\"\n class={cn(\n 'window-no-drag flex min-w-0 items-center gap-2 overflow-x-auto overflow-y-hidden',\n local.align === 'end' && 'md:justify-end-safe',\n local.align !== 'end' && 'justify-start',\n local.class\n )}\n onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}\n {...rest}\n />","<div\n data-slot=\"top-bar-title\"\n class={cn(\n /* The title slot sits in the drag region; a link, button or field\n placed in it (a breadcrumb, a view's search) must stay pressable. */\n 'truncate text-sm font-medium [&_:is(a,button,input)]:window-no-drag',\n local.align === 'center' && 'text-center',\n local.class\n )}\n {...rest}\n />","<div\n data-slot=\"top-bar-breadcrumb\"\n class={cn(\n 'flex min-w-0 items-center gap-1.5 text-sm [&_:is(a,button,input)]:window-no-drag',\n local.class\n )}\n {...rest}\n />","type=\"button\"","<Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />","class=\"size-4 shrink-0 sm:hidden\"","<button\n type=\"button\"\n data-slot=\"top-bar-search\"\n class={cn(\n 'text-muted-foreground flex h-control-md w-full min-w-(--control-height-md) items-center justify-center gap-2 rounded-md border border-input px-3 text-sm sm:justify-start',\n 'transition-colors ease-out outline-none',\n 'hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag',\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n <Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />\n <span class=\"sr-only sm:not-sr-only sm:truncate\">{local.placeholder ?? 'Search'}</span>\n <Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />\n )}\n </Show>\n </button>","<Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />\n )}\n </Show>","<KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />","class=\"ms-auto hidden shrink-0 sm:inline-flex\"","<button\n type=\"button\"\n data-slot=\"top-bar-pill\"\n class={cn(\n 'text-muted-foreground inline-flex h-control-sm shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs font-medium',\n 'transition-colors ease-out outline-none',\n 'hover:border-input hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag [&_svg]:size-3.5 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <span>{local.label}</span>\n </button>","Search","LucideSearch"],"sources":["../../../../src/components/layout/top-bar/top-bar.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { Search as LucideSearch } from '@lucide/solid'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { KbdChord } from '../../ui/kbd'\nimport { windowChromeClass, type WindowChromeProps } from './window-chrome'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Search = fastIcon(LucideSearch)\n\n/**\n * TopBar.\n *\n * The window's title row and primary toolbar. Three tracks: a leading group, a\n * centred search, and a trailing group. On wide screens the search is a fixed\n * function of the window width and the side groups are equal remainders. On\n * narrow screens the middle track yields space to the controls, and each side\n * group scrolls when necessary so keyboard focus can reveal every action.\n *\n * The centre track is sized for a lone search field. A bar whose centre holds\n * more than that, such as a search plus an action beside it, passes\n * `centerWidth=\"wide\"`: the centre then stays fluid below 1280px, with each\n * side group sized to its content but capped between 30% and 40% of the row\n * (a longer group scrolls instead): the cap is 30% on the narrowest rows and\n * grows to 40% as the row widens, so full side groups never squeeze the\n * centre's search out of it and enlarged text never pushes a short leading\n * control such as a navigation toggle out of the row. Above 1280px it takes a\n * wider fixed track.\n *\n * A wide bar also never squeezes its centre to nothing. When the row is\n * narrower than 19rem (measured in rem, so enlarged text reaches it at a wider\n * window) the centre moves to a second row of its own and the two side groups\n * share the first, the trailing group taking the remainder beside the leading\n * group's cap, so the leading and trailing controls and the whole centre each\n * keep a full row instead of fighting for one. The bar grows from one row\n * to two only then. The wide layout places the leading group, centre and\n * trailing group as its first, second and third children.\n *\n * On a frameless desktop window this row is also the drag region, so it carries\n * `window-drag` and the controls inside it opt back out. `macos-inset` and\n * `windows-inset` reserve the space the native window controls occupy, which is\n * why the row can look off-centre in a frameless window and be correct: it is\n * centred in the space the user can actually see.\n */\nexport type TopBarProps = Omit<ComponentProps<'header'>, 'draggable'> &\n WindowChromeProps & {\n /**\n * How wide the centre track is. `field` (default) suits a lone search field.\n * `wide` suits a centre that also holds an action: fluid below 1280px between\n * side groups sized to their content and capped between 30% and 40% of the\n * row (a longer group scrolls), then a clamp of 32vw up to 672px between equal\n * side tracks.\n * Below a 19rem row the centre drops to a second row of its own.\n */\n centerWidth?: 'field' | 'wide'\n }\n\nexport function TopBar(props: TopBarProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'draggable',\n 'macosInset',\n 'windowsInset',\n 'glass',\n 'centerWidth'\n )\n\n return (\n <header\n data-slot=\"top-bar\"\n class={cn(\n 'h-topbar relative z-(--z-sticky) grid shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b border-border bg-card text-card-foreground md:grid-cols-[minmax(0,1fr)_clamp(240px,22vw,480px)_minmax(0,1fr)]',\n /* The bar is its own container so its children can move to a second\n row by the row's width in rem, which enlarged text shrinks. The\n first row keeps the bar's height (less the 1px bottom border); the\n second only exists when the centre has dropped onto it. */\n local.centerWidth === 'wide' &&\n '@container/top-bar h-auto grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] grid-rows-[minmax(calc(var(--topbar-height)-1px),auto)] gap-x-2 gap-y-0 md:grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] xl:grid-cols-[minmax(0,1fr)_clamp(240px,32vw,672px)_minmax(0,1fr)] [&>:nth-child(2)]:@max-[19rem]/top-bar:col-span-full [&>:nth-child(2)]:@max-[19rem]/top-bar:row-start-2 [&>:nth-child(2)]:@max-[19rem]/top-bar:pb-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-span-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-start-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:row-start-1',\n windowChromeClass(local),\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A scrollable side group; equal wide-screen tracks centre the search. */\nexport function TopBarSection(props: ComponentProps<'div'> & { align?: 'start' | 'end' }) {\n const local = props\n const rest = omit(props, 'class', 'align', 'onFocusIn')\n\n return (\n <div\n data-slot=\"top-bar-section\"\n class={cn(\n 'window-no-drag flex min-w-0 items-center gap-2 overflow-x-auto overflow-y-hidden',\n local.align === 'end' && 'md:justify-end-safe',\n local.align !== 'end' && 'justify-start',\n local.class\n )}\n onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}\n {...rest}\n />\n )\n}\n\nexport function TopBarTitle(\n props: ComponentProps<'div'> & {\n /** Aligns text within this slot; it does not position the slot. */\n align?: 'start' | 'center'\n }\n) {\n const local = props\n const rest = omit(props, 'class', 'align')\n return (\n <div\n data-slot=\"top-bar-title\"\n class={cn(\n /* The title slot sits in the drag region; a link, button or field\n placed in it (a breadcrumb, a view's search) must stay pressable. */\n 'truncate text-sm font-medium [&_:is(a,button,input)]:window-no-drag',\n local.align === 'center' && 'text-center',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A breadcrumb or path readout that yields to the actions when space runs out. */\nexport function TopBarBreadcrumb(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"top-bar-breadcrumb\"\n class={cn(\n 'flex min-w-0 items-center gap-1.5 text-sm [&_:is(a,button,input)]:window-no-drag',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TopBarSearchProps = ComponentProps<'button'> & {\n /** The hint shown inside the field, e.g. \"Search projects and files\". */\n placeholder?: string\n /** The shortcut chip drawn at the trailing edge, e.g. \"⌘K\". */\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+K`. The chip is\n * `aria-hidden` — reading it out would pollute the button's accessible\n * name — so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n}\n\n/**\n * The search affordance in the middle track.\n *\n * It is a button, not an input, and that is deliberate: clicking it opens the\n * command palette, which already owns the input, the ranking and the keyboard\n * handling. A second live input here would be a second source of truth for the\n * same query. It is styled to read as a field because that is what it behaves\n * like from the user's side.\n */\nexport function TopBarSearch(props: TopBarSearchProps) {\n const local = props\n const rest = omit(props, 'class', 'placeholder', 'shortcut', 'keyshortcuts')\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-search\"\n class={cn(\n 'text-muted-foreground flex h-control-md w-full min-w-(--control-height-md) items-center justify-center gap-2 rounded-md border border-input px-3 text-sm sm:justify-start',\n 'transition-colors ease-out outline-none',\n 'hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag',\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n <Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />\n <span class=\"sr-only sm:not-sr-only sm:truncate\">{local.placeholder ?? 'Search'}</span>\n <Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />\n )}\n </Show>\n </button>\n )\n}\n\n/**\n * A labelled top-bar control — the readouts KiroCrew puts in the trailing\n * group. Container queries on the group decide which of these survive a narrow\n * window; a caller marks the cheap-to-drop ones and the group handles the rest.\n */\nexport function TopBarPill(props: ComponentProps<'button'> & { label: string }) {\n const local = props\n const rest = omit(props, 'class', 'label', 'children')\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-pill\"\n class={cn(\n 'text-muted-foreground inline-flex h-control-sm shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs font-medium',\n 'transition-colors ease-out outline-none',\n 'hover:border-input hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag [&_svg]:size-3.5 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\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A,GAAA,IAAA;CAXN,OAAA,aAaE;EAAC,OAAA,MAAM;CAAQ,GAbjBO,KAeQ;CADN,OAAA,aAAM;EAAC,OAAA,MAAM;CAAK,CAAO;CAf7B,OACEA;AAiBJ"}
1
+ {"version":3,"file":"top-bar.js","names":["<header\n data-slot=\"top-bar\"\n class={cn(\n 'h-topbar relative z-(--z-sticky) grid shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b border-border bg-card text-card-foreground md:grid-cols-[minmax(0,1fr)_clamp(240px,22vw,480px)_minmax(0,1fr)]',\n /* The bar is its own container so its children can move to a second\n row by the row's width in rem, which enlarged text shrinks. The\n first row keeps the bar's height (less the 1px bottom border); the\n second only exists when the centre has dropped onto it. */\n local.centerWidth === 'wide' &&\n '@container/top-bar h-auto grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] grid-rows-[minmax(calc(var(--topbar-height)-1px),auto)] gap-x-2 gap-y-0 md:grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] xl:grid-cols-[minmax(0,1fr)_clamp(240px,32vw,672px)_minmax(0,1fr)] [&>:nth-child(2)]:@max-[19rem]/top-bar:col-span-full [&>:nth-child(2)]:@max-[19rem]/top-bar:row-start-2 [&>:nth-child(2)]:@max-[19rem]/top-bar:pb-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-span-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-start-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:row-start-1',\n windowChromeClass(local),\n local.class\n )}\n {...rest}\n />","onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}","<div\n data-slot=\"top-bar-section\"\n class={cn(\n 'window-no-drag flex min-w-0 items-center gap-2 overflow-x-auto overflow-y-hidden',\n local.align === 'end' && 'md:justify-end-safe',\n local.align !== 'end' && 'justify-start',\n local.class\n )}\n onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}\n {...rest}\n />","<div\n data-slot=\"top-bar-title\"\n class={cn(\n /* The title slot sits in the drag region; a link, button or field\n placed in it (a breadcrumb, a view's search) must stay pressable. */\n 'truncate text-sm font-medium [&_:is(a,button,input)]:window-no-drag',\n local.align === 'center' && 'text-center',\n local.class\n )}\n {...rest}\n />","<div\n data-slot=\"top-bar-breadcrumb\"\n class={cn(\n 'flex min-w-0 items-center gap-1.5 text-sm [&_:is(a,button,input)]:window-no-drag',\n local.class\n )}\n {...rest}\n />","type=\"button\"","<Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />","class=\"size-4 shrink-0 sm:hidden\"","<button\n type=\"button\"\n data-slot=\"top-bar-search\"\n class={cn(\n 'text-muted-foreground flex h-control-md w-full min-w-(--control-height-md) items-center justify-center gap-2 rounded-md border border-input px-3 text-sm sm:justify-start',\n 'transition-colors ease-out outline-none',\n 'hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag',\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n <Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />\n <span class=\"sr-only sm:not-sr-only sm:truncate\">{local.placeholder ?? 'Search'}</span>\n <Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />\n )}\n </Show>\n </button>","<Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />\n )}\n </Show>","<KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />","class=\"ms-auto hidden shrink-0 sm:inline-flex\"","<button\n type=\"button\"\n data-slot=\"top-bar-pill\"\n class={cn(\n 'text-muted-foreground inline-flex h-control-sm shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs font-medium',\n 'transition-colors ease-out outline-none',\n 'hover:border-input hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag [&_svg]:size-3.5 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <span>{local.label}</span>\n </button>","LucideSearch","_$spread","_$insert"],"sources":["../../../../src/components/layout/top-bar/top-bar.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { Show, omit } from 'solid-js'\nimport { Search as LucideSearch } from '@lucide/solid'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { KbdChord } from '../../ui/kbd'\nimport { windowChromeClass, type WindowChromeProps } from './window-chrome'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Search = fastIcon(LucideSearch)\n\n/**\n * TopBar.\n *\n * The window's title row and primary toolbar. Three tracks: a leading group, a\n * centred search, and a trailing group. On wide screens the search is a fixed\n * function of the window width and the side groups are equal remainders. On\n * narrow screens the middle track yields space to the controls, and each side\n * group scrolls when necessary so keyboard focus can reveal every action.\n *\n * The centre track is sized for a lone search field. A bar whose centre holds\n * more than that, such as a search plus an action beside it, passes\n * `centerWidth=\"wide\"`: the centre then stays fluid below 1280px, with each\n * side group sized to its content but capped between 30% and 40% of the row\n * (a longer group scrolls instead): the cap is 30% on the narrowest rows and\n * grows to 40% as the row widens, so full side groups never squeeze the\n * centre's search out of it and enlarged text never pushes a short leading\n * control such as a navigation toggle out of the row. Above 1280px it takes a\n * wider fixed track.\n *\n * A wide bar also never squeezes its centre to nothing. When the row is\n * narrower than 19rem (measured in rem, so enlarged text reaches it at a wider\n * window) the centre moves to a second row of its own and the two side groups\n * share the first, the trailing group taking the remainder beside the leading\n * group's cap, so the leading and trailing controls and the whole centre each\n * keep a full row instead of fighting for one. The bar grows from one row\n * to two only then. The wide layout places the leading group, centre and\n * trailing group as its first, second and third children.\n *\n * On a frameless desktop window this row is also the drag region, so it carries\n * `window-drag` and the controls inside it opt back out. `macos-inset` and\n * `windows-inset` reserve the space the native window controls occupy, which is\n * why the row can look off-centre in a frameless window and be correct: it is\n * centred in the space the user can actually see.\n */\nexport type TopBarProps = Omit<ComponentProps<'header'>, 'draggable'> &\n WindowChromeProps & {\n /**\n * How wide the centre track is. `field` (default) suits a lone search field.\n * `wide` suits a centre that also holds an action: fluid below 1280px between\n * side groups sized to their content and capped between 30% and 40% of the\n * row (a longer group scrolls), then a clamp of 32vw up to 672px between equal\n * side tracks.\n * Below a 19rem row the centre drops to a second row of its own.\n */\n centerWidth?: 'field' | 'wide'\n }\n\nexport function TopBar(props: TopBarProps) {\n const local = props\n const rest = omit(\n props,\n 'class',\n 'draggable',\n 'macosInset',\n 'windowsInset',\n 'glass',\n 'centerWidth'\n )\n\n return (\n <header\n data-slot=\"top-bar\"\n class={cn(\n 'h-topbar relative z-(--z-sticky) grid shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b border-border bg-card text-card-foreground md:grid-cols-[minmax(0,1fr)_clamp(240px,22vw,480px)_minmax(0,1fr)]',\n /* The bar is its own container so its children can move to a second\n row by the row's width in rem, which enlarged text shrinks. The\n first row keeps the bar's height (less the 1px bottom border); the\n second only exists when the centre has dropped onto it. */\n local.centerWidth === 'wide' &&\n '@container/top-bar h-auto grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] grid-rows-[minmax(calc(var(--topbar-height)-1px),auto)] gap-x-2 gap-y-0 md:grid-cols-[fit-content(max(30%,min(40%,calc(50%-3.75rem))))_minmax(0,1fr)_fit-content(max(30%,min(40%,calc(50%-3.75rem))))] xl:grid-cols-[minmax(0,1fr)_clamp(240px,32vw,672px)_minmax(0,1fr)] [&>:nth-child(2)]:@max-[19rem]/top-bar:col-span-full [&>:nth-child(2)]:@max-[19rem]/top-bar:row-start-2 [&>:nth-child(2)]:@max-[19rem]/top-bar:pb-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-span-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:col-start-2 [&>:nth-child(3)]:@max-[19rem]/top-bar:row-start-1',\n windowChromeClass(local),\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A scrollable side group; equal wide-screen tracks centre the search. */\nexport function TopBarSection(props: ComponentProps<'div'> & { align?: 'start' | 'end' }) {\n const local = props\n const rest = omit(props, 'class', 'align', 'onFocusIn')\n\n return (\n <div\n data-slot=\"top-bar-section\"\n class={cn(\n 'window-no-drag flex min-w-0 items-center gap-2 overflow-x-auto overflow-y-hidden',\n local.align === 'end' && 'md:justify-end-safe',\n local.align !== 'end' && 'justify-start',\n local.class\n )}\n onFocusIn={(event) => {\n if (event.target instanceof HTMLElement) {\n event.target.scrollIntoView({ block: 'nearest', inline: 'nearest' })\n }\n callHandler(local.onFocusIn, event)\n }}\n {...rest}\n />\n )\n}\n\nexport function TopBarTitle(\n props: ComponentProps<'div'> & {\n /** Aligns text within this slot; it does not position the slot. */\n align?: 'start' | 'center'\n }\n) {\n const local = props\n const rest = omit(props, 'class', 'align')\n return (\n <div\n data-slot=\"top-bar-title\"\n class={cn(\n /* The title slot sits in the drag region; a link, button or field\n placed in it (a breadcrumb, a view's search) must stay pressable. */\n 'truncate text-sm font-medium [&_:is(a,button,input)]:window-no-drag',\n local.align === 'center' && 'text-center',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/** A breadcrumb or path readout that yields to the actions when space runs out. */\nexport function TopBarBreadcrumb(props: ComponentProps<'div'>) {\n const local = props\n const rest = omit(props, 'class')\n return (\n <div\n data-slot=\"top-bar-breadcrumb\"\n class={cn(\n 'flex min-w-0 items-center gap-1.5 text-sm [&_:is(a,button,input)]:window-no-drag',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TopBarSearchProps = ComponentProps<'button'> & {\n /** The hint shown inside the field, e.g. \"Search projects and files\". */\n placeholder?: string\n /** The shortcut chip drawn at the trailing edge, e.g. \"⌘K\". */\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+K`. The chip is\n * `aria-hidden` — reading it out would pollute the button's accessible\n * name — so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n}\n\n/**\n * The search affordance in the middle track.\n *\n * It is a button, not an input, and that is deliberate: clicking it opens the\n * command palette, which already owns the input, the ranking and the keyboard\n * handling. A second live input here would be a second source of truth for the\n * same query. It is styled to read as a field because that is what it behaves\n * like from the user's side.\n */\nexport function TopBarSearch(props: TopBarSearchProps) {\n const local = props\n const rest = omit(props, 'class', 'placeholder', 'shortcut', 'keyshortcuts')\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-search\"\n class={cn(\n 'text-muted-foreground flex h-control-md w-full min-w-(--control-height-md) items-center justify-center gap-2 rounded-md border border-input px-3 text-sm sm:justify-start',\n 'transition-colors ease-out outline-none',\n 'hover:bg-surface-hover hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag',\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n <Search aria-hidden=\"true\" class=\"size-4 shrink-0 sm:hidden\" />\n <span class=\"sr-only sm:not-sr-only sm:truncate\">{local.placeholder ?? 'Search'}</span>\n <Show when={local.shortcut}>\n {(shortcut) => (\n <KbdChord keys={shortcut()} class=\"ms-auto hidden shrink-0 sm:inline-flex\" />\n )}\n </Show>\n </button>\n )\n}\n\n/**\n * A labelled top-bar control — the readouts KiroCrew puts in the trailing\n * group. Container queries on the group decide which of these survive a narrow\n * window; a caller marks the cheap-to-drop ones and the group handles the rest.\n */\nexport function TopBarPill(props: ComponentProps<'button'> & { label: string }) {\n const local = props\n const rest = omit(props, 'class', 'label', 'children')\n\n return (\n <button\n type=\"button\"\n data-slot=\"top-bar-pill\"\n class={cn(\n 'text-muted-foreground inline-flex h-control-sm shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs font-medium',\n 'transition-colors ease-out outline-none',\n 'hover:border-input hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'window-no-drag [&_svg]:size-3.5 [&_svg]:shrink-0',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <span>{local.label}</span>\n </button>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAUA,IAAM,SAAS,SAASa,QAAY;AAiDpC,SAAgB,OAAO,OAAoB;CACzC,MAAM,QAAQ;CACd,MAAM,OAAO,KACX,OACA,SACA,aACA,cACA,gBACA,SACA,aACF;CAGE,IAAA,OAAA,OAcC;CADCC,OAAA,MAAA,CAAA;EAZA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,yOAKA,MAAM,gBAAgB,UACpB,+sBACF,kBAAkB,KAAK,GACvB,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,KAAA;CAdR,OACEd;AAgBJ;;AAGA,SAAgB,cAAc,OAA4D;CACxF,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,SAAS,WAAW;CAGpD,IAAA,QAAA,QAeC;CADCc,OAAA,OAAA,CAAA;EAbA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,oFACA,MAAM,UAAU,SAAS,uBACzB,MAAM,UAAU,SAAS,iBACzB,MAAM,KACR;EAAC;EACDb,YAAY,UAAU;GACpB,IAAI,MAAM,kBAAkB,aAC1B,MAAM,OAAO,eAAe;IAAE,OAAO;IAAW,QAAQ;GAAU,CAAC;GAErE,YAAY,MAAM,WAAW,KAAK;EACpC;CACQ,GAAJ,IAAA,GAAA,KAAA;CAfR,O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GAAC;GAAEC,OAAM;EAA0C,CAAA;CAE1E,CAAA,GApBRH,KAqBQ;CAtBV,OACEA;AAuBJ;;;;;;AAOA,SAAgB,WAAW,OAAqD;CAC9E,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,SAAS,UAAU;CAGnD,IAAA,QAAA,QAeQ;CADN,IAAA,QAAA,MAAA;CAHAM,OAAA,OAAA,CAAA;EAVAT,MAAAA;EACA,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GACL,2IACA,2CACA,4CACA,oFACA,oDACA,MAAM,KACR;EAAC;CACO,GAAJ,IAAA,GAAA,IAAA;CAXNU,OAAA,aAaE;EAAC,OAAA,MAAM;CAAQ,GAbjBH,KAeQ;CADNG,OAAA,aAAM;EAAC,OAAA,MAAM;CAAK,CAAO;CAf7B,OACEH;AAiBJ"}
@@ -1,6 +1,6 @@
1
- import { cn } from "../../../lib/utils.js";
2
1
  import { className, effect, insert, readShallow, setStyleProperty, spread, template } from "@solidjs/web";
3
2
  import { omit } from "solid-js";
3
+ import { cn } from "../../../lib/utils.js";
4
4
  // src/components/layout/virtual-window/virtual-window.tsx
5
5
  var _tmpl$ = /* @__PURE__ */ template(`<div><div data-slot=virtual-window-content>`);
6
6
  function finitePixels(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-window.js","names":["transform: `translateY(${finitePixels(local.offset ?? 0)})`","<div\n {...rest}\n data-slot=\"virtual-window-space\"\n class={cn('relative', local.class)}\n style={{ height: finitePixels(Math.max(0, local.totalSize)) }}\n >\n <div\n data-slot=\"virtual-window-content\"\n class={local.contentClass}\n style={{ transform: `translateY(${finitePixels(local.offset ?? 0)})` }}\n >\n {local.children}\n </div>\n </div>","_$readShallow","_$setStyleProperty"],"sources":["../../../../src/components/layout/virtual-window/virtual-window.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { omit } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * VirtualWindow.\n *\n * Supplies the two geometry wrappers a virtualized viewport needs: a full-height\n * scroll space and a translated window containing the mounted rows. The caller\n * owns the scroll region, its semantics, keyboard model, and range calculation;\n * this component only keeps those rows at their measured position.\n */\nexport type VirtualWindowProps = Omit<ComponentProps<'div'>, 'children' | 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /** The full scrollable height, in pixels. */\n totalSize: number\n /** The mounted window's top offset from the start of the full list, in pixels. */\n offset?: number\n /** Optional layout classes for the translated row container. */\n contentClass?: string\n children?: JSX.Element\n}\n\nfunction finitePixels(value: number): string {\n return `${Number.isFinite(value) ? value : 0}px`\n}\n\nexport function VirtualWindow(props: VirtualWindowProps) {\n const local = props\n const rest = omit(props, 'class', 'children', 'totalSize', 'offset', 'contentClass', 'style')\n\n return (\n <div\n {...rest}\n data-slot=\"virtual-window-space\"\n class={cn('relative', local.class)}\n style={{ height: finitePixels(Math.max(0, local.totalSize)) }}\n >\n <div\n data-slot=\"virtual-window-content\"\n class={local.contentClass}\n style={{ transform: `translateY(${finitePixels(local.offset ?? 0)})` }}\n >\n {local.children}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;AAwBA,SAAS,aAAa,OAAuB;CAC3C,OAAO,GAAG,OAAO,SAAS,KAAK,IAAI,QAAQ,EAAE;AAC/C;AAEA,SAAgB,cAAc,OAA2B;CACvD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,YAAY,aAAa,UAAU,gBAAgB,OAAO;CAG1F,IAAA,OAAA,OAaK;CAPH,IAAA,QAAA,KAAA;CALI,OAAA,MAAA,CAAA,MAAA;EACJ,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,YAAY,MAAM,KAAK;EAAC;EAClC,IAAA,QAAA;GAAO,OAAA,EAAE,QAAQ,aAAa,KAAK,IAAI,GAAG,MAAM,SAAS,CAAC,EAAE;EAAC;;CAE7D,OAAA,aAKE;EAAC,OAAA,MAAM;CAAQ,CACZ;CAJH,aAAA;;GAAO,GAAAE,YAAA,MAAM,YAAY;GAChBF,GAAW,cAAc,aAAa,MAAM,UAAU,CAAC,EAAE;EADzC;CAAzB,IAAA,EAAA,GAAA,KAAA,QAAA;EAAyB,UAAA,OAAA,GAAA,KAAA,CAAA;EAChB,MAAA,KAAA,KAAAG,iBAAA,OAAA,aAAA,CAA0D;CAD1C,CAAA;CAT/B,OACEF;AAeJ"}
1
+ {"version":3,"file":"virtual-window.js","names":["transform: `translateY(${finitePixels(local.offset ?? 0)})`","<div\n {...rest}\n data-slot=\"virtual-window-space\"\n class={cn('relative', local.class)}\n style={{ height: finitePixels(Math.max(0, local.totalSize)) }}\n >\n <div\n data-slot=\"virtual-window-content\"\n class={local.contentClass}\n style={{ transform: `translateY(${finitePixels(local.offset ?? 0)})` }}\n >\n {local.children}\n </div>\n </div>","_$spread","_$insert","_$effect","_$readShallow","_$className","_$setStyleProperty"],"sources":["../../../../src/components/layout/virtual-window/virtual-window.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from '@solidjs/web'\nimport { omit } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * VirtualWindow.\n *\n * Supplies the two geometry wrappers a virtualized viewport needs: a full-height\n * scroll space and a translated window containing the mounted rows. The caller\n * owns the scroll region, its semantics, keyboard model, and range calculation;\n * this component only keeps those rows at their measured position.\n */\nexport type VirtualWindowProps = Omit<ComponentProps<'div'>, 'children' | 'style'> & {\n /** JSX style props are owned by this geometry primitive. */\n style?: never\n /** The full scrollable height, in pixels. */\n totalSize: number\n /** The mounted window's top offset from the start of the full list, in pixels. */\n offset?: number\n /** Optional layout classes for the translated row container. */\n contentClass?: string\n children?: JSX.Element\n}\n\nfunction finitePixels(value: number): string {\n return `${Number.isFinite(value) ? value : 0}px`\n}\n\nexport function VirtualWindow(props: VirtualWindowProps) {\n const local = props\n const rest = omit(props, 'class', 'children', 'totalSize', 'offset', 'contentClass', 'style')\n\n return (\n <div\n {...rest}\n data-slot=\"virtual-window-space\"\n class={cn('relative', local.class)}\n style={{ height: finitePixels(Math.max(0, local.totalSize)) }}\n >\n <div\n data-slot=\"virtual-window-content\"\n class={local.contentClass}\n style={{ transform: `translateY(${finitePixels(local.offset ?? 0)})` }}\n >\n {local.children}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;AAwBA,SAAS,aAAa,OAAuB;CAC3C,OAAO,GAAG,OAAO,SAAS,KAAK,IAAI,QAAQ,EAAE;AAC/C;AAEA,SAAgB,cAAc,OAA2B;CACvD,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,SAAS,YAAY,aAAa,UAAU,gBAAgB,OAAO;CAG1F,IAAA,OAAA,OAaK;CAPH,IAAA,QAAA,KAAA;CALIE,OAAA,MAAA,CAAA,MAAA;EACJ,aAAA;EACA,IAAA,UAAA;GAAO,OAAA,GAAG,YAAY,MAAM,KAAK;EAAC;EAClC,IAAA,QAAA;GAAO,OAAA,EAAE,QAAQ,aAAa,KAAK,IAAI,GAAG,MAAM,SAAS,CAAC,EAAE;EAAC;;CAE7DC,OAAA,aAKE;EAAC,OAAA,MAAM;CAAQ,CACZ;CAJHC,aAAA;;GAAO,GAAAC,YAAA,MAAM,YAAY;GAChBL,GAAW,cAAc,aAAa,MAAM,UAAU,CAAC,EAAE;EADzC;CAAzB,IAAA,EAAA,GAAA,KAAA,QAAA;EAAyBM,UAAA,OAAA,GAAA,KAAA,CAAA;EAChB,MAAA,KAAA,KAAAC,iBAAA,OAAA,aAAA,CAA0D;CAD1C,CAAA;CAT/B,OACEN;AAeJ"}
@@ -1,6 +1,6 @@
1
- import { PresenceContext, motionRunners } from "./motion.js";
2
1
  import { createComponent, memo } from "@solidjs/web";
3
2
  import { children, createEffect, createMemo, createSignal, onSettled } from "solid-js";
3
+ import { PresenceContext, motionRunners } from "./motion.js";
4
4
  // src/components/motion/presence.tsx
5
5
  function Presence(props) {
6
6
  let first = true;
@@ -1,3 +1,6 @@
1
+ import { createComponent, insert, memo, spread, template } from "@solidjs/web";
2
+ import { omit, onSettled } from "solid-js";
3
+ import { RadioGroup } from "@ui-sdk/solid/radio";
1
4
  import { accentPresets, isPresetAccentId } from "../../lib/accent-presets.js";
2
5
  import { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from "../../lib/appearance-font-settings.js";
3
6
  import { THEME_DEFAULT_ID } from "../../lib/theme-defaults.js";
@@ -8,9 +11,6 @@ import { RadioGroup as RadioGroup$1, RadioGroupItem } from "../ui/radio-group/ra
8
11
  import { ThemePicker } from "./theme-picker.js";
9
12
  import { useTheme } from "./theme-context.js";
10
13
  import { Heading } from "../ui/typography/typography.js";
11
- import { createComponent, insert, memo, spread, template } from "@solidjs/web";
12
- import { omit, onSettled } from "solid-js";
13
- import { RadioGroup } from "@ui-sdk/solid/radio";
14
14
  // src/components/theme/appearance-panel.tsx
15
15
  var _tmpl$ = /* @__PURE__ */ template(`<div><section class="flex flex-col gap-3"><header class="flex flex-col gap-0.5"><p class="max-w-prose text-sm text-muted-foreground">Follow the system, or pin one. Each appearance keeps its own theme.</p></header></section><!><section class="flex flex-col gap-3"><header class="flex flex-col gap-0.5"><p class="max-w-prose text-sm text-muted-foreground">Colours the interactive roles — the primary button, the focus ring, a selected row — on top of the theme above — one of the presets, or a colour the theme carries itself. Every option is measured against the surface it lands on, so none of them can make a label unreadable.</p></header></section><section class="flex flex-col gap-3"><header class="flex flex-col gap-0.5"><p class="max-w-prose text-sm text-muted-foreground">Interface, reading and code fonts.`);
16
16
  var _tmpl$2 = /* @__PURE__ */ template(`<section class="flex flex-col gap-3"><header class="flex flex-col gap-0.5"><p class="max-w-prose text-sm text-muted-foreground">`);
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-panel.js","names":["<p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>","<p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>","<p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>","<Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>","as=\"h2\"","size=\"card\"","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>","<RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>","onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}","<RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />","value=\"light\"","label=\"Light\"","description=\"Always the light theme.\"","<RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />","value=\"dark\"","label=\"Dark\"","description=\"Always the dark theme.\"","<RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />","value=\"system\"","label=\"Match the system\"","<ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />","title=\"Light theme\"","description=\"Shown when the appearance resolves to light.\"","onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}","<div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <SdkRadioGroup\n value={selectedAccent()}\n onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </SdkRadioGroup>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>","<ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />","title=\"Dark theme\"","description=\"Shown when the appearance resolves to dark.\"","onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}","<Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>","<SdkRadioGroup\n value={selectedAccent()}\n onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </SdkRadioGroup>","onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}","class=\"flex flex-col items-start gap-3\"","<AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />","themeDefaultColor=\"var(--primary)\"","<Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>","<AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />","onChange={(fonts) => setSelection({ fonts })}","<Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>","<ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />","<section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { Show, onSettled, omit } from 'solid-js'\nimport { RadioGroup as SdkRadioGroup } from '@ui-sdk/solid/radio'\nimport { accentPresets, isPresetAccentId } from '#lib/accent-presets'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport type { ThemeAppearance, ThemeVariant } from '#lib/theme-types'\nimport { cn } from '#lib/utils'\n// Direct modules, not the appearance-editor barrel, which would load the whole\n// editor, its sheet and its switch into every theme import (lint allows these two).\nimport { AccentSwatchGroups } from '../composites/appearance-editor/accent-swatch-groups'\nimport { AppearanceFontSettingsGroup } from '../composites/appearance-editor/font-settings-group'\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group'\nimport { ThemePicker } from './theme-picker'\nimport { useTheme } from './theme-context'\nimport { Heading } from '../ui/typography'\n\n/**\n * AppearancePanel.\n *\n * The appearance page, as a component rather than as a screen each application\n * draws for itself. Two applications that both let a user choose a theme should\n * offer the *same* choices in the *same* arrangement, otherwise \"Adea\" and\n * \"Cortana\" are two products that happen to share a component library, which is\n * the opposite of what this system is for.\n *\n * Four axes, in the order a user thinks about them:\n *\n * 1. **Appearance**: light, dark, or follow the system.\n * 2. **Themes**: one for each appearance. Both are shown at once, because the\n * choice is per-appearance and hiding the other half makes it feel like one\n * setting that keeps changing.\n * 3. **Accent**: adea's presets, then the accents the selected theme pair\n * carries itself, layered on whichever theme is active.\n * 4. **Fonts**: separate families and sizes for interface, content and code.\n *\n * The panel reads and writes the provider's preference and keeps no state of its\n * own, so it cannot disagree with what is applied. Its themes are the provider's, so\n * under the lazy provider it asks for the catalogue when it mounts and lists the rest\n * when it arrives.\n */\nexport type AppearancePanelProps = ComponentProps<'div'>\n\nexport function AppearancePanel(props: AppearancePanelProps) {\n const local = props\n const rest = omit(props, 'class')\n const context = useTheme()\n const { selection, setSelection, resolvedAppearance, themeAccents } = context\n onSettled(() => void context.loadCatalogue?.())\n const themesFor = (appearance: ThemeAppearance) =>\n context.themes.filter((variant) => variant.appearance === appearance)\n const selectedAccent = () => {\n const accent = selection().accent\n return accent === THEME_DEFAULT_ID ||\n isPresetAccentId(accent) ||\n themeAccents().some((option) => option.id === accent)\n ? accent\n : THEME_DEFAULT_ID\n }\n\n return (\n <div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <SdkRadioGroup\n value={selectedAccent()}\n onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </SdkRadioGroup>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>\n )\n}\n\nfunction ThemeSection(props: {\n title: string\n description: string\n themes: readonly ThemeVariant[]\n selectedId: string\n onThemeSelect: (theme: ThemeVariant) => void\n}) {\n return (\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAChC,MAAM,UAAU,SAAS;CACzB,MAAM,EAAE,WAAW,cAAc,oBAAoB,iBAAiB;CACtE,gBAAgB,KAAK,QAAQ,gBAAgB,CAAC;CAC9C,MAAM,aAAa,eACjB,QAAQ,OAAO,QAAQ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EACY;CA9BjB,CAAA,GAAA,IA+BS;CAIP,OAAA,QACEC,gBAAAA,SAAAA;EAAShC,IAAG;EAAKC,MAAK;EAAtB+B,UAA6B;CAEpB,CAAA,GAHXC,MAOQ;CARV,OAAA,OASEC,gBAAAA,6BAAAA;EACE,IAAA,WAAA;GAAU,OAAA,UAAU,CAAC,CAAC,SAAS;EAAuC;EACtEC,WAAW,UAAU,aAAa,EAAE,MAAM,CAAC;CAC5C,CAAA,GAZH,IAaS;CA/Fb,OACEf;AAiGJ;AAEA,SAAS,aAAa,OAMnB;CAEC,IAAA,SAAA,QAYS;CAXP,IAAA,SAAA,OAAA;CAIE,IAAA,SAAA,OAAA;CAJF,OAAA,QACEgB,gBAAAA,SAAAA;EAASpC,IAAG;EAAKC,MAAK;EAAtB,IAAA,WAAA;GACG,OAAA,MAAM;EACA;CAHXoC,CAAAA,GAAAA,MAKQ;CADN,OAAA,cAAqD;EAAC,OAAA,MAAM;CAAW,CAAI;CAL/E,OAAA,QAOEC,gBAAAA,aAAAA;EACE,IAAA,SAAA;GAAQ,OAAA,MAAM;EAAM;EACpB,IAAA,aAAA;GAAY,OAAA,MAAM;EAAU;EAC5B,IAAA,gBAAA;GAAe,OAAA,MAAM;EAAa;CACnC,CAAA,GAXH,IAYS;CAbX,OACEC;AAcJ"}
1
+ {"version":3,"file":"appearance-panel.js","names":["<p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>","<p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>","<p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>","<Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>","as=\"h2\"","size=\"card\"","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>","<RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>","onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}","<RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />","value=\"light\"","label=\"Light\"","description=\"Always the light theme.\"","<RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />","value=\"dark\"","label=\"Dark\"","description=\"Always the dark theme.\"","<RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />","value=\"system\"","label=\"Match the system\"","<ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />","title=\"Light theme\"","description=\"Shown when the appearance resolves to light.\"","onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}","<div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <SdkRadioGroup\n value={selectedAccent()}\n onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </SdkRadioGroup>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>","<ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />","title=\"Dark theme\"","description=\"Shown when the appearance resolves to dark.\"","onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}","<Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>","<SdkRadioGroup\n value={selectedAccent()}\n onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </SdkRadioGroup>","onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}","class=\"flex flex-col items-start gap-3\"","<AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />","themeDefaultColor=\"var(--primary)\"","<Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>","<AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />","onChange={(fonts) => setSelection({ fonts })}","<Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>","<header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>","<ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />","<section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>","_$spread","_$insert"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from '@solidjs/web'\nimport { Show, onSettled, omit } from 'solid-js'\nimport { RadioGroup as SdkRadioGroup } from '@ui-sdk/solid/radio'\nimport { accentPresets, isPresetAccentId } from '#lib/accent-presets'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport type { ThemeAppearance, ThemeVariant } from '#lib/theme-types'\nimport { cn } from '#lib/utils'\n// Direct modules, not the appearance-editor barrel, which would load the whole\n// editor, its sheet and its switch into every theme import (lint allows these two).\nimport { AccentSwatchGroups } from '../composites/appearance-editor/accent-swatch-groups'\nimport { AppearanceFontSettingsGroup } from '../composites/appearance-editor/font-settings-group'\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group'\nimport { ThemePicker } from './theme-picker'\nimport { useTheme } from './theme-context'\nimport { Heading } from '../ui/typography'\n\n/**\n * AppearancePanel.\n *\n * The appearance page, as a component rather than as a screen each application\n * draws for itself. Two applications that both let a user choose a theme should\n * offer the *same* choices in the *same* arrangement, otherwise \"Adea\" and\n * \"Cortana\" are two products that happen to share a component library, which is\n * the opposite of what this system is for.\n *\n * Four axes, in the order a user thinks about them:\n *\n * 1. **Appearance**: light, dark, or follow the system.\n * 2. **Themes**: one for each appearance. Both are shown at once, because the\n * choice is per-appearance and hiding the other half makes it feel like one\n * setting that keeps changing.\n * 3. **Accent**: adea's presets, then the accents the selected theme pair\n * carries itself, layered on whichever theme is active.\n * 4. **Fonts**: separate families and sizes for interface, content and code.\n *\n * The panel reads and writes the provider's preference and keeps no state of its\n * own, so it cannot disagree with what is applied. Its themes are the provider's, so\n * under the lazy provider it asks for the catalogue when it mounts and lists the rest\n * when it arrives.\n */\nexport type AppearancePanelProps = ComponentProps<'div'>\n\nexport function AppearancePanel(props: AppearancePanelProps) {\n const local = props\n const rest = omit(props, 'class')\n const context = useTheme()\n const { selection, setSelection, resolvedAppearance, themeAccents } = context\n onSettled(() => void context.loadCatalogue?.())\n const themesFor = (appearance: ThemeAppearance) =>\n context.themes.filter((variant) => variant.appearance === appearance)\n const selectedAccent = () => {\n const accent = selection().accent\n return accent === THEME_DEFAULT_ID ||\n isPresetAccentId(accent) ||\n themeAccents().some((option) => option.id === accent)\n ? accent\n : THEME_DEFAULT_ID\n }\n\n return (\n <div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. Each appearance keeps its own theme.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={themesFor('light')}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={themesFor('dark')}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <SdkRadioGroup\n value={selectedAccent()}\n onValueChange={(accent) => {\n if (accent !== null) setSelection({ accent })\n }}\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n // The presets, then the accents the selected theme pair carries: the\n // selection already accepts those ids, so the panel must offer them.\n accentOptions={[\n ...accentPresets,\n ...themeAccents().filter((option) => !isPresetAccentId(option.id)),\n ]}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </SdkRadioGroup>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Interface, reading and code fonts.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>\n )\n}\n\nfunction ThemeSection(props: {\n title: string\n description: string\n themes: readonly ThemeVariant[]\n selectedId: string\n onThemeSelect: (theme: ThemeVariant) => void\n}) {\n return (\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,OAAO;CAChC,MAAM,UAAU,SAAS;CACzB,MAAM,EAAE,WAAW,cAAc,oBAAoB,iBAAiB;CACtE,gBAAgB,KAAK,QAAQ,gBAAgB,CAAC;CAC9C,MAAM,aAAa,eACjB,QAAQ,OAAO,QAAQ,YAAY,QAAQ,eAAe,UAAU;CACtE,MAAM,uBAAuB;EAC3B,MAAM,SAAS,UAAU,CAAC,CAAC;EAC3B,OAAO,WAAA,WACL,iBAAiB,MAAM,KACvB,aAAa,CAAC,CAAC,MAAM,WAAW,OAAO,OAAO,MAAM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gBAAAA,6BAAAA;EACE,IAAA,WAAA;GAAU,OAAA,UAAU,CAAC,CAAC,SAAS;EAAuC;EACtEC,WAAW,UAAU,aAAa,EAAE,MAAM,CAAC;CAC5C,CAAA,GAZH,IAaS;CA/Fb,OACEf;AAiGJ;AAEA,SAAS,aAAa,OAMnB;CAEC,IAAA,SAAA,QAYS;CAXP,IAAA,SAAA,OAAA;CAIE,IAAA,SAAA,OAAA;CAJFqB,OAAA,QACEL,gBAAAA,SAAAA;EAASpC,IAAG;EAAKC,MAAK;EAAtB,IAAA,WAAA;GACG,OAAA,MAAM;EACA;CAHXoC,CAAAA,GAAAA,MAKQ;CADNI,OAAA,cAAqD;EAAC,OAAA,MAAM;CAAW,CAAI;CAL/EA,OAAA,QAOEH,gBAAAA,aAAAA;EACE,IAAA,SAAA;GAAQ,OAAA,MAAM;EAAM;EACpB,IAAA,aAAA;GAAY,OAAA,MAAM;EAAU;EAC5B,IAAA,gBAAA;GAAe,OAAA,MAAM;EAAa;CACnC,CAAA,GAXH,IAYS;CAbX,OACEC;AAcJ"}
@@ -2,13 +2,13 @@ import { safeScriptStringLiteral } from "../../lib/safe-script.js";
2
2
  import { useOptionalTheme, useTheme } from "./theme-context.js";
3
3
  import { defaultThemeSelection, resolvedDensity } from "./theme-state.js";
4
4
  import { createVersionedPersistence, localStoragePersistence } from "./theme-persistence.js";
5
+ import { createComponent, merge } from "solid-js";
6
+ import "@solidjs/web";
5
7
  import { createLazyCatalogue, loadThemeCatalogue } from "./theme-catalogue-source.js";
6
8
  import { themeScript } from "./theme-script.js";
7
9
  import { ThemeProviderWith } from "./theme-provider-value.js";
8
10
  import { ThemeToggle } from "./theme-toggle.js";
9
11
  import { ThemeModeToggle } from "./theme-mode-toggle.js";
10
- import "@solidjs/web";
11
- import { createComponent as createComponent$1, merge } from "solid-js";
12
12
  // src/components/theme/lazy.ts
13
13
  /**
14
14
  * ThemeProvider, with the theme catalogue out of the start-up path.
@@ -36,7 +36,7 @@ import { createComponent as createComponent$1, merge } from "solid-js";
36
36
  * `AppearancePanel` does.
37
37
  */
38
38
  function ThemeProvider(props) {
39
- return createComponent$1(ThemeProviderWith, merge(props, { catalogue: createLazyCatalogue() }));
39
+ return createComponent(ThemeProviderWith, merge(props, { catalogue: createLazyCatalogue() }));
40
40
  }
41
41
  export { ThemeModeToggle, ThemeProvider, ThemeToggle, createVersionedPersistence, defaultThemeSelection, safeScriptStringLiteral as inlineScriptLiteral, loadThemeCatalogue, localStoragePersistence, resolvedDensity, themeScript, useOptionalTheme, useTheme };
42
42
 
@@ -1 +1 @@
1
- {"version":3,"file":"lazy.js","names":["createComponent"],"sources":["../../../src/components/theme/lazy.ts"],"sourcesContent":["import { createComponent, merge } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { createLazyCatalogue } from './theme-catalogue-source'\nimport { ThemeProviderWith, type ThemeProviderProps } from './theme-provider-value'\n\n/**\n * The theme provider with the catalogue out of the start-up path.\n *\n * Everything here is free of the 34-theme catalogue: `import` this entry instead of\n * `@adea-ai/ui/components/theme` in a host that paints its theme from a stylesheet.\n * See {@link ThemeProvider} for the rules and the package README for the setup.\n */\nexport * from './theme-api'\nexport { loadThemeCatalogue } from './theme-catalogue-source'\nexport type { ThemeCatalogueSource } from './theme-provider-value'\nexport { ThemeToggle, type ThemeToggleProps } from './theme-toggle'\nexport { ThemeModeToggle, type ThemeModeToggleProps } from './theme-mode-toggle'\n\n/**\n * ThemeProvider, with the theme catalogue out of the start-up path.\n *\n * Same props, same context and same behaviour as `ThemeProvider` for everything the\n * shipped default pair covers: the default light and dark themes, a host's own\n * `themes`, every accent preset and custom colour, the surface axis, fonts and\n * density. Only the 32 other catalogue themes are not in the start-up chunk. The first\n * time the selection (or a preview) names one, or a theme-derived `ansi-*` accent over\n * such a pair, this provider imports the catalogue in a chunk of its own:\n *\n * - until it arrives the document keeps what is on it (set before first paint by\n * `themeScript`, painted by the stylesheet under `palette=\"stylesheet\"`), and\n * `variant()` is the default of the appearance;\n * - when it arrives the provider re-resolves and paints the stored theme, and\n * `useTheme().catalogueReady()` turns true;\n * - a preview of a theme that has not loaded starts the load and shows when it ends.\n *\n * Pair it with `palette=\"stylesheet\"` and `themeScript`: inline palettes of catalogue\n * themes need the catalogue to compute, so under the default `inline` palette every\n * stored theme but the defaults waits for the import.\n *\n * `useTheme().themes` and `allThemes()` list only the default pair until\n * `catalogueReady()`; a picker calls `useTheme().loadCatalogue()` when it mounts, as\n * `AppearancePanel` does.\n */\nexport function ThemeProvider(props: ThemeProviderProps): JSX.Element {\n return createComponent(ThemeProviderWith, merge(props, { catalogue: createLazyCatalogue() }))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,cAAc,OAAwC;CACpE,OAAOA,kBAAgB,mBAAmB,MAAM,OAAO,EAAE,WAAW,oBAAoB,EAAE,CAAC,CAAC;AAC9F"}
1
+ {"version":3,"file":"lazy.js","names":[],"sources":["../../../src/components/theme/lazy.ts"],"sourcesContent":["import { createComponent, merge } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { createLazyCatalogue } from './theme-catalogue-source'\nimport { ThemeProviderWith, type ThemeProviderProps } from './theme-provider-value'\n\n/**\n * The theme provider with the catalogue out of the start-up path.\n *\n * Everything here is free of the 34-theme catalogue: `import` this entry instead of\n * `@adea-ai/ui/components/theme` in a host that paints its theme from a stylesheet.\n * See {@link ThemeProvider} for the rules and the package README for the setup.\n */\nexport * from './theme-api'\nexport { loadThemeCatalogue } from './theme-catalogue-source'\nexport type { ThemeCatalogueSource } from './theme-provider-value'\nexport { ThemeToggle, type ThemeToggleProps } from './theme-toggle'\nexport { ThemeModeToggle, type ThemeModeToggleProps } from './theme-mode-toggle'\n\n/**\n * ThemeProvider, with the theme catalogue out of the start-up path.\n *\n * Same props, same context and same behaviour as `ThemeProvider` for everything the\n * shipped default pair covers: the default light and dark themes, a host's own\n * `themes`, every accent preset and custom colour, the surface axis, fonts and\n * density. Only the 32 other catalogue themes are not in the start-up chunk. The first\n * time the selection (or a preview) names one, or a theme-derived `ansi-*` accent over\n * such a pair, this provider imports the catalogue in a chunk of its own:\n *\n * - until it arrives the document keeps what is on it (set before first paint by\n * `themeScript`, painted by the stylesheet under `palette=\"stylesheet\"`), and\n * `variant()` is the default of the appearance;\n * - when it arrives the provider re-resolves and paints the stored theme, and\n * `useTheme().catalogueReady()` turns true;\n * - a preview of a theme that has not loaded starts the load and shows when it ends.\n *\n * Pair it with `palette=\"stylesheet\"` and `themeScript`: inline palettes of catalogue\n * themes need the catalogue to compute, so under the default `inline` palette every\n * stored theme but the defaults waits for the import.\n *\n * `useTheme().themes` and `allThemes()` list only the default pair until\n * `catalogueReady()`; a picker calls `useTheme().loadCatalogue()` when it mounts, as\n * `AppearancePanel` does.\n */\nexport function ThemeProvider(props: ThemeProviderProps): JSX.Element {\n return createComponent(ThemeProviderWith, merge(props, { catalogue: createLazyCatalogue() }))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,cAAc,OAAwC;CACpE,OAAO,gBAAgB,mBAAmB,MAAM,OAAO,EAAE,WAAW,oBAAoB,EAAE,CAAC,CAAC;AAC9F"}
@@ -1,6 +1,6 @@
1
1
  import { safeScriptStringLiteral } from "../../lib/safe-script.js";
2
- import { themeScriptWithProjection } from "./theme-script.js";
3
2
  import { themeTokenProjectionBundle } from "@adea-ai/themes/theme-token-projection/script";
3
+ import { themeScriptWithProjection } from "./theme-script.js";
4
4
  // src/components/theme/script-projection.ts
5
5
  /**
6
6
  * Opt-in no-flash script entry that can project imported token maps synchronously.
@@ -1,5 +1,5 @@
1
- import { createLightThemeEngine } from "../../lib/theme-engine-light.js";
2
1
  import { createSignal } from "solid-js";
2
+ import { createLightThemeEngine } from "../../lib/theme-engine-light.js";
3
3
  // src/components/theme/theme-catalogue-source.ts
4
4
  /**
5
5
  * The full catalogue engine once something has asked for it, shared by every lazy
@@ -1 +1 @@
1
- {"version":3,"file":"theme-document.js","names":[],"sources":["../../../src/components/theme/theme-document.ts"],"sourcesContent":["import {\n applyAppearanceFontSettings,\n normalizeAppearanceEditorFontSettings,\n} from '#lib/appearance-font-settings'\nimport { terminalCssVariables } from '#lib/theme-css'\nimport type { ThemeTokenProjectionOptions } from './token-projection'\nimport { assertThemeTokenProjectionConfig } from './token-projection-options'\nimport type { ThemeEngine } from '#lib/theme-engine'\nimport type { EditorRolesMode, ThemeAppearance, ThemeVariant } from '#lib/theme-types'\nimport { isCustomAccent } from '#lib/accent-roles'\nimport { surfaceAlpha, type SurfaceState } from '#lib/theme-surface'\nimport { resolvedDensity, type ThemeSelection } from './theme-state'\n\n/**\n * The document half of the theme provider: the single writer of `<html>`.\n *\n * Written against the few members of an element it uses, so the rules can be tested\n * on a stand-in. Every question the catalogue answers goes through the\n * {@link ThemeEngine} it is given, so it imports no catalogue code or data.\n */\nexport type ThemeRoot = Pick<\n HTMLElement,\n 'classList' | 'dataset' | 'style' | 'removeAttribute' | 'setAttribute'\n>\n\nexport type ThemeDocumentState = {\n /** What the document shows: the committed selection, or a preview laid over it. */\n selection: ThemeSelection\n appearance: ThemeAppearance\n variant: ThemeVariant\n /**\n * The variant whose terminal palette is pinned over the interface variant's.\n * Absent, the terminal follows the interface theme.\n */\n terminalVariant?: ThemeVariant\n /**\n * The variant whose syntax palette, and the canvas it was measured on, is pinned\n * over the interface variant's `--editor-*` ramp. Absent, code follows the\n * interface theme and no `--editor-background` family is written.\n */\n codeVariant?: ThemeVariant\n /**\n * The resolved surface axis. Absent, the axis is off: no attribute and no\n * `--surface-alpha` is written, and any this writer wrote before is removed.\n */\n surface?: SurfaceState\n}\n\nexport type ThemeDocumentOptions = {\n /**\n * Rewrites the custom properties just before they are written: the variant's\n * roles with the accent laid over them. It sees every property of the pass and\n * must return the full map; a name it drops is not written.\n */\n transformTokens?: (tokens: Record<string, string>) => Record<string, string>\n /**\n * The contrast an accent is held to against the variant's background. Absent, a\n * preset is painted verbatim (the catalogue measured it for its own themes) and\n * only a custom `#rrggbb` is held to the default floor of 3:1.\n */\n accentContrastFloor?: number\n /**\n * Where a catalogue variant's palette comes from. `inline` (the default) writes\n * every role onto the root. `stylesheet` writes none for a catalogue variant,\n * because the host loads a stylesheet that carries a `[data-theme]` block for it;\n * a variant the catalogue does not hold (a host's imported theme) is still written\n * inline, since no stylesheet can know it. The accent, the terminal pin, the\n * surface alpha and the fonts are written the same in both.\n *\n * Switching from an imported variant back to a catalogue one removes what the\n * imported one wrote, so nothing inline outlives it to beat the stylesheet.\n */\n palette?: 'inline' | 'stylesheet'\n /**\n * The `--editor-*` projection. `syntax` (the default) is the catalogue's quiet\n * syntax roles, which is what `theme-variants.css` carries; `floor` holds every\n * editor role to 4.5:1 on the canvas, as hex.\n *\n * With `palette: 'stylesheet'`, `floor` is the one palette write a catalogue\n * variant still gets: the stylesheet is generated for the default projection, so\n * the `--editor-*` properties are written inline over it. The rest of the\n * palette stays in the stylesheet.\n */\n editorRoles?: EditorRolesMode\n} & ThemeTokenProjectionOptions\n\n/**\n * What a catalogue variant still writes inline when its palette is the stylesheet's:\n * nothing, unless the editor projection is not the one the stylesheet was generated\n * for.\n */\nfunction stylesheetOverrides(\n engine: ThemeEngine,\n variant: ThemeVariant,\n editorRoles: EditorRolesMode | undefined\n): Record<string, string> {\n if (editorRoles !== 'floor') return {}\n return Object.fromEntries(\n Object.entries(engine.themeCssVariables(variant, { editor: 'floor' })).filter(([name]) =>\n name.startsWith('--editor-')\n )\n )\n}\n\n/**\n * The properties a pinned code theme writes: its `--editor-*` syntax ramp under the\n * host's projection, and the four canvas roles that ramp was measured against. Code\n * surfaces read the canvas as `var(--editor-background, var(--background))`, so the\n * interface canvas is the fallback whenever nothing is pinned.\n */\nexport function codeCssVariables(\n engine: ThemeEngine,\n variant: ThemeVariant,\n editorRoles?: EditorRolesMode\n): Record<string, string> {\n const all = engine.themeCssVariables(variant, { editor: editorRoles })\n const properties: Record<string, string> = {}\n for (const [name, value] of Object.entries(all)) {\n if (name.startsWith('--editor-')) properties[name] = value\n }\n properties['--editor-background'] = all['--background'] ?? variant.colors.background\n properties['--editor-foreground'] = all['--foreground'] ?? variant.colors.foreground\n properties['--editor-muted-foreground'] =\n all['--muted-foreground'] ?? variant.colors.mutedForeground\n properties['--editor-border'] = all['--border'] ?? variant.colors.border\n return properties\n}\n\n/**\n * The custom properties a state paints: the variant's roles, an optional projection\n * from the raw host map, the accent, the pinned terminal and code palettes, the surface alpha,\n * then `transformTokens`.\n *\n * The accent is applied *here* rather than left to the `[data-accent]` blocks in\n * `theme.css`, because the properties are written inline and an inline declaration\n * outranks every stylesheet selector however specific it is. The blocks still exist\n * and are still correct — they are what styles the window before this runs — but\n * they cannot win from here, so leaving the accent to them meant the attribute was\n * set, the rules were present, and nothing changed on screen.\n */\nexport function themeDocumentTokens(\n engine: ThemeEngine,\n state: ThemeDocumentState,\n options: ThemeDocumentOptions = {}\n): { tokens: Record<string, string>; accented: boolean } {\n assertThemeTokenProjectionConfig(options.tokenProjection)\n const fromStylesheet =\n options.palette === 'stylesheet' && engine.isCatalogueVariant(state.variant)\n const properties = fromStylesheet\n ? stylesheetOverrides(engine, state.variant, options.editorRoles)\n : { ...engine.themeCssVariables(state.variant, { editor: options.editorRoles }) }\n if (options.tokenProjection && !engine.isCatalogueVariant(state.variant)) {\n const rawTokens = state.variant.tokens ?? {}\n const projected = options.tokenProjection.project(rawTokens, options.tokenProjection.rules)\n for (const rule of options.tokenProjection.rules) {\n if (!rule || typeof rule.target !== 'string') continue\n if (Object.hasOwn(projected, rule.target)) {\n properties[rule.target] = projected[rule.target]!\n }\n }\n }\n const accent = engine.accentVariables(state.selection.accent, state.appearance, state.selection, {\n background: state.variant.colors.background,\n floor: options.accentContrastFloor,\n variantId: state.variant.id,\n })\n if (accent) Object.assign(properties, accent)\n // Written after the variant and the accent, so it wins over the interface\n // variant's own terminal ramp (and over the stylesheet's, which it outranks as an\n // inline declaration). Dropping the pin needs no removal of its own: the ramp is\n // then rewritten by the variant, or swept back to the stylesheet.\n if (state.terminalVariant) Object.assign(properties, terminalCssVariables(state.terminalVariant))\n // The same rule for code: the pinned ramp wins over the interface variant's, and its\n // canvas comes with it. Unpinning drops the canvas properties from this pass, so the\n // previous-set sweep removes them and code falls back to the interface canvas.\n if (state.codeVariant)\n Object.assign(properties, codeCssVariables(engine, state.codeVariant, options.editorRoles))\n if (state.surface) properties['--surface-alpha'] = surfaceAlpha[state.surface.surface]\n return {\n tokens: options.transformTokens ? options.transformTokens(properties) : properties,\n accented: accent !== undefined,\n }\n}\n\n/**\n * Write a state onto a root and report which custom properties it owns.\n *\n * Pass the previous call's return as `previous` and any palette property that pass\n * wrote and this one does not is removed. For the catalogue the two sets are the\n * same, so nothing is ever removed; it matters for a host variant that carries\n * `tokens` the catalogue does not, which would otherwise stay inline, beating the\n * stylesheet, after the user switched away from it.\n */\nexport function applyThemeToRoot(\n engine: ThemeEngine,\n root: ThemeRoot,\n state: ThemeDocumentState,\n options: ThemeDocumentOptions = {},\n previous?: ReadonlySet<string>\n): ReadonlySet<string> {\n const { tokens, accented } = themeDocumentTokens(engine, state, options)\n\n // Every pass recomputes the whole token set (an accent or font step included);\n // only the values that changed are written, so an unchanged palette does not\n // dirty the document's style. Custom property values read back as written.\n for (const [name, value] of Object.entries(tokens)) {\n if (root.style.getPropertyValue(name) !== value) root.style.setProperty(name, value)\n }\n if (previous) {\n for (const name of previous) {\n if (!(name in tokens)) root.style.removeProperty(name)\n }\n }\n\n root.classList.toggle('dark', state.appearance === 'dark')\n setData(root, 'theme', state.variant.id)\n setData(root, 'appearance', state.appearance)\n if (root.style.colorScheme !== state.appearance) root.style.colorScheme = state.appearance\n\n // A custom colour has no stylesheet block to select, and its value is the\n // attribute's worst possible content, so it is reported as `custom`.\n if (!accented) root.removeAttribute('data-accent')\n else\n setData(\n root,\n 'accent',\n isCustomAccent(state.selection.accent) ? 'custom' : state.selection.accent\n )\n\n // The surface axis is opt-in, so its absence removes rather than defaults: a host\n // that never enables it keeps an `<html>` with neither attribute, and one that\n // turns it off leaves nothing behind. (`--surface-alpha` is swept with the tokens.)\n if (state.surface) {\n setData(root, 'surface', state.surface.surface)\n setData(root, 'reduceTransparency', state.surface.reduceTransparencyActive ? 'true' : 'false')\n } else {\n root.removeAttribute('data-surface')\n root.removeAttribute('data-reduce-transparency')\n }\n\n applyAppearanceFontSettings(\n root,\n normalizeAppearanceEditorFontSettings(state.selection.fonts, state.selection.font).settings\n )\n\n const density = resolvedDensity(state.selection)\n if (density === 'comfortable') root.removeAttribute('data-density')\n else setData(root, 'density', density)\n\n return new Set(Object.keys(tokens))\n}\n\n/** Rewriting an attribute with its own value still queues a mutation and a style check. */\nfunction setData(root: ThemeRoot, key: string, value: string) {\n if (root.dataset[key] !== value) root.dataset[key] = value\n}\n\n/** What {@link applyWithoutTransitions} needs of a document. */\nexport type TransitionDocument = {\n head: { appendChild(node: unknown): unknown }\n createElement(tag: 'style'): {\n textContent: string | null\n offsetHeight?: number\n remove(): void\n }\n}\n\n/**\n * Run `apply` with every CSS transition switched off for the frame that carries\n * it, so a theme switch cannot animate page-wide.\n *\n * Without this, flipping the custom properties on `<html>` starts a transition on\n * every element that declares one, and each fades from the old palette to the new\n * over its own duration: a theme change that looks like a rendering fault. The\n * rule is removed two frames later, after the browser has committed the new styles\n * with transitions off, and `restore` runs it early (the provider calls it when it\n * is disposed mid-switch).\n *\n * `schedule` is the frame source; it defaults to `requestAnimationFrame` and falls\n * back to running at once where there is none, which leaves transitions on rather\n * than off.\n */\nexport function applyWithoutTransitions(\n doc: TransitionDocument,\n apply: () => void,\n schedule: (callback: () => void) => void = defaultSchedule\n): () => void {\n const style = doc.createElement('style')\n style.textContent = '*{transition:none !important}'\n doc.head.appendChild(style)\n // Reading a layout property forces the browser to commit the rule before the\n // properties change; without it the two can be batched into one style recalc.\n void style.offsetHeight\n let removed = false\n const restore = () => {\n if (removed) return\n removed = true\n style.remove()\n }\n try {\n apply()\n } catch (error) {\n restore()\n throw error\n }\n schedule(() => schedule(restore))\n return restore\n}\n\nfunction defaultSchedule(callback: () => void): void {\n if (typeof requestAnimationFrame === 'function') requestAnimationFrame(callback)\n else callback()\n}\n"],"mappings":";;;;;;;;;;;;AA2FA,SAAS,oBACP,QACA,SACA,aACwB;CACxB,IAAI,gBAAgB,SAAS,OAAO,CAAC;CACrC,OAAO,OAAO,YACZ,OAAO,QAAQ,OAAO,kBAAkB,SAAS,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,UAC9E,KAAK,WAAW,WAAW,CAC7B,CACF;AACF;;;;;;;AAQA,SAAgB,iBACd,QACA,SACA,aACwB;CACxB,MAAM,MAAM,OAAO,kBAAkB,SAAS,EAAE,QAAQ,YAAY,CAAC;CACrE,MAAM,aAAqC,CAAC;CAC5C,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,GAAG,GAC5C,IAAI,KAAK,WAAW,WAAW,GAAG,WAAW,QAAQ;CAEvD,WAAW,yBAAyB,IAAI,mBAAmB,QAAQ,OAAO;CAC1E,WAAW,yBAAyB,IAAI,mBAAmB,QAAQ,OAAO;CAC1E,WAAW,+BACT,IAAI,yBAAyB,QAAQ,OAAO;CAC9C,WAAW,qBAAqB,IAAI,eAAe,QAAQ,OAAO;CAClE,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,oBACd,QACA,OACA,UAAgC,CAAC,GACsB;CACvD,iCAAiC,QAAQ,eAAe;CAGxD,MAAM,aADJ,QAAQ,YAAY,gBAAgB,OAAO,mBAAmB,MAAM,OAAO,IAEzE,oBAAoB,QAAQ,MAAM,SAAS,QAAQ,WAAW,IAC9D,EAAE,GAAG,OAAO,kBAAkB,MAAM,SAAS,EAAE,QAAQ,QAAQ,YAAY,CAAC,EAAE;CAClF,IAAI,QAAQ,mBAAmB,CAAC,OAAO,mBAAmB,MAAM,OAAO,GAAG;EACxE,MAAM,YAAY,MAAM,QAAQ,UAAU,CAAC;EAC3C,MAAM,YAAY,QAAQ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"}
1
+ {"version":3,"file":"theme-document.js","names":[],"sources":["../../../src/components/theme/theme-document.ts"],"sourcesContent":["import {\n applyAppearanceFontSettings,\n normalizeAppearanceEditorFontSettings,\n} from '#lib/appearance-font-settings'\nimport { terminalCssVariables } from '#lib/theme-css'\nimport type { ThemeTokenProjectionOptions } from './token-projection'\nimport { assertThemeTokenProjectionConfig } from './token-projection-options'\nimport type { ThemeEngine } from '#lib/theme-engine'\nimport type { EditorRolesMode, ThemeAppearance, ThemeVariant } from '#lib/theme-types'\nimport { isCustomAccent } from '#lib/accent-roles'\nimport { surfaceAlpha, type SurfaceState } from '#lib/theme-surface'\nimport { resolvedDensity, type ThemeSelection } from './theme-state'\n\n/**\n * The document half of the theme provider: the single writer of `<html>`.\n *\n * Written against the few members of an element it uses, so the rules can be tested\n * on a stand-in. Every question the catalogue answers goes through the\n * {@link ThemeEngine} it is given, so it imports no catalogue code or data.\n */\nexport type ThemeRoot = Pick<\n HTMLElement,\n 'classList' | 'dataset' | 'style' | 'removeAttribute' | 'setAttribute'\n>\n\nexport type ThemeDocumentState = {\n /** What the document shows: the committed selection, or a preview laid over it. */\n selection: ThemeSelection\n appearance: ThemeAppearance\n variant: ThemeVariant\n /**\n * The variant whose terminal palette is pinned over the interface variant's.\n * Absent, the terminal follows the interface theme.\n */\n terminalVariant?: ThemeVariant\n /**\n * The variant whose syntax palette, and the canvas it was measured on, is pinned\n * over the interface variant's `--editor-*` ramp. Absent, code follows the\n * interface theme and no `--editor-background` family is written.\n */\n codeVariant?: ThemeVariant\n /**\n * The resolved surface axis. Absent, the axis is off: no attribute and no\n * `--surface-alpha` is written, and any this writer wrote before is removed.\n */\n surface?: SurfaceState\n}\n\nexport type ThemeDocumentOptions = {\n /**\n * Rewrites the custom properties just before they are written: the variant's\n * roles with the accent laid over them. It sees every property of the pass and\n * must return the full map; a name it drops is not written.\n */\n transformTokens?: (tokens: Record<string, string>) => Record<string, string>\n /**\n * The contrast an accent is held to against the variant's background. Absent, a\n * preset is painted verbatim (the catalogue measured it for its own themes) and\n * only a custom `#rrggbb` is held to the default floor of 3:1.\n */\n accentContrastFloor?: number\n /**\n * Where a catalogue variant's palette comes from. `inline` (the default) writes\n * every role onto the root. `stylesheet` writes none for a catalogue variant,\n * because the host loads a stylesheet that carries a `[data-theme]` block for it;\n * a variant the catalogue does not hold (a host's imported theme) is still written\n * inline, since no stylesheet can know it. The accent, the terminal pin, the\n * surface alpha and the fonts are written the same in both.\n *\n * Switching from an imported variant back to a catalogue one removes what the\n * imported one wrote, so nothing inline outlives it to beat the stylesheet.\n */\n palette?: 'inline' | 'stylesheet'\n /**\n * The `--editor-*` projection. `syntax` (the default) is the catalogue's quiet\n * syntax roles, which is what `theme-variants.css` carries; `floor` holds every\n * editor role to 4.5:1 on the canvas, as hex.\n *\n * With `palette: 'stylesheet'`, `floor` is the one palette write a catalogue\n * variant still gets: the stylesheet is generated for the default projection, so\n * the `--editor-*` properties are written inline over it. The rest of the\n * palette stays in the stylesheet.\n */\n editorRoles?: EditorRolesMode\n} & ThemeTokenProjectionOptions\n\n/**\n * What a catalogue variant still writes inline when its palette is the stylesheet's:\n * nothing, unless the editor projection is not the one the stylesheet was generated\n * for.\n */\nfunction stylesheetOverrides(\n engine: ThemeEngine,\n variant: ThemeVariant,\n editorRoles: EditorRolesMode | undefined\n): Record<string, string> {\n if (editorRoles !== 'floor') return {}\n return Object.fromEntries(\n Object.entries(engine.themeCssVariables(variant, { editor: 'floor' })).filter(([name]) =>\n name.startsWith('--editor-')\n )\n )\n}\n\n/**\n * The properties a pinned code theme writes: its `--editor-*` syntax ramp under the\n * host's projection, and the four canvas roles that ramp was measured against. Code\n * surfaces read the canvas as `var(--editor-background, var(--background))`, so the\n * interface canvas is the fallback whenever nothing is pinned.\n */\nexport function codeCssVariables(\n engine: ThemeEngine,\n variant: ThemeVariant,\n editorRoles?: EditorRolesMode\n): Record<string, string> {\n const all = engine.themeCssVariables(variant, { editor: editorRoles })\n const properties: Record<string, string> = {}\n for (const [name, value] of Object.entries(all)) {\n if (name.startsWith('--editor-')) properties[name] = value\n }\n properties['--editor-background'] = all['--background'] ?? variant.colors.background\n properties['--editor-foreground'] = all['--foreground'] ?? variant.colors.foreground\n properties['--editor-muted-foreground'] =\n all['--muted-foreground'] ?? variant.colors.mutedForeground\n properties['--editor-border'] = all['--border'] ?? variant.colors.border\n return properties\n}\n\n/**\n * The custom properties a state paints: the variant's roles, an optional projection\n * from the raw host map, the accent, the pinned terminal and code palettes, the surface alpha,\n * then `transformTokens`.\n *\n * The accent is applied *here* rather than left to the `[data-accent]` blocks in\n * `theme.css`, because the properties are written inline and an inline declaration\n * outranks every stylesheet selector however specific it is. The blocks still exist\n * and are still correct — they are what styles the window before this runs — but\n * they cannot win from here, so leaving the accent to them meant the attribute was\n * set, the rules were present, and nothing changed on screen.\n */\nexport function themeDocumentTokens(\n engine: ThemeEngine,\n state: ThemeDocumentState,\n options: ThemeDocumentOptions = {}\n): { tokens: Record<string, string>; accented: boolean } {\n assertThemeTokenProjectionConfig(options.tokenProjection)\n const fromStylesheet =\n options.palette === 'stylesheet' && engine.isCatalogueVariant(state.variant)\n const properties = fromStylesheet\n ? stylesheetOverrides(engine, state.variant, options.editorRoles)\n : { ...engine.themeCssVariables(state.variant, { editor: options.editorRoles }) }\n if (options.tokenProjection && !engine.isCatalogueVariant(state.variant)) {\n const rawTokens = state.variant.tokens ?? {}\n const projected = options.tokenProjection.project(rawTokens, options.tokenProjection.rules)\n for (const rule of options.tokenProjection.rules) {\n if (!rule || typeof rule.target !== 'string') continue\n if (Object.hasOwn(projected, rule.target)) {\n properties[rule.target] = projected[rule.target]!\n }\n }\n }\n const accent = engine.accentVariables(state.selection.accent, state.appearance, state.selection, {\n background: state.variant.colors.background,\n floor: options.accentContrastFloor,\n variantId: state.variant.id,\n })\n if (accent) Object.assign(properties, accent)\n // Written after the variant and the accent, so it wins over the interface\n // variant's own terminal ramp (and over the stylesheet's, which it outranks as an\n // inline declaration). Dropping the pin needs no removal of its own: the ramp is\n // then rewritten by the variant, or swept back to the stylesheet.\n if (state.terminalVariant) Object.assign(properties, terminalCssVariables(state.terminalVariant))\n // The same rule for code: the pinned ramp wins over the interface variant's, and its\n // canvas comes with it. Unpinning drops the canvas properties from this pass, so the\n // previous-set sweep removes them and code falls back to the interface canvas.\n if (state.codeVariant)\n Object.assign(properties, codeCssVariables(engine, state.codeVariant, options.editorRoles))\n if (state.surface) properties['--surface-alpha'] = surfaceAlpha[state.surface.surface]\n return {\n tokens: options.transformTokens ? options.transformTokens(properties) : properties,\n accented: accent !== undefined,\n }\n}\n\n/**\n * Write a state onto a root and report which custom properties it owns.\n *\n * Pass the previous call's return as `previous` and any palette property that pass\n * wrote and this one does not is removed. For the catalogue the two sets are the\n * same, so nothing is ever removed; it matters for a host variant that carries\n * `tokens` the catalogue does not, which would otherwise stay inline, beating the\n * stylesheet, after the user switched away from it.\n */\nexport function applyThemeToRoot(\n engine: ThemeEngine,\n root: ThemeRoot,\n state: ThemeDocumentState,\n options: ThemeDocumentOptions = {},\n previous?: ReadonlySet<string>\n): ReadonlySet<string> {\n const { tokens, accented } = themeDocumentTokens(engine, state, options)\n\n // Every pass recomputes the whole token set (an accent or font step included);\n // only the values that changed are written, so an unchanged palette does not\n // dirty the document's style. Custom property values read back as written.\n for (const [name, value] of Object.entries(tokens)) {\n if (root.style.getPropertyValue(name) !== value) root.style.setProperty(name, value)\n }\n if (previous) {\n for (const name of previous) {\n if (!(name in tokens)) root.style.removeProperty(name)\n }\n }\n\n root.classList.toggle('dark', state.appearance === 'dark')\n setData(root, 'theme', state.variant.id)\n setData(root, 'appearance', state.appearance)\n if (root.style.colorScheme !== state.appearance) root.style.colorScheme = state.appearance\n\n // A custom colour has no stylesheet block to select, and its value is the\n // attribute's worst possible content, so it is reported as `custom`.\n if (!accented) root.removeAttribute('data-accent')\n else\n setData(\n root,\n 'accent',\n isCustomAccent(state.selection.accent) ? 'custom' : state.selection.accent\n )\n\n // The surface axis is opt-in, so its absence removes rather than defaults: a host\n // that never enables it keeps an `<html>` with neither attribute, and one that\n // turns it off leaves nothing behind. (`--surface-alpha` is swept with the tokens.)\n if (state.surface) {\n setData(root, 'surface', state.surface.surface)\n setData(root, 'reduceTransparency', state.surface.reduceTransparencyActive ? 'true' : 'false')\n } else {\n root.removeAttribute('data-surface')\n root.removeAttribute('data-reduce-transparency')\n }\n\n applyAppearanceFontSettings(\n root,\n normalizeAppearanceEditorFontSettings(state.selection.fonts, state.selection.font).settings\n )\n\n const density = resolvedDensity(state.selection)\n if (density === 'comfortable') root.removeAttribute('data-density')\n else setData(root, 'density', density)\n\n return new Set(Object.keys(tokens))\n}\n\n/** Rewriting an attribute with its own value still queues a mutation and a style check. */\nfunction setData(root: ThemeRoot, key: string, value: string) {\n if (root.dataset[key] !== value) root.dataset[key] = value\n}\n\n/** What {@link applyWithoutTransitions} needs of a document. */\nexport type TransitionDocument = {\n head: { appendChild(node: unknown): unknown }\n createElement(tag: 'style'): {\n textContent: string | null\n offsetHeight?: number\n remove(): void\n }\n}\n\n/**\n * Run `apply` with every CSS transition switched off for the frame that carries\n * it, so a theme switch cannot animate page-wide.\n *\n * Without this, flipping the custom properties on `<html>` starts a transition on\n * every element that declares one, and each fades from the old palette to the new\n * over its own duration: a theme change that looks like a rendering fault. The\n * rule is removed two frames later, after the browser has committed the new styles\n * with transitions off, and `restore` runs it early (the provider calls it when it\n * is disposed mid-switch).\n *\n * `schedule` is the frame source; it defaults to `requestAnimationFrame` and falls\n * back to running at once where there is none, which leaves transitions on rather\n * than off.\n */\nexport function applyWithoutTransitions(\n doc: TransitionDocument,\n apply: () => void,\n schedule: (callback: () => void) => void = defaultSchedule\n): () => void {\n const style = doc.createElement('style')\n style.textContent = '*{transition:none !important}'\n doc.head.appendChild(style)\n // Reading a layout property forces the browser to commit the rule before the\n // properties change; without it the two can be batched into one style recalc.\n void style.offsetHeight\n let removed = false\n const restore = () => {\n if (removed) return\n removed = true\n style.remove()\n }\n try {\n apply()\n } catch (error) {\n restore()\n throw error\n }\n schedule(() => schedule(restore))\n return restore\n}\n\nfunction defaultSchedule(callback: () => void): void {\n if (typeof requestAnimationFrame === 'function') requestAnimationFrame(callback)\n else callback()\n}\n"],"mappings":";;;;;;;;;;;;AA2FA,SAAS,oBACP,QACA,SACA,aACwB;CACxB,IAAI,gBAAgB,SAAS,OAAO,CAAC;CACrC,OAAO,OAAO,YACZ,OAAO,QAAQ,OAAO,kBAAkB,SAAS,EAAE,QAAQ,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,UAC9E,KAAK,WAAW,WAAW,CAC7B,CACF;AACF;;;;;;;AAQA,SAAgB,iBACd,QACA,SACA,aACwB;CACxB,MAAM,MAAM,OAAO,kBAAkB,SAAS,EAAE,QAAQ,YAAY,CAAC;CACrE,MAAM,aAAqC,CAAC;CAC5C,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,GAAG,GAC5C,IAAI,KAAK,WAAW,WAAW,GAAG,WAAW,QAAQ;CAEvD,WAAW,yBAAyB,IAAI,mBAAmB,QAAQ,OAAO;CAC1E,WAAW,yBAAyB,IAAI,mBAAmB,QAAQ,OAAO;CAC1E,WAAW,+BACT,IAAI,yBAAyB,QAAQ,OAAO;CAC9C,WAAW,qBAAqB,IAAI,eAAe,QAAQ,OAAO;CAClE,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,oBACd,QACA,OACA,UAAgC,CAAC,GACsB;CACvD,iCAAiC,QAAQ,eAAe;CAGxD,MAAM,aADJ,QAAQ,YAAY,gBAAgB,OAAO,mBAAmB,MAAM,OAAO,IAEzE,oBAAoB,QAAQ,MAAM,SAAS,QAAQ,WAAW,IAC9D,EAAE,GAAG,OAAO,kBAAkB,MAAM,SAAS,EAAE,QAAQ,QAAQ,YAAY,CAAC,EAAE;CAClF,IAAI,QAAQ,mBAAmB,CAAC,OAAO,mBAAmB,MAAM,OAAO,GAAG;EACxE,MAAM,YAAY,MAAM,QAAQ,UAAU,CAAC;EAC3C,MA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C1E,SAAS;AAChB"}
@@ -1,13 +1,13 @@
1
+ import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
2
+ import { Monitor as Monitor$1, Moon as Moon$1, Sun } from "@lucide/solid";
3
+ import { For, omit } from "solid-js";
1
4
  import { ToggleGroup, ToggleGroupItem } from "../ui/toggle-group/toggle-group.js";
2
5
  import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip/tooltip.js";
3
6
  import { fastIcon } from "../../lib/fast-icon.js";
4
- import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
5
- import { Monitor, Moon, Sun } from "@lucide/solid";
6
- import { For, omit } from "solid-js";
7
7
  // src/components/theme/theme-mode-toggle.tsx
8
8
  var _tmpl$ = /* @__PURE__ */ template(`<span>`);
9
- var Monitor$1 = fastIcon(Monitor);
10
- var Moon$1 = fastIcon(Moon);
9
+ var Monitor = fastIcon(Monitor$1);
10
+ var Moon = fastIcon(Moon$1);
11
11
  var APPEARANCES = [
12
12
  {
13
13
  value: "light",
@@ -17,12 +17,12 @@ var APPEARANCES = [
17
17
  {
18
18
  value: "dark",
19
19
  label: "Dark",
20
- icon: Moon$1
20
+ icon: Moon
21
21
  },
22
22
  {
23
23
  value: "system",
24
24
  label: "System",
25
- icon: Monitor$1
25
+ icon: Monitor
26
26
  }
27
27
  ];
28
28
  function ThemeModeToggle(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"theme-mode-toggle.js","names":["<ToggleGroup\n {...rest}\n attached\n multiple={false}\n value={local.mode}\n onChange={(value: string | null) => {\n const option = APPEARANCES.find((candidate) => candidate.value === value)\n if (option) local.onModeChange(option.value)\n }}\n aria-label={rest['aria-label'] ?? 'Appearance'}\n >\n <For each={APPEARANCES}>\n {(appearance) => (\n <Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>\n )}\n </For>\n </ToggleGroup>","multiple={false}","onChange={(value: string | null) => {\n const option = APPEARANCES.find((candidate) => candidate.value === value)\n if (option) local.onModeChange(option.value)\n }}","<For each={APPEARANCES}>\n {(appearance) => (\n <Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>\n )}\n </For>","each={APPEARANCES}","<Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>","<TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>","as={ToggleGroupItem}","variant=\"outline\"","<appearance.icon aria-hidden=\"true\" />","appearance.icon","{local.withLabels ? <span>{appearance.label}</span> : null}","<TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>","appearance.label.toLowerCase()","Monitor","LucideMonitor","Moon","LucideMoon","LucideSun"],"sources":["../../../src/components/theme/theme-mode-toggle.tsx"],"sourcesContent":["import { Monitor as LucideMonitor, Moon as LucideMoon, Sun as LucideSun } from '@lucide/solid'\nimport type { ComponentProps } from '@solidjs/web'\nimport { For, omit } from 'solid-js'\nimport { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Monitor = fastIcon(LucideMonitor)\nconst Moon = fastIcon(LucideMoon)\nconst Sun = fastIcon(LucideSun)\n\nconst APPEARANCES = [\n { value: 'light', label: 'Light', icon: Sun },\n { value: 'dark', label: 'Dark', icon: Moon },\n { value: 'system', label: 'System', icon: Monitor },\n] as const\n\n/** Controlled appearance selection for hosts that own their preference storage. */\nexport type ThemeModeToggleProps = Omit<\n ComponentProps<typeof ToggleGroup>,\n 'children' | 'value' | 'onChange' | 'multiple'\n> & {\n mode: 'light' | 'dark' | 'system'\n onModeChange: (mode: 'light' | 'dark' | 'system') => void\n withLabels?: boolean\n}\n\nexport function ThemeModeToggle(props: ThemeModeToggleProps) {\n const local = props\n const rest = omit(props, 'mode', 'onModeChange', 'withLabels')\n return (\n <ToggleGroup\n {...rest}\n attached\n multiple={false}\n value={local.mode}\n onChange={(value: string | null) => {\n const option = APPEARANCES.find((candidate) => candidate.value === value)\n if (option) local.onModeChange(option.value)\n }}\n aria-label={rest['aria-label'] ?? 'Appearance'}\n >\n <For each={APPEARANCES}>\n {(appearance) => (\n <Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>\n )}\n </For>\n </ToggleGroup>\n )\n}\n"],"mappings":";;;;;;;;AAQA,IAAMc,YAAU,SAASC,OAAa;AACtC,IAAMC,SAAO,SAASC,IAAU;AAGhC,IAAM,cAAc;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B,OAAA;;OAAKC,WAAAA;QAAW,OAAA,WAAA,MAAM,YAAY;;OAAE;MAAjC;KAA4D,EAAA,CAAA,CAVhF;IAWQ,EAAA,CAAA;GAER,CAAA;EACM;;AAEjB"}
1
+ {"version":3,"file":"theme-mode-toggle.js","names":["<ToggleGroup\n {...rest}\n attached\n multiple={false}\n value={local.mode}\n onChange={(value: string | null) => {\n const option = APPEARANCES.find((candidate) => candidate.value === value)\n if (option) local.onModeChange(option.value)\n }}\n aria-label={rest['aria-label'] ?? 'Appearance'}\n >\n <For each={APPEARANCES}>\n {(appearance) => (\n <Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>\n )}\n </For>\n </ToggleGroup>","multiple={false}","onChange={(value: string | null) => {\n const option = APPEARANCES.find((candidate) => candidate.value === value)\n if (option) local.onModeChange(option.value)\n }}","<For each={APPEARANCES}>\n {(appearance) => (\n <Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>\n )}\n </For>","each={APPEARANCES}","<Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>","<TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>","as={ToggleGroupItem}","variant=\"outline\"","<appearance.icon aria-hidden=\"true\" />","appearance.icon","{local.withLabels ? <span>{appearance.label}</span> : null}","<TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>","appearance.label.toLowerCase()","LucideMonitor","LucideMoon","LucideSun","_$insert"],"sources":["../../../src/components/theme/theme-mode-toggle.tsx"],"sourcesContent":["import { Monitor as LucideMonitor, Moon as LucideMoon, Sun as LucideSun } from '@lucide/solid'\nimport type { ComponentProps } from '@solidjs/web'\nimport { For, omit } from 'solid-js'\nimport { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Monitor = fastIcon(LucideMonitor)\nconst Moon = fastIcon(LucideMoon)\nconst Sun = fastIcon(LucideSun)\n\nconst APPEARANCES = [\n { value: 'light', label: 'Light', icon: Sun },\n { value: 'dark', label: 'Dark', icon: Moon },\n { value: 'system', label: 'System', icon: Monitor },\n] as const\n\n/** Controlled appearance selection for hosts that own their preference storage. */\nexport type ThemeModeToggleProps = Omit<\n ComponentProps<typeof ToggleGroup>,\n 'children' | 'value' | 'onChange' | 'multiple'\n> & {\n mode: 'light' | 'dark' | 'system'\n onModeChange: (mode: 'light' | 'dark' | 'system') => void\n withLabels?: boolean\n}\n\nexport function ThemeModeToggle(props: ThemeModeToggleProps) {\n const local = props\n const rest = omit(props, 'mode', 'onModeChange', 'withLabels')\n return (\n <ToggleGroup\n {...rest}\n attached\n multiple={false}\n value={local.mode}\n onChange={(value: string | null) => {\n const option = APPEARANCES.find((candidate) => candidate.value === value)\n if (option) local.onModeChange(option.value)\n }}\n aria-label={rest['aria-label'] ?? 'Appearance'}\n >\n <For each={APPEARANCES}>\n {(appearance) => (\n <Tooltip>\n <TooltipTrigger\n as={ToggleGroupItem}\n value={appearance.value}\n variant=\"outline\"\n size={local.withLabels ? 'sm' : 'icon-sm'}\n aria-label={appearance.label}\n >\n <appearance.icon aria-hidden=\"true\" />\n {local.withLabels ? <span>{appearance.label}</span> : null}\n </TooltipTrigger>\n <TooltipContent>Use {appearance.label.toLowerCase()} appearance</TooltipContent>\n </Tooltip>\n )}\n </For>\n </ToggleGroup>\n )\n}\n"],"mappings":";;;;;;;;AAQA,IAAM,UAAU,SAASc,SAAa;AACtC,IAAM,OAAO,SAASC,MAAU;AAGhC,IAAM,cAAc;CAClB;EAAE,OAAO;EAAS,OAAO;EAAS,MAHxB,SAASC,GAGqB;CAAI;CAC5C;EAAE,OAAO;EAAQ,OAAO;EAAQ,MAAM;CAAK;CAC3C;EAAE,OAAO;EAAU,OAAO;EAAU,MAAM;CAAQ;AACpD;AAYA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,QAAQ;CACd,MAAM,OAAO,KAAK,OAAO,QAAQ,gBAAgB,YAAY;CAC7D,OACEhB,gBAAAA,aAAAA,WACM,MADN;EAEE,UAAA;EACAC,UAAU;EACV,IAAA,QAAA;GAAO,OAAA,MAAM;EAAI;EACjBC,WAAW,UAAyB;GAClC,MAAM,SAAS,YAAY,MAAM,cAAc,UAAU,UAAU,KAAK;GACxE,IAAI,QAAQ,MAAM,aAAa,OAAO,KAAK;EAC7C;EACA,IAAA,eAAA;GAAY,OAAA,KAAK,iBAAiB;EAAY;EAThD,IAAA,WAAA;GAWEC,OAAAA,gBAAAA,KAAAA;IAAKC,MAAM;IAAXD,WACI,eACAE,gBAAAA,SAAAA,EAAAA,IAAAA,WAAAA;KAAS,OAAA,CACPC,gBAAAA,gBAAAA;MACEC,IAAI;MACJ,IAAA,QAAA;OAAO,OAAA,WAAW;MAAK;MACvBC,SAAQ;MACR,IAAA,OAAA;OAAM,OAAA,MAAM,aAAa,OAAO;MAAS;MACzC,IAAA,eAAA;OAAY,OAAA,WAAW;MAAK;MAL9B,IAAA,WAAA;OAMC,OAAA,CACCC,gBAAAA,WAACC,MAAD,EAAiB,eAAY,OAAQ,CAAA,GACrCC,WAAAA;;SAAC,OAAA,CAAA,CAAA,MAAM;QAAmD,CAAA,CAAC,CAAD,WAAtC;SAA8B,IAAA,OAAA,OAAA;SAA9BM,OAAA,YAAM;UAAC,OAAA,WAAW;SAAK,CAAO;SAA9B,OAAA;QAA8B,EAAA,CAAA,IAAI;OAAI,CAAA,CAD3D;MAEe;KAChBL,CAAAA,GAAAA,gBAAAA,gBAAAA,EAAAA,IAAAA,WAAAA;MAAgB,OAAA;;OAAKC,WAAAA;QAAW,OAAA,WAAA,MAAM,YAAY;;OAAE;MAAjC;KAA4D,EAAA,CAAA,CAVhF;IAWQ,EAAA,CAAA;GAER,CAAA;EACM;;AAEjB"}
@@ -1,7 +1,7 @@
1
- import { cn } from "../../lib/utils.js";
2
- import { Button } from "../ui/button/button.js";
3
1
  import { className, createComponent, effect, insert, memo, readShallow, setStyleProperty, spread, template } from "@solidjs/web";
4
2
  import { For, omit } from "solid-js";
3
+ import { cn } from "../../lib/utils.js";
4
+ import { Button } from "../ui/button/button.js";
5
5
  // src/components/theme/theme-picker.tsx
6
6
  var _tmpl$ = /* @__PURE__ */ template(`<span>`);
7
7
  var _tmpl$2 = /* @__PURE__ */ template(`<div><div class="flex h-24"><div class="theme-preview-edge flex w-6 flex-col items-center gap-1.5 border-e py-2"><span class="size-2.5 rounded-sm"></span><span class="size-2.5 rounded-sm"></span><span class="size-2.5 rounded-sm"></span></div><div class="flex flex-1 flex-col gap-1.5 p-2"><div class="h-1.5 w-14 rounded-full"></div><div class="h-1 w-20 rounded-full"></div><div class="h-1 w-16 rounded-full"></div><div class="mt-auto flex items-center gap-1"><span class="h-3 w-9 rounded-sm"></span><span class="h-3 w-6 rounded-sm"></span><span class="h-3 w-6 rounded-sm">`);