@adea-ai/ui 0.154.0 → 0.154.1

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 (554) hide show
  1. package/README.md +10 -10
  2. package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
  3. package/dist/components/composites/about-dialog/about-dialog.js +3 -1
  4. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  5. package/dist/components/composites/accent-picker/accent-picker.js +20 -9
  6. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  7. package/dist/components/composites/account-menu/account-menu.d.ts.map +1 -1
  8. package/dist/components/composites/account-menu/account-menu.js +20 -10
  9. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  10. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  11. package/dist/components/composites/action-button/action-button.js +37 -24
  12. package/dist/components/composites/action-button/action-button.js.map +1 -1
  13. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  14. package/dist/components/composites/appearance-editor/appearance-choices.js +7 -3
  15. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  16. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-editor.js +11 -6
  18. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  19. package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
  20. package/dist/components/composites/appearance-editor/appearance-rows.js +8 -3
  21. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  22. package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
  23. package/dist/components/composites/appearance-editor/font-settings-group.js +8 -4
  24. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  25. package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -1
  26. package/dist/components/composites/catalog-browser/catalog-browser-group.js +7 -3
  27. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  28. package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -1
  29. package/dist/components/composites/catalog-browser/catalog-browser.js +8 -4
  30. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  31. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -1
  32. package/dist/components/composites/chain-of-thought/chain-of-thought.js +3 -1
  33. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  34. package/dist/components/composites/chat/chat.d.ts.map +1 -1
  35. package/dist/components/composites/chat/chat.js +5 -1
  36. package/dist/components/composites/chat/chat.js.map +1 -1
  37. package/dist/components/composites/checkpoint/checkpoint.d.ts.map +1 -1
  38. package/dist/components/composites/checkpoint/checkpoint.js +3 -1
  39. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  40. package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -1
  41. package/dist/components/composites/confirmation/confirmation.js +11 -5
  42. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  43. package/dist/components/composites/context/context.d.ts.map +1 -1
  44. package/dist/components/composites/context/context.js +7 -4
  45. package/dist/components/composites/context/context.js.map +1 -1
  46. package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -1
  47. package/dist/components/composites/file-tree/file-tree.js +7 -3
  48. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  49. package/dist/components/composites/help-center/help-center.d.ts.map +1 -1
  50. package/dist/components/composites/help-center/help-center.js +3 -1
  51. package/dist/components/composites/help-center/help-center.js.map +1 -1
  52. package/dist/components/composites/icon-picker/icon-picker.d.ts +2 -2
  53. package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -1
  54. package/dist/components/composites/icon-picker/icon-picker.js +77 -71
  55. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  56. package/dist/components/composites/icon-picker/shell-icons.d.ts.map +1 -1
  57. package/dist/components/composites/icon-picker/shell-icons.js +119 -59
  58. package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
  59. package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -1
  60. package/dist/components/composites/inline-citation/inline-citation.js +5 -2
  61. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  62. package/dist/components/composites/list-row/list-row-control.d.ts.map +1 -1
  63. package/dist/components/composites/list-row/list-row-control.js +3 -4
  64. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  65. package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -1
  66. package/dist/components/composites/message-scroller/message-scroller.js +5 -2
  67. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  68. package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -1
  69. package/dist/components/composites/model-selector/model-selector.js +9 -5
  70. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  71. package/dist/components/composites/plan/plan.d.ts.map +1 -1
  72. package/dist/components/composites/plan/plan.js +3 -1
  73. package/dist/components/composites/plan/plan.js.map +1 -1
  74. package/dist/components/composites/queue/queue.d.ts.map +1 -1
  75. package/dist/components/composites/queue/queue.js +11 -5
  76. package/dist/components/composites/queue/queue.js.map +1 -1
  77. package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -1
  78. package/dist/components/composites/reasoning/reasoning.js +3 -1
  79. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  80. package/dist/components/composites/scene-controls/scene-controls.d.ts.map +1 -1
  81. package/dist/components/composites/scene-controls/scene-controls.js +14 -7
  82. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  83. package/dist/components/composites/settings/settings.d.ts.map +1 -1
  84. package/dist/components/composites/settings/settings.js +77 -67
  85. package/dist/components/composites/settings/settings.js.map +1 -1
  86. package/dist/components/composites/sources/sources.d.ts.map +1 -1
  87. package/dist/components/composites/sources/sources.js +39 -39
  88. package/dist/components/composites/sources/sources.js.map +1 -1
  89. package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -1
  90. package/dist/components/composites/stack-trace/stack-trace.js +9 -4
  91. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  92. package/dist/components/composites/stat/stat.d.ts.map +1 -1
  93. package/dist/components/composites/stat/stat.js +4 -1
  94. package/dist/components/composites/stat/stat.js.map +1 -1
  95. package/dist/components/composites/subagent/subagent.d.ts.map +1 -1
  96. package/dist/components/composites/subagent/subagent.js +3 -1
  97. package/dist/components/composites/subagent/subagent.js.map +1 -1
  98. package/dist/components/composites/task/task.d.ts.map +1 -1
  99. package/dist/components/composites/task/task.js +3 -1
  100. package/dist/components/composites/task/task.js.map +1 -1
  101. package/dist/components/composites/terminal/ansi.d.ts.map +1 -1
  102. package/dist/components/composites/terminal/ansi.js +16 -0
  103. package/dist/components/composites/terminal/ansi.js.map +1 -1
  104. package/dist/components/composites/terminal/terminal.d.ts.map +1 -1
  105. package/dist/components/composites/terminal/terminal.js +15 -7
  106. package/dist/components/composites/terminal/terminal.js.map +1 -1
  107. package/dist/components/composites/test-results/test-results.d.ts.map +1 -1
  108. package/dist/components/composites/test-results/test-results.js +15 -7
  109. package/dist/components/composites/test-results/test-results.js.map +1 -1
  110. package/dist/components/composites/tool/tool.d.ts.map +1 -1
  111. package/dist/components/composites/tool/tool.js +3 -1
  112. package/dist/components/composites/tool/tool.js.map +1 -1
  113. package/dist/components/composites/tree/tree.d.ts.map +1 -1
  114. package/dist/components/composites/tree/tree.js +3 -1
  115. package/dist/components/composites/tree/tree.js.map +1 -1
  116. package/dist/components/composites/update-dialog/update-dialog.d.ts.map +1 -1
  117. package/dist/components/composites/update-dialog/update-dialog.js +34 -24
  118. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  119. package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
  120. package/dist/components/composites/workspace-mark/workspace-mark.js +17 -12
  121. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  122. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.d.ts.map +1 -1
  123. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +5 -2
  124. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  125. package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -1
  126. package/dist/components/composites/workspace-switcher/workspace-switcher.js +9 -4
  127. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  128. package/dist/components/conversation/busy-send-button.d.ts.map +1 -1
  129. package/dist/components/conversation/busy-send-button.js +9 -5
  130. package/dist/components/conversation/busy-send-button.js.map +1 -1
  131. package/dist/components/conversation/conversation-avatar.d.ts.map +1 -1
  132. package/dist/components/conversation/conversation-avatar.js +6 -3
  133. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  134. package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
  135. package/dist/components/conversation/conversation-surface.js +3 -1
  136. package/dist/components/conversation/conversation-surface.js.map +1 -1
  137. package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
  138. package/dist/components/conversation/internal/chat-composer-shell.js +9 -4
  139. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  140. package/dist/components/conversation/message-composer.d.ts.map +1 -1
  141. package/dist/components/conversation/message-composer.js +9 -4
  142. package/dist/components/conversation/message-composer.js.map +1 -1
  143. package/dist/components/conversation/message-row.d.ts.map +1 -1
  144. package/dist/components/conversation/message-row.js +11 -5
  145. package/dist/components/conversation/message-row.js.map +1 -1
  146. package/dist/components/conversation/thread-panel.d.ts.map +1 -1
  147. package/dist/components/conversation/thread-panel.js +3 -1
  148. package/dist/components/conversation/thread-panel.js.map +1 -1
  149. package/dist/components/conversation/transcript-composition.d.ts.map +1 -1
  150. package/dist/components/conversation/transcript-composition.js +3 -1
  151. package/dist/components/conversation/transcript-composition.js.map +1 -1
  152. package/dist/components/layout/floating-preview/floating-preview.d.ts.map +1 -1
  153. package/dist/components/layout/floating-preview/floating-preview.js +5 -2
  154. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  155. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.d.ts.map +1 -1
  156. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +3 -1
  157. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  158. package/dist/components/layout/shell-rail/shell-rail.d.ts.map +1 -1
  159. package/dist/components/layout/shell-rail/shell-rail.js +3 -1
  160. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  161. package/dist/components/layout/sidebar-nav/sidebar-nav.d.ts.map +1 -1
  162. package/dist/components/layout/sidebar-nav/sidebar-nav.js +3 -1
  163. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  164. package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
  165. package/dist/components/layout/split-layout/split-layout.js +5 -2
  166. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  167. package/dist/components/layout/top-bar/top-bar.d.ts.map +1 -1
  168. package/dist/components/layout/top-bar/top-bar.js +3 -1
  169. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  170. package/dist/components/theme/appearance-panel.d.ts.map +1 -1
  171. package/dist/components/theme/appearance-panel.js +3 -1
  172. package/dist/components/theme/appearance-panel.js.map +1 -1
  173. package/dist/components/theme/theme-mode-toggle.d.ts.map +1 -1
  174. package/dist/components/theme/theme-mode-toggle.js +6 -3
  175. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  176. package/dist/components/theme/theme-toggle.d.ts.map +1 -1
  177. package/dist/components/theme/theme-toggle.js +6 -3
  178. package/dist/components/theme/theme-toggle.js.map +1 -1
  179. package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
  180. package/dist/components/ui/accordion/accordion.js +3 -1
  181. package/dist/components/ui/accordion/accordion.js.map +1 -1
  182. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  183. package/dist/components/ui/alert/alert.js +15 -9
  184. package/dist/components/ui/alert/alert.js.map +1 -1
  185. package/dist/components/ui/annotation-surface/annotation-surface.d.ts.map +1 -1
  186. package/dist/components/ui/annotation-surface/annotation-surface.js +5 -4
  187. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  188. package/dist/components/ui/attachment/attachment.d.ts.map +1 -1
  189. package/dist/components/ui/attachment/attachment.js +18 -9
  190. package/dist/components/ui/attachment/attachment.js.map +1 -1
  191. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  192. package/dist/components/ui/badge/badge.js +30 -11
  193. package/dist/components/ui/badge/badge.js.map +1 -1
  194. package/dist/components/ui/breadcrumb/breadcrumb.d.ts.map +1 -1
  195. package/dist/components/ui/breadcrumb/breadcrumb.js +5 -2
  196. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  197. package/dist/components/ui/button/button.d.ts.map +1 -1
  198. package/dist/components/ui/button/button.js +37 -13
  199. package/dist/components/ui/button/button.js.map +1 -1
  200. package/dist/components/ui/calendar/calendar.d.ts.map +1 -1
  201. package/dist/components/ui/calendar/calendar.js +5 -2
  202. package/dist/components/ui/calendar/calendar.js.map +1 -1
  203. package/dist/components/ui/carousel/carousel.d.ts.map +1 -1
  204. package/dist/components/ui/carousel/carousel.js +12 -6
  205. package/dist/components/ui/carousel/carousel.js.map +1 -1
  206. package/dist/components/ui/checkbox/checkbox.d.ts +13 -0
  207. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  208. package/dist/components/ui/checkbox/checkbox.js +296 -21
  209. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  210. package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
  211. package/dist/components/ui/code-block/code-block.js +9 -6
  212. package/dist/components/ui/code-block/code-block.js.map +1 -1
  213. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  214. package/dist/components/ui/combobox/combobox.js +8 -11
  215. package/dist/components/ui/combobox/combobox.js.map +1 -1
  216. package/dist/components/ui/command/command.d.ts.map +1 -1
  217. package/dist/components/ui/command/command.js +4 -2
  218. package/dist/components/ui/command/command.js.map +1 -1
  219. package/dist/components/ui/detail-panel/detail-panel.d.ts.map +1 -1
  220. package/dist/components/ui/detail-panel/detail-panel.js +3 -1
  221. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  222. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  223. package/dist/components/ui/dialog/dialog.js +3 -1
  224. package/dist/components/ui/dialog/dialog.js.map +1 -1
  225. package/dist/components/ui/dropdown-menu/menu-parts.d.ts.map +1 -1
  226. package/dist/components/ui/dropdown-menu/menu-parts.js +7 -3
  227. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  228. package/dist/components/ui/empty/empty-state.d.ts.map +1 -1
  229. package/dist/components/ui/empty/empty-state.js +3 -1
  230. package/dist/components/ui/empty/empty-state.js.map +1 -1
  231. package/dist/components/ui/field/field.d.ts.map +1 -1
  232. package/dist/components/ui/field/field.js +12 -6
  233. package/dist/components/ui/field/field.js.map +1 -1
  234. package/dist/components/ui/input/input-control.d.ts +2 -0
  235. package/dist/components/ui/input/input-control.d.ts.map +1 -1
  236. package/dist/components/ui/input/input-control.js +24 -6
  237. package/dist/components/ui/input/input-control.js.map +1 -1
  238. package/dist/components/ui/input/input.d.ts.map +1 -1
  239. package/dist/components/ui/input/input.js +47 -48
  240. package/dist/components/ui/input/input.js.map +1 -1
  241. package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
  242. package/dist/components/ui/input-group/input-group.js +1 -8
  243. package/dist/components/ui/input-group/input-group.js.map +1 -1
  244. package/dist/components/ui/message/index.d.ts +1 -1
  245. package/dist/components/ui/message/index.d.ts.map +1 -1
  246. package/dist/components/ui/message/index.js +2 -2
  247. package/dist/components/ui/message/message.d.ts.map +1 -1
  248. package/dist/components/ui/message/message.js +5 -3
  249. package/dist/components/ui/message/message.js.map +1 -1
  250. package/dist/components/ui/message/parse-message-text.d.ts +32 -0
  251. package/dist/components/ui/message/parse-message-text.d.ts.map +1 -1
  252. package/dist/components/ui/message/parse-message-text.js +63 -3
  253. package/dist/components/ui/message/parse-message-text.js.map +1 -1
  254. package/dist/components/ui/native-select/native-select.d.ts.map +1 -1
  255. package/dist/components/ui/native-select/native-select.js +4 -9
  256. package/dist/components/ui/native-select/native-select.js.map +1 -1
  257. package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
  258. package/dist/components/ui/navigation-menu/navigation-menu.js +3 -1
  259. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  260. package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
  261. package/dist/components/ui/pagination/pagination.js +7 -3
  262. package/dist/components/ui/pagination/pagination.js.map +1 -1
  263. package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -1
  264. package/dist/components/ui/questionnaire/questionnaire.js +9 -4
  265. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  266. package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
  267. package/dist/components/ui/radio-group/radio-group.js +4 -9
  268. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  269. package/dist/components/ui/resizable/resizable.d.ts.map +1 -1
  270. package/dist/components/ui/resizable/resizable.js +3 -1
  271. package/dist/components/ui/resizable/resizable.js.map +1 -1
  272. package/dist/components/ui/select/select.d.ts.map +1 -1
  273. package/dist/components/ui/select/select.js +7 -3
  274. package/dist/components/ui/select/select.js.map +1 -1
  275. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  276. package/dist/components/ui/sheet/sheet.js +3 -1
  277. package/dist/components/ui/sheet/sheet.js.map +1 -1
  278. package/dist/components/ui/spinner/spinner.d.ts.map +1 -1
  279. package/dist/components/ui/spinner/spinner.js +3 -1
  280. package/dist/components/ui/spinner/spinner.js.map +1 -1
  281. package/dist/components/ui/status-chip/status-chip.d.ts.map +1 -1
  282. package/dist/components/ui/status-chip/status-chip.js +35 -30
  283. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  284. package/dist/components/ui/switch/switch.d.ts +7 -0
  285. package/dist/components/ui/switch/switch.d.ts.map +1 -1
  286. package/dist/components/ui/switch/switch.js +255 -17
  287. package/dist/components/ui/switch/switch.js.map +1 -1
  288. package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
  289. package/dist/components/ui/textarea/textarea.js +1 -8
  290. package/dist/components/ui/textarea/textarea.js.map +1 -1
  291. package/dist/components/ui/toast/toast.d.ts.map +1 -1
  292. package/dist/components/ui/toast/toast.js +3 -1
  293. package/dist/components/ui/toast/toast.js.map +1 -1
  294. package/dist/components/ui/tooltip/deferred-tooltip.d.ts.map +1 -1
  295. package/dist/components/ui/tooltip/deferred-tooltip.js +10 -4
  296. package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
  297. package/dist/components/ui/tooltip/index.d.ts +1 -0
  298. package/dist/components/ui/tooltip/index.d.ts.map +1 -1
  299. package/dist/components/ui/tooltip/index.js +2 -1
  300. package/dist/components/ui/tooltip/lazy-tooltip.d.ts +40 -0
  301. package/dist/components/ui/tooltip/lazy-tooltip.d.ts.map +1 -0
  302. package/dist/components/ui/tooltip/lazy-tooltip.js +61 -0
  303. package/dist/components/ui/tooltip/lazy-tooltip.js.map +1 -0
  304. package/dist/components/ui/trace/trace.d.ts.map +1 -1
  305. package/dist/components/ui/trace/trace.js +82 -68
  306. package/dist/components/ui/trace/trace.js.map +1 -1
  307. package/dist/components/ui/typography/typography.d.ts +1 -1
  308. package/dist/components/ui/typography/typography.d.ts.map +1 -1
  309. package/dist/components/ui/typography/typography.js +5 -6
  310. package/dist/components/ui/typography/typography.js.map +1 -1
  311. package/dist/index.js +3 -2
  312. package/dist/lib/clipboard.d.ts.map +1 -1
  313. package/dist/lib/clipboard.js +3 -0
  314. package/dist/lib/clipboard.js.map +1 -1
  315. package/dist/lib/fast-icon.d.ts +18 -0
  316. package/dist/lib/fast-icon.d.ts.map +1 -0
  317. package/dist/lib/fast-icon.js +75 -0
  318. package/dist/lib/fast-icon.js.map +1 -0
  319. package/dist/lib/form-field.d.ts +1 -1
  320. package/dist/lib/form-field.js +3 -1
  321. package/dist/lib/form-field.js.map +1 -1
  322. package/dist/lib/observe-resize.d.ts +14 -0
  323. package/dist/lib/observe-resize.d.ts.map +1 -0
  324. package/dist/lib/observe-resize.js +19 -0
  325. package/dist/lib/observe-resize.js.map +1 -0
  326. package/dist/lint/index.d.ts +1 -0
  327. package/dist/lint/index.d.ts.map +1 -1
  328. package/dist/lint.js +251 -118
  329. package/dist/lint.js.map +1 -1
  330. package/dist/r/action-button.json +3 -1
  331. package/dist/r/floating-preview.json +2 -1
  332. package/dist/r/icon-picker.json +0 -1
  333. package/dist/r/lib.json +10 -0
  334. package/dist/r/plan.json +2 -1
  335. package/dist/r/queue.json +2 -1
  336. package/dist/r/registry.json +30 -9
  337. package/dist/r/scene-controls.json +2 -1
  338. package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +5 -1
  339. package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +22 -17
  340. package/dist/r/src/components/composites/account-menu/account-menu.tsx +21 -9
  341. package/dist/r/src/components/composites/action-button/action-button.tsx +38 -21
  342. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
  343. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  344. package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
  345. package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
  346. package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
  347. package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
  348. package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
  349. package/dist/r/src/components/composites/chat/chat.tsx +11 -1
  350. package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +5 -1
  351. package/dist/r/src/components/composites/confirmation/confirmation.tsx +15 -1
  352. package/dist/r/src/components/composites/context/context.tsx +9 -1
  353. package/dist/r/src/components/composites/file-tree/file-tree.tsx +11 -1
  354. package/dist/r/src/components/composites/help-center/help-center.tsx +5 -1
  355. package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +59 -31
  356. package/dist/r/src/components/composites/icon-picker/shell-icons.ts +121 -59
  357. package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +6 -1
  358. package/dist/r/src/components/composites/list-row/list-row-control.tsx +7 -5
  359. package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +6 -1
  360. package/dist/r/src/components/composites/model-selector/model-selector.tsx +11 -1
  361. package/dist/r/src/components/composites/plan/plan.tsx +5 -1
  362. package/dist/r/src/components/composites/queue/queue.tsx +15 -1
  363. package/dist/r/src/components/composites/reasoning/reasoning.tsx +5 -1
  364. package/dist/r/src/components/composites/scene-controls/scene-controls.tsx +17 -1
  365. package/dist/r/src/components/composites/settings/settings.tsx +23 -14
  366. package/dist/r/src/components/composites/sources/sources.tsx +27 -20
  367. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +13 -1
  368. package/dist/r/src/components/composites/stat/stat.tsx +9 -1
  369. package/dist/r/src/components/composites/subagent/subagent.tsx +5 -1
  370. package/dist/r/src/components/composites/task/task.tsx +5 -1
  371. package/dist/r/src/components/composites/terminal/ansi.ts +18 -0
  372. package/dist/r/src/components/composites/terminal/terminal.tsx +17 -7
  373. package/dist/r/src/components/composites/test-results/test-results.tsx +17 -7
  374. package/dist/r/src/components/composites/tool/tool.tsx +5 -1
  375. package/dist/r/src/components/composites/tree/tree.tsx +5 -1
  376. package/dist/r/src/components/composites/update-dialog/update-dialog.tsx +35 -15
  377. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
  378. package/dist/r/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
  379. package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
  380. package/dist/r/src/components/conversation/busy-send-button.tsx +11 -1
  381. package/dist/r/src/components/conversation/conversation-avatar.tsx +7 -1
  382. package/dist/r/src/components/conversation/conversation-surface.tsx +5 -1
  383. package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
  384. package/dist/r/src/components/conversation/message-composer.tsx +13 -1
  385. package/dist/r/src/components/conversation/message-row.tsx +15 -1
  386. package/dist/r/src/components/conversation/thread-panel.tsx +5 -1
  387. package/dist/r/src/components/conversation/transcript-composition.tsx +5 -1
  388. package/dist/r/src/components/layout/floating-preview/floating-preview.tsx +6 -1
  389. package/dist/r/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
  390. package/dist/r/src/components/layout/shell-rail/shell-rail.tsx +5 -1
  391. package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
  392. package/dist/r/src/components/layout/split-layout/split-layout.tsx +6 -1
  393. package/dist/r/src/components/layout/top-bar/top-bar.tsx +5 -1
  394. package/dist/r/src/components/theme/appearance-panel.tsx +6 -1
  395. package/dist/r/src/components/theme/theme-mode-toggle.tsx +7 -1
  396. package/dist/r/src/components/theme/theme-toggle.tsx +7 -1
  397. package/dist/r/src/components/ui/accordion/accordion.tsx +5 -1
  398. package/dist/r/src/components/ui/alert/alert.tsx +20 -3
  399. package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
  400. package/dist/r/src/components/ui/attachment/attachment.tsx +19 -8
  401. package/dist/r/src/components/ui/badge/badge.tsx +24 -8
  402. package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
  403. package/dist/r/src/components/ui/button/button.tsx +47 -16
  404. package/dist/r/src/components/ui/calendar/calendar.tsx +6 -1
  405. package/dist/r/src/components/ui/carousel/carousel.tsx +15 -5
  406. package/dist/r/src/components/ui/checkbox/checkbox.tsx +260 -22
  407. package/dist/r/src/components/ui/code-block/code-block.tsx +11 -5
  408. package/dist/r/src/components/ui/combobox/combobox.tsx +8 -9
  409. package/dist/r/src/components/ui/command/command.tsx +8 -4
  410. package/dist/r/src/components/ui/detail-panel/detail-panel.tsx +5 -1
  411. package/dist/r/src/components/ui/dialog/dialog.tsx +5 -1
  412. package/dist/r/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
  413. package/dist/r/src/components/ui/empty/empty-state.tsx +5 -1
  414. package/dist/r/src/components/ui/field/field.tsx +14 -5
  415. package/dist/r/src/components/ui/input/input-control.tsx +28 -19
  416. package/dist/r/src/components/ui/input/input.tsx +9 -12
  417. package/dist/r/src/components/ui/input-group/input-group.tsx +1 -8
  418. package/dist/r/src/components/ui/message/index.ts +3 -0
  419. package/dist/r/src/components/ui/message/message.tsx +11 -2
  420. package/dist/r/src/components/ui/message/parse-message-text.ts +94 -2
  421. package/dist/r/src/components/ui/native-select/native-select.tsx +6 -9
  422. package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
  423. package/dist/r/src/components/ui/pagination/pagination.tsx +11 -1
  424. package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +13 -1
  425. package/dist/r/src/components/ui/radio-group/radio-group.tsx +6 -9
  426. package/dist/r/src/components/ui/resizable/resizable.tsx +5 -1
  427. package/dist/r/src/components/ui/select/select.tsx +11 -1
  428. package/dist/r/src/components/ui/sheet/sheet.tsx +5 -1
  429. package/dist/r/src/components/ui/spinner/spinner.tsx +5 -1
  430. package/dist/r/src/components/ui/status-chip/status-chip.tsx +14 -7
  431. package/dist/r/src/components/ui/switch/switch.tsx +235 -28
  432. package/dist/r/src/components/ui/textarea/textarea.tsx +1 -8
  433. package/dist/r/src/components/ui/toast/toast.tsx +5 -1
  434. package/dist/r/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
  435. package/dist/r/src/components/ui/tooltip/index.ts +1 -0
  436. package/dist/r/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
  437. package/dist/r/src/components/ui/trace/trace.tsx +61 -28
  438. package/dist/r/src/components/ui/typography/typography.tsx +6 -5
  439. package/dist/r/src/lib/clipboard.ts +4 -0
  440. package/dist/r/src/lib/fast-icon.ts +88 -0
  441. package/dist/r/src/lib/form-field.ts +7 -7
  442. package/dist/r/src/lib/observe-resize.ts +28 -0
  443. package/dist/r/subagent.json +2 -1
  444. package/dist/r/tool.json +2 -1
  445. package/dist/r/tooltip.json +5 -0
  446. package/dist/r/trace.json +0 -1
  447. package/package.json +1 -1
  448. package/registry.json +30 -9
  449. package/src/components/composites/about-dialog/about-dialog.tsx +5 -1
  450. package/src/components/composites/accent-picker/accent-picker.tsx +22 -17
  451. package/src/components/composites/account-menu/account-menu.tsx +21 -9
  452. package/src/components/composites/action-button/action-button.tsx +38 -21
  453. package/src/components/composites/appearance-editor/appearance-choices.tsx +7 -1
  454. package/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  455. package/src/components/composites/appearance-editor/appearance-rows.tsx +13 -1
  456. package/src/components/composites/appearance-editor/font-settings-group.tsx +13 -1
  457. package/src/components/composites/catalog-browser/catalog-browser-group.tsx +11 -1
  458. package/src/components/composites/catalog-browser/catalog-browser.tsx +11 -1
  459. package/src/components/composites/chain-of-thought/chain-of-thought.tsx +5 -1
  460. package/src/components/composites/chat/chat.tsx +11 -1
  461. package/src/components/composites/checkpoint/checkpoint.tsx +5 -1
  462. package/src/components/composites/confirmation/confirmation.tsx +15 -1
  463. package/src/components/composites/context/context.tsx +9 -1
  464. package/src/components/composites/file-tree/file-tree.tsx +11 -1
  465. package/src/components/composites/help-center/help-center.tsx +5 -1
  466. package/src/components/composites/icon-picker/icon-picker.tsx +59 -31
  467. package/src/components/composites/icon-picker/shell-icons.ts +121 -59
  468. package/src/components/composites/inline-citation/inline-citation.tsx +6 -1
  469. package/src/components/composites/list-row/list-row-control.tsx +7 -5
  470. package/src/components/composites/message-scroller/message-scroller.tsx +6 -1
  471. package/src/components/composites/model-selector/model-selector.tsx +11 -1
  472. package/src/components/composites/plan/plan.tsx +5 -1
  473. package/src/components/composites/queue/queue.tsx +15 -1
  474. package/src/components/composites/reasoning/reasoning.tsx +5 -1
  475. package/src/components/composites/scene-controls/scene-controls.tsx +17 -1
  476. package/src/components/composites/settings/settings.tsx +23 -14
  477. package/src/components/composites/sources/sources.tsx +27 -20
  478. package/src/components/composites/stack-trace/stack-trace.tsx +13 -1
  479. package/src/components/composites/stat/stat.tsx +9 -1
  480. package/src/components/composites/subagent/subagent.tsx +5 -1
  481. package/src/components/composites/task/task.tsx +5 -1
  482. package/src/components/composites/terminal/ansi.ts +18 -0
  483. package/src/components/composites/terminal/terminal.tsx +17 -7
  484. package/src/components/composites/test-results/test-results.tsx +17 -7
  485. package/src/components/composites/tool/tool.tsx +5 -1
  486. package/src/components/composites/tree/tree.tsx +5 -1
  487. package/src/components/composites/update-dialog/update-dialog.tsx +35 -15
  488. package/src/components/composites/workspace-mark/workspace-mark.tsx +14 -7
  489. package/src/components/composites/workspace-switcher/workspace-reorder-dialog.tsx +6 -1
  490. package/src/components/composites/workspace-switcher/workspace-switcher.tsx +13 -1
  491. package/src/components/conversation/busy-send-button.tsx +11 -1
  492. package/src/components/conversation/conversation-avatar.tsx +7 -1
  493. package/src/components/conversation/conversation-surface.tsx +5 -1
  494. package/src/components/conversation/internal/chat-composer-shell.tsx +13 -1
  495. package/src/components/conversation/message-composer.tsx +13 -1
  496. package/src/components/conversation/message-row.tsx +15 -1
  497. package/src/components/conversation/thread-panel.tsx +5 -1
  498. package/src/components/conversation/transcript-composition.tsx +5 -1
  499. package/src/components/layout/floating-preview/floating-preview.tsx +6 -1
  500. package/src/components/layout/pixel-resize-handle/pixel-resize-handle.tsx +5 -1
  501. package/src/components/layout/shell-rail/shell-rail.tsx +5 -1
  502. package/src/components/layout/sidebar-nav/sidebar-nav.tsx +5 -1
  503. package/src/components/layout/split-layout/split-layout.tsx +6 -1
  504. package/src/components/layout/top-bar/top-bar.tsx +5 -1
  505. package/src/components/theme/appearance-panel.tsx +6 -1
  506. package/src/components/theme/theme-mode-toggle.tsx +7 -1
  507. package/src/components/theme/theme-toggle.tsx +7 -1
  508. package/src/components/ui/accordion/accordion.tsx +5 -1
  509. package/src/components/ui/alert/alert.tsx +20 -3
  510. package/src/components/ui/annotation-surface/annotation-surface.tsx +6 -3
  511. package/src/components/ui/attachment/attachment.tsx +19 -8
  512. package/src/components/ui/badge/badge.tsx +24 -8
  513. package/src/components/ui/breadcrumb/breadcrumb.tsx +9 -1
  514. package/src/components/ui/button/button.tsx +47 -16
  515. package/src/components/ui/calendar/calendar.tsx +6 -1
  516. package/src/components/ui/carousel/carousel.tsx +15 -5
  517. package/src/components/ui/checkbox/checkbox.tsx +260 -22
  518. package/src/components/ui/code-block/code-block.tsx +11 -5
  519. package/src/components/ui/combobox/combobox.tsx +8 -9
  520. package/src/components/ui/command/command.tsx +8 -4
  521. package/src/components/ui/detail-panel/detail-panel.tsx +5 -1
  522. package/src/components/ui/dialog/dialog.tsx +5 -1
  523. package/src/components/ui/dropdown-menu/menu-parts.tsx +11 -1
  524. package/src/components/ui/empty/empty-state.tsx +5 -1
  525. package/src/components/ui/field/field.tsx +14 -5
  526. package/src/components/ui/input/input-control.tsx +28 -19
  527. package/src/components/ui/input/input.tsx +9 -12
  528. package/src/components/ui/input-group/input-group.tsx +1 -8
  529. package/src/components/ui/message/index.ts +3 -0
  530. package/src/components/ui/message/message.tsx +11 -2
  531. package/src/components/ui/message/parse-message-text.ts +94 -2
  532. package/src/components/ui/native-select/native-select.tsx +6 -9
  533. package/src/components/ui/navigation-menu/navigation-menu.tsx +5 -1
  534. package/src/components/ui/pagination/pagination.tsx +11 -1
  535. package/src/components/ui/questionnaire/questionnaire.tsx +13 -1
  536. package/src/components/ui/radio-group/radio-group.tsx +6 -9
  537. package/src/components/ui/resizable/resizable.tsx +5 -1
  538. package/src/components/ui/select/select.tsx +11 -1
  539. package/src/components/ui/sheet/sheet.tsx +5 -1
  540. package/src/components/ui/spinner/spinner.tsx +5 -1
  541. package/src/components/ui/status-chip/status-chip.tsx +14 -7
  542. package/src/components/ui/switch/switch.tsx +235 -28
  543. package/src/components/ui/textarea/textarea.tsx +1 -8
  544. package/src/components/ui/toast/toast.tsx +5 -1
  545. package/src/components/ui/tooltip/deferred-tooltip.tsx +14 -8
  546. package/src/components/ui/tooltip/index.ts +1 -0
  547. package/src/components/ui/tooltip/lazy-tooltip.tsx +73 -0
  548. package/src/components/ui/trace/trace.tsx +61 -28
  549. package/src/components/ui/typography/typography.tsx +6 -5
  550. package/src/lib/clipboard.ts +4 -0
  551. package/src/lib/fast-icon.ts +88 -0
  552. package/src/lib/form-field.ts +7 -7
  553. package/src/lib/observe-resize.ts +28 -0
  554. package/src/lint/index.ts +199 -0
