@adea-ai/ui 0.151.12 → 0.151.13

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 (961) hide show
  1. package/dist/NOTICE +3 -2
  2. package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
  3. package/dist/components/composites/about-dialog/about-dialog.js +27 -48
  4. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  5. package/dist/components/composites/account-menu/account-menu.d.ts +2 -2
  6. package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
  7. package/dist/components/composites/account-menu/account-menu.js +4 -22
  8. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  9. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  10. package/dist/components/composites/action-button/action-button.js +2 -4
  11. package/dist/components/composites/action-button/action-button.js.map +1 -1
  12. package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +1 -10
  13. package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts.map +1 -1
  14. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +2 -1
  15. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  16. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-choices.js +3 -2
  18. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  19. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  20. package/dist/components/composites/appearance-editor/appearance-editor.js +1 -0
  21. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  22. package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
  23. package/dist/components/composites/appearance-editor/appearance-rows.js +12 -50
  24. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  25. package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
  26. package/dist/components/composites/appearance-editor/font-settings-group.js +7 -47
  27. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  28. package/dist/components/composites/appearance-editor/index.d.ts +1 -0
  29. package/dist/components/composites/appearance-editor/index.d.ts.map +1 -1
  30. package/dist/components/composites/appearance-editor/index.js +2 -1
  31. package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
  32. package/dist/components/composites/catalog-browser/catalog-browser.js +8 -11
  33. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  34. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts +5 -4
  35. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -1
  36. package/dist/components/composites/chain-of-thought/chain-of-thought.js +5 -12
  37. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  38. package/dist/components/composites/chat/chat.d.ts +2 -2
  39. package/dist/components/composites/chat/chat.d.ts.map +1 -1
  40. package/dist/components/composites/chat/chat.js.map +1 -1
  41. package/dist/components/composites/checkpoint/checkpoint-model.js +1 -1
  42. package/dist/components/composites/checkpoint/checkpoint-model.js.map +1 -1
  43. package/dist/components/composites/checkpoint/checkpoint.js +3 -3
  44. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  45. package/dist/components/composites/confirmation/confirmation-model.d.ts +3 -12
  46. package/dist/components/composites/confirmation/confirmation-model.d.ts.map +1 -1
  47. package/dist/components/composites/confirmation/confirmation-model.js +5 -17
  48. package/dist/components/composites/confirmation/confirmation-model.js.map +1 -1
  49. package/dist/components/composites/confirmation/confirmation.js +1 -1
  50. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  51. package/dist/components/composites/context/context-model.js +1 -1
  52. package/dist/components/composites/context/context-model.js.map +1 -1
  53. package/dist/components/composites/file-tree/build-file-tree.d.ts +5 -12
  54. package/dist/components/composites/file-tree/build-file-tree.d.ts.map +1 -1
  55. package/dist/components/composites/file-tree/build-file-tree.js +26 -30
  56. package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
  57. package/dist/components/composites/file-tree/file-tree.d.ts +2 -2
  58. package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
  59. package/dist/components/composites/file-tree/file-tree.js +4 -30
  60. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  61. package/dist/components/composites/file-tree/index.d.ts +2 -1
  62. package/dist/components/composites/file-tree/index.d.ts.map +1 -1
  63. package/dist/components/composites/file-tree/index.js +2 -1
  64. package/dist/components/composites/help-center/help-center.d.ts.map +1 -1
  65. package/dist/components/composites/help-center/help-center.js +9 -20
  66. package/dist/components/composites/help-center/help-center.js.map +1 -1
  67. package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -1
  68. package/dist/components/composites/icon-picker/icon-picker.js +7 -11
  69. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  70. package/dist/components/composites/inline-citation/citation.d.ts.map +1 -1
  71. package/dist/components/composites/inline-citation/citation.js +2 -1
  72. package/dist/components/composites/inline-citation/citation.js.map +1 -1
  73. package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -1
  74. package/dist/components/composites/inline-citation/inline-citation.js +2 -1
  75. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  76. package/dist/components/composites/message-scroller/message-scroller.d.ts +4 -5
  77. package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -1
  78. package/dist/components/composites/message-scroller/message-scroller.js +19 -13
  79. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  80. package/dist/components/composites/message-scroller/scroll-anchor.d.ts +4 -3
  81. package/dist/components/composites/message-scroller/scroll-anchor.d.ts.map +1 -1
  82. package/dist/components/composites/message-scroller/scroll-anchor.js +5 -3
  83. package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -1
  84. package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
  85. package/dist/components/composites/model-selector/model-selector.js +1 -1
  86. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  87. package/dist/components/composites/model-selector/models.js +1 -1
  88. package/dist/components/composites/model-selector/models.js.map +1 -1
  89. package/dist/components/composites/plan/plan.d.ts.map +1 -1
  90. package/dist/components/composites/plan/plan.js +2 -3
  91. package/dist/components/composites/plan/plan.js.map +1 -1
  92. package/dist/components/composites/queue/queue.d.ts +2 -2
  93. package/dist/components/composites/queue/queue.d.ts.map +1 -1
  94. package/dist/components/composites/queue/queue.js +57 -64
  95. package/dist/components/composites/queue/queue.js.map +1 -1
  96. package/dist/components/composites/reasoning/index.js +3 -1
  97. package/dist/components/composites/reasoning/reasoning.d.ts +2 -3
  98. package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -1
  99. package/dist/components/composites/reasoning/reasoning.js +5 -20
  100. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  101. package/dist/components/composites/settings/settings-layout.d.ts.map +1 -1
  102. package/dist/components/composites/settings/settings-layout.js +3 -2
  103. package/dist/components/composites/settings/settings-layout.js.map +1 -1
  104. package/dist/components/composites/settings/settings-navigation.d.ts.map +1 -1
  105. package/dist/components/composites/settings/settings-navigation.js +1 -1
  106. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  107. package/dist/components/composites/sources/index.js +2 -1
  108. package/dist/components/composites/sources/source.d.ts +3 -8
  109. package/dist/components/composites/sources/source.d.ts.map +1 -1
  110. package/dist/components/composites/sources/source.js +5 -30
  111. package/dist/components/composites/sources/source.js.map +1 -1
  112. package/dist/components/composites/sources/sources.js +2 -1
  113. package/dist/components/composites/sources/sources.js.map +1 -1
  114. package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -1
  115. package/dist/components/composites/stack-trace/stack-trace.js +3 -12
  116. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  117. package/dist/components/composites/subagent/subagent.d.ts +3 -1
  118. package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
  119. package/dist/components/composites/subagent/subagent.js +5 -17
  120. package/dist/components/composites/subagent/subagent.js.map +1 -1
  121. package/dist/components/composites/suggestion/suggestion.d.ts.map +1 -1
  122. package/dist/components/composites/suggestion/suggestion.js +3 -2
  123. package/dist/components/composites/suggestion/suggestion.js.map +1 -1
  124. package/dist/components/composites/task/task.d.ts +2 -3
  125. package/dist/components/composites/task/task.d.ts.map +1 -1
  126. package/dist/components/composites/task/task.js +49 -109
  127. package/dist/components/composites/task/task.js.map +1 -1
  128. package/dist/components/composites/terminal/terminal-model.d.ts +1 -2
  129. package/dist/components/composites/terminal/terminal-model.d.ts.map +1 -1
  130. package/dist/components/composites/terminal/terminal-model.js +7 -1
  131. package/dist/components/composites/terminal/terminal-model.js.map +1 -1
  132. package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
  133. package/dist/components/composites/terminal/terminal.js +3 -12
  134. package/dist/components/composites/terminal/terminal.js.map +1 -1
  135. package/dist/components/composites/test-results/test-results.d.ts.map +1 -1
  136. package/dist/components/composites/test-results/test-results.js +3 -12
  137. package/dist/components/composites/test-results/test-results.js.map +1 -1
  138. package/dist/components/composites/tool/tool.d.ts +0 -1
  139. package/dist/components/composites/tool/tool.d.ts.map +1 -1
  140. package/dist/components/composites/tool/tool.js +47 -41
  141. package/dist/components/composites/tool/tool.js.map +1 -1
  142. package/dist/components/composites/tree/tree-navigation.d.ts +6 -2
  143. package/dist/components/composites/tree/tree-navigation.d.ts.map +1 -1
  144. package/dist/components/composites/tree/tree-navigation.js +18 -1
  145. package/dist/components/composites/tree/tree-navigation.js.map +1 -1
  146. package/dist/components/composites/tree/tree.d.ts +6 -0
  147. package/dist/components/composites/tree/tree.d.ts.map +1 -1
  148. package/dist/components/composites/tree/tree.js +30 -4
  149. package/dist/components/composites/tree/tree.js.map +1 -1
  150. package/dist/components/composites/update-dialog/channel-control.d.ts.map +1 -1
  151. package/dist/components/composites/update-dialog/channel-control.js +7 -8
  152. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  153. package/dist/components/composites/update-dialog/update-dialog.d.ts +2 -26
  154. package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
  155. package/dist/components/composites/update-dialog/update-dialog.js +47 -125
  156. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  157. package/dist/components/composites/update-dialog/update-model.d.ts +65 -0
  158. package/dist/components/composites/update-dialog/update-model.d.ts.map +1 -0
  159. package/dist/components/composites/update-dialog/update-model.js +75 -0
  160. package/dist/components/composites/update-dialog/update-model.js.map +1 -0
  161. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  162. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.d.ts.map +1 -1
  163. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +3 -16
  164. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  165. package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -1
  166. package/dist/components/composites/workspace-switcher/workspace-switcher.js +10 -14
  167. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  168. package/dist/components/conversation/busy-send-button.d.ts +3 -5
  169. package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
  170. package/dist/components/conversation/busy-send-button.js +4 -15
  171. package/dist/components/conversation/busy-send-button.js.map +1 -1
  172. package/dist/components/conversation/chat-composer.d.ts +1 -1
  173. package/dist/components/conversation/chat-composer.d.ts.map +1 -1
  174. package/dist/components/conversation/chat-composer.js +1 -1
  175. package/dist/components/conversation/chat-composer.js.map +1 -1
  176. package/dist/components/conversation/composer-core.d.ts +35 -0
  177. package/dist/components/conversation/composer-core.d.ts.map +1 -0
  178. package/dist/components/conversation/composer-core.js +68 -0
  179. package/dist/components/conversation/composer-core.js.map +1 -0
  180. package/dist/components/conversation/composer-menu.d.ts +1 -1
  181. package/dist/components/conversation/composer-menu.d.ts.map +1 -1
  182. package/dist/components/conversation/composer-menu.js.map +1 -1
  183. package/dist/components/conversation/conversation-pane.d.ts +4 -1
  184. package/dist/components/conversation/conversation-pane.d.ts.map +1 -1
  185. package/dist/components/conversation/conversation-pane.js +4 -0
  186. package/dist/components/conversation/conversation-pane.js.map +1 -1
  187. package/dist/components/conversation/conversation-surface.d.ts +9 -6
  188. package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
  189. package/dist/components/conversation/conversation-surface.js +7 -5
  190. package/dist/components/conversation/conversation-surface.js.map +1 -1
  191. package/dist/components/conversation/ime-guard.d.ts +1 -0
  192. package/dist/components/conversation/ime-guard.d.ts.map +1 -1
  193. package/dist/components/conversation/ime-guard.js +5 -0
  194. package/dist/components/conversation/ime-guard.js.map +1 -1
  195. package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
  196. package/dist/components/conversation/internal/chat-composer-shell.js +16 -50
  197. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  198. package/dist/components/conversation/message-composer.d.ts +1 -3
  199. package/dist/components/conversation/message-composer.d.ts.map +1 -1
  200. package/dist/components/conversation/message-composer.js +15 -32
  201. package/dist/components/conversation/message-composer.js.map +1 -1
  202. package/dist/components/conversation/message-row.d.ts +10 -11
  203. package/dist/components/conversation/message-row.d.ts.map +1 -1
  204. package/dist/components/conversation/message-row.js +24 -49
  205. package/dist/components/conversation/message-row.js.map +1 -1
  206. package/dist/components/conversation/paste-token-editor.d.ts.map +1 -1
  207. package/dist/components/conversation/paste-token-editor.js +7 -17
  208. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  209. package/dist/components/conversation/paste-tokens.d.ts +10 -1
  210. package/dist/components/conversation/paste-tokens.d.ts.map +1 -1
  211. package/dist/components/conversation/paste-tokens.js +26 -2
  212. package/dist/components/conversation/paste-tokens.js.map +1 -1
  213. package/dist/components/conversation/scroll-follow-core.d.ts +30 -79
  214. package/dist/components/conversation/scroll-follow-core.d.ts.map +1 -1
  215. package/dist/components/conversation/scroll-follow-core.js +65 -54
  216. package/dist/components/conversation/scroll-follow-core.js.map +1 -1
  217. package/dist/components/conversation/scroll-follow.d.ts +5 -1
  218. package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
  219. package/dist/components/conversation/scroll-follow.js +27 -91
  220. package/dist/components/conversation/scroll-follow.js.map +1 -1
  221. package/dist/components/conversation/thread-panel.d.ts +0 -2
  222. package/dist/components/conversation/thread-panel.d.ts.map +1 -1
  223. package/dist/components/conversation/thread-panel.js.map +1 -1
  224. package/dist/components/conversation/transcript-composition.d.ts.map +1 -1
  225. package/dist/components/conversation/transcript-composition.js +4 -16
  226. package/dist/components/conversation/transcript-composition.js.map +1 -1
  227. package/dist/components/conversation/transcript-folding.d.ts +0 -1
  228. package/dist/components/conversation/transcript-folding.d.ts.map +1 -1
  229. package/dist/components/conversation/transcript-folding.js +1 -1
  230. package/dist/components/conversation/transcript-folding.js.map +1 -1
  231. package/dist/components/conversation/transcript-grouping.d.ts +8 -0
  232. package/dist/components/conversation/transcript-grouping.d.ts.map +1 -1
  233. package/dist/components/conversation/transcript-grouping.js +17 -3
  234. package/dist/components/conversation/transcript-grouping.js.map +1 -1
  235. package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts.map +1 -1
  236. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +2 -1
  237. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  238. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -1
  239. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -1
  240. package/dist/components/layout/floating-preview/index.js +2 -2
  241. package/dist/components/layout/floating-preview/model.d.ts +21 -55
  242. package/dist/components/layout/floating-preview/model.d.ts.map +1 -1
  243. package/dist/components/layout/floating-preview/model.js +33 -88
  244. package/dist/components/layout/floating-preview/model.js.map +1 -1
  245. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
  246. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +11 -5
  247. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  248. package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts +2 -12
  249. package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts.map +1 -1
  250. package/dist/components/layout/shell-top-bar/shell-top-bar.js +2 -1
  251. package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
  252. package/dist/components/layout/side-rail/side-rail-context.d.ts +0 -1
  253. package/dist/components/layout/side-rail/side-rail-context.d.ts.map +1 -1
  254. package/dist/components/layout/side-rail/side-rail-context.js +2 -8
  255. package/dist/components/layout/side-rail/side-rail-context.js.map +1 -1
  256. package/dist/components/layout/side-rail/side-rail.d.ts +0 -9
  257. package/dist/components/layout/side-rail/side-rail.d.ts.map +1 -1
  258. package/dist/components/layout/side-rail/side-rail.js +148 -128
  259. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  260. package/dist/components/layout/sidebar-nav/index.d.ts +2 -1
  261. package/dist/components/layout/sidebar-nav/index.d.ts.map +1 -1
  262. package/dist/components/layout/sidebar-nav/index.js +2 -1
  263. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.d.ts +10 -0
  264. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.d.ts.map +1 -0
  265. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js +18 -0
  266. package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js.map +1 -0
  267. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts +1 -1
  268. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.d.ts.map +1 -1
  269. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js.map +1 -1
  270. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts +5 -9
  271. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
  272. package/dist/components/layout/sidebar-nav/sidebar-nav.js +5 -23
  273. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  274. package/dist/components/layout/split-layout/geometry.d.ts.map +1 -1
  275. package/dist/components/layout/split-layout/geometry.js +2 -2
  276. package/dist/components/layout/split-layout/geometry.js.map +1 -1
  277. package/dist/components/layout/split-layout/index.js +2 -2
  278. package/dist/components/layout/split-layout/model.d.ts.map +1 -1
  279. package/dist/components/layout/split-layout/model.js +4 -4
  280. package/dist/components/layout/split-layout/model.js.map +1 -1
  281. package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts +5 -0
  282. package/dist/components/layout/split-layout/resize-controller-core-retry.d.ts.map +1 -1
  283. package/dist/components/layout/split-layout/resize-controller-core-retry.js +17 -10
  284. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  285. package/dist/components/layout/split-layout/resize-controller-core.d.ts +5 -0
  286. package/dist/components/layout/split-layout/resize-controller-core.d.ts.map +1 -1
  287. package/dist/components/layout/split-layout/resize-controller-core.js +17 -10
  288. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  289. package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
  290. package/dist/components/layout/split-layout/split-layout.js +54 -47
  291. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  292. package/dist/components/layout/split-layout/tree.d.ts +2 -0
  293. package/dist/components/layout/split-layout/tree.d.ts.map +1 -1
  294. package/dist/components/layout/split-layout/tree.js +5 -1
  295. package/dist/components/layout/split-layout/tree.js.map +1 -1
  296. package/dist/components/layout/top-bar/top-bar.d.ts +2 -9
  297. package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
  298. package/dist/components/layout/top-bar/top-bar.js +4 -8
  299. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  300. package/dist/components/layout/top-bar/window-chrome.d.ts +13 -0
  301. package/dist/components/layout/top-bar/window-chrome.d.ts.map +1 -0
  302. package/dist/components/layout/top-bar/window-chrome.js +12 -0
  303. package/dist/components/layout/top-bar/window-chrome.js.map +1 -0
  304. package/dist/components/motion/presence.d.ts +1 -1
  305. package/dist/components/motion/presence.d.ts.map +1 -1
  306. package/dist/components/motion/presence.js +1 -4
  307. package/dist/components/motion/presence.js.map +1 -1
  308. package/dist/components/theme/appearance-panel.d.ts +3 -1
  309. package/dist/components/theme/appearance-panel.d.ts.map +1 -1
  310. package/dist/components/theme/appearance-panel.js +17 -9
  311. package/dist/components/theme/appearance-panel.js.map +1 -1
  312. package/dist/components/theme/index.d.ts +1 -1
  313. package/dist/components/theme/index.d.ts.map +1 -1
  314. package/dist/components/theme/index.js +5 -4
  315. package/dist/components/theme/lazy.d.ts +31 -5
  316. package/dist/components/theme/lazy.d.ts.map +1 -1
  317. package/dist/components/theme/lazy.js +39 -6
  318. package/dist/components/theme/lazy.js.map +1 -0
  319. package/dist/components/theme/script-projection.js +3 -2
  320. package/dist/components/theme/script-projection.js.map +1 -1
  321. package/dist/components/theme/script.js +3 -1
  322. package/dist/components/theme/theme-api.d.ts +14 -0
  323. package/dist/components/theme/theme-api.d.ts.map +1 -0
  324. package/dist/components/theme/theme-catalogue-source.d.ts.map +1 -1
  325. package/dist/components/theme/theme-catalogue-source.js +3 -2
  326. package/dist/components/theme/theme-catalogue-source.js.map +1 -1
  327. package/dist/components/theme/theme-document.d.ts +112 -10
  328. package/dist/components/theme/theme-document.d.ts.map +1 -1
  329. package/dist/components/theme/{theme-document-core.js → theme-document.js} +7 -7
  330. package/dist/components/theme/theme-document.js.map +1 -0
  331. package/dist/components/theme/theme-mode-toggle.d.ts +1 -1
  332. package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -1
  333. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  334. package/dist/components/theme/theme-persistence.d.ts +6 -5
  335. package/dist/components/theme/theme-persistence.d.ts.map +1 -1
  336. package/dist/components/theme/theme-persistence.js +48 -80
  337. package/dist/components/theme/theme-persistence.js.map +1 -1
  338. package/dist/components/theme/theme-picker.d.ts +1 -1
  339. package/dist/components/theme/theme-picker.d.ts.map +1 -1
  340. package/dist/components/theme/theme-picker.js.map +1 -1
  341. package/dist/components/theme/theme-provider-value.d.ts +14 -15
  342. package/dist/components/theme/theme-provider-value.d.ts.map +1 -1
  343. package/dist/components/theme/theme-provider-value.js +26 -42
  344. package/dist/components/theme/theme-provider-value.js.map +1 -1
  345. package/dist/components/theme/theme-provider.d.ts +3 -9
  346. package/dist/components/theme/theme-provider.d.ts.map +1 -1
  347. package/dist/components/theme/theme-provider.js +8 -7
  348. package/dist/components/theme/theme-provider.js.map +1 -1
  349. package/dist/components/theme/theme-script.d.ts +12 -25
  350. package/dist/components/theme/theme-script.d.ts.map +1 -1
  351. package/dist/components/theme/theme-script.js +35 -38
  352. package/dist/components/theme/theme-script.js.map +1 -1
  353. package/dist/components/theme/theme-state.d.ts +241 -9
  354. package/dist/components/theme/theme-state.d.ts.map +1 -1
  355. package/dist/components/theme/{theme-state-core.js → theme-state.js} +10 -11
  356. package/dist/components/theme/theme-state.js.map +1 -0
  357. package/dist/components/theme/theme-toggle.d.ts +1 -1
  358. package/dist/components/theme/theme-toggle.d.ts.map +1 -1
  359. package/dist/components/theme/theme-toggle.js.map +1 -1
  360. package/dist/components/ui/alert-dialog/alert-dialog.d.ts +7 -5
  361. package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -1
  362. package/dist/components/ui/alert-dialog/alert-dialog.js +40 -36
  363. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  364. package/dist/components/ui/attachment/attachment.d.ts.map +1 -1
  365. package/dist/components/ui/attachment/attachment.js +5 -16
  366. package/dist/components/ui/attachment/attachment.js.map +1 -1
  367. package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
  368. package/dist/components/ui/avatar/avatar.js +5 -2
  369. package/dist/components/ui/avatar/avatar.js.map +1 -1
  370. package/dist/components/ui/board/board.d.ts +0 -3
  371. package/dist/components/ui/board/board.d.ts.map +1 -1
  372. package/dist/components/ui/board/board.js +3 -6
  373. package/dist/components/ui/board/board.js.map +1 -1
  374. package/dist/components/ui/button-group/button-group.d.ts +1 -1
  375. package/dist/components/ui/button-group/button-group.d.ts.map +1 -1
  376. package/dist/components/ui/button-group/button-group.js.map +1 -1
  377. package/dist/components/ui/chart/chart.d.ts +0 -3
  378. package/dist/components/ui/chart/chart.d.ts.map +1 -1
  379. package/dist/components/ui/chart/chart.js.map +1 -1
  380. package/dist/components/ui/code-block/code-block.d.ts +0 -2
  381. package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
  382. package/dist/components/ui/code-block/code-block.js +8 -24
  383. package/dist/components/ui/code-block/code-block.js.map +1 -1
  384. package/dist/components/ui/command/command.d.ts.map +1 -1
  385. package/dist/components/ui/command/command.js +56 -48
  386. package/dist/components/ui/command/command.js.map +1 -1
  387. package/dist/components/ui/context-menu/context-menu.d.ts +8 -30
  388. package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
  389. package/dist/components/ui/context-menu/context-menu.js +13 -121
  390. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  391. package/dist/components/ui/dialog/dialog-layer.d.ts +46 -0
  392. package/dist/components/ui/dialog/dialog-layer.d.ts.map +1 -0
  393. package/dist/components/ui/dialog/dialog-layer.js +169 -0
  394. package/dist/components/ui/dialog/dialog-layer.js.map +1 -0
  395. package/dist/components/ui/dialog/dialog.d.ts +20 -26
  396. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  397. package/dist/components/ui/dialog/dialog.js +69 -187
  398. package/dist/components/ui/dialog/dialog.js.map +1 -1
  399. package/dist/components/ui/drawer/drawer.d.ts.map +1 -1
  400. package/dist/components/ui/drawer/drawer.js +5 -8
  401. package/dist/components/ui/drawer/drawer.js.map +1 -1
  402. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +39 -53
  403. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  404. package/dist/components/ui/dropdown-menu/dropdown-menu.js +135 -191
  405. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  406. package/dist/components/ui/dropdown-menu/menu-parts.d.ts +46 -0
  407. package/dist/components/ui/dropdown-menu/menu-parts.d.ts.map +1 -0
  408. package/dist/components/ui/dropdown-menu/menu-parts.js +176 -0
  409. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -0
  410. package/dist/components/ui/field/field.js.map +1 -1
  411. package/dist/components/ui/field/number-field.js.map +1 -1
  412. package/dist/components/ui/hover-card/hover-card.d.ts +1 -2
  413. package/dist/components/ui/hover-card/hover-card.d.ts.map +1 -1
  414. package/dist/components/ui/hover-card/hover-card.js +4 -21
  415. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  416. package/dist/components/ui/menubar/menubar.d.ts +19 -33
  417. package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
  418. package/dist/components/ui/menubar/menubar.js +21 -116
  419. package/dist/components/ui/menubar/menubar.js.map +1 -1
  420. package/dist/components/ui/message/index.js +2 -1
  421. package/dist/components/ui/message/message.d.ts +0 -1
  422. package/dist/components/ui/message/message.d.ts.map +1 -1
  423. package/dist/components/ui/message/message.js.map +1 -1
  424. package/dist/components/ui/message/parse-message-text.d.ts +20 -2
  425. package/dist/components/ui/message/parse-message-text.d.ts.map +1 -1
  426. package/dist/components/ui/message/parse-message-text.js +94 -28
  427. package/dist/components/ui/message/parse-message-text.js.map +1 -1
  428. package/dist/components/ui/modal-dialog/modal-dialog.d.ts +5 -12
  429. package/dist/components/ui/modal-dialog/modal-dialog.d.ts.map +1 -1
  430. package/dist/components/ui/modal-dialog/modal-dialog.js +61 -77
  431. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  432. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +0 -1
  433. package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
  434. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  435. package/dist/components/ui/popover/popover.d.ts +1 -3
  436. package/dist/components/ui/popover/popover.d.ts.map +1 -1
  437. package/dist/components/ui/popover/popover.js +1 -22
  438. package/dist/components/ui/popover/popover.js.map +1 -1
  439. package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
  440. package/dist/components/ui/resizable/resizable.js +12 -6
  441. package/dist/components/ui/resizable/resizable.js.map +1 -1
  442. package/dist/components/ui/sheet/sheet.d.ts +4 -6
  443. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  444. package/dist/components/ui/sheet/sheet.js +31 -32
  445. package/dist/components/ui/sheet/sheet.js.map +1 -1
  446. package/dist/components/ui/text-link/index.d.ts.map +1 -1
  447. package/dist/components/ui/toggle-group/toggle-group.d.ts +1 -1
  448. package/dist/components/ui/toggle-group/toggle-group.d.ts.map +1 -1
  449. package/dist/components/ui/toggle-group/toggle-group.js +2 -7
  450. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  451. package/dist/components/ui/tooltip/tooltip.d.ts +17 -1
  452. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  453. package/dist/components/ui/tooltip/tooltip.js +40 -20
  454. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  455. package/dist/components/ui/trace/index.d.ts +1 -1
  456. package/dist/components/ui/trace/index.d.ts.map +1 -1
  457. package/dist/components/ui/trace/index.js +1 -1
  458. package/dist/components/ui/trace/trace.d.ts +44 -3
  459. package/dist/components/ui/trace/trace.d.ts.map +1 -1
  460. package/dist/components/ui/trace/trace.js +87 -15
  461. package/dist/components/ui/trace/trace.js.map +1 -1
  462. package/dist/index.js +34 -28
  463. package/dist/lib/accent-presets.d.ts +7 -4
  464. package/dist/lib/accent-presets.d.ts.map +1 -1
  465. package/dist/lib/accent-presets.js +10 -5
  466. package/dist/lib/accent-presets.js.map +1 -1
  467. package/dist/lib/accent-roles.d.ts +20 -1
  468. package/dist/lib/accent-roles.d.ts.map +1 -1
  469. package/dist/lib/accent-roles.js +34 -26
  470. package/dist/lib/accent-roles.js.map +1 -1
  471. package/dist/lib/appearance-font-settings.d.ts.map +1 -1
  472. package/dist/lib/appearance-font-settings.js +4 -4
  473. package/dist/lib/appearance-font-settings.js.map +1 -1
  474. package/dist/lib/async-action.d.ts +42 -0
  475. package/dist/lib/async-action.d.ts.map +1 -0
  476. package/dist/lib/async-action.js +61 -0
  477. package/dist/lib/async-action.js.map +1 -0
  478. package/dist/lib/breakpoints.d.ts +8 -0
  479. package/dist/lib/breakpoints.d.ts.map +1 -0
  480. package/dist/lib/breakpoints.js +11 -0
  481. package/dist/lib/breakpoints.js.map +1 -0
  482. package/dist/lib/bytes.d.ts +8 -0
  483. package/dist/lib/bytes.d.ts.map +1 -0
  484. package/dist/lib/bytes.js +20 -0
  485. package/dist/lib/bytes.js.map +1 -0
  486. package/dist/lib/clipboard.d.ts +13 -0
  487. package/dist/lib/clipboard.d.ts.map +1 -1
  488. package/dist/lib/clipboard.js +32 -1
  489. package/dist/lib/clipboard.js.map +1 -1
  490. package/dist/lib/events.d.ts +14 -0
  491. package/dist/lib/events.d.ts.map +1 -0
  492. package/dist/lib/events.js +16 -0
  493. package/dist/lib/events.js.map +1 -0
  494. package/dist/lib/external-link.d.ts +19 -0
  495. package/dist/lib/external-link.d.ts.map +1 -0
  496. package/dist/lib/external-link.js +27 -0
  497. package/dist/lib/external-link.js.map +1 -0
  498. package/dist/lib/font-catalog.d.ts +3 -6
  499. package/dist/lib/font-catalog.d.ts.map +1 -1
  500. package/dist/lib/font-catalog.js +16 -12
  501. package/dist/lib/font-catalog.js.map +1 -1
  502. package/dist/lib/font-zoom.d.ts +4 -4
  503. package/dist/lib/font-zoom.d.ts.map +1 -1
  504. package/dist/lib/font-zoom.js +9 -12
  505. package/dist/lib/font-zoom.js.map +1 -1
  506. package/dist/lib/overlay.d.ts +29 -1
  507. package/dist/lib/overlay.d.ts.map +1 -1
  508. package/dist/lib/overlay.js +32 -16
  509. package/dist/lib/overlay.js.map +1 -1
  510. package/dist/lib/preference-store.d.ts +13 -3
  511. package/dist/lib/preference-store.d.ts.map +1 -1
  512. package/dist/lib/preference-store.js +27 -37
  513. package/dist/lib/preference-store.js.map +1 -1
  514. package/dist/lib/resize-separator.d.ts +15 -0
  515. package/dist/lib/resize-separator.d.ts.map +1 -0
  516. package/dist/lib/resize-separator.js +23 -0
  517. package/dist/lib/resize-separator.js.map +1 -0
  518. package/dist/lib/safe-script.d.ts +19 -1
  519. package/dist/lib/safe-script.d.ts.map +1 -1
  520. package/dist/lib/safe-script.js +19 -1
  521. package/dist/lib/safe-script.js.map +1 -1
  522. package/dist/lib/scroll-geometry.d.ts +33 -0
  523. package/dist/lib/scroll-geometry.d.ts.map +1 -0
  524. package/dist/lib/scroll-geometry.js +48 -0
  525. package/dist/lib/scroll-geometry.js.map +1 -0
  526. package/dist/lib/text.d.ts +13 -0
  527. package/dist/lib/text.d.ts.map +1 -0
  528. package/dist/lib/text.js +30 -0
  529. package/dist/lib/text.js.map +1 -0
  530. package/dist/lib/theme-accents.d.ts +2 -0
  531. package/dist/lib/theme-accents.d.ts.map +1 -1
  532. package/dist/lib/theme-accents.js +2 -2
  533. package/dist/lib/theme-accents.js.map +1 -1
  534. package/dist/lib/theme-catalogue.d.ts.map +1 -1
  535. package/dist/lib/theme-catalogue.js +3 -4
  536. package/dist/lib/theme-catalogue.js.map +1 -1
  537. package/dist/lib/theme-css.d.ts +14 -1
  538. package/dist/lib/theme-css.d.ts.map +1 -1
  539. package/dist/lib/theme-css.js +25 -48
  540. package/dist/lib/theme-css.js.map +1 -1
  541. package/dist/lib/theme-defaults.d.ts +33 -5
  542. package/dist/lib/theme-defaults.d.ts.map +1 -1
  543. package/dist/lib/theme-defaults.generated.d.ts +1 -1
  544. package/dist/lib/theme-defaults.generated.d.ts.map +1 -1
  545. package/dist/lib/theme-defaults.generated.js.map +1 -1
  546. package/dist/lib/theme-defaults.js +59 -3
  547. package/dist/lib/theme-defaults.js.map +1 -1
  548. package/dist/lib/theme-engine-light.d.ts +6 -0
  549. package/dist/lib/theme-engine-light.d.ts.map +1 -1
  550. package/dist/lib/theme-engine-light.js +71 -57
  551. package/dist/lib/theme-engine-light.js.map +1 -1
  552. package/dist/lib/theme-engine.d.ts +20 -22
  553. package/dist/lib/theme-engine.d.ts.map +1 -1
  554. package/dist/lib/theme-engine.js +19 -6
  555. package/dist/lib/theme-engine.js.map +1 -1
  556. package/dist/lib/theme-records.d.ts +3 -3
  557. package/dist/lib/theme-records.d.ts.map +1 -1
  558. package/dist/lib/theme-records.js +20 -59
  559. package/dist/lib/theme-records.js.map +1 -1
  560. package/dist/lib/theme-types.d.ts +174 -0
  561. package/dist/lib/theme-types.d.ts.map +1 -0
  562. package/dist/lib/theme-types.js +105 -0
  563. package/dist/lib/theme-types.js.map +1 -0
  564. package/dist/lib/themes.d.ts +4 -159
  565. package/dist/lib/themes.d.ts.map +1 -1
  566. package/dist/lib/themes.js +14 -33
  567. package/dist/lib/themes.js.map +1 -1
  568. package/dist/lib/tokens.d.ts.map +1 -1
  569. package/dist/lib/tokens.js +0 -1
  570. package/dist/lib/tokens.js.map +1 -1
  571. package/dist/lib/url.d.ts +9 -0
  572. package/dist/lib/url.d.ts.map +1 -0
  573. package/dist/lib/url.js +24 -0
  574. package/dist/lib/url.js.map +1 -0
  575. package/dist/lib/version-notes.d.ts.map +1 -1
  576. package/dist/lib/version-notes.js +3 -10
  577. package/dist/lib/version-notes.js.map +1 -1
  578. package/dist/r/about-dialog.json +2 -1
  579. package/dist/r/action-button.json +2 -1
  580. package/dist/r/alert-dialog.json +1 -0
  581. package/dist/r/checkpoint.json +0 -2
  582. package/dist/r/code-block.json +1 -0
  583. package/dist/r/confirmation.json +0 -1
  584. package/dist/r/context-menu.json +2 -2
  585. package/dist/r/context.json +0 -1
  586. package/dist/r/conversation.json +6 -5
  587. package/dist/r/dialog.json +5 -0
  588. package/dist/r/drawer.json +0 -1
  589. package/dist/r/dropdown-menu.json +5 -0
  590. package/dist/r/lib.json +50 -0
  591. package/dist/r/menubar.json +2 -2
  592. package/dist/r/model-selector.json +0 -1
  593. package/dist/r/reasoning.json +2 -1
  594. package/dist/r/registry.json +102 -43
  595. package/dist/r/shell-top-bar.json +1 -0
  596. package/dist/r/sidebar-nav.json +5 -0
  597. package/dist/r/sources.json +2 -2
  598. package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +22 -42
  599. package/dist/r/src/components/composites/account-menu/account-menu.tsx +9 -35
  600. package/dist/r/src/components/composites/action-button/action-button.tsx +5 -7
  601. package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -11
  602. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +8 -5
  603. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +8 -6
  604. package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +14 -74
  605. package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +11 -77
  606. package/dist/r/src/components/composites/appearance-editor/index.ts +1 -0
  607. package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +9 -13
  608. package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +16 -18
  609. package/dist/r/src/components/composites/chat/chat.tsx +2 -2
  610. package/dist/r/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
  611. package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +3 -3
  612. package/dist/r/src/components/composites/confirmation/confirmation-model.ts +9 -17
  613. package/dist/r/src/components/composites/confirmation/confirmation.tsx +2 -2
  614. package/dist/r/src/components/composites/context/context-model.ts +1 -1
  615. package/dist/r/src/components/composites/file-tree/build-file-tree.ts +21 -39
  616. package/dist/r/src/components/composites/file-tree/file-tree.tsx +5 -58
  617. package/dist/r/src/components/composites/file-tree/index.ts +1 -1
  618. package/dist/r/src/components/composites/help-center/help-center.tsx +8 -21
  619. package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +10 -11
  620. package/dist/r/src/components/composites/inline-citation/citation.ts +2 -1
  621. package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +3 -2
  622. package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +30 -30
  623. package/dist/r/src/components/composites/message-scroller/scroll-anchor.ts +5 -5
  624. package/dist/r/src/components/composites/model-selector/model-selector.tsx +3 -2
  625. package/dist/r/src/components/composites/model-selector/models.ts +1 -1
  626. package/dist/r/src/components/composites/plan/plan.tsx +1 -4
  627. package/dist/r/src/components/composites/queue/queue.tsx +8 -11
  628. package/dist/r/src/components/composites/reasoning/reasoning.tsx +5 -23
  629. package/dist/r/src/components/composites/settings/settings-layout.tsx +3 -2
  630. package/dist/r/src/components/composites/settings/settings-navigation.tsx +4 -1
  631. package/dist/r/src/components/composites/sources/source.ts +7 -53
  632. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +3 -12
  633. package/dist/r/src/components/composites/subagent/subagent.tsx +7 -17
  634. package/dist/r/src/components/composites/suggestion/suggestion.tsx +4 -3
  635. package/dist/r/src/components/composites/task/task.tsx +21 -64
  636. package/dist/r/src/components/composites/terminal/terminal-model.ts +4 -4
  637. package/dist/r/src/components/composites/terminal/terminal.tsx +3 -12
  638. package/dist/r/src/components/composites/test-results/test-results.tsx +3 -12
  639. package/dist/r/src/components/composites/tool/tool.tsx +34 -40
  640. package/dist/r/src/components/composites/tree/tree-navigation.ts +22 -2
  641. package/dist/r/src/components/composites/tree/tree.tsx +47 -3
  642. package/dist/r/src/components/composites/update-dialog/channel-control.tsx +10 -14
  643. package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +66 -200
  644. package/dist/r/src/components/composites/update-dialog/update-model.ts +137 -0
  645. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
  646. package/dist/r/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +1 -18
  647. package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +16 -19
  648. package/dist/r/src/components/conversation/busy-send-button.tsx +7 -34
  649. package/dist/r/src/components/conversation/chat-composer.tsx +1 -1
  650. package/dist/r/src/components/conversation/composer-core.ts +76 -0
  651. package/dist/r/src/components/conversation/composer-menu.tsx +1 -1
  652. package/dist/r/src/components/conversation/conversation-pane.tsx +4 -1
  653. package/dist/r/src/components/conversation/conversation-surface.tsx +23 -10
  654. package/dist/r/src/components/conversation/ime-guard.ts +6 -0
  655. package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +24 -65
  656. package/dist/r/src/components/conversation/message-composer.tsx +24 -54
  657. package/dist/r/src/components/conversation/message-row.tsx +33 -47
  658. package/dist/r/src/components/conversation/paste-token-editor.tsx +13 -16
  659. package/dist/r/src/components/conversation/paste-tokens.ts +36 -1
  660. package/dist/r/src/components/conversation/scroll-follow-core.ts +66 -137
  661. package/dist/r/src/components/conversation/scroll-follow.ts +26 -67
  662. package/dist/r/src/components/conversation/thread-panel.tsx +2 -4
  663. package/dist/r/src/components/conversation/transcript-composition.tsx +9 -33
  664. package/dist/r/src/components/conversation/transcript-folding.ts +2 -2
  665. package/dist/r/src/components/conversation/transcript-grouping.ts +18 -3
  666. package/dist/r/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +4 -3
  667. package/dist/r/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +1 -1
  668. package/dist/r/src/components/layout/floating-preview/model.ts +57 -195
  669. package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +6 -12
  670. package/dist/r/src/components/layout/shell-top-bar/shell-top-bar.tsx +32 -47
  671. package/dist/r/src/components/layout/side-rail/side-rail-context.ts +1 -11
  672. package/dist/r/src/components/layout/side-rail/side-rail.tsx +95 -107
  673. package/dist/r/src/components/layout/sidebar-nav/index.ts +1 -2
  674. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +15 -0
  675. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +1 -4
  676. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +9 -27
  677. package/dist/r/src/components/layout/split-layout/geometry.ts +2 -9
  678. package/dist/r/src/components/layout/split-layout/model.ts +3 -6
  679. package/dist/r/src/components/layout/split-layout/resize-controller-core-retry.tsx +12 -6
  680. package/dist/r/src/components/layout/split-layout/resize-controller-core.tsx +12 -6
  681. package/dist/r/src/components/layout/split-layout/split-layout.tsx +46 -61
  682. package/dist/r/src/components/layout/split-layout/tree.ts +5 -0
  683. package/dist/r/src/components/layout/top-bar/top-bar.tsx +16 -38
  684. package/dist/r/src/components/layout/top-bar/window-chrome.ts +23 -0
  685. package/dist/r/src/components/motion/presence.tsx +1 -3
  686. package/dist/r/src/components/theme/appearance-panel.tsx +28 -19
  687. package/dist/r/src/components/theme/index.ts +1 -22
  688. package/dist/r/src/components/theme/lazy.ts +36 -26
  689. package/dist/r/src/components/theme/theme-api.ts +30 -0
  690. package/dist/r/src/components/theme/theme-catalogue-source.ts +3 -2
  691. package/dist/r/src/components/theme/theme-document.ts +248 -23
  692. package/dist/r/src/components/theme/theme-mode-toggle.tsx +1 -1
  693. package/dist/r/src/components/theme/theme-persistence.ts +74 -130
  694. package/dist/r/src/components/theme/theme-picker.tsx +2 -2
  695. package/dist/r/src/components/theme/theme-provider-value.ts +53 -68
  696. package/dist/r/src/components/theme/theme-provider.tsx +5 -24
  697. package/dist/r/src/components/theme/theme-script.ts +48 -43
  698. package/dist/r/src/components/theme/theme-state.ts +350 -10
  699. package/dist/r/src/components/theme/theme-toggle.tsx +1 -1
  700. package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +43 -43
  701. package/dist/r/src/components/ui/attachment/attachment.tsx +4 -17
  702. package/dist/r/src/components/ui/avatar/avatar.tsx +3 -2
  703. package/dist/r/src/components/ui/board/board.tsx +4 -10
  704. package/dist/r/src/components/ui/button-group/button-group.tsx +1 -1
  705. package/dist/r/src/components/ui/chart/chart.tsx +0 -3
  706. package/dist/r/src/components/ui/code-block/code-block.tsx +7 -26
  707. package/dist/r/src/components/ui/command/command.tsx +43 -39
  708. package/dist/r/src/components/ui/context-menu/context-menu.tsx +18 -168
  709. package/dist/r/src/components/ui/dialog/dialog-layer.tsx +266 -0
  710. package/dist/r/src/components/ui/dialog/dialog.tsx +77 -271
  711. package/dist/r/src/components/ui/drawer/drawer.tsx +5 -23
  712. package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +204 -226
  713. package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +220 -0
  714. package/dist/r/src/components/ui/field/field.tsx +1 -1
  715. package/dist/r/src/components/ui/field/number-field.tsx +1 -1
  716. package/dist/r/src/components/ui/hover-card/hover-card.tsx +4 -11
  717. package/dist/r/src/components/ui/menubar/menubar.tsx +36 -169
  718. package/dist/r/src/components/ui/message/message.tsx +0 -1
  719. package/dist/r/src/components/ui/message/parse-message-text.ts +80 -32
  720. package/dist/r/src/components/ui/modal-dialog/modal-dialog.tsx +9 -39
  721. package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +0 -1
  722. package/dist/r/src/components/ui/popover/popover.tsx +5 -11
  723. package/dist/r/src/components/ui/resizable/resizable.tsx +6 -16
  724. package/dist/r/src/components/ui/sheet/sheet.tsx +30 -42
  725. package/dist/r/src/components/ui/text-link/index.ts +0 -1
  726. package/dist/r/src/components/ui/toggle-group/toggle-group.tsx +3 -11
  727. package/dist/r/src/components/ui/tooltip/tooltip.tsx +47 -26
  728. package/dist/r/src/components/ui/trace/index.ts +7 -0
  729. package/dist/r/src/components/ui/trace/trace.tsx +100 -9
  730. package/dist/r/src/lib/accent-presets.ts +12 -8
  731. package/dist/r/src/lib/accent-roles.ts +43 -29
  732. package/dist/r/src/lib/appearance-font-settings.ts +5 -5
  733. package/dist/r/src/lib/async-action.ts +72 -0
  734. package/dist/r/src/lib/breakpoints.ts +7 -0
  735. package/dist/r/src/lib/bytes.ts +20 -0
  736. package/dist/r/src/lib/clipboard.ts +43 -0
  737. package/dist/r/src/lib/events.ts +17 -0
  738. package/dist/r/src/lib/external-link.ts +42 -0
  739. package/dist/r/src/lib/font-catalog.ts +4 -6
  740. package/dist/r/src/lib/font-zoom.ts +9 -14
  741. package/dist/r/src/lib/overlay.ts +55 -18
  742. package/dist/r/src/lib/preference-store.ts +36 -34
  743. package/dist/r/src/lib/resize-separator.ts +36 -0
  744. package/dist/r/src/lib/safe-script.ts +19 -1
  745. package/dist/r/src/lib/scroll-geometry.ts +69 -0
  746. package/dist/r/src/lib/text.ts +49 -0
  747. package/dist/r/src/lib/theme-accents.ts +1 -1
  748. package/dist/r/src/lib/theme-catalogue.ts +3 -4
  749. package/dist/r/src/lib/theme-css.ts +33 -54
  750. package/dist/r/src/lib/theme-defaults.generated.ts +1 -1
  751. package/dist/r/src/lib/theme-defaults.ts +55 -7
  752. package/dist/r/src/lib/theme-engine-light.ts +88 -72
  753. package/dist/r/src/lib/theme-engine.ts +29 -33
  754. package/dist/r/src/lib/theme-records.ts +33 -69
  755. package/dist/r/src/lib/theme-types.ts +199 -0
  756. package/dist/r/src/lib/themes.ts +33 -196
  757. package/dist/r/src/lib/tokens.ts +0 -1
  758. package/dist/r/src/lib/url.ts +25 -0
  759. package/dist/r/src/lib/version-notes.ts +3 -9
  760. package/dist/r/src/styles/theme-variants.css +32 -32
  761. package/dist/r/src/styles/theme.css +17 -13
  762. package/dist/r/subagent.json +0 -2
  763. package/dist/r/suggestion.json +0 -1
  764. package/dist/r/theming.json +5 -20
  765. package/dist/r/top-bar.json +5 -0
  766. package/dist/r/trace.json +1 -0
  767. package/dist/r/update-dialog.json +5 -0
  768. package/package.json +9 -7
  769. package/registry.json +102 -43
  770. package/src/components/composites/about-dialog/about-dialog.tsx +22 -42
  771. package/src/components/composites/account-menu/account-menu.tsx +9 -35
  772. package/src/components/composites/action-button/action-button.tsx +5 -7
  773. package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +3 -11
  774. package/src/components/composites/appearance-editor/appearance-choices.tsx +8 -5
  775. package/src/components/composites/appearance-editor/appearance-editor.tsx +8 -6
  776. package/src/components/composites/appearance-editor/appearance-rows.tsx +14 -74
  777. package/src/components/composites/appearance-editor/font-settings-group.tsx +11 -77
  778. package/src/components/composites/appearance-editor/index.ts +1 -0
  779. package/src/components/composites/catalog-browser/catalog-browser.tsx +9 -13
  780. package/src/components/composites/chain-of-thought/chain-of-thought.tsx +16 -18
  781. package/src/components/composites/chat/chat.tsx +2 -2
  782. package/src/components/composites/checkpoint/checkpoint-model.ts +3 -3
  783. package/src/components/composites/checkpoint/checkpoint.tsx +3 -3
  784. package/src/components/composites/confirmation/confirmation-model.ts +9 -17
  785. package/src/components/composites/confirmation/confirmation.tsx +2 -2
  786. package/src/components/composites/context/context-model.ts +1 -1
  787. package/src/components/composites/file-tree/build-file-tree.ts +21 -39
  788. package/src/components/composites/file-tree/file-tree.tsx +5 -58
  789. package/src/components/composites/file-tree/index.ts +1 -1
  790. package/src/components/composites/help-center/help-center.tsx +8 -21
  791. package/src/components/composites/icon-picker/icon-picker.tsx +10 -11
  792. package/src/components/composites/inline-citation/citation.ts +2 -1
  793. package/src/components/composites/inline-citation/inline-citation.tsx +3 -2
  794. package/src/components/composites/message-scroller/message-scroller.tsx +30 -30
  795. package/src/components/composites/message-scroller/scroll-anchor.ts +5 -5
  796. package/src/components/composites/model-selector/model-selector.tsx +3 -2
  797. package/src/components/composites/model-selector/models.ts +1 -1
  798. package/src/components/composites/plan/plan.tsx +1 -4
  799. package/src/components/composites/queue/queue.tsx +8 -11
  800. package/src/components/composites/reasoning/reasoning.tsx +5 -23
  801. package/src/components/composites/settings/settings-layout.tsx +3 -2
  802. package/src/components/composites/settings/settings-navigation.tsx +4 -1
  803. package/src/components/composites/sources/source.ts +7 -53
  804. package/src/components/composites/stack-trace/stack-trace.tsx +3 -12
  805. package/src/components/composites/subagent/subagent.tsx +7 -17
  806. package/src/components/composites/suggestion/suggestion.tsx +4 -3
  807. package/src/components/composites/task/task.tsx +21 -64
  808. package/src/components/composites/terminal/terminal-model.ts +4 -4
  809. package/src/components/composites/terminal/terminal.tsx +3 -12
  810. package/src/components/composites/test-results/test-results.tsx +3 -12
  811. package/src/components/composites/tool/tool.tsx +34 -40
  812. package/src/components/composites/tree/tree-navigation.ts +22 -2
  813. package/src/components/composites/tree/tree.tsx +47 -3
  814. package/src/components/composites/update-dialog/channel-control.tsx +10 -14
  815. package/src/components/composites/update-dialog/update-dialog.tsx +66 -200
  816. package/src/components/composites/update-dialog/update-model.ts +137 -0
  817. package/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
  818. package/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +1 -18
  819. package/src/components/composites/workspace-switcher/workspace-switcher.tsx +16 -19
  820. package/src/components/conversation/busy-send-button.tsx +7 -34
  821. package/src/components/conversation/chat-composer.tsx +1 -1
  822. package/src/components/conversation/composer-core.ts +76 -0
  823. package/src/components/conversation/composer-menu.tsx +1 -1
  824. package/src/components/conversation/conversation-pane.tsx +4 -1
  825. package/src/components/conversation/conversation-surface.tsx +23 -10
  826. package/src/components/conversation/ime-guard.ts +6 -0
  827. package/src/components/conversation/internal/chat-composer-shell.tsx +24 -65
  828. package/src/components/conversation/message-composer.tsx +24 -54
  829. package/src/components/conversation/message-row.tsx +33 -47
  830. package/src/components/conversation/paste-token-editor.tsx +13 -16
  831. package/src/components/conversation/paste-tokens.ts +36 -1
  832. package/src/components/conversation/scroll-follow-core.ts +66 -137
  833. package/src/components/conversation/scroll-follow.ts +26 -67
  834. package/src/components/conversation/thread-panel.tsx +2 -4
  835. package/src/components/conversation/transcript-composition.tsx +9 -33
  836. package/src/components/conversation/transcript-folding.ts +2 -2
  837. package/src/components/conversation/transcript-grouping.ts +18 -3
  838. package/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +4 -3
  839. package/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +1 -1
  840. package/src/components/layout/floating-preview/model.ts +57 -195
  841. package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +6 -12
  842. package/src/components/layout/shell-top-bar/shell-top-bar.tsx +32 -47
  843. package/src/components/layout/side-rail/side-rail-context.ts +1 -11
  844. package/src/components/layout/side-rail/side-rail.tsx +95 -107
  845. package/src/components/layout/sidebar-nav/index.ts +1 -2
  846. package/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +15 -0
  847. package/src/components/layout/sidebar-nav/sidebar-nav-resize-handle.tsx +1 -4
  848. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +9 -27
  849. package/src/components/layout/split-layout/geometry.ts +2 -9
  850. package/src/components/layout/split-layout/model.ts +3 -6
  851. package/src/components/layout/split-layout/resize-controller-core-retry.tsx +12 -6
  852. package/src/components/layout/split-layout/resize-controller-core.tsx +12 -6
  853. package/src/components/layout/split-layout/split-layout.tsx +46 -61
  854. package/src/components/layout/split-layout/tree.ts +5 -0
  855. package/src/components/layout/top-bar/top-bar.tsx +16 -38
  856. package/src/components/layout/top-bar/window-chrome.ts +23 -0
  857. package/src/components/motion/presence.tsx +1 -3
  858. package/src/components/theme/appearance-panel.tsx +28 -19
  859. package/src/components/theme/index.ts +1 -22
  860. package/src/components/theme/lazy.ts +36 -26
  861. package/src/components/theme/theme-api.ts +30 -0
  862. package/src/components/theme/theme-catalogue-source.ts +3 -2
  863. package/src/components/theme/theme-document.ts +248 -23
  864. package/src/components/theme/theme-mode-toggle.tsx +1 -1
  865. package/src/components/theme/theme-persistence.ts +74 -130
  866. package/src/components/theme/theme-picker.tsx +2 -2
  867. package/src/components/theme/theme-provider-value.ts +53 -68
  868. package/src/components/theme/theme-provider.tsx +5 -24
  869. package/src/components/theme/theme-script.ts +48 -43
  870. package/src/components/theme/theme-state.ts +350 -10
  871. package/src/components/theme/theme-toggle.tsx +1 -1
  872. package/src/components/ui/alert-dialog/alert-dialog.tsx +43 -43
  873. package/src/components/ui/attachment/attachment.tsx +4 -17
  874. package/src/components/ui/avatar/avatar.tsx +3 -2
  875. package/src/components/ui/board/board.tsx +4 -10
  876. package/src/components/ui/button-group/button-group.tsx +1 -1
  877. package/src/components/ui/chart/chart.tsx +0 -3
  878. package/src/components/ui/code-block/code-block.tsx +7 -26
  879. package/src/components/ui/command/command.tsx +43 -39
  880. package/src/components/ui/context-menu/context-menu.tsx +18 -168
  881. package/src/components/ui/dialog/dialog-layer.tsx +266 -0
  882. package/src/components/ui/dialog/dialog.tsx +77 -271
  883. package/src/components/ui/drawer/drawer.tsx +5 -23
  884. package/src/components/ui/dropdown-menu/dropdown-menu.tsx +204 -226
  885. package/src/components/ui/dropdown-menu/menu-parts.tsx +220 -0
  886. package/src/components/ui/field/field.tsx +1 -1
  887. package/src/components/ui/field/number-field.tsx +1 -1
  888. package/src/components/ui/hover-card/hover-card.tsx +4 -11
  889. package/src/components/ui/menubar/menubar.tsx +36 -169
  890. package/src/components/ui/message/message.tsx +0 -1
  891. package/src/components/ui/message/parse-message-text.ts +80 -32
  892. package/src/components/ui/modal-dialog/modal-dialog.tsx +9 -39
  893. package/src/components/ui/navigation-menu/navigation-menu.tsx +0 -1
  894. package/src/components/ui/popover/popover.tsx +5 -11
  895. package/src/components/ui/resizable/resizable.tsx +6 -16
  896. package/src/components/ui/sheet/sheet.tsx +30 -42
  897. package/src/components/ui/text-link/index.ts +0 -1
  898. package/src/components/ui/toggle-group/toggle-group.tsx +3 -11
  899. package/src/components/ui/tooltip/tooltip.tsx +47 -26
  900. package/src/components/ui/trace/index.ts +7 -0
  901. package/src/components/ui/trace/trace.tsx +100 -9
  902. package/src/lib/accent-presets.ts +12 -8
  903. package/src/lib/accent-roles.ts +43 -29
  904. package/src/lib/appearance-font-settings.ts +5 -5
  905. package/src/lib/async-action.ts +72 -0
  906. package/src/lib/breakpoints.ts +7 -0
  907. package/src/lib/bytes.ts +20 -0
  908. package/src/lib/clipboard.ts +43 -0
  909. package/src/lib/events.ts +17 -0
  910. package/src/lib/external-link.ts +42 -0
  911. package/src/lib/font-catalog.ts +4 -6
  912. package/src/lib/font-zoom.ts +9 -14
  913. package/src/lib/overlay.ts +55 -18
  914. package/src/lib/preference-store.ts +36 -34
  915. package/src/lib/resize-separator.ts +36 -0
  916. package/src/lib/safe-script.ts +19 -1
  917. package/src/lib/scroll-geometry.ts +69 -0
  918. package/src/lib/text.ts +49 -0
  919. package/src/lib/theme-accents.ts +1 -1
  920. package/src/lib/theme-catalogue.ts +3 -4
  921. package/src/lib/theme-css.ts +33 -54
  922. package/src/lib/theme-defaults.generated.ts +1 -1
  923. package/src/lib/theme-defaults.ts +55 -7
  924. package/src/lib/theme-engine-light.ts +88 -72
  925. package/src/lib/theme-engine.ts +29 -33
  926. package/src/lib/theme-records.ts +33 -69
  927. package/src/lib/theme-types.ts +199 -0
  928. package/src/lib/themes.ts +33 -196
  929. package/src/lib/tokens.ts +0 -1
  930. package/src/lib/url.ts +25 -0
  931. package/src/lib/version-notes.ts +3 -9
  932. package/src/styles/theme-variants.css +32 -32
  933. package/src/styles/theme.css +17 -13
  934. package/dist/components/conversation/paste-preview.d.ts +0 -11
  935. package/dist/components/conversation/paste-preview.d.ts.map +0 -1
  936. package/dist/components/conversation/paste-preview.js +0 -27
  937. package/dist/components/conversation/paste-preview.js.map +0 -1
  938. package/dist/components/theme/theme-document-core.d.ts +0 -124
  939. package/dist/components/theme/theme-document-core.d.ts.map +0 -1
  940. package/dist/components/theme/theme-document-core.js.map +0 -1
  941. package/dist/components/theme/theme-provider-core.d.ts +0 -19
  942. package/dist/components/theme/theme-provider-core.d.ts.map +0 -1
  943. package/dist/components/theme/theme-provider-core.js +0 -27
  944. package/dist/components/theme/theme-provider-core.js.map +0 -1
  945. package/dist/components/theme/theme-provider-lazy.d.ts +0 -28
  946. package/dist/components/theme/theme-provider-lazy.d.ts.map +0 -1
  947. package/dist/components/theme/theme-provider-lazy.js +0 -35
  948. package/dist/components/theme/theme-provider-lazy.js.map +0 -1
  949. package/dist/components/theme/theme-state-core.d.ts +0 -254
  950. package/dist/components/theme/theme-state-core.d.ts.map +0 -1
  951. package/dist/components/theme/theme-state-core.js.map +0 -1
  952. package/dist/r/src/components/conversation/paste-preview.ts +0 -35
  953. package/dist/r/src/components/theme/theme-document-core.ts +0 -275
  954. package/dist/r/src/components/theme/theme-provider-core.tsx +0 -40
  955. package/dist/r/src/components/theme/theme-provider-lazy.tsx +0 -34
  956. package/dist/r/src/components/theme/theme-state-core.ts +0 -370
  957. package/src/components/conversation/paste-preview.ts +0 -35
  958. package/src/components/theme/theme-document-core.ts +0 -275
  959. package/src/components/theme/theme-provider-core.tsx +0 -40
  960. package/src/components/theme/theme-provider-lazy.tsx +0 -34
  961. package/src/components/theme/theme-state-core.ts +0 -370