@@ -1 +1 @@
1
- {"version":3,"file":"code-block.js","names":["createEffect","createMemo","createSignal","For","on","onCleanup","onMount","Show","splitProps","Check","Copy","createCopyFeedback","cn","ActionButton","Button","code","language","highlight","complete","title","actions","copyLabel","copiedLabel","lineHeight","showLineNumbers","tallThreshold","maxHeight","wrap","size","lineMarks","loadHighlight","Promise","lineLimit","onCopy","ok","CODE_BLOCK_LINE_LIMIT","TALL_CODE_BLOCK_PX","NO_LINES","CodeBlock","props","local","rest","copied","failed","copy","copyText","tall","setTall","loaded","setLoaded","showAll","setShowAll","bodyElement","trim","slice","undefined","label","groupLabel","small","highlighter","perLine","usesLines","lines","replace","split","visibleLines","hiddenLines","length","lang","load","current","resolve","then","resolved","truncated","Actions","_el$","_tmpl$","_$insert","_$createComponent","variant","touchTarget","_$memo","tooltip","onClick","children","when","fallback","_el$2","_tmpl$5","_el$3","firstChild","_el$4","_el$5","nextSibling","_$use","element","ref","observer","ResizeObserver","footer","querySelector","offsetHeight","observe","disconnect","_$spread","_$mergeProps","class","_el$14","_tmpl$6","_el$15","each","line","index","CodeLine","number","numbered","mark","_$effect","_p$","_v$6","_v$7","e","_$className","t","_$setStyleProperty","_el$16","_tmpl$7","join","_el$6","_tmpl$2","_el$7","_el$10","_el$11","toLocaleString","focus","preventScroll","_tmpl$3","_el$13","_tmpl$4","_v$","_v$2","_v$3","_v$4","_v$5","_$setAttribute","a","o","_$style","i","MARK_GLYPH","add","remove","error","content","_el$17","_tmpl$8","_el$18","_tmpl$9","_c$","_el$19","_tmpl$0","rowClass","_el$21","_v$8","_v$9","_el$22","_tmpl$10","_el$20","_tmpl$1","InlineCode","_el$23","_tmpl$11"],"sources":["../../../../src/components/ui/code-block/code-block.tsx"],"sourcesContent":["import {\n createEffect,\n createMemo,\n createSignal,\n For,\n on,\n onCleanup,\n onMount,\n Show,\n splitProps,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { Check, Copy } from 'lucide-solid'\nimport { createCopyFeedback } from '#lib/clipboard'\nimport { cn } from '#lib/utils'\nimport { ActionButton } from '../../composites/action-button'\nimport { Button } from '../button'\n\n/**\n * CodeBlock.\n *\n * A fenced block, rendered as a surface. The library ships no highlighter —\n * syntax colouring is a large dependency with its own theme format, and a\n * component that bundled one would force every consumer to pay for it. This\n * renders the block, its chrome, and its behaviour; a caller that wants\n * highlighting passes the result through `highlight`, which is the seam a\n * Shiki/Pierre/Prism integration plugs into.\n *\n * Four details are the reason this exists rather than a styled `<pre>`:\n *\n * **Copy confirms only on success.** `navigator.clipboard.writeText` rejects\n * outside a secure context, in a sandboxed frame, and when the document is not\n * focused. Flipping to a tick unconditionally confirms a copy that did not\n * happen, and the reader pastes something stale and does not know why. The\n * rejection is caught and the button reports the failure instead.\n *\n * **A tall block repeats its action row at the bottom.** Copying from a block\n * that is taller than the viewport otherwise costs a scroll back to the top and\n * another scroll down to where you were. The threshold is a fixed 480px rather\n * than viewport-relative so the behaviour does not change when the window is\n * resized.\n *\n * **The scroller is focusable and named.** A horizontally scrollable region has\n * to be reachable by keyboard — this is axe's `scrollable-region-focusable`, and\n * a region that scrolls but cannot be focused is a WCAG 2.1.1 failure. It is a\n * labelled `group` rather than a bare `tabindex`, so the tab stop announces what\n * it is. It is deliberately not a `region` landmark: a transcript holds many\n * blocks, often in one language, and repeated landmarks of one name are noise.\n *\n * **Resolving a streaming block must not move the reader.** When `complete` is\n * false the block shows the code it has plus a generating indicator; the\n * indicator is inside the scroller's own box and does not add a line, because a\n * block that grows the moment its content resolves shifts everything below it.\n * If a caller's `highlight` changes the line box, that is the caller's height to\n * hold — `lineHeight` is a prop for exactly that reason.\n *\n * ## Output, not only source\n *\n * The same surface carries terminal output, logs and diffs inside an agent's\n * activity, so it also:\n *\n * - **loads its highlighter lazily** (`loadHighlight`). The grammar is fetched\n * only for a block that is complete and has a language, the block renders plain\n * until it arrives, and a loader that returns nothing — an unknown language, a\n * failed fetch — leaves the plain text in place without an error. Highlighting\n * a block on every streamed delta would re-tokenise the whole thing per token,\n * so a streaming block stays plain until `complete`.\n * - **marks lines** (`lineMarks`) as added, removed, highlighted or failed. A mark\n * is carried by a gutter glyph and by `<ins>`/`<del>` for the two that change\n * text, never by colour alone, and the glyph is not selectable so a copied\n * selection stays the source.\n * - **copies the source exactly.** The copy button writes `code` as given: no\n * trailing-newline trimming, no line numbers, no gutter glyphs, and the whole\n * block even when only part of it is rendered (`lineLimit`).\n * - **bounds a large render.** Past `lineLimit` lines the per-line renderer and a\n * highlighted render show the first lines and a control to show the rest,\n * because tens of thousands of row elements, or a tokenizer run over all of\n * them, are a freeze, not a transcript. Which renderer is in use is decided\n * at the time, so a highlighter that loads late takes over the bound from the\n * per-line rows and the note below the block always describes what is drawn.\n * The plain renderer is a single text node and needs no limit.\n * - **comes in a small size** (`size=\"sm\"`) for tool output inside a Trace line.\n */\nexport type CodeBlockProps = Omit<ComponentProps<'div'>, 'children' | 'onCopy'> & {\n code: string\n /** The language, shown in the header and used as the region's label. */\n language?: string\n /** The code, transformed — highlighted HTML or a component. Omit for plain text. */\n highlight?: (code: string) => JSX.Element\n /** False while the block is still streaming. Adds a generating indicator. */\n complete?: boolean\n /** A filename or title, shown instead of the language. */\n title?: string\n /** Extra header controls, before the copy button. */\n actions?: JSX.Element\n /** Copy label. Override for a non-English application. */\n copyLabel?: string\n copiedLabel?: string\n /** Line height of the rendered code. Set it when `highlight` changes the box. */\n lineHeight?: string\n /** A line-number gutter. Off by default; a short snippet rarely needs one. */\n showLineNumbers?: boolean\n /** The height above which the action row is repeated below the block. */\n tallThreshold?: number\n /**\n * Cap the code body's height and scroll it vertically past that. A number is\n * pixels; a string is any CSS length (`'20rem'`, `'50vh'`). Unset, the block\n * grows with its content.\n */\n maxHeight?: number | string\n /**\n * Soft-wrap long lines inside the block instead of scrolling sideways. Off by\n * default: wrapped code loses its column alignment, so it is for prose-like\n * output (logs, long commands) in a narrow column. Wraps the plain renderer and\n * any `pre` inside `highlight` output; line numbers stay on the first visual line.\n */\n wrap?: boolean\n /** `sm` is the compact chrome for output nested inside a Trace line. */\n size?: 'default' | 'sm'\n /**\n * Marks on 1-based line numbers. Applies to the per-line renderer, which is\n * used whenever marks or line numbers are present and no highlighter is in use,\n * given as `highlight` or loaded by `loadHighlight`: a highlighter replaces the\n * rows, so the marks and the gutter go with them.\n */\n lineMarks?: Readonly<Record<number, CodeLineMark>>\n /**\n * Resolve a highlighter for the block's language. Called once the block is\n * complete; resolving to `undefined` (or rejecting) keeps the plain rendering.\n */\n loadHighlight?: (language: string | undefined) => Promise<CodeHighlighter | undefined>\n /**\n * Lines the per-line and the highlighted renderer show before offering the\n * rest. Default 2000. The plain renderer is one text node and is not limited.\n */\n lineLimit?: number\n /** Called after each copy attempt with whether the clipboard accepted it. */\n onCopy?: (ok: boolean) => void\n}\n\nexport type CodeLineMark = 'add' | 'remove' | 'highlight' | 'error'\nexport type CodeHighlighter = (code: string) => JSX.Element\n\nexport const CODE_BLOCK_LINE_LIMIT = 2_000\n\nexport const TALL_CODE_BLOCK_PX = 480\n\nconst NO_LINES: readonly string[] = []\n\nexport function CodeBlock(props: CodeBlockProps) {\n const [local, rest] = splitProps(props, [\n 'code',\n 'language',\n 'highlight',\n 'complete',\n 'title',\n 'actions',\n 'copyLabel',\n 'copiedLabel',\n 'lineHeight',\n 'showLineNumbers',\n 'tallThreshold',\n 'maxHeight',\n 'wrap',\n 'size',\n 'lineMarks',\n 'loadHighlight',\n 'lineLimit',\n 'onCopy',\n 'class',\n 'ref',\n ])\n\n const { copied, failed, copy: copyText } = createCopyFeedback()\n const [tall, setTall] = createSignal(false)\n\n const [loaded, setLoaded] = createSignal<CodeHighlighter>()\n const [showAll, setShowAll] = createSignal(false)\n let bodyElement: HTMLDivElement | undefined\n\n // A language string can come from untrusted model output. It is rendered as\n // text, so it cannot inject markup; the cap keeps a pathological one from\n // swallowing the header.\n const language = () => local.language?.trim().slice(0, 40) || undefined\n const label = () => local.title ?? language() ?? 'code'\n const groupLabel = () => (language() ? `${language()} code` : 'code')\n const small = () => local.size === 'sm'\n const highlighter = (): CodeHighlighter | undefined => local.highlight ?? loaded()\n const perLine = () =>\n highlighter() === undefined && (local.showLineNumbers === true || local.lineMarks !== undefined)\n const usesLines = () => highlighter() !== undefined || perLine()\n // Memos run eagerly, so the split is gated on a renderer that reads lines: a\n // streaming plain block would otherwise split its whole text on every delta.\n const lines = createMemo((): readonly string[] =>\n usesLines() ? local.code.replace(/\\n$/, '').split('\\n') : NO_LINES\n )\n const lineLimit = () => local.lineLimit ?? CODE_BLOCK_LINE_LIMIT\n const visibleLines = createMemo(() => (showAll() ? lines() : lines().slice(0, lineLimit())))\n const hiddenLines = () => lines().length - visibleLines().length\n\n // Load once the block has stopped changing. `on` keys the effect to the\n // language and completion, not to every streamed character, and a stale\n // resolution (the language changed while the grammar was in flight) is dropped.\n createEffect(\n on(\n () => [local.complete, language(), local.loadHighlight] as const,\n ([complete, lang, load]) => {\n setLoaded(undefined)\n if (!complete || !load || local.highlight) return\n let current = true\n onCleanup(() => (current = false))\n // Wrapped, not called bare: a loader that throws before it returns a promise\n // (a bad import path, a missing grammar table) must degrade to plain text\n // like one that rejects, not tear down the tree from inside this effect.\n new Promise<CodeHighlighter | undefined>((resolve) => resolve(load(lang))).then(\n (resolved) => {\n if (current && resolved) setLoaded(() => resolved)\n },\n () => undefined\n )\n }\n )\n )\n // The renderer in use decides everything about the limit, not the props alone:\n // a highlighter that has loaded since the first render replaces the per-line\n // rows, so what is drawn, and what the footer may say, follows `highlighter()`.\n const truncated = () => usesLines() && hiddenLines() > 0\n const maxHeight = () =>\n typeof local.maxHeight === 'number' ? `${local.maxHeight}px` : local.maxHeight\n\n const copy = async () => {\n const ok = await copyText(local.code)\n local.onCopy?.(ok)\n }\n\n const Actions = () => (\n <div class=\"flex items-center gap-1 opacity-0 transition-opacity group-focus-within/code:opacity-100 group-hover/code:opacity-100 [@media(hover:none)]:opacity-100\">\n {local.actions}\n <ActionButton\n variant=\"ghost\"\n size=\"icon-2xs\"\n touchTarget=\"comfortable\"\n aria-label={copied() ? (local.copiedLabel ?? 'Copied') : (local.copyLabel ?? 'Copy code')}\n tooltip={local.copyLabel ?? 'Copy code'}\n title={failed() ? 'Copying is unavailable in this context' : undefined}\n onClick={() => void copy()}\n >\n <Show when={copied()} fallback={<Copy aria-hidden=\"true\" />}>\n <Check aria-hidden=\"true\" />\n </Show>\n </ActionButton>\n </div>\n )\n\n return (\n <div\n data-slot=\"code-block\"\n data-size={local.size ?? 'default'}\n class={cn(\n 'group/code overflow-hidden border border-border bg-card',\n small() ? 'rounded-lg' : 'rounded-xl',\n local.class\n )}\n {...rest}\n ref={(element) => {\n // Composed rather than replaced: a caller's ref must survive.\n if (typeof local.ref === 'function') local.ref(element)\n else if (local.ref) local.ref = element\n // Measured rather than assumed: the caller controls the content, so only\n // the rendered box can say whether the action row has scrolled away.\n // The body is what is watched, not the block: the repeated action row is\n // added to the block, so watching the block made this callback resize the\n // very element it observes, which is a ResizeObserver loop (WebKit reports\n // it as an uncaught \"loop completed with undelivered notifications\" error).\n // The footer's own height is left out of the measure for the same reason: a\n // block is tall by its content, not by the row that tallness adds.\n const observer = new ResizeObserver(() => {\n const footer = element.querySelector<HTMLElement>('[data-code-block-footer]')\n setTall(\n element.offsetHeight - (footer?.offsetHeight ?? 0) >\n (local.tallThreshold ?? TALL_CODE_BLOCK_PX)\n )\n })\n onMount(() => {\n if (bodyElement) observer.observe(bodyElement)\n })\n onCleanup(() => observer.disconnect())\n }}\n >\n <div\n class={cn('flex items-center justify-between gap-2', small() ? 'px-2 py-0.5' : 'px-3 py-1')}\n >\n <span class=\"truncate font-code text-code text-muted-foreground\">{label()}</span>\n <Actions />\n </div>\n <div\n ref={(element) => (bodyElement = element)}\n data-slot=\"code-block-body\"\n data-wrap={local.wrap ? '' : undefined}\n class={cn('scroll-fade overflow-x-auto', {\n // A capped body scrolls on both axes; the region is already a tab stop,\n // so the keyboard reaches the vertical overflow the same way.\n 'overflow-y-auto': local.maxHeight !== undefined,\n '[&_pre]:whitespace-pre-wrap [&_pre]:[overflow-wrap:anywhere]': local.wrap,\n })}\n style={maxHeight() === undefined ? undefined : { 'max-height': maxHeight() }}\n // A region that scrolls must be focusable, and a tab stop needs a name.\n // A `group`, not a `region`: a landmark with the same role and name as the\n // next block's (\"ts code\" twice) is a duplicate in the screen reader's\n // landmark list, and a long answer would fill that list with code blocks.\n tabindex=\"0\"\n role=\"group\"\n aria-label={groupLabel()}\n >\n <Show\n when={highlighter()}\n fallback={\n <pre\n class={cn('m-0', small() ? 'px-2 py-1.5' : 'px-3 py-2')}\n style={{ 'line-height': local.lineHeight ?? '1.5' }}\n >\n <code class=\"font-code text-code\">\n <Show when={perLine()} fallback={local.code.replace(/\\n$/, '')}>\n <For each={visibleLines()}>\n {(line, index) => (\n <CodeLine\n line={line}\n number={index() + 1}\n numbered={local.showLineNumbers === true}\n mark={local.lineMarks?.[index() + 1]}\n wrap={local.wrap === true}\n />\n )}\n </For>\n </Show>\n </code>\n </pre>\n }\n >\n {(highlight) => (\n <div class={small() ? 'px-2 py-1.5' : 'px-3 py-2'}>\n {highlight()(hiddenLines() > 0 ? visibleLines().join('\\n') : local.code)}\n </div>\n )}\n </Show>\n <Show when={truncated()}>\n <div class=\"flex items-center gap-2 border-t border-border px-3 py-1 text-xs text-muted-foreground\">\n <span>\n Showing the first {visibleLines().length.toLocaleString()} of{' '}\n {lines().length.toLocaleString()} lines.\n </span>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\n onClick={() => {\n setShowAll(true)\n // This button leaves the document with the click; the scroller\n // is the nearest place focus can stay, so a keyboard user keeps their place.\n bodyElement?.focus({ preventScroll: true })\n }}\n >\n Show all {lines().length.toLocaleString()} lines\n </Button>\n </div>\n </Show>\n {/*\n In the scroller's box, and a single line: the indicator must not add\n height when it disappears, or a streaming block shifts everything below\n it as it resolves.\n */}\n <Show when={!local.complete}>\n <p class=\"px-3 pb-2 text-xs text-muted-foreground italic\">Generating…</p>\n </Show>\n </div>\n <Show when={tall()}>\n <div\n data-code-block-footer=\"\"\n class=\"flex items-center justify-end border-t border-transparent px-3 py-1 transition-colors group-focus-within/code:border-border group-hover/code:border-border\"\n >\n <Actions />\n </div>\n </Show>\n </div>\n )\n}\n\nconst MARK_GLYPH: Readonly<Record<CodeLineMark, string>> = {\n add: '+',\n remove: '−',\n highlight: '',\n error: '!',\n}\n\n/**\n * One rendered line. The gutter glyph and the element (`ins`/`del`) carry what a\n * mark means so it survives greyscale and a screen reader; both gutters are\n * unselectable so dragging across the block and copying yields only source.\n */\nfunction CodeLine(props: {\n line: string\n number: number\n numbered: boolean\n mark?: CodeLineMark\n wrap: boolean\n}) {\n const content = () => (\n <>\n <Show when={props.numbered}>\n <span class=\"text-right text-muted-foreground select-none\" aria-hidden=\"true\">\n {props.number}\n </span>\n </Show>\n <span\n class=\"w-[1ch] text-center text-muted-foreground select-none\"\n aria-hidden=\"true\"\n data-slot=\"code-line-mark\"\n >\n {props.mark ? MARK_GLYPH[props.mark] : ''}\n </span>\n <span class={cn({ 'min-w-0': props.wrap })}>{props.line || ' '}</span>\n </>\n )\n const rowClass = () =>\n cn(\n 'grid gap-3 no-underline',\n props.numbered ? 'grid-cols-[3ch_1ch_1fr]' : 'grid-cols-[1ch_1fr]',\n {\n 'bg-success-subtle': props.mark === 'add',\n 'bg-destructive-subtle': props.mark === 'remove' || props.mark === 'error',\n 'bg-primary-subtle': props.mark === 'highlight',\n }\n )\n return (\n <Show\n when={props.mark === 'add' || props.mark === 'remove'}\n fallback={\n <span data-mark={props.mark} class={rowClass()}>\n {content()}\n </span>\n }\n >\n <Show\n when={props.mark === 'add'}\n fallback={\n <del data-mark=\"remove\" class={rowClass()}>\n {content()}\n </del>\n }\n >\n <ins data-mark=\"add\" class={rowClass()}>\n {content()}\n </ins>\n </Show>\n </Show>\n )\n}\n\n/**\n * InlineCode.\n *\n * The `code` inside a sentence. It is a component rather than a class because it\n * has to hold three properties at once: it uses the shared code family and size\n * preference, and it wraps rather than overflows a narrow column\n * (`overflow-wrap: anywhere` — an identifier with\n * no spaces is one long token), and it must be legible against whatever surface\n * it lands on, which is why the fill is a token and not a fixed grey.\n */\nexport function InlineCode(props: ComponentProps<'code'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <code\n class={cn(\n 'rounded-sm bg-muted px-[0.4em] py-[0.15em] font-code text-code text-foreground [overflow-wrap:anywhere]',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgJA,IAAamC,wBAAwB;AAErC,IAAaC,qBAAqB;AAElC,IAAMC,WAA8B,CAAA;AAEpC,SAAgBC,UAAUC,OAAuB;CAC/C,MAAM,CAACC,OAAOC,QAAQjC,WAAW+B,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAK,CACN;CAED,MAAM,EAAEG,QAAQC,QAAQC,MAAMC,aAAalC,mBAAmB;CAC9D,MAAM,CAACmC,MAAMC,WAAW7C,aAAa,KAAK;CAE1C,MAAM,CAAC8C,QAAQC,aAAa/C,aAA8B;CAC1D,MAAM,CAACgD,SAASC,cAAcjD,aAAa,KAAK;CAChD,IAAIkD;CAKJ,MAAMpC,iBAAiBwB,MAAMxB,UAAUqC,KAAK,CAAC,CAACC,MAAM,GAAG,EAAE,KAAKC,KAAAA;CAC9D,MAAMC,cAAchB,MAAMrB,SAASH,SAAS,KAAK;CACjD,MAAMyC,mBAAoBzC,SAAS,IAAI,GAAGA,SAAS,EAAC,SAAU;CAC9D,MAAM0C,cAAclB,MAAMZ,SAAS;CACnC,MAAM+B,oBAAiDnB,MAAMvB,aAAa+B,OAAO;CACjF,MAAMY,gBACJD,YAAY,MAAMJ,KAAAA,MAAcf,MA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A6C,OADO7H,MAAM8E,MAAIgD,OAASH,SAAS;KAACE,SAAA7C,IAAAG,KAAAuB,aAAAkB,QAAA,aAAA5C,IAAAG,IAAA0C,IAAA;KAAAC,SAAA9C,IAAAK,KAAAD,UAAAwC,QAAA5C,IAAAK,IAAAyC,IAAA;KAAA,OAAA9C;IAAA,GAAA;KAAAG,GAAAnE,KAAAA;KAAAqE,GAAArE,KAAAA;IAAA,CAAA;IAAA,OAAA4G;GAAA,EAAA,CAAA;EAAA;EAAA,IAAA9E,WAAA;GAAA,OAAAN,gBAK/CxE,MAAI;IAAA,IACH+E,OAAI;KAAA,OAAE/C,MAAM8E,SAAS;IAAK;IAAA,IAC1B9B,WAAQ;KAAA,cAAA;MAAA,IAAA+E,SAAAC,SAAA;MAAAzF,OAAAwF,QAEHZ,OAAO;MAAApC,aAAAK,UAAA2C,QADqBJ,SAAS,CAAC,CAAA;MAAA,OAAAI;KAAA,EAAA,CAAA;IAAA;IAAA,IAAAjF,WAAA;KAAA,IAAAmF,SAAAC,QAAA;KAAA3F,OAAA0F,QAMxCd,OAAO;KAAApC,aAAAK,UAAA6C,QADkBN,SAAS,CAAC,CAAA;KAAA,OAAAM;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AAM9C;;;;;;;;;;;AAYA,SAAgBE,WAAWnI,OAA+B;CACxD,MAAM,CAACC,OAAOC,QAAQjC,WAAW+B,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAoI,SAAAC,SAAA;EAAAnE,OAAAkE,QAAAjE,WAAA,EAAA,KAAA,WAAA;GAAA,OAEW9F,GACL,2GACA4B,MAAMmE,KACR;EAAC,EAAA,GACGlE,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAkI;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"code-block.js","names":["createEffect","createMemo","createSignal","For","on","onCleanup","onMount","Show","splitProps","Check","LucideCheck","Copy","LucideCopy","createCopyFeedback","observeResize","cn","ActionButton","Button","fastIcon","code","language","highlight","complete","title","actions","copyLabel","copiedLabel","lineHeight","showLineNumbers","tallThreshold","maxHeight","wrap","size","lineMarks","loadHighlight","Promise","lineLimit","onCopy","ok","CODE_BLOCK_LINE_LIMIT","TALL_CODE_BLOCK_PX","NO_LINES","CodeBlock","props","local","rest","copied","failed","copy","copyText","tall","setTall","loaded","setLoaded","showAll","setShowAll","bodyElement","trim","slice","undefined","label","groupLabel","small","highlighter","perLine","usesLines","lines","replace","split","visibleLines","hiddenLines","length","lang","load","current","resolve","then","resolved","truncated","Actions","_el$","_tmpl$","_$insert","_$createComponent","variant","touchTarget","_$memo","tooltip","onClick","children","when","fallback","_el$2","_tmpl$5","_el$3","firstChild","_el$4","_el$5","nextSibling","_$use","element","ref","measure","footer","querySelector","offsetHeight","_$spread","_$mergeProps","class","_el$14","_tmpl$6","_el$15","each","line","index","CodeLine","number","numbered","mark","_$effect","_p$","_v$6","_v$7","e","_$className","t","_$setStyleProperty","_el$16","_tmpl$7","join","_el$6","_tmpl$2","_el$7","_el$10","_el$11","toLocaleString","focus","preventScroll","_tmpl$3","_el$13","_tmpl$4","_v$","_v$2","_v$3","_v$4","_v$5","_$setAttribute","a","o","_$style","i","MARK_GLYPH","add","remove","error","content","_el$17","_tmpl$8","_el$18","_tmpl$9","_c$","_el$19","_tmpl$0","rowClass","_el$21","_v$8","_v$9","_el$22","_tmpl$10","_el$20","_tmpl$1","InlineCode","_el$23","_tmpl$11"],"sources":["../../../../src/components/ui/code-block/code-block.tsx"],"sourcesContent":["import {\n createEffect,\n createMemo,\n createSignal,\n For,\n on,\n onCleanup,\n onMount,\n Show,\n splitProps,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { Check as LucideCheck, Copy as LucideCopy } from 'lucide-solid'\nimport { createCopyFeedback } from '#lib/clipboard'\nimport { observeResize } from '#lib/observe-resize'\nimport { cn } from '#lib/utils'\nimport { ActionButton } from '../../composites/action-button'\nimport { Button } from '../button'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst Copy = fastIcon(LucideCopy)\n\n/**\n * CodeBlock.\n *\n * A fenced block, rendered as a surface. The library ships no highlighter —\n * syntax colouring is a large dependency with its own theme format, and a\n * component that bundled one would force every consumer to pay for it. This\n * renders the block, its chrome, and its behaviour; a caller that wants\n * highlighting passes the result through `highlight`, which is the seam a\n * Shiki/Pierre/Prism integration plugs into.\n *\n * Four details are the reason this exists rather than a styled `<pre>`:\n *\n * **Copy confirms only on success.** `navigator.clipboard.writeText` rejects\n * outside a secure context, in a sandboxed frame, and when the document is not\n * focused. Flipping to a tick unconditionally confirms a copy that did not\n * happen, and the reader pastes something stale and does not know why. The\n * rejection is caught and the button reports the failure instead.\n *\n * **A tall block repeats its action row at the bottom.** Copying from a block\n * that is taller than the viewport otherwise costs a scroll back to the top and\n * another scroll down to where you were. The threshold is a fixed 480px rather\n * than viewport-relative so the behaviour does not change when the window is\n * resized.\n *\n * **The scroller is focusable and named.** A horizontally scrollable region has\n * to be reachable by keyboard — this is axe's `scrollable-region-focusable`, and\n * a region that scrolls but cannot be focused is a WCAG 2.1.1 failure. It is a\n * labelled `group` rather than a bare `tabindex`, so the tab stop announces what\n * it is. It is deliberately not a `region` landmark: a transcript holds many\n * blocks, often in one language, and repeated landmarks of one name are noise.\n *\n * **Resolving a streaming block must not move the reader.** When `complete` is\n * false the block shows the code it has plus a generating indicator; the\n * indicator is inside the scroller's own box and does not add a line, because a\n * block that grows the moment its content resolves shifts everything below it.\n * If a caller's `highlight` changes the line box, that is the caller's height to\n * hold — `lineHeight` is a prop for exactly that reason.\n *\n * ## Output, not only source\n *\n * The same surface carries terminal output, logs and diffs inside an agent's\n * activity, so it also:\n *\n * - **loads its highlighter lazily** (`loadHighlight`). The grammar is fetched\n * only for a block that is complete and has a language, the block renders plain\n * until it arrives, and a loader that returns nothing — an unknown language, a\n * failed fetch — leaves the plain text in place without an error. Highlighting\n * a block on every streamed delta would re-tokenise the whole thing per token,\n * so a streaming block stays plain until `complete`.\n * - **marks lines** (`lineMarks`) as added, removed, highlighted or failed. A mark\n * is carried by a gutter glyph and by `<ins>`/`<del>` for the two that change\n * text, never by colour alone, and the glyph is not selectable so a copied\n * selection stays the source.\n * - **copies the source exactly.** The copy button writes `code` as given: no\n * trailing-newline trimming, no line numbers, no gutter glyphs, and the whole\n * block even when only part of it is rendered (`lineLimit`).\n * - **bounds a large render.** Past `lineLimit` lines the per-line renderer and a\n * highlighted render show the first lines and a control to show the rest,\n * because tens of thousands of row elements, or a tokenizer run over all of\n * them, are a freeze, not a transcript. Which renderer is in use is decided\n * at the time, so a highlighter that loads late takes over the bound from the\n * per-line rows and the note below the block always describes what is drawn.\n * The plain renderer is a single text node and needs no limit.\n * - **comes in a small size** (`size=\"sm\"`) for tool output inside a Trace line.\n */\nexport type CodeBlockProps = Omit<ComponentProps<'div'>, 'children' | 'onCopy'> & {\n code: string\n /** The language, shown in the header and used as the region's label. */\n language?: string\n /** The code, transformed — highlighted HTML or a component. Omit for plain text. */\n highlight?: (code: string) => JSX.Element\n /** False while the block is still streaming. Adds a generating indicator. */\n complete?: boolean\n /** A filename or title, shown instead of the language. */\n title?: string\n /** Extra header controls, before the copy button. */\n actions?: JSX.Element\n /** Copy label. Override for a non-English application. */\n copyLabel?: string\n copiedLabel?: string\n /** Line height of the rendered code. Set it when `highlight` changes the box. */\n lineHeight?: string\n /** A line-number gutter. Off by default; a short snippet rarely needs one. */\n showLineNumbers?: boolean\n /** The height above which the action row is repeated below the block. */\n tallThreshold?: number\n /**\n * Cap the code body's height and scroll it vertically past that. A number is\n * pixels; a string is any CSS length (`'20rem'`, `'50vh'`). Unset, the block\n * grows with its content.\n */\n maxHeight?: number | string\n /**\n * Soft-wrap long lines inside the block instead of scrolling sideways. Off by\n * default: wrapped code loses its column alignment, so it is for prose-like\n * output (logs, long commands) in a narrow column. Wraps the plain renderer and\n * any `pre` inside `highlight` output; line numbers stay on the first visual line.\n */\n wrap?: boolean\n /** `sm` is the compact chrome for output nested inside a Trace line. */\n size?: 'default' | 'sm'\n /**\n * Marks on 1-based line numbers. Applies to the per-line renderer, which is\n * used whenever marks or line numbers are present and no highlighter is in use,\n * given as `highlight` or loaded by `loadHighlight`: a highlighter replaces the\n * rows, so the marks and the gutter go with them.\n */\n lineMarks?: Readonly<Record<number, CodeLineMark>>\n /**\n * Resolve a highlighter for the block's language. Called once the block is\n * complete; resolving to `undefined` (or rejecting) keeps the plain rendering.\n */\n loadHighlight?: (language: string | undefined) => Promise<CodeHighlighter | undefined>\n /**\n * Lines the per-line and the highlighted renderer show before offering the\n * rest. Default 2000. The plain renderer is one text node and is not limited.\n */\n lineLimit?: number\n /** Called after each copy attempt with whether the clipboard accepted it. */\n onCopy?: (ok: boolean) => void\n}\n\nexport type CodeLineMark = 'add' | 'remove' | 'highlight' | 'error'\nexport type CodeHighlighter = (code: string) => JSX.Element\n\nexport const CODE_BLOCK_LINE_LIMIT = 2_000\n\nexport const TALL_CODE_BLOCK_PX = 480\n\nconst NO_LINES: readonly string[] = []\n\nexport function CodeBlock(props: CodeBlockProps) {\n const [local, rest] = splitProps(props, [\n 'code',\n 'language',\n 'highlight',\n 'complete',\n 'title',\n 'actions',\n 'copyLabel',\n 'copiedLabel',\n 'lineHeight',\n 'showLineNumbers',\n 'tallThreshold',\n 'maxHeight',\n 'wrap',\n 'size',\n 'lineMarks',\n 'loadHighlight',\n 'lineLimit',\n 'onCopy',\n 'class',\n 'ref',\n ])\n\n const { copied, failed, copy: copyText } = createCopyFeedback()\n const [tall, setTall] = createSignal(false)\n\n const [loaded, setLoaded] = createSignal<CodeHighlighter>()\n const [showAll, setShowAll] = createSignal(false)\n let bodyElement: HTMLDivElement | undefined\n\n // A language string can come from untrusted model output. It is rendered as\n // text, so it cannot inject markup; the cap keeps a pathological one from\n // swallowing the header.\n const language = () => local.language?.trim().slice(0, 40) || undefined\n const label = () => local.title ?? language() ?? 'code'\n const groupLabel = () => (language() ? `${language()} code` : 'code')\n const small = () => local.size === 'sm'\n const highlighter = (): CodeHighlighter | undefined => local.highlight ?? loaded()\n const perLine = () =>\n highlighter() === undefined && (local.showLineNumbers === true || local.lineMarks !== undefined)\n const usesLines = () => highlighter() !== undefined || perLine()\n // Memos run eagerly, so the split is gated on a renderer that reads lines: a\n // streaming plain block would otherwise split its whole text on every delta.\n const lines = createMemo((): readonly string[] =>\n usesLines() ? local.code.replace(/\\n$/, '').split('\\n') : NO_LINES\n )\n const lineLimit = () => local.lineLimit ?? CODE_BLOCK_LINE_LIMIT\n const visibleLines = createMemo(() => (showAll() ? lines() : lines().slice(0, lineLimit())))\n const hiddenLines = () => lines().length - visibleLines().length\n\n // Load once the block has stopped changing. `on` keys the effect to the\n // language and completion, not to every streamed character, and a stale\n // resolution (the language changed while the grammar was in flight) is dropped.\n createEffect(\n on(\n () => [local.complete, language(), local.loadHighlight] as const,\n ([complete, lang, load]) => {\n setLoaded(undefined)\n if (!complete || !load || local.highlight) return\n let current = true\n onCleanup(() => (current = false))\n // Wrapped, not called bare: a loader that throws before it returns a promise\n // (a bad import path, a missing grammar table) must degrade to plain text\n // like one that rejects, not tear down the tree from inside this effect.\n new Promise<CodeHighlighter | undefined>((resolve) => resolve(load(lang))).then(\n (resolved) => {\n if (current && resolved) setLoaded(() => resolved)\n },\n () => undefined\n )\n }\n )\n )\n // The renderer in use decides everything about the limit, not the props alone:\n // a highlighter that has loaded since the first render replaces the per-line\n // rows, so what is drawn, and what the footer may say, follows `highlighter()`.\n const truncated = () => usesLines() && hiddenLines() > 0\n const maxHeight = () =>\n typeof local.maxHeight === 'number' ? `${local.maxHeight}px` : local.maxHeight\n\n const copy = async () => {\n const ok = await copyText(local.code)\n local.onCopy?.(ok)\n }\n\n const Actions = () => (\n <div class=\"flex items-center gap-1 opacity-0 transition-opacity group-focus-within/code:opacity-100 group-hover/code:opacity-100 [@media(hover:none)]:opacity-100\">\n {local.actions}\n <ActionButton\n variant=\"ghost\"\n size=\"icon-2xs\"\n touchTarget=\"comfortable\"\n aria-label={copied() ? (local.copiedLabel ?? 'Copied') : (local.copyLabel ?? 'Copy code')}\n tooltip={local.copyLabel ?? 'Copy code'}\n title={failed() ? 'Copying is unavailable in this context' : undefined}\n onClick={() => void copy()}\n >\n <Show when={copied()} fallback={<Copy aria-hidden=\"true\" />}>\n <Check aria-hidden=\"true\" />\n </Show>\n </ActionButton>\n </div>\n )\n\n return (\n <div\n data-slot=\"code-block\"\n data-size={local.size ?? 'default'}\n class={cn(\n 'group/code overflow-hidden border border-border bg-card',\n small() ? 'rounded-lg' : 'rounded-xl',\n local.class\n )}\n {...rest}\n ref={(element) => {\n // Composed rather than replaced: a caller's ref must survive.\n if (typeof local.ref === 'function') local.ref(element)\n else if (local.ref) local.ref = element\n // Measured rather than assumed: the caller controls the content, so only\n // the rendered box can say whether the action row has scrolled away.\n // The body is what is watched, not the block: the repeated action row is\n // added to the block, so watching the block made this callback resize the\n // very element it observes, which is a ResizeObserver loop (WebKit reports\n // it as an uncaught \"loop completed with undelivered notifications\" error).\n // The footer's own height is left out of the measure for the same reason: a\n // block is tall by its content, not by the row that tallness adds.\n // One observer is shared by every block (see observeResize).\n const measure = () => {\n const footer = element.querySelector<HTMLElement>('[data-code-block-footer]')\n setTall(\n element.offsetHeight - (footer?.offsetHeight ?? 0) >\n (local.tallThreshold ?? TALL_CODE_BLOCK_PX)\n )\n }\n onMount(() => {\n if (bodyElement) onCleanup(observeResize(bodyElement, measure))\n })\n }}\n >\n <div\n class={cn('flex items-center justify-between gap-2', small() ? 'px-2 py-0.5' : 'px-3 py-1')}\n >\n <span class=\"truncate font-code text-code text-muted-foreground\">{label()}</span>\n <Actions />\n </div>\n <div\n ref={(element) => (bodyElement = element)}\n data-slot=\"code-block-body\"\n data-wrap={local.wrap ? '' : undefined}\n class={cn('scroll-fade overflow-x-auto', {\n // A capped body scrolls on both axes; the region is already a tab stop,\n // so the keyboard reaches the vertical overflow the same way.\n 'overflow-y-auto': local.maxHeight !== undefined,\n '[&_pre]:whitespace-pre-wrap [&_pre]:[overflow-wrap:anywhere]': local.wrap,\n })}\n style={maxHeight() === undefined ? undefined : { 'max-height': maxHeight() }}\n // A region that scrolls must be focusable, and a tab stop needs a name.\n // A `group`, not a `region`: a landmark with the same role and name as the\n // next block's (\"ts code\" twice) is a duplicate in the screen reader's\n // landmark list, and a long answer would fill that list with code blocks.\n tabindex=\"0\"\n role=\"group\"\n aria-label={groupLabel()}\n >\n <Show\n when={highlighter()}\n fallback={\n <pre\n class={cn('m-0', small() ? 'px-2 py-1.5' : 'px-3 py-2')}\n style={{ 'line-height': local.lineHeight ?? '1.5' }}\n >\n <code class=\"font-code text-code\">\n <Show when={perLine()} fallback={local.code.replace(/\\n$/, '')}>\n <For each={visibleLines()}>\n {(line, index) => (\n <CodeLine\n line={line}\n number={index() + 1}\n numbered={local.showLineNumbers === true}\n mark={local.lineMarks?.[index() + 1]}\n wrap={local.wrap === true}\n />\n )}\n </For>\n </Show>\n </code>\n </pre>\n }\n >\n {(highlight) => (\n <div class={small() ? 'px-2 py-1.5' : 'px-3 py-2'}>\n {highlight()(hiddenLines() > 0 ? visibleLines().join('\\n') : local.code)}\n </div>\n )}\n </Show>\n <Show when={truncated()}>\n <div class=\"flex items-center gap-2 border-t border-border px-3 py-1 text-xs text-muted-foreground\">\n <span>\n Showing the first {visibleLines().length.toLocaleString()} of{' '}\n {lines().length.toLocaleString()} lines.\n </span>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\n onClick={() => {\n setShowAll(true)\n // This button leaves the document with the click; the scroller\n // is the nearest place focus can stay, so a keyboard user keeps their place.\n bodyElement?.focus({ preventScroll: true })\n }}\n >\n Show all {lines().length.toLocaleString()} lines\n </Button>\n </div>\n </Show>\n {/*\n In the scroller's box, and a single line: the indicator must not add\n height when it disappears, or a streaming block shifts everything below\n it as it resolves.\n */}\n <Show when={!local.complete}>\n <p class=\"px-3 pb-2 text-xs text-muted-foreground italic\">Generating…</p>\n </Show>\n </div>\n <Show when={tall()}>\n <div\n data-code-block-footer=\"\"\n class=\"flex items-center justify-end border-t border-transparent px-3 py-1 transition-colors group-focus-within/code:border-border group-hover/code:border-border\"\n >\n <Actions />\n </div>\n </Show>\n </div>\n )\n}\n\nconst MARK_GLYPH: Readonly<Record<CodeLineMark, string>> = {\n add: '+',\n remove: '−',\n highlight: '',\n error: '!',\n}\n\n/**\n * One rendered line. The gutter glyph and the element (`ins`/`del`) carry what a\n * mark means so it survives greyscale and a screen reader; both gutters are\n * unselectable so dragging across the block and copying yields only source.\n */\nfunction CodeLine(props: {\n line: string\n number: number\n numbered: boolean\n mark?: CodeLineMark\n wrap: boolean\n}) {\n const content = () => (\n <>\n <Show when={props.numbered}>\n <span class=\"text-right text-muted-foreground select-none\" aria-hidden=\"true\">\n {props.number}\n </span>\n </Show>\n <span\n class=\"w-[1ch] text-center text-muted-foreground select-none\"\n aria-hidden=\"true\"\n data-slot=\"code-line-mark\"\n >\n {props.mark ? MARK_GLYPH[props.mark] : ''}\n </span>\n <span class={cn({ 'min-w-0': props.wrap })}>{props.line || ' '}</span>\n </>\n )\n const rowClass = () =>\n cn(\n 'grid gap-3 no-underline',\n props.numbered ? 'grid-cols-[3ch_1ch_1fr]' : 'grid-cols-[1ch_1fr]',\n {\n 'bg-success-subtle': props.mark === 'add',\n 'bg-destructive-subtle': props.mark === 'remove' || props.mark === 'error',\n 'bg-primary-subtle': props.mark === 'highlight',\n }\n )\n return (\n <Show\n when={props.mark === 'add' || props.mark === 'remove'}\n fallback={\n <span data-mark={props.mark} class={rowClass()}>\n {content()}\n </span>\n }\n >\n <Show\n when={props.mark === 'add'}\n fallback={\n <del data-mark=\"remove\" class={rowClass()}>\n {content()}\n </del>\n }\n >\n <ins data-mark=\"add\" class={rowClass()}>\n {content()}\n </ins>\n </Show>\n </Show>\n )\n}\n\n/**\n * InlineCode.\n *\n * The `code` inside a sentence. It is a component rather than a class because it\n * has to hold three properties at once: it uses the shared code family and size\n * preference, and it wraps rather than overflows a narrow column\n * (`overflow-wrap: anywhere` — an identifier with\n * no spaces is one long token), and it must be legible against whatever surface\n * it lands on, which is why the fill is a token and not a fixed grey.\n */\nexport function InlineCode(props: ComponentProps<'code'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <code\n class={cn(\n 'rounded-sm bg-muted px-[0.4em] py-[0.15em] font-code text-code text-foreground [overflow-wrap:anywhere]',\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAMS,UAAQS,SAASR,KAAW;AAClC,IAAMC,SAAOO,SAASN,IAAU;AA+HhC,IAAa2B,wBAAwB;AAErC,IAAaC,qBAAqB;AAElC,IAAMC,WAA8B,CAAA;AAEpC,SAAgBC,UAAUC,OAAuB;CAC/C,MAAM,CAACC,OAAOC,QAAQrC,WAAWmC,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAK,CACN;CAED,MAAM,EAAEG,QAAQC,QAAQC,MAAMC,aAAapC,mBAAmB;CAC9D,MAAM,CAACqC,MAAMC,WAAWjD,aAAa,KAAK;CAE1C,MAAM,CAACkD,QAAQC,aAAanD,aAA8B;CAC1D,MAAM,CAACoD,SAASC,cAAcrD,aAAa,KAAK;CAChD,IAAIsD;CAKJ,MAAMpC,iBAAiBwB,MAAMxB,UAAUqC,KAAK,CAAC,CAACC,MAAM,GAAG,EAAE,KAAKC,KAAAA;CAC9D,MAAMC,cAAchB,MAAMrB,SAASH,SAAS,KAAK;CACjD,MAAMyC,mBAAoBzC,SAAS,IAAI,GAAGA,SAAS,EAAC,SAAU;CAC9D,MAAM0C,cAAclB,MAAMZ,SAAS;CACnC,MAAM+B,oBAAiDnB,MAAMvB,aAAa+B,OAAO;CACjF,MAAMY,gBACJD,YAAY,MAAMJ,KAAAA,MAAcf,MAAMhB,oBAAoB,QAAQgB,MAAMX,cAAc0B,KAAAA;CACx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,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,kCAgBpF;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,kCA4BhF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,kCAoBpF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,kCAuBpF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,kCAgB9E;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,kCAGpF;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,kCAkB3E"}
@@ -1,12 +1,16 @@
1
1
  import { menuItem, popoverArrow, topLayerProps } from "../../../lib/overlay.js";
2
2
  import { useFormFieldControl } from "../../../lib/form-field.js";
3
3
  import { cn } from "../../../lib/utils.js";
4
+ import { fastIcon } from "../../../lib/fast-icon.js";
4
5
  import { className, createComponent, delegateEvents, effect, insert, memo, mergeProps, template } from "solid-js/web";
5
6
  import { Check, ChevronDown, X } from "lucide-solid";
6
7
  import { Show, splitProps } from "solid-js";
7
8
  import { Combobox } from "@kobalte/core/combobox";
8
9
  // src/components/ui/combobox/combobox.tsx
9
10
  var _tmpl$ = /*#__PURE__*/ template(`<button type=button aria-label="Clear selection">`);
11
+ var Check$1 = fastIcon(Check);
12
+ var ChevronDown$1 = fastIcon(ChevronDown);
13
+ var X$1 = fastIcon(X);
10
14
  /**
11
15
  * Combobox.
12
16
  *
@@ -39,14 +43,7 @@ function ComboboxInput(props) {
39
43
  "aria-invalid",
40
44
  "aria-errormessage"
41
45
  ]);
42
- const field = useFormFieldControl("control", {
43
- id: local.id,
44
- "aria-label": local["aria-label"],
45
- "aria-labelledby": local["aria-labelledby"],
46
- "aria-describedby": local["aria-describedby"],
47
- "aria-invalid": local["aria-invalid"],
48
- "aria-errormessage": local["aria-errormessage"]
49
- });
46
+ const field = useFormFieldControl("control", local);
50
47
  return createComponent(Combobox.Input, mergeProps({
51
48
  get id() {
52
49
  return field?.id ?? local.id;
@@ -77,7 +74,7 @@ function ComboboxTrigger(props) {
77
74
  return cn("text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none", "transition-colors ease-out hover:text-foreground", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", "disabled:pointer-events-none disabled:opacity-50", local.class);
78
75
  } }, rest, { get children() {
79
76
  return [memo(() => local.children), createComponent(Combobox.Icon, { get children() {
80
- return createComponent(ChevronDown, { "class": "size-4" });
77
+ return createComponent(ChevronDown$1, { "class": "size-4" });
81
78
  } })];
82
79
  } }));
83
80
  }
@@ -111,7 +108,7 @@ function ComboboxItem(props) {
111
108
  "data-slot": "combobox-indicator",
112
109
  "class": "absolute end-2 flex size-4 items-center justify-center text-primary",
113
110
  get children() {
114
- return createComponent(Check, { "class": "size-4" });
111
+ return createComponent(Check$1, { "class": "size-4" });
115
112
  }
116
113
  })];
117
114
  } }));
@@ -131,7 +128,7 @@ function ComboboxClear(props) {
131
128
  get children() {
132
129
  var _el$ = _tmpl$();
133
130
  _el$.$$click = () => props.onClear();
134
- insert(_el$, createComponent(X, { "class": "size-3.5" }));
131
+ insert(_el$, createComponent(X$1, { "class": "size-3.5" }));
135
132
  effect(() => className(_el$, cn("text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm", "transition-colors ease-out outline-none hover:text-foreground", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle", props.class)));
136
133
  return _el$;
137
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.js","names":["Combobox","KobalteCombobox","Check","ChevronDown","X","Show","splitProps","menuItem","popoverArrow","topLayerProps","useFormFieldControl","cn","props","_$createComponent","ComboboxControl","Control","local","rest","_$mergeProps","class","ComboboxInput","Input","field","id","ComboboxTrigger","Trigger","children","_$memo","Icon","ComboboxContent","Content","Portal","Listbox","Arrow","ComboboxItem","Item","ItemLabel","ItemIndicator","ComboboxSection","Section","ComboboxClear","onClear","when","_el$","_tmpl$","$$click","_$insert","_$effect","_$className","_$delegateEvents"],"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["import { Combobox as KobalteCombobox } from '@kobalte/core/combobox'\nimport { Check, ChevronDown, X } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { menuContentPadding, menuItem, popoverArrow, topLayerProps } from '#lib/overlay'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\n/**\n * Combobox.\n *\n * A Select whose list is filterable by typing. The difference from Select is\n * not cosmetic: a Combobox has a text input, so the user can narrow forty\n * options to one without reading the list. Above roughly ten options the\n * search is the feature; below it, a Select is quieter and a RadioGroup is\n * better still.\n *\n * Kobalte supplies the filtering, the `aria-activedescendant` wiring, the\n * keyboard selection and the multiple-selection mode, which is the part a\n * hand-rolled version reliably gets wrong.\n */\nexport function Combobox<Option, OptGroup = never>(\n props: ComponentProps<typeof KobalteCombobox<Option, OptGroup>>\n) {\n return <KobalteCombobox {...props} />\n}\n\nexport function ComboboxControl(props: ComponentProps<typeof KobalteCombobox.Control>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteCombobox.Control\n class={cn(\n 'border-input bg-transparent flex h-control-md w-full items-center gap-1.5 rounded-md border px-control-sm',\n 'transition-[color,box-shadow,border-color] ease-out',\n 'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function ComboboxInput(props: ComponentProps<typeof KobalteCombobox.Input>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <KobalteCombobox.Input\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'h-full flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function ComboboxTrigger(props: ComponentProps<typeof KobalteCombobox.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Trigger\n class={cn(\n 'text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none',\n 'transition-colors ease-out hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <KobalteCombobox.Icon>\n <ChevronDown class=\"size-4\" />\n </KobalteCombobox.Icon>\n </KobalteCombobox.Trigger>\n )\n}\n\nexport function ComboboxContent(props: ComponentProps<typeof KobalteCombobox.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Portal>\n <KobalteCombobox.Content\n {...topLayerProps}\n class={cn(\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',\n 'z-(--z-menu) max-h-72 min-w-(--kb-popper-anchor-width) origin-(--kb-combobox-content-transform-origin) overflow-hidden',\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-150 data-closed:duration-100',\n local.class\n )}\n {...rest}\n >\n <KobalteCombobox.Listbox class={cn('max-h-72 overflow-y-auto', menuContentPadding)} />\n {local.children}\n <KobalteCombobox.Arrow aria-hidden=\"true\" class={popoverArrow} />\n </KobalteCombobox.Content>\n </KobalteCombobox.Portal>\n )\n}\n\nexport function ComboboxItem(props: ComponentProps<typeof KobalteCombobox.Item>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Item class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n <KobalteCombobox.ItemLabel>{local.children}</KobalteCombobox.ItemLabel>\n {/* The indicator reads in the accent, like every other selected state in\n the system. */}\n <KobalteCombobox.ItemIndicator\n data-slot=\"combobox-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </KobalteCombobox.ItemIndicator>\n </KobalteCombobox.Item>\n )\n}\n\nexport function ComboboxSection(props: ComponentProps<typeof KobalteCombobox.Section>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteCombobox.Section class={cn('flex flex-col', local.class)} {...rest} />\n}\n\n/** The clear affordance for a single-select Combobox with a value. */\nexport function ComboboxClear(props: { class?: string; onClear: () => void }) {\n return (\n <Show when={props.onClear}>\n <button\n type=\"button\"\n aria-label=\"Clear selection\"\n onClick={() => props.onClear()}\n class={cn(\n 'text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm',\n 'transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}\n >\n <X class=\"size-3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;CAAC,EAAA,GAAMF,MAAI,EAAA,IAAAS,WAAA;EAAA,OAAA,CAAAb,gBACrEZ,SAAgBmC,WAAS,EAAA,IAAAV,WAAA;GAAA,OAAEV,MAAMU;EAAQ,EAAA,CAAA,GAAAb,gBAGzCZ,SAAgBoC,eAAa;GAAA,aAAA;GAAA,SAAA;GAAA,IAAAX,WAAA;IAAA,OAAAb,gBAI3BX,OAAK,EAAA,SAAA,SAAA,CAAA;GAAA;EAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAId;AAEA,SAAgBoC,gBAAgB1B,OAAuD;CACrF,MAAM,CAACI,OAAOC,QAAQX,WAAWM,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAC,gBAAQZ,SAAgBsC,SAAOrB,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQP,GAAG,iBAAiBK,MAAMG,KAAK;CAAC,EAAA,GAAMF,IAAI,CAAA;AACnF;;AAGA,SAAgBuB,cAAc5B,OAAgD;CAC5E,OAAAC,gBACGR,MAAI;EAAA,IAACqC,OAAI;GAAA,OAAE9B,MAAM6B;EAAO;EAAA,IAAAf,WAAA;GAAA,IAAAiB,OAAAC,OAAA;GAAAD,KAAAE,gBAINjC,MAAM6B,QAAQ;GAACK,OAAAH,MAAA9B,gBAQ7BT,GAAC,EAAA,SAAA,WAAA,CAAA,CAAA;GAAA2C,aAAAC,UAAAL,MAPKhC,GACL,qFACA,iEACA,oFACAC,MAAMO,KACR,CAAC,CAAA;GAAA,OAAAwB;EAAA;CAAA,CAAA;AAMT;AAACM,eAAA,CAAA,OAAA,CAAA"}
1
+ {"version":3,"file":"combobox.js","names":["Combobox","KobalteCombobox","Check","LucideCheck","ChevronDown","LucideChevronDown","X","LucideX","Show","splitProps","menuItem","popoverArrow","topLayerProps","useFormFieldControl","cn","fastIcon","props","_$createComponent","ComboboxControl","Control","local","rest","_$mergeProps","class","ComboboxInput","Input","field","id","ComboboxTrigger","Trigger","children","_$memo","Icon","ComboboxContent","Content","Portal","Listbox","Arrow","ComboboxItem","Item","ItemLabel","ItemIndicator","ComboboxSection","Section","ComboboxClear","onClear","when","_el$","_tmpl$","$$click","_$insert","_$effect","_$className","_$delegateEvents"],"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["import { Combobox as KobalteCombobox } from '@kobalte/core/combobox'\nimport { Check as LucideCheck, ChevronDown as LucideChevronDown, X as LucideX } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { menuContentPadding, menuItem, popoverArrow, topLayerProps } from '#lib/overlay'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst ChevronDown = fastIcon(LucideChevronDown)\nconst X = fastIcon(LucideX)\n\n/**\n * Combobox.\n *\n * A Select whose list is filterable by typing. The difference from Select is\n * not cosmetic: a Combobox has a text input, so the user can narrow forty\n * options to one without reading the list. Above roughly ten options the\n * search is the feature; below it, a Select is quieter and a RadioGroup is\n * better still.\n *\n * Kobalte supplies the filtering, the `aria-activedescendant` wiring, the\n * keyboard selection and the multiple-selection mode, which is the part a\n * hand-rolled version reliably gets wrong.\n */\nexport function Combobox<Option, OptGroup = never>(\n props: ComponentProps<typeof KobalteCombobox<Option, OptGroup>>\n) {\n return <KobalteCombobox {...props} />\n}\n\nexport function ComboboxControl(props: ComponentProps<typeof KobalteCombobox.Control>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteCombobox.Control\n class={cn(\n 'border-input bg-transparent flex h-control-md w-full items-center gap-1.5 rounded-md border px-control-sm',\n 'transition-[color,box-shadow,border-color] ease-out',\n 'focus-within:border-ring focus-within:ring-3 focus-within:ring-primary-subtle',\n 'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',\n 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function ComboboxInput(props: ComponentProps<typeof KobalteCombobox.Input>) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', local)\n\n return (\n <KobalteCombobox.Input\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n class={cn(\n 'h-full flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function ComboboxTrigger(props: ComponentProps<typeof KobalteCombobox.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Trigger\n class={cn(\n 'text-muted-foreground flex shrink-0 items-center justify-center rounded-sm outline-none',\n 'transition-colors ease-out hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <KobalteCombobox.Icon>\n <ChevronDown class=\"size-4\" />\n </KobalteCombobox.Icon>\n </KobalteCombobox.Trigger>\n )\n}\n\nexport function ComboboxContent(props: ComponentProps<typeof KobalteCombobox.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Portal>\n <KobalteCombobox.Content\n {...topLayerProps}\n class={cn(\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg',\n 'z-(--z-menu) max-h-72 min-w-(--kb-popper-anchor-width) origin-(--kb-combobox-content-transform-origin) overflow-hidden',\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-expanded:duration-150 data-closed:duration-100',\n local.class\n )}\n {...rest}\n >\n <KobalteCombobox.Listbox class={cn('max-h-72 overflow-y-auto', menuContentPadding)} />\n {local.children}\n <KobalteCombobox.Arrow aria-hidden=\"true\" class={popoverArrow} />\n </KobalteCombobox.Content>\n </KobalteCombobox.Portal>\n )\n}\n\nexport function ComboboxItem(props: ComponentProps<typeof KobalteCombobox.Item>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteCombobox.Item class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n <KobalteCombobox.ItemLabel>{local.children}</KobalteCombobox.ItemLabel>\n {/* The indicator reads in the accent, like every other selected state in\n the system. */}\n <KobalteCombobox.ItemIndicator\n data-slot=\"combobox-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </KobalteCombobox.ItemIndicator>\n </KobalteCombobox.Item>\n )\n}\n\nexport function ComboboxSection(props: ComponentProps<typeof KobalteCombobox.Section>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteCombobox.Section class={cn('flex flex-col', local.class)} {...rest} />\n}\n\n/** The clear affordance for a single-select Combobox with a value. */\nexport function ComboboxClear(props: { class?: string; onClear: () => void }) {\n return (\n <Show when={props.onClear}>\n <button\n type=\"button\"\n aria-label=\"Clear selection\"\n onClick={() => props.onClear()}\n class={cn(\n 'text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded-sm',\n 'transition-colors ease-out outline-none hover:text-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n props.class\n )}\n >\n <X class=\"size-3.5\" />\n </button>\n </Show>\n )\n}\n"],"mappings":";;;;;;;;;;AAUA,IAAME,UAAQa,SAASZ,KAAW;AAClC,IAAMC,gBAAcW,SAASV,WAAiB;AAC9C,IAAMC,MAAIS,SAASR,CAA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AAO,QAAQ,CAAC,kCAkBjE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,kCAG3E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,kCAQvE;AAED,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;CAC9C,kCAYA;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,kCAUvD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,kCAUrD"}
@@ -1,6 +1,7 @@
1
1
  import { createDialogLayer } from "../dialog/dialog-layer.js";
2
2
  import { menuItem, menuShortcut, overlaySurface, overlayZoom } from "../../../lib/overlay.js";
3
3
  import { cn } from "../../../lib/utils.js";
4
+ import { fastIcon } from "../../../lib/fast-icon.js";
4
5
  import { className, createComponent, effect, insert, mergeProps, spread, template, use } from "solid-js/web";
5
6
  import { Search } from "lucide-solid";
6
7
  import { createEffect, createSignal, splitProps } from "solid-js";
@@ -12,6 +13,7 @@ var _tmpl$2 = /*#__PURE__*/ template(`<div class=contents>`);
12
13
  var _tmpl$3 = /*#__PURE__*/ template(`<span>`);
13
14
  var _tmpl$4 = /*#__PURE__*/ template(`<p data-slot=command-status>`);
14
15
  var _tmpl$5 = /*#__PURE__*/ template(`<p data-slot=command-hint>`);
16
+ var Search$1 = fastIcon(Search);
15
17
  var commandItem = menuItem.replace("data-[disabled]:pointer-events-none", "").replace("data-[disabled]:text-muted-foreground", "");
16
18
  /**
17
19
  * Command.
@@ -114,7 +116,7 @@ function CommandInput$1(props) {
114
116
  const [local, rest] = splitProps(props, ["class"]);
115
117
  return (() => {
116
118
  var _el$ = _tmpl$();
117
- insert(_el$, createComponent(Search, {
119
+ insert(_el$, createComponent(Search$1, {
118
120
  "class": "size-4 shrink-0 text-muted-foreground",
119
121
  "aria-hidden": "true"
120
122
  }), null);
@@ -151,7 +153,7 @@ function CommandList$1(props) {
151
153
  createEffect(() => {
152
154
  const root = wrapper();
153
155
  if (!root) return;
154
- for (const selector of ["[cmdk-list-sizer]", "[cmdk-separator]"]) root.querySelector(selector)?.setAttribute("role", "presentation");
156
+ for (const node of root.querySelectorAll("[cmdk-list-sizer], [cmdk-separator]")) node.setAttribute("role", "presentation");
155
157
  root.querySelector("[cmdk-list]")?.setAttribute("role", resultCount() > 0 ? "listbox" : "presentation");
156
158
  });
157
159
  return (() => {
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","names":["CommandDialog","CommandEmpty","CmdkEmpty","CommandGroup","CmdkGroup","CommandInput","CmdkInput","CommandItem","CmdkItem","CommandList","CmdkList","CommandLoading","CmdkLoading","CmdkRoot","CommandSeparator","CmdkSeparator","useCommandState","KobalteDialog","Search","createEffect","createSignal","splitProps","createDialogLayer","menuItem","menuShortcut","overlaySurface","overlayZoom","cn","commandItem","replace","Command","props","local","rest","_$createComponent","_$mergeProps","class","Content","dialogProps","commandProps","children","Portal","mount","container","Overlay","overlayClassName","CommandDialogContent","label","contentClassName","onOpenAutoFocus","onCloseAutoFocus","layer","event","role","_el$","_tmpl$","_$insert","wrapper","setWrapper","resultCount","state","filtered","count","root","selector","querySelector","setAttribute","_el$2","_tmpl$2","_$use","CommandShortcut","_el$3","_tmpl$3","_$effect","_$className","CommandStatus","_el$4","_tmpl$4","_$spread","CommandHint","_el$5","_tmpl$5"],"sources":["../../../../src/components/ui/command/command.tsx"],"sourcesContent":["import {\n CommandDialog as CmdkDialog,\n CommandEmpty as CmdkEmpty,\n CommandGroup as CmdkGroup,\n CommandInput as CmdkInput,\n CommandItem as CmdkItem,\n CommandList as CmdkList,\n CommandLoading as CmdkLoading,\n CommandRoot as CmdkRoot,\n CommandSeparator as CmdkSeparator,\n useCommandState,\n} from 'cmdk-solid'\nimport { Dialog as KobalteDialog } from '@kobalte/core/dialog'\nimport { Search } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { createEffect, createSignal, splitProps } from 'solid-js'\nimport { createDialogLayer } from '../dialog/dialog-layer'\nimport { menuItem, menuShortcut, overlaySurface, overlayZoom } from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n// cmdk emits data-disabled=\"false\" on enabled items, unlike the presence-only\n// attributes Kobalte menu rows use. Apply those shared disabled styles only when\n// cmdk's value is true.\nconst commandItem = menuItem\n .replace('data-[disabled]:pointer-events-none', '')\n .replace('data-[disabled]:text-muted-foreground', '')\n\n/**\n * Command.\n *\n * The command palette: a filtered list of everything the user can do, ranked\n * by fuzzy match. It is the one place in an app where a keyboard-first surface\n * is the *primary* one, so it carries rules the rest of the system does not:\n *\n * - Every item must be reachable by typing its name. If a user has to\n * remember which group it lives in, the palette has failed at its job.\n * - Groups exist for reading, not for navigation. The ranking crosses them.\n * - The empty state is not an apology: it should offer the closest thing\n * the app could guess, or say plainly that nothing matched.\n *\n * cmdk-solid supplies the filter, the scoring, the `aria-activedescendant`\n * wiring and the arrow-key navigation.\n */\nexport function Command(props: ComponentProps<typeof CmdkRoot>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkRoot\n class={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-xl',\n local.class\n )}\n {...rest}\n />\n )\n}\n\ntype CommandDialogProps = ComponentProps<typeof CmdkDialog> &\n Pick<ComponentProps<typeof KobalteDialog.Content>, 'onCloseAutoFocus' | 'onOpenAutoFocus'>\n\nexport function CommandDialog(props: CommandDialogProps) {\n // cmdk-solid's Dialog does not forward Content autofocus props: unknown\n // props fall through to its Command root. Compose Kobalte's dialog surface\n // here so it gets the kit's focus return. Preserve the shared wrapper's\n // `class` contract on the dialog surface; `contentClassName` adds to it,\n // while the nested Command keeps its own API.\n const [local, dialogProps, commandProps] = splitProps(\n props,\n [\n 'class',\n 'contentClassName',\n 'overlayClassName',\n 'container',\n 'onCloseAutoFocus',\n 'onOpenAutoFocus',\n ],\n [\n 'open',\n 'defaultOpen',\n 'onOpenChange',\n 'id',\n 'modal',\n 'preventScroll',\n 'forceMount',\n 'translations',\n ]\n )\n\n return (\n <KobalteDialog {...dialogProps}>\n <KobalteDialog.Portal mount={local.container}>\n <KobalteDialog.Overlay cmdk-overlay=\"\" class={local.overlayClassName} />\n <CommandDialogContent\n label={commandProps.label}\n class={cn(local.class, local.contentClassName)}\n onOpenAutoFocus={local.onOpenAutoFocus}\n onCloseAutoFocus={local.onCloseAutoFocus}\n >\n <Command {...commandProps} />\n </CommandDialogContent>\n </KobalteDialog.Portal>\n </KobalteDialog>\n )\n}\n\nfunction CommandDialogContent(\n props: Pick<CommandDialogProps, 'onCloseAutoFocus' | 'onOpenAutoFocus' | 'children'> & {\n label?: string\n class?: string\n }\n) {\n const layer = createDialogLayer({\n onOpenAutoFocus: (event) => props.onOpenAutoFocus?.(event),\n onCloseAutoFocus: (event) => props.onCloseAutoFocus?.(event),\n })\n return (\n <KobalteDialog.Content\n aria-label={props.label}\n cmdk-dialog=\"\"\n role=\"dialog\"\n class={cn(\n overlaySurface,\n 'fixed top-1/3 left-1/2 z-(--z-dialog) w-full max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden shadow-xl',\n overlayZoom,\n props.class\n )}\n onOpenAutoFocus={layer.onOpenAutoFocus}\n onCloseAutoFocus={layer.onCloseAutoFocus}\n >\n {props.children}\n </KobalteDialog.Content>\n )\n}\n\nexport function CommandInput(props: ComponentProps<typeof CmdkInput>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"command-input-wrapper\"\n class=\"flex h-11 items-center gap-2 border-b border-border px-3\"\n >\n <Search class=\"size-4 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n <CmdkInput\n class={cn(\n 'h-full w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n local.class\n )}\n {...rest}\n />\n </div>\n )\n}\n\n/**\n * The scrolling list.\n *\n * Two DOM corrections, and both are deliberate. cmdk builds a `role=\"listbox\"`\n * whose children include two elements ARIA does not allow there:\n *\n * - a bare `<div cmdk-list-sizer>` with no role, wrapped around every group;\n * - a `<div cmdk-separator role=\"separator\">`, and `separator` is a menu and\n * toolbar role, inside a listbox the only owned elements may be `option`\n * and `group`.\n *\n * Both are pure presentation: the sizer is layout, and the separator is a\n * hairline between groups that the groups already structure. `role=\"presentation\"`\n * is their accurate role rather than a workaround, each is flattened out of the\n * accessibility tree, and the options inside are reached exactly as before.\n *\n * Written onto the mounted nodes rather than through props, because cmdk owns\n * this markup and does not forward a `ref`; in an effect rather than `onMount`,\n * because cmdk renders the sizer with the first item, after the list itself.\n */\nexport function CommandList(props: ComponentProps<typeof CmdkList>) {\n const [local, rest] = splitProps(props, ['class'])\n const [wrapper, setWrapper] = createSignal<HTMLDivElement>()\n const resultCount = useCommandState((state) => state.filtered.count)\n\n createEffect(() => {\n const root = wrapper()\n if (!root) return\n for (const selector of ['[cmdk-list-sizer]', '[cmdk-separator]']) {\n root.querySelector(selector)?.setAttribute('role', 'presentation')\n }\n\n /*\n * A `listbox` must own at least one `option`, so a listbox with nothing in it\n * is invalid ARIA, which is what a search with no matches produces. When\n * there are no results the list is inert, so it becomes presentational and\n * the empty message carries the information instead. It keeps its `id`, so\n * the input's `aria-controls` still resolves.\n */\n root\n .querySelector('[cmdk-list]')\n ?.setAttribute('role', resultCount() > 0 ? 'listbox' : 'presentation')\n })\n\n return (\n <div ref={setWrapper} class=\"contents\">\n <CmdkList\n class={cn('max-h-80 scroll-py-1 overflow-y-auto overflow-x-hidden p-1', local.class)}\n {...rest}\n />\n </div>\n )\n}\n\nexport function CommandEmpty(props: ComponentProps<typeof CmdkEmpty>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkEmpty\n /*\n * A status rather than plain text: when the list is presentational, this is\n * the only thing that tells a screen reader the search matched nothing.\n */\n role=\"status\"\n class={cn('text-muted-foreground py-8 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function CommandGroup(props: ComponentProps<typeof CmdkGroup>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkGroup\n class={cn(\n 'text-foreground overflow-hidden p-1',\n '[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-2xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function CommandItem(props: ComponentProps<typeof CmdkItem>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkItem\n class={cn(\n commandItem,\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:text-muted-foreground',\n // The selected row sits on the accent rung, the same primary-subtle\n // fill the settings navigation's selected row owns, instead of the\n // popover rung, so what is chosen keeps the accent the checked menus\n // already carry in their indicators.\n 'group/command-item text-popover-foreground data-[selected=true]:bg-primary-subtle data-[selected=true]:text-foreground',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function CommandSeparator(props: ComponentProps<typeof CmdkSeparator>) {\n const [local, rest] = splitProps(props, ['class'])\n return <CmdkSeparator class={cn('bg-border -mx-1 my-1 h-px', local.class)} {...rest} />\n}\n\nexport function CommandLoading(props: ComponentProps<typeof CmdkLoading>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <CmdkLoading\n class={cn('text-muted-foreground py-6 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n\n/** The keyboard hint a palette item usually carries. */\nexport function CommandShortcut(props: {\n class?: string\n children?: ComponentProps<'span'>['children']\n}) {\n return (\n <span\n class={cn(\n menuShortcut,\n 'group-data-[selected=true]/command-item:text-foreground',\n props.class\n )}\n >\n {props.children}\n </span>\n )\n}\n\n/**\n * The status line a command surface reports under its list: searching, offline,\n * a partial result caveat. The copy and the live-role semantics (`status`,\n * `alert`) are the caller's, a palette's failure modes are app facts, but the\n * line's shape is not something every caller should redraw.\n */\nexport function CommandStatus(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <p\n data-slot=\"command-status\"\n class={cn('text-muted-foreground px-4 py-4 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The keyboard hint a palette footer carries, right-aligned under the list so\n * it reads as furniture rather than a result. Muted on purpose: the arrows are\n * what the user has already been doing by the time they read it.\n */\nexport function CommandHint(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <p\n data-slot=\"command-hint\"\n class={cn('text-muted-foreground px-4 pb-1.5 text-right text-xs', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAuBA,IAAM4B,cAAcL,SACjBM,QAAQ,uCAAuC,EAAE,CAAC,CAClDA,QAAQ,yCAAyC,EAAE;;;;;;;;;;;;;;;;;AAkBtD,SAAgBC,QAAQC,OAAwC;CAC9D,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CAEjD,OAAAG,gBACGrB,aAAQsB,WAAA,EAAA,KAAA,WAAA;EAAA,OACAR,GACL,6FACAK,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAKA,SAAgBjC,cAAc+B,OAA2B;CAMvD,MAAM,CAACC,OAAOM,aAAaC,gBAAgBlB,WACzCU,OACA;EACE;EACA;EACA;EACA;EACA;EACA;CAAiB,GAEnB;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAc,CAElB;CAEA,OAAAG,gBACGjB,QAAakB,WAAKG,aAAW,EAAA,IAAAE,WAAA;EAAA,OAAAN,gBAC3BjB,OAAcwB,QAAM;GAAA,IAACC,QAAK;IAAA,OAAE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AAO,CAAC;CAEjD,cAAA;EAAA,IAAA6C,QAAAC,QAAA;EAAAC,OAAAF,OAAAzC,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,uDAAuDK,MAAMI,KAAK;EAAC,EAAA,GACzEH,IAAI,GAAA,OAAA,KAAA;EAAA,OAAA2C;CAAA,EAAA,CAAA;AAGd;;;;;;AAOA,SAAgBG,YAAYhD,OAA4B;CACtD,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CAEjD,cAAA;EAAA,IAAAiD,QAAAC,QAAA;EAAAH,OAAAE,OAAA7C,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWR,GAAG,wDAAwDK,MAAMI,KAAK;EAAC,EAAA,GAC1EH,IAAI,GAAA,OAAA,KAAA;EAAA,OAAA+C;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"command.js","names":["CommandDialog","CommandEmpty","CmdkEmpty","CommandGroup","CmdkGroup","CommandInput","CmdkInput","CommandItem","CmdkItem","CommandList","CmdkList","CommandLoading","CmdkLoading","CmdkRoot","CommandSeparator","CmdkSeparator","useCommandState","KobalteDialog","Search","LucideSearch","createEffect","createSignal","splitProps","createDialogLayer","menuItem","menuShortcut","overlaySurface","overlayZoom","cn","fastIcon","commandItem","replace","Command","props","local","rest","_$createComponent","_$mergeProps","class","Content","dialogProps","commandProps","children","Portal","mount","container","Overlay","overlayClassName","CommandDialogContent","label","contentClassName","onOpenAutoFocus","onCloseAutoFocus","layer","event","role","_el$","_tmpl$","_$insert","wrapper","setWrapper","resultCount","state","filtered","count","root","node","querySelectorAll","setAttribute","querySelector","_el$2","_tmpl$2","_$use","CommandShortcut","_el$3","_tmpl$3","_$effect","_$className","CommandStatus","_el$4","_tmpl$4","_$spread","CommandHint","_el$5","_tmpl$5"],"sources":["../../../../src/components/ui/command/command.tsx"],"sourcesContent":["import {\n CommandDialog as CmdkDialog,\n CommandEmpty as CmdkEmpty,\n CommandGroup as CmdkGroup,\n CommandInput as CmdkInput,\n CommandItem as CmdkItem,\n CommandList as CmdkList,\n CommandLoading as CmdkLoading,\n CommandRoot as CmdkRoot,\n CommandSeparator as CmdkSeparator,\n useCommandState,\n} from 'cmdk-solid'\nimport { Dialog as KobalteDialog } from '@kobalte/core/dialog'\nimport { Search as LucideSearch } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { createEffect, createSignal, splitProps } from 'solid-js'\nimport { createDialogLayer } from '../dialog/dialog-layer'\nimport { menuItem, menuShortcut, overlaySurface, overlayZoom } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Search = fastIcon(LucideSearch)\n\n// cmdk emits data-disabled=\"false\" on enabled items, unlike the presence-only\n// attributes Kobalte menu rows use. Apply those shared disabled styles only when\n// cmdk's value is true.\nconst commandItem = menuItem\n .replace('data-[disabled]:pointer-events-none', '')\n .replace('data-[disabled]:text-muted-foreground', '')\n\n/**\n * Command.\n *\n * The command palette: a filtered list of everything the user can do, ranked\n * by fuzzy match. It is the one place in an app where a keyboard-first surface\n * is the *primary* one, so it carries rules the rest of the system does not:\n *\n * - Every item must be reachable by typing its name. If a user has to\n * remember which group it lives in, the palette has failed at its job.\n * - Groups exist for reading, not for navigation. The ranking crosses them.\n * - The empty state is not an apology: it should offer the closest thing\n * the app could guess, or say plainly that nothing matched.\n *\n * cmdk-solid supplies the filter, the scoring, the `aria-activedescendant`\n * wiring and the arrow-key navigation.\n */\nexport function Command(props: ComponentProps<typeof CmdkRoot>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkRoot\n class={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-xl',\n local.class\n )}\n {...rest}\n />\n )\n}\n\ntype CommandDialogProps = ComponentProps<typeof CmdkDialog> &\n Pick<ComponentProps<typeof KobalteDialog.Content>, 'onCloseAutoFocus' | 'onOpenAutoFocus'>\n\nexport function CommandDialog(props: CommandDialogProps) {\n // cmdk-solid's Dialog does not forward Content autofocus props: unknown\n // props fall through to its Command root. Compose Kobalte's dialog surface\n // here so it gets the kit's focus return. Preserve the shared wrapper's\n // `class` contract on the dialog surface; `contentClassName` adds to it,\n // while the nested Command keeps its own API.\n const [local, dialogProps, commandProps] = splitProps(\n props,\n [\n 'class',\n 'contentClassName',\n 'overlayClassName',\n 'container',\n 'onCloseAutoFocus',\n 'onOpenAutoFocus',\n ],\n [\n 'open',\n 'defaultOpen',\n 'onOpenChange',\n 'id',\n 'modal',\n 'preventScroll',\n 'forceMount',\n 'translations',\n ]\n )\n\n return (\n <KobalteDialog {...dialogProps}>\n <KobalteDialog.Portal mount={local.container}>\n <KobalteDialog.Overlay cmdk-overlay=\"\" class={local.overlayClassName} />\n <CommandDialogContent\n label={commandProps.label}\n class={cn(local.class, local.contentClassName)}\n onOpenAutoFocus={local.onOpenAutoFocus}\n onCloseAutoFocus={local.onCloseAutoFocus}\n >\n <Command {...commandProps} />\n </CommandDialogContent>\n </KobalteDialog.Portal>\n </KobalteDialog>\n )\n}\n\nfunction CommandDialogContent(\n props: Pick<CommandDialogProps, 'onCloseAutoFocus' | 'onOpenAutoFocus' | 'children'> & {\n label?: string\n class?: string\n }\n) {\n const layer = createDialogLayer({\n onOpenAutoFocus: (event) => props.onOpenAutoFocus?.(event),\n onCloseAutoFocus: (event) => props.onCloseAutoFocus?.(event),\n })\n return (\n <KobalteDialog.Content\n aria-label={props.label}\n cmdk-dialog=\"\"\n role=\"dialog\"\n class={cn(\n overlaySurface,\n 'fixed top-1/3 left-1/2 z-(--z-dialog) w-full max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden shadow-xl',\n overlayZoom,\n props.class\n )}\n onOpenAutoFocus={layer.onOpenAutoFocus}\n onCloseAutoFocus={layer.onCloseAutoFocus}\n >\n {props.children}\n </KobalteDialog.Content>\n )\n}\n\nexport function CommandInput(props: ComponentProps<typeof CmdkInput>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <div\n data-slot=\"command-input-wrapper\"\n class=\"flex h-11 items-center gap-2 border-b border-border px-3\"\n >\n <Search class=\"size-4 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n <CmdkInput\n class={cn(\n 'h-full w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n local.class\n )}\n {...rest}\n />\n </div>\n )\n}\n\n/**\n * The scrolling list.\n *\n * Two DOM corrections, and both are deliberate. cmdk builds a `role=\"listbox\"`\n * whose children include two elements ARIA does not allow there:\n *\n * - a bare `<div cmdk-list-sizer>` with no role, wrapped around every group;\n * - a `<div cmdk-separator role=\"separator\">`, and `separator` is a menu and\n * toolbar role, inside a listbox the only owned elements may be `option`\n * and `group`.\n *\n * Both are pure presentation: the sizer is layout, and the separator is a\n * hairline between groups that the groups already structure. `role=\"presentation\"`\n * is their accurate role rather than a workaround, each is flattened out of the\n * accessibility tree, and the options inside are reached exactly as before.\n *\n * Written onto the mounted nodes rather than through props, because cmdk owns\n * this markup and does not forward a `ref`; in an effect rather than `onMount`,\n * because cmdk renders the sizer with the first item, after the list itself.\n */\nexport function CommandList(props: ComponentProps<typeof CmdkList>) {\n const [local, rest] = splitProps(props, ['class'])\n const [wrapper, setWrapper] = createSignal<HTMLDivElement>()\n const resultCount = useCommandState((state) => state.filtered.count)\n\n createEffect(() => {\n const root = wrapper()\n if (!root) return\n // Every separator, not the first: a palette with three groups has two.\n for (const node of root.querySelectorAll('[cmdk-list-sizer], [cmdk-separator]'))\n node.setAttribute('role', 'presentation')\n\n /*\n * A `listbox` must own at least one `option`, so a listbox with nothing in it\n * is invalid ARIA, which is what a search with no matches produces. When\n * there are no results the list is inert, so it becomes presentational and\n * the empty message carries the information instead. It keeps its `id`, so\n * the input's `aria-controls` still resolves.\n */\n root\n .querySelector('[cmdk-list]')\n ?.setAttribute('role', resultCount() > 0 ? 'listbox' : 'presentation')\n })\n\n return (\n <div ref={setWrapper} class=\"contents\">\n <CmdkList\n class={cn('max-h-80 scroll-py-1 overflow-y-auto overflow-x-hidden p-1', local.class)}\n {...rest}\n />\n </div>\n )\n}\n\nexport function CommandEmpty(props: ComponentProps<typeof CmdkEmpty>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkEmpty\n /*\n * A status rather than plain text: when the list is presentational, this is\n * the only thing that tells a screen reader the search matched nothing.\n */\n role=\"status\"\n class={cn('text-muted-foreground py-8 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function CommandGroup(props: ComponentProps<typeof CmdkGroup>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkGroup\n class={cn(\n 'text-foreground overflow-hidden p-1',\n '[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-2xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function CommandItem(props: ComponentProps<typeof CmdkItem>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <CmdkItem\n class={cn(\n commandItem,\n 'data-[disabled=true]:pointer-events-none data-[disabled=true]:text-muted-foreground',\n // The selected row sits on the accent rung, the same primary-subtle\n // fill the settings navigation's selected row owns, instead of the\n // popover rung, so what is chosen keeps the accent the checked menus\n // already carry in their indicators.\n 'group/command-item text-popover-foreground data-[selected=true]:bg-primary-subtle data-[selected=true]:text-foreground',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function CommandSeparator(props: ComponentProps<typeof CmdkSeparator>) {\n const [local, rest] = splitProps(props, ['class'])\n return <CmdkSeparator class={cn('bg-border -mx-1 my-1 h-px', local.class)} {...rest} />\n}\n\nexport function CommandLoading(props: ComponentProps<typeof CmdkLoading>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <CmdkLoading\n class={cn('text-muted-foreground py-6 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n\n/** The keyboard hint a palette item usually carries. */\nexport function CommandShortcut(props: {\n class?: string\n children?: ComponentProps<'span'>['children']\n}) {\n return (\n <span\n class={cn(\n menuShortcut,\n 'group-data-[selected=true]/command-item:text-foreground',\n props.class\n )}\n >\n {props.children}\n </span>\n )\n}\n\n/**\n * The status line a command surface reports under its list: searching, offline,\n * a partial result caveat. The copy and the live-role semantics (`status`,\n * `alert`) are the caller's, a palette's failure modes are app facts, but the\n * line's shape is not something every caller should redraw.\n */\nexport function CommandStatus(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <p\n data-slot=\"command-status\"\n class={cn('text-muted-foreground px-4 py-4 text-center text-sm', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * The keyboard hint a palette footer carries, right-aligned under the list so\n * it reads as furniture rather than a result. Muted on purpose: the arrows are\n * what the user has already been doing by the time they read it.\n */\nexport function CommandHint(props: ComponentProps<'p'>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <p\n data-slot=\"command-hint\"\n class={cn('text-muted-foreground px-4 pb-1.5 text-right text-xs', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,IAAMkB,WAASW,SAASV,MAAY;AAKpC,IAAMW,cAAcN,SACjBO,QAAQ,uCAAuC,EAAE,CAAC,CAClDA,QAAQ,yCAAyC,EAAE;;;;;;;;;;;;;;;;;AAkBtD,SAAgBC,QAAQC,OAAwC;CAC9D,MAAM,CAACC,OAAOC,QAAQb,WAAWW,OAAO,CAAC,OAAO,CAAC;CAEjD,OAAAG,gBACGvB,aAAQwB,WAAA,EAAA,KAAA,WAAA;EAAA,OACAT,GACL,6FACAM,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAKA,SAAgBnC,cAAciC,OAA2B;CAMvD,MAAM,CAACC,OAAOM,aAAaC,gBAAgB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E,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAkD9D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAQ3D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,eAajF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACnB,oFAAoF;IACpF,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,eASA"}
1
+ {"version":3,"file":"detail-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/detail-panel/detail-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAS1F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IACvD,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAelD;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG;IAC9D,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAkD9D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAQ3D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,eAajF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACnB,oFAAoF;IACpF,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,eASA"}
@@ -1,5 +1,6 @@
1
1
  import { Button } from "../button/button.js";
2
2
  import { cn } from "../../../lib/utils.js";
3
+ import { fastIcon } from "../../../lib/fast-icon.js";
3
4
  import { className, createComponent, effect, insert, mergeProps, setAttribute, spread, template } from "solid-js/web";
4
5
  import { X } from "lucide-solid";
5
6
  import { Show, createUniqueId, splitProps } from "solid-js";
@@ -10,6 +11,7 @@ var _tmpl$3 = /*#__PURE__*/ template(`<p class="text-2xs font-semibold tracking-
10
11
  var _tmpl$4 = /*#__PURE__*/ template(`<div>`);
11
12
  var _tmpl$5 = /*#__PURE__*/ template(`<div class="grid gap-2"><h3 class="text-2xs font-semibold tracking-wide text-muted-foreground uppercase"></h3><dl>`);
12
13
  var _tmpl$6 = /*#__PURE__*/ template(`<div class="flex items-baseline justify-between gap-4 text-sm"><dt class=text-muted-foreground></dt><dd>`);
14
+ var X$1 = fastIcon(X);
13
15
  function DetailPanel(props) {
14
16
  const [local, rest] = splitProps(props, [
15
17
  "label",
@@ -72,7 +74,7 @@ function DetailPanelHeader(props) {
72
74
  },
73
75
  onClick: () => dismiss()(),
74
76
  get children() {
75
- return createComponent(X, { "aria-hidden": "true" });
77
+ return createComponent(X$1, { "aria-hidden": "true" });
76
78
  }
77
79
  })
78
80
  }), null);
@@ -1 +1 @@
1
- {"version":3,"file":"detail-panel.js","names":["createUniqueId","Show","splitProps","X","Button","cn","label","DetailPanel","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","children","eyebrow","title","actions","onDismiss","dismissLabel","DetailPanelHeader","titleId","_el$2","_tmpl$2","_el$3","firstChild","_el$4","_el$5","nextSibling","_$createComponent","when","eyebrowSlot","_el$6","_tmpl$3","_$setAttribute","dismiss","variant","size","onClick","DetailPanelBody","_el$7","_tmpl$4","DetailPanelSection","_el$8","_tmpl$5","_el$9","_el$0","DetailPanelField","name","value","muted","_el$1","_tmpl$6","_el$10","_el$11","_$effect","_$className"],"sources":["../../../../src/components/ui/detail-panel/detail-panel.tsx"],"sourcesContent":["import { createUniqueId, Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { X } from 'lucide-solid'\nimport { Button } from '../button'\nimport { cn } from '#lib/utils'\n\n/**\n * DetailPanel.\n *\n * The companion surface to a list: something is selected over there, and its\n * detail is here. Every application grows one — an artifact, a task, a member, a\n * file, a commit — and every one of them is a header, a body, and a way to close.\n *\n * It is an `<aside>` with a label, not a `<div>`. That is the whole reason it is a\n * component: a detail panel is a *second region* next to the main content, and a\n * screen reader user needs to be able to skip to it, name it, and know when it\n * appeared. A div with a heading inside is invisible to that navigation. The\n * label is wired to the title by id, so the panel announces itself as the thing\n * it is showing rather than as \"complementary\".\n *\n * The header is sticky and the body scrolls, because a detail panel is usually\n * taller than its viewport and the close affordance must not scroll away — the\n * panel is dismissed far more often than it is read to the end.\n *\n * `DetailPanelSection` is the repeating unit of a detail body: a small caption\n * and its value. Definition-list semantics, because these are facets of one\n * subject rather than a table with columns to compare.\n */\nexport type DetailPanelProps = ComponentProps<'aside'> & {\n /** The panel's name, for its accessible label. Usually the selected item's name. */\n label: string\n}\n\nexport function DetailPanel(props: DetailPanelProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <aside\n class={cn(\n 'flex h-full min-h-0 flex-col overflow-hidden border-l border-border bg-card',\n local.class\n )}\n aria-label={local.label}\n {...rest}\n >\n {local.children}\n </aside>\n )\n}\n\nexport type DetailPanelHeaderProps = ComponentProps<'header'> & {\n /** A small caption above the title: what kind of thing this is. */\n eyebrow?: string\n title: string\n /** Trailing controls, before the close button. */\n actions?: JSX.Element\n onDismiss?: () => void\n /** Accessible name for the dismiss control. Defaults to `Dismiss <title>`. */\n dismissLabel?: string\n}\n\nexport function DetailPanelHeader(props: DetailPanelHeaderProps) {\n const [local, rest] = splitProps(props, [\n 'eyebrow',\n 'title',\n 'actions',\n 'onDismiss',\n 'dismissLabel',\n 'class',\n 'children',\n ])\n const titleId = createUniqueId()\n\n return (\n <header\n class={cn(\n 'sticky top-0 z-(--z-sticky) flex shrink-0 items-start justify-between gap-3 border-b border-border bg-card px-4 py-3',\n local.class\n )}\n {...rest}\n >\n <div class=\"min-w-0\">\n <Show when={local.eyebrow}>\n {(eyebrowSlot) => (\n <p class=\"text-2xs font-semibold tracking-wide text-muted-foreground uppercase\">\n {eyebrowSlot()}\n </p>\n )}\n </Show>\n <h2 id={titleId} class=\"truncate text-sm font-semibold text-foreground\">\n {local.title}\n </h2>\n {local.children}\n </div>\n <div class=\"flex shrink-0 items-center gap-1\">\n {local.actions}\n <Show when={local.onDismiss}>\n {(dismiss) => (\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={local.dismissLabel ?? `Dismiss ${local.title}`}\n onClick={() => dismiss()()}\n >\n <X aria-hidden=\"true\" />\n </Button>\n )}\n </Show>\n </div>\n </header>\n )\n}\n\nexport function DetailPanelBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <div class={cn('min-h-0 flex-1 overflow-y-auto px-4 py-3', local.class)} {...rest}>\n {local.children}\n </div>\n )\n}\n\n/**\n * A group of related facets. Renders a `<dl>`, so its children are\n * `DetailPanelField`s; a section whose content is not name/value pairs — a\n * preview, a list, a form — belongs directly in `DetailPanelBody` with its own\n * layout rather than inside this.\n */\nexport function DetailPanelSection(props: ComponentProps<'dl'> & { title: string }) {\n const [local, rest] = splitProps(props, ['title', 'class', 'children'])\n\n return (\n <div class=\"grid gap-2\">\n <h3 class=\"text-2xs font-semibold tracking-wide text-muted-foreground uppercase\">\n {local.title}\n </h3>\n <dl class={cn('grid gap-2', local.class)} {...rest}>\n {local.children}\n </dl>\n </div>\n )\n}\n\n/**\n * One facet: a name and its value. `muted` is for a value that is absent or\n * unknown, so \"—\" reads as *no value* rather than as a value that happens to be\n * a dash.\n */\nexport function DetailPanelField(props: {\n name: string\n value?: JSX.Element\n /** Render the value in the muted colour: an absent, unknown, or inherited value. */\n muted?: boolean\n}) {\n return (\n <div class=\"flex items-baseline justify-between gap-4 text-sm\">\n <dt class=\"text-muted-foreground\">{props.name}</dt>\n <dd class={cn('text-right', props.muted ? 'text-muted-foreground' : 'text-foreground')}>\n {props.value ?? '—'}\n </dd>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,SAAgBO,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,WAAA;IAAA,OAEWT,GACL,+EACAI,MAAMM,KACR;GAAC;GAAA,KAAA,gBAAA;IAAA,OACWN,MAAMH;GAAK;EAAA,GACnBI,IAAI,GAAA,OAAA,IAAA;EAAAM,OAAAL,YAEPF,MAAMQ,QAAQ;EAAA,OAAAN;CAAA,EAAA,CAAA;AAGrB;AAaA,SAAgBY,kBAAkBf,OAA+B;CAC/D,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EACtC;EACA;EACA;EACA;EACA;E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,EAAA,KAAA,WAAA;GAAA,OACcT,GAAG,4CAA4CI,MAAMM,KAAK;EAAC,EAAA,GAAML,IAAI,GAAA,OAAA,IAAA;EAAAM,OAAA2B,aAC9ElC,MAAMQ,QAAQ;EAAA,OAAA0B;CAAA,EAAA,CAAA;AAGrB;;;;;;;AAQA,SAAgBE,mBAAmBrC,OAAiD;CAClF,MAAM,CAACC,OAAOC,QAAQR,WAAWM,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,cAAA;EAAA,IAAAsC,QAAAC,QAAA,GAAAC,QAAAF,MAAAlB,YAAAqB,QAAAD,MAAAjB;EAAAf,OAAAgC,aAGOvC,MAAMU,KAAK;EAAAN,OAAAoC,OAAAnC,WAAA,EAAA,KAAA,WAAA;GAAA,OAEHT,GAAG,cAAcI,MAAMM,KAAK;EAAC,EAAA,GAAML,IAAI,GAAA,OAAA,IAAA;EAAAM,OAAAiC,aAC/CxC,MAAMQ,QAAQ;EAAA,OAAA6B;CAAA,EAAA,CAAA;AAIvB;;;;;;AAOA,SAAgBI,iBAAiB1C,OAK9B;CACD,cAAA;EAAA,IAAA8C,QAAAC,QAAA,GAAAC,SAAAF,MAAA1B,YAAA6B,SAAAD,OAAAzB;EAAAf,OAAAwC,cAEuChD,MAAM2C,IAAI;EAAAnC,OAAAyC,cAE1CjD,MAAM4C,SAAS,GAAG;EAAAM,aAAAC,UAAAF,QADVpD,GAAG,cAAcG,MAAM6C,QAAQ,0BAA0B,iBAAiB,CAAC,CAAA;EAAA,OAAAC;CAAA,EAAA,CAAA;AAK5F"}
1
+ {"version":3,"file":"detail-panel.js","names":["createUniqueId","Show","splitProps","X","LucideX","Button","cn","fastIcon","label","DetailPanel","props","local","rest","_el$","_tmpl$","_$spread","_$mergeProps","class","_$insert","children","eyebrow","title","actions","onDismiss","dismissLabel","DetailPanelHeader","titleId","_el$2","_tmpl$2","_el$3","firstChild","_el$4","_el$5","nextSibling","_$createComponent","when","eyebrowSlot","_el$6","_tmpl$3","_$setAttribute","dismiss","variant","size","onClick","DetailPanelBody","_el$7","_tmpl$4","DetailPanelSection","_el$8","_tmpl$5","_el$9","_el$0","DetailPanelField","name","value","muted","_el$1","_tmpl$6","_el$10","_el$11","_$effect","_$className"],"sources":["../../../../src/components/ui/detail-panel/detail-panel.tsx"],"sourcesContent":["import { createUniqueId, Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { X as LucideX } from 'lucide-solid'\nimport { Button } from '../button'\nimport { cn } from '#lib/utils'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst X = fastIcon(LucideX)\n\n/**\n * DetailPanel.\n *\n * The companion surface to a list: something is selected over there, and its\n * detail is here. Every application grows one — an artifact, a task, a member, a\n * file, a commit — and every one of them is a header, a body, and a way to close.\n *\n * It is an `<aside>` with a label, not a `<div>`. That is the whole reason it is a\n * component: a detail panel is a *second region* next to the main content, and a\n * screen reader user needs to be able to skip to it, name it, and know when it\n * appeared. A div with a heading inside is invisible to that navigation. The\n * label is wired to the title by id, so the panel announces itself as the thing\n * it is showing rather than as \"complementary\".\n *\n * The header is sticky and the body scrolls, because a detail panel is usually\n * taller than its viewport and the close affordance must not scroll away — the\n * panel is dismissed far more often than it is read to the end.\n *\n * `DetailPanelSection` is the repeating unit of a detail body: a small caption\n * and its value. Definition-list semantics, because these are facets of one\n * subject rather than a table with columns to compare.\n */\nexport type DetailPanelProps = ComponentProps<'aside'> & {\n /** The panel's name, for its accessible label. Usually the selected item's name. */\n label: string\n}\n\nexport function DetailPanel(props: DetailPanelProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <aside\n class={cn(\n 'flex h-full min-h-0 flex-col overflow-hidden border-l border-border bg-card',\n local.class\n )}\n aria-label={local.label}\n {...rest}\n >\n {local.children}\n </aside>\n )\n}\n\nexport type DetailPanelHeaderProps = ComponentProps<'header'> & {\n /** A small caption above the title: what kind of thing this is. */\n eyebrow?: string\n title: string\n /** Trailing controls, before the close button. */\n actions?: JSX.Element\n onDismiss?: () => void\n /** Accessible name for the dismiss control. Defaults to `Dismiss <title>`. */\n dismissLabel?: string\n}\n\nexport function DetailPanelHeader(props: DetailPanelHeaderProps) {\n const [local, rest] = splitProps(props, [\n 'eyebrow',\n 'title',\n 'actions',\n 'onDismiss',\n 'dismissLabel',\n 'class',\n 'children',\n ])\n const titleId = createUniqueId()\n\n return (\n <header\n class={cn(\n 'sticky top-0 z-(--z-sticky) flex shrink-0 items-start justify-between gap-3 border-b border-border bg-card px-4 py-3',\n local.class\n )}\n {...rest}\n >\n <div class=\"min-w-0\">\n <Show when={local.eyebrow}>\n {(eyebrowSlot) => (\n <p class=\"text-2xs font-semibold tracking-wide text-muted-foreground uppercase\">\n {eyebrowSlot()}\n </p>\n )}\n </Show>\n <h2 id={titleId} class=\"truncate text-sm font-semibold text-foreground\">\n {local.title}\n </h2>\n {local.children}\n </div>\n <div class=\"flex shrink-0 items-center gap-1\">\n {local.actions}\n <Show when={local.onDismiss}>\n {(dismiss) => (\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={local.dismissLabel ?? `Dismiss ${local.title}`}\n onClick={() => dismiss()()}\n >\n <X aria-hidden=\"true\" />\n </Button>\n )}\n </Show>\n </div>\n </header>\n )\n}\n\nexport function DetailPanelBody(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <div class={cn('min-h-0 flex-1 overflow-y-auto px-4 py-3', local.class)} {...rest}>\n {local.children}\n </div>\n )\n}\n\n/**\n * A group of related facets. Renders a `<dl>`, so its children are\n * `DetailPanelField`s; a section whose content is not name/value pairs — a\n * preview, a list, a form — belongs directly in `DetailPanelBody` with its own\n * layout rather than inside this.\n */\nexport function DetailPanelSection(props: ComponentProps<'dl'> & { title: string }) {\n const [local, rest] = splitProps(props, ['title', 'class', 'children'])\n\n return (\n <div class=\"grid gap-2\">\n <h3 class=\"text-2xs font-semibold tracking-wide text-muted-foreground uppercase\">\n {local.title}\n </h3>\n <dl class={cn('grid gap-2', local.class)} {...rest}>\n {local.children}\n </dl>\n </div>\n )\n}\n\n/**\n * One facet: a name and its value. `muted` is for a value that is absent or\n * unknown, so \"—\" reads as *no value* rather than as a value that happens to be\n * a dash.\n */\nexport function DetailPanelField(props: {\n name: string\n value?: JSX.Element\n /** Render the value in the muted colour: an absent, unknown, or inherited value. */\n muted?: boolean\n}) {\n return (\n <div class=\"flex items-baseline justify-between gap-4 text-sm\">\n <dt class=\"text-muted-foreground\">{props.name}</dt>\n <dd class={cn('text-right', props.muted ? 'text-muted-foreground' : 'text-foreground')}>\n {props.value ?? '—'}\n </dd>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAOA,IAAMG,MAAII,SAASH,CAAO;AA6B1B,SAAgBK,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,cAAA;EAAA,IAAAG,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,WAAA;GAAA,KAAA,WAAA;IAAA,OAEWV,GACL,+EACAK,MAAMM,KACR;GAAC;GAAA,KAAA,gBAAA;IAAA,OACWN,MAAMH;GAAK;EAAA,GACnBI,IAAI,GAAA,OAAA,IAAA;EAAAM,OAAAL,YAEPF,MAAMQ,QAAQ;EAAA,OAAAN;CAAA,EAAA,CAAA;AAGrB;AAaA,SAAgBY,kBAAkBf,OAA+B;CAC/D,MAAM,CAACC,OAAOC,QAAQV,WAAWQ,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CACD,MAAMgB,UAAU1B,eAAe;CAE/B,cAAA;EAAA,IAAA2B,QAAAC,QAAA,GAAAC,QAAAF,MAAAG,YAAAC,QAAAF,MAAAC,YAAAE,QAAAH,MAAAI;EAAAlB,OAAAY,OAAAX,WAAA,EAAA,KAAA,WAAA;GAAA,OAEWV,GACL,wHACAK,MAAMM,KACR;EAAC,EAAA,GACGL,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AK,EAAE,kBAAkB,eAsEtD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,eAS7E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,eAGxD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,KAAK,CAAC,eAG5E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,eAGxF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,eAGlF;AAED,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,oBAAc,CAAA"}
@@ -2,6 +2,7 @@ import { dialogSurface, overlayCornerClose, overlayDescription, overlayFooter, o
2
2
  import { cn } from "../../../lib/utils.js";
3
3
  import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
4
4
  import { DialogEscapeTarget, createDialogLayer } from "./dialog-layer.js";
5
+ import { fastIcon } from "../../../lib/fast-icon.js";
5
6
  import { className, createComponent, effect, insert, memo, mergeProps, spread, template } from "solid-js/web";
6
7
  import { X } from "lucide-solid";
7
8
  import { Show, children, splitProps } from "solid-js";
@@ -10,6 +11,7 @@ import { Content, Dialog, Overlay, Portal as DialogPortal, Root as Dialog$1, Tri
10
11
  var _tmpl$ = /*#__PURE__*/ template(`<div>`);
11
12
  var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=dialog-header>`);
12
13
  var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=dialog-footer>`);
14
+ var X$1 = fastIcon(X);
13
15
  function DialogOverlay(props) {
14
16
  const [local, rest] = splitProps(props, ["class"]);
15
17
  return createComponent(Overlay, mergeProps({ get ["class"]() {
@@ -82,7 +84,7 @@ function DialogContent(props) {
82
84
  },
83
85
  "class": overlayCornerClose,
84
86
  get children() {
85
- return closeButton() ?? createComponent(X, { "class": "size-4" });
87
+ return closeButton() ?? createComponent(X$1, { "class": "size-4" });
86
88
  }
87
89
  }), createComponent(TooltipContent, { get children() {
88
90
  return memo(() => !!local.closeLabel)() ? `${local.closeLabel}.` : "Close dialog.";