@@ -1 +1 @@
1
- {"version":3,"file":"top-bar.js","names":["ComponentProps","Show","splitProps","Search","cn","TopBarProps","draggable","macosInset","windowsInset","glass","centerWidth","TopBar","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","invokeFocusHandler","handler","event","Event","Array","isArray","callback","data","TopBarSection","align","_el$2","_tmpl$2","$$focusin","target","HTMLElement","scrollIntoView","block","inline","onFocusIn","TopBarTitle","_el$3","_tmpl$3","TopBarBreadcrumb","_el$4","_tmpl$4","TopBarSearchProps","placeholder","shortcut","keyshortcuts","TopBarSearch","_el$5","_tmpl$6","_el$6","firstChild","aria-keyshortcuts","_$insert","_$createComponent","when","children","_el$7","_tmpl$5","TopBarPill","label","_el$8","_tmpl$7","_el$9","_$delegateEvents","_$mergeProps","_$createComponent","_$delegateEvents"],"sources":["../../../../src/components/layout/top-bar/top-bar.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { Search } from 'lucide-solid'\nimport { cn } from '#lib/utils'\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 = ComponentProps<'header'> & {\n /** Make the row draggable, for a frameless window. */\n draggable?: boolean\n /** Reserve space for the macOS traffic lights. */\n macosInset?: boolean\n /** Reserve space for the Windows caption buttons. */\n windowsInset?: boolean\n /** Blur the content scrolling under the bar. */\n glass?: boolean\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, rest] = splitProps(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 local.glass && 'glass-panel',\n local.draggable && 'window-drag',\n /* Each edge gets exactly one inline-padding utility. A window inset\n and px-3 would share a layer and tie-break by build order, and a\n build that put px-3 last hid the leading controls under the\n traffic lights. */\n local.macosInset ? 'window-inset-macos' : 'ps-3',\n local.windowsInset ? 'window-inset-windows' : 'pe-3',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nfunction invokeFocusHandler(handler: unknown, event: Event) {\n if (Array.isArray(handler)) {\n const [callback, data] = handler as [(data: unknown, event: Event) => void, unknown]\n callback(data, event)\n } else if (typeof handler === 'function') {\n const callback = handler as (event: Event) => void\n callback(event)\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, rest] = splitProps(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 invokeFocusHandler(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, rest] = splitProps(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, rest] = splitProps(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, rest] = splitProps(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 <kbd\n aria-hidden=\"true\"\n class=\"bg-muted ms-auto hidden h-5 shrink-0 items-center rounded-sm border border-border px-1.5 font-code text-code sm:flex\"\n >\n {local.shortcut}\n </kbd>\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, rest] = splitProps(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":";;;;;;;;;;;;AA2DA,SAAgBW,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAa,CACd;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWd,GACL,yOAKAS,MAAMH,gBAAgB,UACpB,+sBACFG,MAAMJ,SAAS,eACfI,MAAMP,aAAa,eAKnBO,MAAMN,aAAa,uBAAuB,QAC1CM,MAAML,eAAe,yBAAyB,QAC9CK,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA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EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAyC,OAAAQ,aAEPlD,MAAM6C,UAAQO,KAAA;EAAAV,OAAAU,aACRpD,MAAMiD,KAAK;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGxB;AAACG,eAAA,CAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"top-bar.js","names":["ComponentProps","Show","splitProps","Search","callHandler","cn","windowChromeClass","WindowChromeProps","TopBarProps","centerWidth","TopBar","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","TopBarSection","align","_el$2","_tmpl$2","$$focusin","event","target","HTMLElement","scrollIntoView","block","inline","onFocusIn","TopBarTitle","_el$3","_tmpl$3","TopBarBreadcrumb","_el$4","_tmpl$4","TopBarSearchProps","placeholder","shortcut","keyshortcuts","TopBarSearch","_el$5","_tmpl$6","_el$6","firstChild","aria-keyshortcuts","_$insert","_$createComponent","when","children","_el$7","_tmpl$5","TopBarPill","label","_el$8","_tmpl$7","_el$9","_$delegateEvents","_$mergeProps","_$createComponent","_$delegateEvents"],"sources":["../../../../src/components/layout/top-bar/top-bar.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { Search } from 'lucide-solid'\nimport { callHandler } from '#lib/events'\nimport { cn } from '#lib/utils'\nimport { windowChromeClass, type WindowChromeProps } from './window-chrome'\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 = ComponentProps<'header'> &\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, rest] = splitProps(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, rest] = splitProps(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, rest] = splitProps(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, rest] = splitProps(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, rest] = splitProps(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 <kbd\n aria-hidden=\"true\"\n class=\"bg-muted ms-auto hidden h-5 shrink-0 items-center rounded-sm border border-border px-1.5 font-code text-code sm:flex\"\n >\n {local.shortcut}\n </kbd>\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, rest] = splitProps(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":";;;;;;;;;;;;;;AAsDA,SAAgBU,OAAOC,OAAoB;CACzC,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAa,CACd;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWZ,GACL,yOAKAO,MAAMH,gBAAgB,UACpB,+sBACFH,kBAAkBM,KAAK,GACvBA,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGd;;AAGA,SAAgBK,cAAcR,OAA4D;CACxF,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO;EAAC;EAAS;EAAS;CAAW,CAAC;CAEvE,cAAA;EAAA,IAAAU,QAAAC,QAAA;EAAAD,MAAAE,aASgBC,UAAU;GACpB,IAAIA,MAAMC,kBAAkBC,aAC1BF,MAAMC,OAAOE,eAAe;I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,MAAMM,KACR;GAAC;GAAA,KAAA,uBAAA;IAAA,OACkBN,MAAM4B;GAAY;EAAA,GACjC3B,IAAI,GAAA,OAAA,IAAA;EAAAkC,OAAAL,OAAAM,gBAEP7C,QAAM;GAAA,eAAA;GAAA,SAAA;EAAA,CAAA,GAAAyC,KAAA;EAAAG,OAAAH,aAC2ChC,MAAM0B,eAAe,QAAQ;EAAAS,OAAAL,OAAAM,gBAC9E/C,MAAI;GAAA,IAACgD,OAAI;IAAA,OAAErC,MAAM2B;GAAQ;GAAA,IAAAW,WAAA;IAAA,IAAAC,QAAAC,QAAA;IAAAL,OAAAI,aAKrBvC,MAAM2B,QAAQ;IAAA,OAAAY;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAT;CAAA,EAAA,CAAA;AAKzB;;;;;;AAOA,SAAgBW,WAAW1C,OAAqD;CAC9E,MAAM,CAACC,OAAOC,QAAQX,WAAWS,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,cAAA;EAAA,IAAA4C,QAAAC,QAAA,GAAAC,QAAAF,MAAAV;EAAA7B,OAAAuC,OAAAtC,WAAA,EAAA,KAAA,WAAA;GAAA,OAIWZ,GACL,2IACA,2CACA,4CACA,oFACA,oDACAO,MAAMM,KACR;EAAC,EAAA,GACGL,IAAI,GAAA,OAAA,IAAA;EAAAkC,OAAAQ,aAEP3C,MAAMsC,UAAQO,KAAA;EAAAV,OAAAU,aACR7C,MAAM0C,KAAK;EAAA,OAAAC;CAAA,EAAA,CAAA;AAGxB;AAACG,eAAA,CAAA,SAAA,CAAA"}
@@ -0,0 +1,13 @@
1
+ /** How a top bar sits in a frameless desktop window; shared by TopBar and ShellTopBar. */
2
+ export type WindowChromeProps = {
3
+ /** Make the row draggable, for a frameless window. */
4
+ draggable?: boolean;
5
+ /** Reserve space for the macOS traffic lights. */
6
+ macosInset?: boolean;
7
+ /** Reserve space for the Windows caption buttons. */
8
+ windowsInset?: boolean;
9
+ /** Blur the content scrolling under the bar. */
10
+ glass?: boolean;
11
+ };
12
+ export declare function windowChromeClass(props: WindowChromeProps): (string | false | undefined)[];
13
+ //# sourceMappingURL=window-chrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window-chrome.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/top-bar/window-chrome.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kDAAkD;IAClD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,kCAUzD"}
@@ -0,0 +1,12 @@
1
+ // src/components/layout/top-bar/window-chrome.ts
2
+ function windowChromeClass(props) {
3
+ return [
4
+ props.glass && "glass-panel",
5
+ props.draggable && "window-drag",
6
+ props.macosInset ? "window-inset-macos" : "ps-3",
7
+ props.windowsInset ? "window-inset-windows" : "pe-3"
8
+ ];
9
+ }
10
+ export { windowChromeClass };
11
+
12
+ //# sourceMappingURL=window-chrome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window-chrome.js","names":[],"sources":["../../../../src/components/layout/top-bar/window-chrome.ts"],"sourcesContent":["/** How a top bar sits in a frameless desktop window; shared by TopBar and ShellTopBar. */\nexport type WindowChromeProps = {\n /** Make the row draggable, for a frameless window. */\n draggable?: boolean\n /** Reserve space for the macOS traffic lights. */\n macosInset?: boolean\n /** Reserve space for the Windows caption buttons. */\n windowsInset?: boolean\n /** Blur the content scrolling under the bar. */\n glass?: boolean\n}\n\nexport function windowChromeClass(props: WindowChromeProps) {\n return [\n props.glass && 'glass-panel',\n props.draggable && 'window-drag',\n /* Each edge gets exactly one inline-padding utility. A window inset and\n px-3 would share a layer and tie-break by build order, and a build that\n put px-3 last hid the leading controls under the traffic lights. */\n props.macosInset ? 'window-inset-macos' : 'ps-3',\n props.windowsInset ? 'window-inset-windows' : 'pe-3',\n ]\n}\n"],"mappings":";AAYA,SAAgB,kBAAkB,OAA0B;CAC1D,OAAO;EACL,MAAM,SAAS;EACf,MAAM,aAAa;EAInB,MAAM,aAAa,uBAAuB;EAC1C,MAAM,eAAe,yBAAyB;CAChD;AACF"}
@@ -35,5 +35,5 @@ import { Presence as MotionPresence } from 'solid-motionone';
35
35
  export type PresenceProps = ComponentProps<typeof MotionPresence> & {
36
36
  children?: JSX.Element;
37
37
  };
38
- export declare function Presence(props: PresenceProps): JSX.Element;
38
+ export declare const Presence: (props: PresenceProps) => JSX.Element;
39
39
  //# sourceMappingURL=presence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../../src/components/motion/presence.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,GAAG;IAClE,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACvB,CAAA;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,eAE5C"}
1
+ {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../../src/components/motion/presence.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,GAAG;IAClE,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,GAAG,CAAC,OAAwB,CAAA"}
@@ -1,9 +1,6 @@
1
- import { createComponent } from "solid-js/web";
2
1
  import { Presence } from "solid-motionone";
3
2
  // src/components/motion/presence.tsx
4
- function Presence$1(props) {
5
- return createComponent(Presence, props);
6
- }
3
+ var Presence$1 = Presence;
7
4
  export { Presence$1 as Presence };
8
5
 
9
6
  //# sourceMappingURL=presence.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"presence.js","names":["ComponentProps","JSX","Presence","MotionPresence","PresenceProps","children","Element","props","_$createComponent","Presence","_$createComponent","MotionPresence"],"sources":["../../../src/components/motion/presence.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Presence as MotionPresence } from 'solid-motionone'\n\n/**\n * Presence.\n *\n * Enter and exit animation with a guarantee the CSS approach cannot make: an exit\n * that is **interrupted** — a menu reopened while it is still closing — returns the\n * element to its shown state instead of finishing the close and then reopening,\n * which is what a class-based `animate-out` does and what makes a fast user's\n * interactions feel like the interface is lagging behind them.\n *\n * The design system uses CSS transitions for state changes (a hover, a press) and\n * this for mounting and unmounting, which is the split that keeps the common case\n * free of a runtime while making the rare case correct.\n *\n * <Presence exitBeforeEnter>\n * <Show when={open()}>\n * <Motion.div\n * initial={{ opacity: 0, scale: 0.96 }}\n * animate={{ opacity: 1, scale: 1 }}\n * exit={{ opacity: 0, scale: 0.96 }}\n * >\n * …\n * </Motion.div>\n * </Show>\n * </Presence>\n *\n * `Presence` goes *outside* the condition: it has to outlive the `<Show>`'s child\n * to keep that child mounted until its exit finishes. It takes only two booleans —\n * `initial={false}` skips the enter animation on first render, `exitBeforeEnter`\n * holds a replacement back until the outgoing element has left. The animation\n * itself lives on the `Motion.*` element, which must be the direct child of the\n * condition for its `exit` to run.\n */\nexport type PresenceProps = ComponentProps<typeof MotionPresence> & {\n children?: JSX.Element\n}\n\nexport function Presence(props: PresenceProps) {\n return <MotionPresence {...props} />\n}\n"],"mappings":";;;AAuCA,SAAgBE,WAASK,OAAsB;CAC7C,OAAAC,gBAAQL,UAAmBI,KAAK;AAClC"}
1
+ {"version":3,"file":"presence.js","names":["ComponentProps","JSX","Presence","MotionPresence","PresenceProps","children","Element","props","Presence","MotionPresence"],"sources":["../../../src/components/motion/presence.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'solid-js'\nimport { Presence as MotionPresence } from 'solid-motionone'\n\n/**\n * Presence.\n *\n * Enter and exit animation with a guarantee the CSS approach cannot make: an exit\n * that is **interrupted** — a menu reopened while it is still closing — returns the\n * element to its shown state instead of finishing the close and then reopening,\n * which is what a class-based `animate-out` does and what makes a fast user's\n * interactions feel like the interface is lagging behind them.\n *\n * The design system uses CSS transitions for state changes (a hover, a press) and\n * this for mounting and unmounting, which is the split that keeps the common case\n * free of a runtime while making the rare case correct.\n *\n * <Presence exitBeforeEnter>\n * <Show when={open()}>\n * <Motion.div\n * initial={{ opacity: 0, scale: 0.96 }}\n * animate={{ opacity: 1, scale: 1 }}\n * exit={{ opacity: 0, scale: 0.96 }}\n * >\n * …\n * </Motion.div>\n * </Show>\n * </Presence>\n *\n * `Presence` goes *outside* the condition: it has to outlive the `<Show>`'s child\n * to keep that child mounted until its exit finishes. It takes only two booleans —\n * `initial={false}` skips the enter animation on first render, `exitBeforeEnter`\n * holds a replacement back until the outgoing element has left. The animation\n * itself lives on the `Motion.*` element, which must be the direct child of the\n * condition for its `exit` to run.\n */\nexport type PresenceProps = ComponentProps<typeof MotionPresence> & {\n children?: JSX.Element\n}\n\nexport const Presence: (props: PresenceProps) => JSX.Element = MotionPresence\n"],"mappings":";;AAuCA,IAAaE,aAAkDC"}
@@ -19,7 +19,9 @@ import type { ComponentProps } from 'solid-js';
19
19
  * 4. **Fonts** — separate families and sizes for interface, content and code.
20
20
  *
21
21
  * The panel reads and writes the provider's preference and keeps no state of its
22
- * own, so it cannot disagree with what is applied.
22
+ * own, so it cannot disagree with what is applied. Its themes are the provider's, so
23
+ * under the lazy provider it asks for the catalogue when it mounts and lists the rest
24
+ * when it arrives.
23
25
  */
24
26
  export type AppearancePanelProps = ComponentProps<'div'>;
25
27
  export declare function AppearancePanel(props: AppearancePanelProps): import("solid-js").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-panel.d.ts","sourceRoot":"","sources":["../../../src/components/theme/appearance-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAc9C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA;AAKxD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,kCAuG1D"}
1
+ {"version":3,"file":"appearance-panel.d.ts","sourceRoot":"","sources":["../../../src/components/theme/appearance-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAiB9C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA;AAExD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,kCA8G1D"}
@@ -1,6 +1,6 @@
1
- import { accentPresets } from "../../lib/accent-presets.js";
2
- import { themesForAppearance } from "../../lib/themes.js";
1
+ import { accentPresets, isPresetAccentId } from "../../lib/accent-presets.js";
3
2
  import { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from "../../lib/appearance-font-settings.js";
3
+ import { THEME_DEFAULT_ID } from "../../lib/theme-defaults.js";
4
4
  import { cn } from "../../lib/utils.js";
5
5
  import { AccentSwatchGroups } from "../composites/appearance-editor/accent-swatch-groups.js";
6
6
  import { AppearanceFontSettingsGroup } from "../composites/appearance-editor/font-settings-group.js";
@@ -9,17 +9,21 @@ import { ThemePicker } from "./theme-picker.js";
9
9
  import { useTheme } from "./theme-context.js";
10
10
  import { Heading } from "../ui/typography/typography.js";
11
11
  import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
12
- import { Show, splitProps } from "solid-js";
12
+ import { Show, onMount, splitProps } from "solid-js";
13
13
  import { RadioGroup } from "@kobalte/core/radio-group";
14
14
  // src/components/theme/appearance-panel.tsx
15
15
  var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=appearance-panel><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. The theme below is chosen per appearance, so switching at sunset does not make you choose again.</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">Choose separate families and sizes for the interface, reading, and code. Font families come from the shared catalogue and are self-hosted.`);
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">`);
17
- var LIGHT_THEMES = themesForAppearance("light");
18
- var DARK_THEMES = themesForAppearance("dark");
19
17
  function AppearancePanel(props) {
20
18
  const [local, rest] = splitProps(props, ["class"]);
21
- const { selection, setSelection, resolvedAppearance, themeAccents } = useTheme();
22
- const selectedAccent = () => accentPresets.some((option) => option.id === selection().accent) || themeAccents().some((option) => option.id === selection().accent) ? selection().accent : "theme";
19
+ const context = useTheme();
20
+ const { selection, setSelection, resolvedAppearance, themeAccents } = context;
21
+ onMount(() => void context.loadCatalogue?.());
22
+ const themesFor = (appearance) => context.themes.filter((variant) => variant.appearance === appearance);
23
+ const selectedAccent = () => {
24
+ const accent = selection().accent;
25
+ return accent === "theme" || isPresetAccentId(accent) || themeAccents().some((option) => option.id === accent) ? accent : THEME_DEFAULT_ID;
26
+ };
23
27
  return (() => {
24
28
  var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild;
25
29
  spread(_el$, mergeProps({ get ["class"]() {
@@ -66,7 +70,9 @@ function AppearancePanel(props) {
66
70
  return createComponent(ThemeSection, {
67
71
  title: "Light theme",
68
72
  description: "Shown when the appearance resolves to light.",
69
- themes: LIGHT_THEMES,
73
+ get themes() {
74
+ return themesFor("light");
75
+ },
70
76
  get selectedId() {
71
77
  return selection().lightThemeId;
72
78
  },
@@ -82,7 +88,9 @@ function AppearancePanel(props) {
82
88
  return createComponent(ThemeSection, {
83
89
  title: "Dark theme",
84
90
  description: "Shown when the appearance resolves to dark.",
85
- themes: DARK_THEMES,
91
+ get themes() {
92
+ return themesFor("dark");
93
+ },
86
94
  get selectedId() {
87
95
  return selection().darkThemeId;
88
96
  },
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-panel.js","names":["ComponentProps","Show","splitProps","RadioGroup","Radio","accentPresets","themesForAppearance","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","cn","AccentSwatchGroups","AppearanceFontSettingsGroup","RadioGroupItem","ThemePicker","useTheme","Heading","AppearancePanelProps","LIGHT_THEMES","DARK_THEMES","AppearancePanel","props","local","rest","selection","setSelection","resolvedAppearance","themeAccents","selectedAccent","some","option","id","accent","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","children","value","appearance","onChange","label","description","when","ThemeSection","title","themes","selectedId","lightThemeId","onThemeSelect","theme","darkThemeId","orientation","accentOptions","themeDefaultColor","settings","fonts","ReturnType","_el$1","_tmpl$2","_el$10","_el$11","_$mergeProps","_$createComponent","RadioGroup","Radio"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { accentPresets } from '#lib/tokens'\nimport { themesForAppearance } from '#lib/themes'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { cn } from '#lib/utils'\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/radio-group'\nimport { ThemePicker } from './theme-picker'\nimport { useTheme } from './theme-provider'\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.\n */\nexport type AppearancePanelProps = ComponentProps<'div'>\n\nconst LIGHT_THEMES = themesForAppearance('light')\nconst DARK_THEMES = themesForAppearance('dark')\n\nexport function AppearancePanel(props: AppearancePanelProps) {\n const [local, rest] = splitProps(props, ['class'])\n const { selection, setSelection, resolvedAppearance, themeAccents } = useTheme()\n const selectedAccent = () =>\n accentPresets.some((option) => option.id === selection().accent) ||\n themeAccents().some((option) => option.id === selection().accent)\n ? selection().accent\n : 'theme'\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. The theme below is chosen per appearance, so switching at\n sunset does not make you choose again.\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={LIGHT_THEMES}\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={DARK_THEMES}\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 <Radio\n value={selectedAccent()}\n onChange={(accent) => setSelection({ accent })}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n accentOptions={accentPresets}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </Radio>\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 Choose separate families and sizes for the interface, reading, and code. Font families\n come from the shared catalogue and are self-hosted.\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: ReturnType<typeof themesForAppearance>\n selectedId: string\n onThemeSelect: (theme: ReturnType<typeof themesForAppearance>[number]) => 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":";;;;;;;;;;;;;;;;AAsCA,IAAMgB,eAAeV,oBAAoB,OAAO;AAChD,IAAMW,cAAcX,oBAAoB,MAAM;AAE9C,SAAgBY,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,QAAQnB,WAAWiB,OAAO,CAAC,OAAO,CAAC;CACjD,MAAM,EAAEG,WAAWC,cAAcC,o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AAA,GAAAR,KAAA;EAAAI,OAAAN,OAAAO,gBAQtBtC,6BAA2B;GAAA,IAC1B2D,WAAQ;IAAA,OAAE/C,UAAU,CAAC,CAACgD,SAAS/D;GAAuC;GACtE+C,WAAWgB,UAAU/C,aAAa,EAAE+C,MAAM,CAAC;EAAC,CAAA,GAAA,IAAA;EAAA,OAAAvC;CAAA,EAAA,CAAA;AAKtD;AAEA,SAAS2B,aAAavC,OAMnB;CACD,cAAA;EAAA,IAAAqD,QAAAC,QAAA,GAAAC,SAAAF,MAAAtC,YAAAyC,SAAAD,OAAAxC;EAAAa,OAAA2B,QAAA1B,gBAGOlC,SAAO;GAACmC,IAAE;GAAMC,MAAI;GAAA,IAAAC,WAAA;IAAA,OAClBhC,MAAMwC;GAAK;EAAA,CAAA,GAAAgB,MAAA;EAAA5B,OAAA4B,cAEwCxD,MAAMqC,WAAW;EAAAT,OAAAyB,OAAAxB,gBAExEpC,aAAW;GAAA,IACVgD,SAAM;IAAA,OAAEzC,MAAMyC;GAAM;GAAA,IACpBC,aAAU;IAAA,OAAE1C,MAAM0C;GAAU;GAAA,IAC5BE,gBAAa;IAAA,OAAE5C,MAAM4C;GAAa;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAS;CAAA,EAAA,CAAA;AAI1C"}
1
+ {"version":3,"file":"appearance-panel.js","names":["ComponentProps","Show","onMount","splitProps","RadioGroup","Radio","accentPresets","isPresetAccentId","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","THEME_DEFAULT_ID","ThemeAppearance","ThemeVariant","cn","AccentSwatchGroups","AppearanceFontSettingsGroup","RadioGroupItem","ThemePicker","useTheme","Heading","AppearancePanelProps","AppearancePanel","props","local","rest","context","selection","setSelection","resolvedAppearance","themeAccents","loadCatalogue","themesFor","appearance","themes","filter","variant","selectedAccent","accent","some","option","id","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","children","value","onChange","label","description","when","ThemeSection","title","selectedId","lightThemeId","onThemeSelect","theme","darkThemeId","orientation","accentOptions","themeDefaultColor","settings","fonts","_el$1","_tmpl$2","_el$10","_el$11","_$mergeProps","_$createComponent","RadioGroup","Radio"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, onMount, splitProps } from 'solid-js'\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\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, rest] = splitProps(props, ['class'])\n const context = useTheme()\n const { selection, setSelection, resolvedAppearance, themeAccents } = context\n onMount(() => 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. The theme below is chosen per appearance, so switching at\n sunset does not make you choose again.\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 <Radio\n value={selectedAccent()}\n onChange={(accent) => setSelection({ accent })}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n accentOptions={accentPresets}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </Radio>\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 Choose separate families and sizes for the interface, reading, and code. Font families\n come from the shared catalogue and are self-hosted.\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.selected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ePanel, type AppearancePanelProps } from './appearance-panel';
2
2
  export { ThemePicker, ThemePreview, ThemeSwatch, type ThemePickerProps, type ThemePreviewProps, type ThemeSwatchProps, } from './theme-picker';
3
- export { ThemeProvider, createVersionedPersistence, defaultThemeSelection, inlineScriptLiteral, localStoragePersistence, resolvedDensity, themeScript, useOptionalTheme, useTheme, type EditorRolesMode, type ThemeContextValue, type ThemeDensity, type ThemePersistence, type ThemeProviderProps, type ThemeScriptOptions, type ThemeSelection, type ThemeStorageSchema, type ThemeSurface, type VersionedCodec, type VersionedPersistenceOptions, } from './theme-provider';
3
+ export * from './theme-provider';
4
4
  export { ThemeToggle, type ThemeToggleProps } from './theme-toggle';
5
5
  export { ThemeModeToggle, type ThemeModeToggleProps } from './theme-mode-toggle';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,2BAA2B,GACjC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EACL,WAAW,EACX,YAAY,EACZ,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,10 +1,11 @@
1
+ import { safeScriptStringLiteral } from "../../lib/safe-script.js";
1
2
  import { AppearancePanel } from "./appearance-panel.js";
2
3
  import { useOptionalTheme, useTheme } from "./theme-context.js";
3
- import { defaultThemeSelection, resolvedDensity } from "./theme-state-core.js";
4
- import { createVersionedPersistence, localStoragePersistence } from "./theme-persistence.js";
5
- import { inlineScriptLiteral, themeScript } from "./theme-script.js";
6
4
  import { ThemePicker, ThemePreview, ThemeSwatch } from "./theme-picker.js";
5
+ import { defaultThemeSelection, resolvedDensity } from "./theme-state.js";
6
+ import { createVersionedPersistence, localStoragePersistence } from "./theme-persistence.js";
7
+ import { themeScript } from "./theme-script.js";
7
8
  import { ThemeProvider } from "./theme-provider.js";
8
9
  import { ThemeToggle } from "./theme-toggle.js";
9
10
  import { ThemeModeToggle } from "./theme-mode-toggle.js";
10
- export { AppearancePanel, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, createVersionedPersistence, defaultThemeSelection, inlineScriptLiteral, localStoragePersistence, resolvedDensity, themeScript, useOptionalTheme, useTheme };
11
+ export { AppearancePanel, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, createVersionedPersistence, defaultThemeSelection, safeScriptStringLiteral as inlineScriptLiteral, localStoragePersistence, resolvedDensity, themeScript, useOptionalTheme, useTheme };
@@ -1,15 +1,41 @@
1
+ import { type JSX } from 'solid-js';
2
+ import { type ThemeProviderProps } from './theme-provider-value';
1
3
  /**
2
4
  * The theme provider with the catalogue out of the start-up path.
3
5
  *
4
6
  * Everything here is free of the 34-theme catalogue: `import` this entry instead of
5
7
  * `@adea-ai/ui/components/theme` in a host that paints its theme from a stylesheet.
6
- * The catalogue loads, in a chunk of its own, the first time a stored or previewed
7
- * theme needs it. See {@link ThemeProvider} for the rules and `docs/consumption.md`
8
- * for the setup.
8
+ * See {@link ThemeProvider} for the rules and `docs/consumption.md` for the setup.
9
9
  */
10
+ export * from './theme-api';
10
11
  export { loadThemeCatalogue } from './theme-catalogue-source';
11
- export { ThemeProvider } from './theme-provider-lazy';
12
- export { createVersionedPersistence, defaultThemeSelection, inlineScriptLiteral, localStoragePersistence, resolvedDensity, themeScript, useOptionalTheme, useTheme, type EditorRolesMode, type ThemeCatalogueSource, type ThemeContextValue, type ThemeDensity, type ThemePersistence, type ThemeProviderProps, type ThemeScriptOptions, type ThemeSelection, type ThemeStorageSchema, type ThemeSurface, type VersionedCodec, type VersionedPersistenceOptions, } from './theme-provider-core';
12
+ export type { ThemeCatalogueSource } from './theme-provider-value';
13
13
  export { ThemeToggle, type ThemeToggleProps } from './theme-toggle';
14
14
  export { ThemeModeToggle, type ThemeModeToggleProps } from './theme-mode-toggle';
15
+ /**
16
+ * ThemeProvider, with the theme catalogue out of the start-up path.
17
+ *
18
+ * Same props, same context and same behaviour as `ThemeProvider` for everything the
19
+ * shipped default pair covers: the default light and dark themes, a host's own
20
+ * `themes`, every accent preset and custom colour, the surface axis, fonts and
21
+ * density. Only the 32 other catalogue themes are not in the start-up chunk. The first
22
+ * time the selection (or a preview) names one, or a theme-derived `ansi-*` accent over
23
+ * such a pair, this provider imports the catalogue in a chunk of its own:
24
+ *
25
+ * - until it arrives the document keeps what is on it (set before first paint by
26
+ * `themeScript`, painted by the stylesheet under `palette="stylesheet"`), and
27
+ * `variant()` is the default of the appearance;
28
+ * - when it arrives the provider re-resolves and paints the stored theme, and
29
+ * `useTheme().catalogueReady()` turns true;
30
+ * - a preview of a theme that has not loaded starts the load and shows when it ends.
31
+ *
32
+ * Pair it with `palette="stylesheet"` and `themeScript`: inline palettes of catalogue
33
+ * themes need the catalogue to compute, so under the default `inline` palette every
34
+ * stored theme but the defaults waits for the import.
35
+ *
36
+ * `useTheme().themes` and `allThemes()` list only the default pair until
37
+ * `catalogueReady()`; a picker calls `useTheme().loadCatalogue()` when it mounts, as
38
+ * `AppearancePanel` does.
39
+ */
40
+ export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element;
15
41
  //# sourceMappingURL=lazy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/components/theme/lazy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,2BAA2B,GACjC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/components/theme/lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAEhE,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEnF;;;;;;GAMG;AACH,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAEpE"}
@@ -1,9 +1,42 @@
1
- import { loadThemeCatalogue } from "./theme-catalogue-source.js";
2
- import { ThemeProvider } from "./theme-provider-lazy.js";
3
- import { createVersionedPersistence, localStoragePersistence } from "./theme-persistence.js";
4
- import { defaultThemeSelection, resolvedDensity } from "./theme-state-core.js";
5
- import { inlineScriptLiteral, themeScript } from "./theme-script.js";
1
+ import { safeScriptStringLiteral } from "../../lib/safe-script.js";
6
2
  import { useOptionalTheme, useTheme } from "./theme-context.js";
3
+ import { defaultThemeSelection, resolvedDensity } from "./theme-state.js";
4
+ import { createVersionedPersistence, localStoragePersistence } from "./theme-persistence.js";
5
+ import { createLazyCatalogue, loadThemeCatalogue } from "./theme-catalogue-source.js";
6
+ import { themeScript } from "./theme-script.js";
7
+ import { ThemeProviderWith } from "./theme-provider-value.js";
7
8
  import { ThemeToggle } from "./theme-toggle.js";
8
9
  import { ThemeModeToggle } from "./theme-mode-toggle.js";
9
- export { ThemeModeToggle, ThemeProvider, ThemeToggle, createVersionedPersistence, defaultThemeSelection, inlineScriptLiteral, loadThemeCatalogue, localStoragePersistence, resolvedDensity, themeScript, useOptionalTheme, useTheme };
10
+ import { createComponent, mergeProps } from "solid-js";
11
+ // src/components/theme/lazy.ts
12
+ /**
13
+ * ThemeProvider, with the theme catalogue out of the start-up path.
14
+ *
15
+ * Same props, same context and same behaviour as `ThemeProvider` for everything the
16
+ * shipped default pair covers: the default light and dark themes, a host's own
17
+ * `themes`, every accent preset and custom colour, the surface axis, fonts and
18
+ * density. Only the 32 other catalogue themes are not in the start-up chunk. The first
19
+ * time the selection (or a preview) names one, or a theme-derived `ansi-*` accent over
20
+ * such a pair, this provider imports the catalogue in a chunk of its own:
21
+ *
22
+ * - until it arrives the document keeps what is on it (set before first paint by
23
+ * `themeScript`, painted by the stylesheet under `palette="stylesheet"`), and
24
+ * `variant()` is the default of the appearance;
25
+ * - when it arrives the provider re-resolves and paints the stored theme, and
26
+ * `useTheme().catalogueReady()` turns true;
27
+ * - a preview of a theme that has not loaded starts the load and shows when it ends.
28
+ *
29
+ * Pair it with `palette="stylesheet"` and `themeScript`: inline palettes of catalogue
30
+ * themes need the catalogue to compute, so under the default `inline` palette every
31
+ * stored theme but the defaults waits for the import.
32
+ *
33
+ * `useTheme().themes` and `allThemes()` list only the default pair until
34
+ * `catalogueReady()`; a picker calls `useTheme().loadCatalogue()` when it mounts, as
35
+ * `AppearancePanel` does.
36
+ */
37
+ function ThemeProvider(props) {
38
+ return createComponent(ThemeProviderWith, mergeProps(props, { catalogue: createLazyCatalogue() }));
39
+ }
40
+ export { ThemeModeToggle, ThemeProvider, ThemeToggle, createVersionedPersistence, defaultThemeSelection, safeScriptStringLiteral as inlineScriptLiteral, loadThemeCatalogue, localStoragePersistence, resolvedDensity, themeScript, useOptionalTheme, useTheme };
41
+
42
+ //# sourceMappingURL=lazy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy.js","names":[],"sources":["../../../src/components/theme/lazy.ts"],"sourcesContent":["import { createComponent, mergeProps, type JSX } from 'solid-js'\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 `docs/consumption.md` 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, mergeProps(props, { catalogue: createLazyCatalogue() }))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgB,cAAc,OAAwC;CACpE,OAAO,gBAAgB,mBAAmB,WAAW,OAAO,EAAE,WAAW,oBAAoB,EAAE,CAAC,CAAC;AACnG"}
@@ -1,4 +1,5 @@
1
- import { inlineScriptLiteral, themeScriptWithProjection } from "./theme-script.js";
1
+ import { safeScriptStringLiteral } from "../../lib/safe-script.js";
2
+ import { themeScriptWithProjection } from "./theme-script.js";
2
3
  import { themeTokenProjectionBundle } from "@adea-ai/themes/theme-token-projection/script";
3
4
  // src/components/theme/script-projection.ts
4
5
  /**
@@ -11,6 +12,6 @@ var tokenProjectionFallbackScript = `if(storedTheme&&tokenProjectionFallbacks.le
11
12
  function themeScript(options) {
12
13
  return themeScriptWithProjection(options, options.tokenProjection, themeTokenProjectionBundle, tokenProjectionFallbackScript);
13
14
  }
14
- export { inlineScriptLiteral, themeScript };
15
+ export { safeScriptStringLiteral as inlineScriptLiteral, themeScript };
15
16
 
16
17
  //# sourceMappingURL=script-projection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"script-projection.js","names":[],"sources":["../../../src/components/theme/script-projection.ts"],"sourcesContent":["/**\n * Opt-in no-flash script entry that can project imported token maps synchronously.\n * Import this path only when the host supplies declarative projection rules; the\n * ordinary `components/theme/script` entry stays free of the browser bundle.\n */\nimport { themeTokenProjectionBundle } from '@adea-ai/themes/theme-token-projection/script'\nimport {\n inlineScriptLiteral,\n themeScriptWithProjection,\n type ThemeScriptOptions as BaseThemeScriptOptions,\n type ThemeTokenProjectionFallback,\n} from './theme-script'\nimport type { ThemeTokenProjection } from './token-projection'\n\nconst tokenProjectionFallbackScript = `if(storedTheme&&tokenProjectionFallbacks.length){var sourceTokens=Object.create(null);for(var sourceName in tokens){if(Object.prototype.hasOwnProperty.call(tokens,sourceName))sourceTokens[sourceName]=tokens[sourceName]}for(var fi=0;fi<tokenProjectionFallbacks.length;fi++){var fallbackToken=tokenProjectionFallbacks[fi];if(!fallbackToken||typeof fallbackToken.token!=='string'||!/^--[A-Za-z0-9_-]+$/.test(fallbackToken.token)||Object.prototype.hasOwnProperty.call(sourceTokens,fallbackToken.token)||!Array.isArray(fallbackToken.path)||fallbackToken.path.length===0)continue;var sourceValue=storedTheme;for(var pi=0;pi<fallbackToken.path.length;pi++){var pathKey=fallbackToken.path[pi];if(typeof pathKey!=='string'||!sourceValue||typeof sourceValue!=='object'||!Object.prototype.hasOwnProperty.call(sourceValue,pathKey)){sourceValue=undefined;break}sourceValue=sourceValue[pathKey]}if(typeof sourceValue==='string')sourceTokens[fallbackToken.token]=sourceValue}tokens=sourceTokens}`\n\n/** Options for the projection-enabled boot script. */\nexport type ThemeScriptOptions = Omit<BaseThemeScriptOptions, 'libraryKey'> & {\n libraryKey: string\n tokenProjection: ThemeTokenProjection\n /** Optional serialized-record sources for projection tokens omitted by flatTokens. */\n tokenProjectionFallbacks?: readonly ThemeTokenProjectionFallback[]\n}\n\n/** Alias that makes the opt-in projection requirement explicit at call sites. */\nexport type ThemeScriptProjectionOptions = ThemeScriptOptions\n\n/** Emit a no-flash script with the same projector used by provider hydration. */\nexport function themeScript(options: ThemeScriptOptions): string {\n return themeScriptWithProjection(\n options,\n options.tokenProjection,\n themeTokenProjectionBundle,\n tokenProjectionFallbackScript\n )\n}\n\nexport { inlineScriptLiteral }\nexport type { ThemeTokenProjectionFallback }\nexport type { ThemeStorageSchema } from './theme-persistence'\n"],"mappings":";;;;;;;;AAcA,IAAM,gCAAgC;;AActC,SAAgB,YAAY,SAAqC;CAC/D,OAAO,0BACL,SACA,QAAQ,iBACR,4BACA,6BACF;AACF"}
1
+ {"version":3,"file":"script-projection.js","names":[],"sources":["../../../src/components/theme/script-projection.ts"],"sourcesContent":["/**\n * Opt-in no-flash script entry that can project imported token maps synchronously.\n * Import this path only when the host supplies declarative projection rules; the\n * ordinary `components/theme/script` entry stays free of the browser bundle.\n */\nimport { themeTokenProjectionBundle } from '@adea-ai/themes/theme-token-projection/script'\nimport {\n inlineScriptLiteral,\n themeScriptWithProjection,\n type ThemeScriptOptions as BaseThemeScriptOptions,\n type ThemeTokenProjectionFallback,\n} from './theme-script'\nimport type { ThemeTokenProjection } from './token-projection'\n\nconst tokenProjectionFallbackScript = `if(storedTheme&&tokenProjectionFallbacks.length){var sourceTokens=Object.create(null);for(var sourceName in tokens){if(Object.prototype.hasOwnProperty.call(tokens,sourceName))sourceTokens[sourceName]=tokens[sourceName]}for(var fi=0;fi<tokenProjectionFallbacks.length;fi++){var fallbackToken=tokenProjectionFallbacks[fi];if(!fallbackToken||typeof fallbackToken.token!=='string'||!/^--[A-Za-z0-9_-]+$/.test(fallbackToken.token)||Object.prototype.hasOwnProperty.call(sourceTokens,fallbackToken.token)||!Array.isArray(fallbackToken.path)||fallbackToken.path.length===0)continue;var sourceValue=storedTheme;for(var pi=0;pi<fallbackToken.path.length;pi++){var pathKey=fallbackToken.path[pi];if(typeof pathKey!=='string'||!sourceValue||typeof sourceValue!=='object'||!Object.prototype.hasOwnProperty.call(sourceValue,pathKey)){sourceValue=undefined;break}sourceValue=sourceValue[pathKey]}if(typeof sourceValue==='string')sourceTokens[fallbackToken.token]=sourceValue}tokens=sourceTokens}`\n\n/** Options for the projection-enabled boot script. */\nexport type ThemeScriptOptions = Omit<BaseThemeScriptOptions, 'libraryKey'> & {\n libraryKey: string\n tokenProjection: ThemeTokenProjection\n /** Optional serialized-record sources for projection tokens omitted by flatTokens. */\n tokenProjectionFallbacks?: readonly ThemeTokenProjectionFallback[]\n}\n\n/** Alias that makes the opt-in projection requirement explicit at call sites. */\nexport type ThemeScriptProjectionOptions = ThemeScriptOptions\n\n/** Emit a no-flash script with the same projector used by provider hydration. */\nexport function themeScript(options: ThemeScriptOptions): string {\n return themeScriptWithProjection(\n options,\n options.tokenProjection,\n themeTokenProjectionBundle,\n tokenProjectionFallbackScript\n )\n}\n\nexport { inlineScriptLiteral }\nexport type { ThemeTokenProjectionFallback }\nexport type { ThemeStorageSchema } from './theme-persistence'\n"],"mappings":";;;;;;;;;AAcA,IAAM,gCAAgC;;AActC,SAAgB,YAAY,SAAqC;CAC/D,OAAO,0BACL,SACA,QAAQ,iBACR,4BACA,6BACF;AACF"}
@@ -1 +1,3 @@
1
- export { inlineScriptLiteral, themeScript } from "./theme-script.js";
1
+ import { safeScriptStringLiteral } from "../../lib/safe-script.js";
2
+ import { themeScript } from "./theme-script.js";
3
+ export { safeScriptStringLiteral as inlineScriptLiteral, themeScript };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * What both provider entries export beside their `ThemeProvider`: the context hooks,
3
+ * the persistence, the boot script and the selection types. One list, so the eager
4
+ * entry (`./index.ts` via `./theme-provider`) and the lazy one (`./lazy.ts`) cannot
5
+ * drift. Nothing here imports the catalogue.
6
+ */
7
+ export { useOptionalTheme, useTheme } from './theme-context';
8
+ export { createVersionedPersistence, localStoragePersistence, type ThemePersistence, type VersionedCodec, type VersionedPersistenceOptions, } from './theme-persistence';
9
+ export { inlineScriptLiteral, themeScript, type ThemeScriptOptions, type ThemeStorageSchema, } from './script';
10
+ export { defaultThemeSelection, resolvedDensity, type ThemeContextValue, type ThemeDensity, type ThemeSelection, } from './theme-state';
11
+ export type { ThemeProviderProps } from './theme-provider-value';
12
+ export type { ThemeSurface } from '#lib/theme-surface';
13
+ export type { EditorRolesMode } from '#lib/theme-types';
14
+ //# sourceMappingURL=theme-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-api.d.ts","sourceRoot":"","sources":["../../../src/components/theme/theme-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,2BAA2B,GACjC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,eAAe,CAAA;AACtB,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"theme-catalogue-source.d.ts","sourceRoot":"","sources":["../../../src/components/theme/theme-catalogue-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAUlE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,WAAW,CAAC,CAazD;AAED,yFAAyF;AACzF,wBAAgB,mBAAmB,IAAI,oBAAoB,CAoB1D"}
1
+ {"version":3,"file":"theme-catalogue-source.d.ts","sourceRoot":"","sources":["../../../src/components/theme/theme-catalogue-source.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAUlE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,WAAW,CAAC,CAazD;AAED,yFAAyF;AACzF,wBAAgB,mBAAmB,IAAI,oBAAoB,CAqB1D"}
@@ -1,4 +1,4 @@
1
- import { lightThemeEngine } from "../../lib/theme-engine-light.js";
1
+ import { createLightThemeEngine } from "../../lib/theme-engine-light.js";
2
2
  import { createSignal } from "solid-js";
3
3
  // src/components/theme/theme-catalogue-source.ts
4
4
  /**
@@ -38,8 +38,9 @@ function createLazyCatalogue() {
38
38
  }, () => {
39
39
  setFailed(true);
40
40
  });
41
+ const shipped = createLightThemeEngine(() => void load());
41
42
  return {
42
- engine: () => full() ?? lightThemeEngine,
43
+ engine: () => full() ?? shipped,
43
44
  loaded: () => full() !== void 0,
44
45
  failed,
45
46
  load
@@ -1 +1 @@
1
- {"version":3,"file":"theme-catalogue-source.js","names":[],"sources":["../../../src/components/theme/theme-catalogue-source.ts"],"sourcesContent":["import { createSignal } from 'solid-js'\nimport type { ThemeEngine } from '#lib/theme-engine'\nimport { lightThemeEngine } from '#lib/theme-engine-light'\nimport type { ThemeCatalogueSource } from './theme-provider-value'\n\n/**\n * The full catalogue engine once something has asked for it, shared by every lazy\n * provider and every caller of {@link loadThemeCatalogue} in the page. A provider\n * created after the load starts with it already in hand.\n */\nlet loadedEngine: ThemeEngine | undefined\nlet loading: Promise<ThemeEngine> | undefined\n\n/**\n * Load the whole theme catalogue (about 129 KB raw, 34 KB gzipped) and resolve to the\n * engine backed by it. Idempotent: every call shares one import, and a failed import is\n * forgotten so the next call retries.\n *\n * The lazy provider calls this itself the moment a selection needs a theme beyond the\n * default pair. Call it earlier — when a settings page mounts, or on hover of its\n * entry — to have the picker ready by the time it opens.\n */\nexport function loadThemeCatalogue(): Promise<ThemeEngine> {\n if (loadedEngine) return Promise.resolve(loadedEngine)\n loading ??= import('#lib/theme-catalogue').then(\n (module) => {\n loadedEngine = module.catalogueThemeEngine\n return loadedEngine\n },\n (error: unknown) => {\n loading = undefined\n throw error\n }\n )\n return loading\n}\n\n/** A catalogue source for one provider: the shipped defaults until the load resolves. */\nexport function createLazyCatalogue(): ThemeCatalogueSource {\n const [full, setFull] = createSignal<ThemeEngine | undefined>(loadedEngine)\n const [failed, setFailed] = createSignal(false)\n const load = () =>\n loadThemeCatalogue().then(\n (loaded) => {\n setFailed(false)\n setFull(() => loaded)\n },\n () => {\n // The theme the stylesheet painted stays; the next request retries.\n setFailed(true)\n }\n )\n return {\n engine: () => full() ?? lightThemeEngine,\n loaded: () => full() !== undefined,\n failed,\n load,\n }\n}\n"],"mappings":";;;;;;;;AAUA,IAAI;AACJ,IAAI;;;;;;;;;;AAWJ,SAAgB,qBAA2C;CACzD,IAAI,cAAc,OAAO,QAAQ,QAAQ,YAAY;CACrD,YAAY,OAAO,+BAAuB,CAAC,MACxC,WAAW;EACV,eAAe,OAAO;EACtB,OAAO;CACT,IACC,UAAmB;EAClB,UAAU,KAAA;EACV,MAAM;CACR,CACF;CACA,OAAO;AACT;;AAGA,SAAgB,sBAA4C;CAC1D,MAAM,CAAC,MAAM,WAAW,aAAsC,YAAY;CAC1E,MAAM,CAAC,QAAQ,aAAa,aAAa,KAAK;CAC9C,MAAM,aACJ,mBAAmB,CAAC,CAAC,MAClB,WAAW;EACV,UAAU,KAAK;EACf,cAAc,MAAM;CACtB,SACM;EAEJ,UAAU,IAAI;CAChB,CACF;CACF,OAAO;EACL,cAAc,KAAK,KAAK;EACxB,cAAc,KAAK,MAAM,KAAA;EACzB;EACA;CACF;AACF"}
1
+ {"version":3,"file":"theme-catalogue-source.js","names":[],"sources":["../../../src/components/theme/theme-catalogue-source.ts"],"sourcesContent":["import { createSignal } from 'solid-js'\nimport type { ThemeEngine } from '#lib/theme-engine'\nimport { createLightThemeEngine } from '#lib/theme-engine-light'\nimport type { ThemeCatalogueSource } from './theme-provider-value'\n\n/**\n * The full catalogue engine once something has asked for it, shared by every lazy\n * provider and every caller of {@link loadThemeCatalogue} in the page. A provider\n * created after the load starts with it already in hand.\n */\nlet loadedEngine: ThemeEngine | undefined\nlet loading: Promise<ThemeEngine> | undefined\n\n/**\n * Load the whole theme catalogue (about 129 KB raw, 34 KB gzipped) and resolve to the\n * engine backed by it. Idempotent: every call shares one import, and a failed import is\n * forgotten so the next call retries.\n *\n * The lazy provider calls this itself the moment a selection needs a theme beyond the\n * default pair. Call it earlier — when a settings page mounts, or on hover of its\n * entry — to have the picker ready by the time it opens.\n */\nexport function loadThemeCatalogue(): Promise<ThemeEngine> {\n if (loadedEngine) return Promise.resolve(loadedEngine)\n loading ??= import('#lib/theme-catalogue').then(\n (module) => {\n loadedEngine = module.catalogueThemeEngine\n return loadedEngine\n },\n (error: unknown) => {\n loading = undefined\n throw error\n }\n )\n return loading\n}\n\n/** A catalogue source for one provider: the shipped defaults until the load resolves. */\nexport function createLazyCatalogue(): ThemeCatalogueSource {\n const [full, setFull] = createSignal<ThemeEngine | undefined>(loadedEngine)\n const [failed, setFailed] = createSignal(false)\n const load = () =>\n loadThemeCatalogue().then(\n (loaded) => {\n setFailed(false)\n setFull(() => loaded)\n },\n () => {\n // The theme the stylesheet painted stays; the next request retries.\n setFailed(true)\n }\n )\n const shipped = createLightThemeEngine(() => void load())\n return {\n engine: () => full() ?? shipped,\n loaded: () => full() !== undefined,\n failed,\n load,\n }\n}\n"],"mappings":";;;;;;;;AAUA,IAAI;AACJ,IAAI;;;;;;;;;;AAWJ,SAAgB,qBAA2C;CACzD,IAAI,cAAc,OAAO,QAAQ,QAAQ,YAAY;CACrD,YAAY,OAAO,+BAAuB,CAAC,MACxC,WAAW;EACV,eAAe,OAAO;EACtB,OAAO;CACT,IACC,UAAmB;EAClB,UAAU,KAAA;EACV,MAAM;CACR,CACF;CACA,OAAO;AACT;;AAGA,SAAgB,sBAA4C;CAC1D,MAAM,CAAC,MAAM,WAAW,aAAsC,YAAY;CAC1E,MAAM,CAAC,QAAQ,aAAa,aAAa,KAAK;CAC9C,MAAM,aACJ,mBAAmB,CAAC,CAAC,MAClB,WAAW;EACV,UAAU,KAAK;EACf,cAAc,MAAM;CACtB,SACM;EAEJ,UAAU,IAAI;CAChB,CACF;CACF,MAAM,UAAU,6BAA6B,KAAK,KAAK,CAAC;CACxD,OAAO;EACL,cAAc,KAAK,KAAK;EACxB,cAAc,KAAK,MAAM,KAAA;EACzB;EACA;CACF;AACF"}