@adea-ai/ui 0.154.0 → 0.154.2

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":"stack-trace.js","names":["Check","CircleAlert","Copy","Package","createMemo","createSignal","For","Match","Show","splitProps","Switch","createCopyFeedback","cn","Button","CodeBlock","TraceLine","boundLines","dedentLines","describeFrameGroup","frameLocation","groupStackEntries","parseStackTrace","text","onOpenFrame","frame","classify","collapseDependencies","defaultDependenciesOpen","maxBlocks","copyLabel","copiedLabel","onCopy","ok","STACK_TRACE_MAX_BLOCKS","TEXT_DISPLAY_LIMIT","DETAIL_LINE_LIMIT","DETAIL_CHAR_LIMIT","rowClass","interactiveClass","omissionNote","lines","chars","toLocaleString","FrameDetail","props","bounded","_el$","_tmpl$","_$insert","join","_$createComponent","when","omittedLines","omittedChars","children","_el$2","_tmpl$2","_el$3","firstChild","ClippedText","class","clipped","length","_el$4","_tmpl$3","_c$","_$memo","slice","_$effect","_$className","_el$5","_tmpl$4","_el$8","nextSibling","FrameGroup","frames","defaultOpen","pageSize","onOpen","open","setOpen","limit","setLimit","title","shown","hidden","icon","onOpenChange","_el$9","_tmpl$5","each","FrameRow","_$setAttribute","ShowMore","onClick","_el$0","_tmpl$6","variant","size","Math","min","location","first","kind","content","_el$1","async","function","_el$10","_tmpl$7","_el$11","_tmpl$8","_el$12","_tmpl$0","undefined","file","fallback","_el$14","_tmpl$1","_el$13","_tmpl$9","$$click","_p$","_v$","_v$2","e","t","detail","TextRow","_el$15","_tmpl$11","_c$2","_el$16","_tmpl$10","_el$19","StackTrace","local","rest","parsed","blocks","entries","filter","block","type","trim","max","floor","copied","failed","copyFailed","copy","copyText","_el$20","_tmpl$15","_$spread","_$mergeProps","format","code","complete","wrap","_el$21","_tmpl$12","_el$22","_el$23","header","_tmpl$16","_el$27","_tmpl$18","message","_tmpl$17","_el$29","_tmpl$19","_el$24","_tmpl$13","entry","_el$25","_tmpl$14","_$delegateEvents"],"sources":["../../../../src/components/composites/stack-trace/stack-trace.tsx"],"sourcesContent":["import { Check, CircleAlert, Copy, Package } from 'lucide-solid'\nimport {\n createMemo,\n createSignal,\n For,\n Match,\n Show,\n splitProps,\n Switch,\n type ComponentProps,\n} from 'solid-js'\nimport { createCopyFeedback } from '#lib/clipboard'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button'\nimport { CodeBlock } from '../../ui/code-block'\nimport { TraceLine } from '../../ui/trace'\nimport {\n boundLines,\n dedentLines,\n describeFrameGroup,\n frameLocation,\n groupStackEntries,\n parseStackTrace,\n type ParseStackTraceOptions,\n type StackBlock,\n type StackFrame,\n} from './parse-stack-trace'\n\n/**\n * StackTrace.\n *\n * A failed call and the frames it failed through. Put it in the body of the\n * `TraceLine` for the call that failed, or under a failing test; reach for\n * `CodeBlock` when the text is not a trace, and for `Terminal` when it is the\n * live output of a command rather than one error.\n *\n * ## The reader's code first\n *\n * A trace is mostly someone else's frames. Runs of dependency and runtime frames\n * (`node_modules`, `site-packages`, `.cargo/registry`, `node:` internals, Rust's\n * `std`) fold into one disclosure line that says what it holds, and a lone\n * dependency frame is dimmed rather than folded. When *none* of the frames is the\n * reader's, nothing folds: hiding the whole trace behind a button helps nobody.\n * Whose code a frame is comes from its path; a host that knows the project layout\n * passes `classify`.\n *\n * ## It never hides a line\n *\n * Every line of `text` is on screen in order, as a frame, as a header, or as\n * muted text, and a trace in a format this does not know is shown whole in a\n * `CodeBlock`, which also copies it. Copy writes `text` exactly as given, not a\n * reformatted version of what was parsed.\n *\n * ## Opening a frame is the host's decision\n *\n * A frame is a button only when `onOpenFrame` is supplied, and only when the\n * frame names a file; without it frames are plain text, because a control that\n * does nothing is a tab stop with no purpose. The component never builds a path\n * or tries to open one, the trace is untrusted text, and what a path in it means\n * on this machine is the host's call.\n *\n * Text is text throughout: frames, messages and source lines are rendered as text\n * nodes, long unbroken tokens wrap rather than widening the column, and what is\n * drawn is bounded with the omission stated every time: a text line or a header\n * message beyond 10 000 characters, a frame's printed lines beyond 40 lines or\n * 10 000 characters, and the frames of a folded group, which are built only while\n * it is open and then `maxBlocks` at a time. Copy and `onOpenFrame` still get all of\n * it.\n */\nexport type StackTraceProps = Omit<ComponentProps<'div'>, 'children'> & {\n /** The trace exactly as the runtime printed it. */\n text: string\n /** Make frames that name a file open it. Omit to render them as plain text. */\n onOpenFrame?: (frame: StackFrame) => void\n classify?: ParseStackTraceOptions['classify']\n /** Fold runs of dependency and runtime frames. Default true. */\n collapseDependencies?: boolean\n /** Start folded groups open. */\n defaultDependenciesOpen?: boolean\n /** Blocks (frames, groups, text) shown before \"show more\". Default 200. */\n maxBlocks?: number\n copyLabel?: string\n copiedLabel?: string\n /** Called after each copy attempt with whether the clipboard accepted it. */\n onCopy?: (ok: boolean) => void\n}\n\nexport const STACK_TRACE_MAX_BLOCKS = 200\nconst TEXT_DISPLAY_LIMIT = 10_000\n/** What a frame's own printed lines (a Python source line, a locals dump) may show. */\nconst DETAIL_LINE_LIMIT = 40\nconst DETAIL_CHAR_LIMIT = 10_000\n\nconst rowClass =\n 'flex min-w-0 flex-wrap items-baseline gap-x-2 rounded-md px-1.5 py-0.5 text-start text-xs outline-none'\nconst interactiveClass =\n 'w-full cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-primary-subtle focus-visible:border-ring'\n\nfunction omissionNote(lines: number, chars: number): string {\n return lines > 0\n ? `… ${lines.toLocaleString()} more ${lines === 1 ? 'line' : 'lines'} (${chars.toLocaleString()} characters) not shown`\n : `… ${chars.toLocaleString()} more characters not shown`\n}\n\n/** A frame's printed lines, bounded so one frame cannot be the whole page. */\nfunction FrameDetail(props: { lines: readonly string[] }) {\n const bounded = createMemo(() => boundLines(props.lines, DETAIL_LINE_LIMIT, DETAIL_CHAR_LIMIT))\n return (\n <>\n <pre class=\"m-0 ms-1.5 px-1.5 font-code text-code whitespace-pre-wrap text-muted-foreground [overflow-wrap:anywhere]\">\n {dedentLines(bounded().lines).join('\\n')}\n </pre>\n <Show when={bounded().omittedLines > 0 || bounded().omittedChars > 0}>\n <p class=\"m-0 ms-1.5 px-1.5 text-xs text-muted-foreground italic\">\n {omissionNote(bounded().omittedLines, bounded().omittedChars)}\n {' (copy has all of it)'}\n </p>\n </Show>\n </>\n )\n}\n\n/** Header text, cut to the display limit with what was cut stated. */\nfunction ClippedText(props: { text: string; class?: string }) {\n const clipped = () => props.text.length > TEXT_DISPLAY_LIMIT\n return (\n <>\n <span class={props.class}>\n {clipped() ? props.text.slice(0, TEXT_DISPLAY_LIMIT) : props.text}\n </span>\n <Show when={clipped()}>\n <span class=\"block text-xs text-muted-foreground italic\">\n … {(props.text.length - TEXT_DISPLAY_LIMIT).toLocaleString()} more characters not shown\n (copy has all of it)\n </span>\n </Show>\n </>\n )\n}\n\n/**\n * A folded run of dependency or runtime frames. Its rows are built only while it\n * is open and then a page at a time, so a run of ten thousand frames costs the\n * same as one of a few hundred until the reader asks for more.\n */\nfunction FrameGroup(props: {\n frames: readonly StackFrame[]\n defaultOpen?: boolean\n pageSize: number\n onOpen?: (frame: StackFrame) => void\n}) {\n const [open, setOpen] = createSignal(props.defaultOpen === true)\n const [limit, setLimit] = createSignal<number | undefined>()\n const title = createMemo(() => describeFrameGroup(props.frames))\n const shown = createMemo(() => props.frames.slice(0, limit() ?? props.pageSize))\n const hidden = () => props.frames.length - shown().length\n return (\n <TraceLine icon={<Package />} title={title()} open={open()} onOpenChange={setOpen}>\n <Show when={open()}>\n <ol role=\"list\" aria-label={title()} class=\"m-0 flex min-w-0 list-none flex-col gap-px p-0\">\n <For each={shown()}>{(frame) => <FrameRow frame={frame} onOpen={props.onOpen} />}</For>\n </ol>\n <Show when={hidden() > 0}>\n <ShowMore\n hidden={hidden()}\n pageSize={props.pageSize}\n onClick={() => setLimit(shown().length + props.pageSize)}\n />\n </Show>\n </Show>\n </TraceLine>\n )\n}\n\nfunction ShowMore(props: { hidden: number; pageSize: number; onClick: () => void }) {\n return (\n <div class=\"ps-1.5\">\n <Button variant=\"ghost\" size=\"2xs\" onClick={props.onClick}>\n Show {Math.min(props.hidden, props.pageSize).toLocaleString()} more (\n {props.hidden.toLocaleString()} hidden)\n </Button>\n </div>\n )\n}\n\nfunction FrameRow(props: { frame: StackFrame; onOpen?: (frame: StackFrame) => void }) {\n const location = () => frameLocation(props.frame)\n const first = () => props.frame.kind === 'first-party'\n const content = () => (\n <>\n <span\n class={cn('font-code text-code', {\n 'text-foreground': first(),\n 'text-muted-foreground': !first(),\n })}\n >\n {props.frame.async ? 'async ' : ''}\n {props.frame.function ?? '(anonymous)'}\n </span>\n <Show when={location()}>\n <span class=\"min-w-0 font-code text-code text-muted-foreground [overflow-wrap:anywhere]\">\n {location()}\n </span>\n </Show>\n {/* The dimming is a colour; the kind is also spoken. */}\n <Show when={!first()}>\n <span class=\"sr-only\">\n {props.frame.kind === 'dependency' ? 'in a dependency' : 'in the runtime'}\n </span>\n </Show>\n </>\n )\n return (\n <li data-slot=\"stack-frame\" data-kind={props.frame.kind} class=\"min-w-0\">\n <Show\n when={props.onOpen !== undefined && props.frame.file !== undefined}\n fallback={<div class={rowClass}>{content()}</div>}\n >\n <button\n type=\"button\"\n aria-label={`Open ${props.frame.async ? 'async ' : ''}${props.frame.function ?? '(anonymous)'} ${location()}`}\n class={cn(rowClass, interactiveClass)}\n onClick={() => props.onOpen?.(props.frame)}\n >\n {content()}\n </button>\n </Show>\n <Show when={props.frame.detail && props.frame.detail.length > 0}>\n <FrameDetail lines={props.frame.detail!} />\n </Show>\n </li>\n )\n}\n\nfunction TextRow(props: { text: string }) {\n const clipped = () => props.text.length > TEXT_DISPLAY_LIMIT\n return (\n <li class=\"min-w-0 px-1.5 py-0.5 font-code text-code whitespace-pre-wrap text-muted-foreground [overflow-wrap:anywhere]\">\n {clipped() ? props.text.slice(0, TEXT_DISPLAY_LIMIT) : props.text}\n <Show when={clipped()}>\n <span class=\"block font-sans text-xs italic\">\n … {(props.text.length - TEXT_DISPLAY_LIMIT).toLocaleString()} more characters not shown\n </span>\n </Show>\n </li>\n )\n}\n\nexport function StackTrace(props: StackTraceProps) {\n const [local, rest] = splitProps(props, [\n 'text',\n 'onOpenFrame',\n 'classify',\n 'collapseDependencies',\n 'defaultDependenciesOpen',\n 'maxBlocks',\n 'copyLabel',\n 'copiedLabel',\n 'onCopy',\n 'class',\n ])\n\n const parsed = createMemo(() => parseStackTrace(local.text, { classify: local.classify }))\n const blocks = createMemo<readonly StackBlock[]>(() =>\n groupStackEntries(parsed().entries, local.collapseDependencies !== false).filter(\n // A blank line between paragraphs of a trace carries nothing to draw.\n (block) => block.type !== 'text' || block.text.trim() !== ''\n )\n )\n const pageSize = () => Math.max(1, Math.floor(local.maxBlocks ?? STACK_TRACE_MAX_BLOCKS))\n const [limit, setLimit] = createSignal<number | undefined>()\n const shown = createMemo(() => blocks().slice(0, limit() ?? pageSize()))\n const hidden = () => blocks().length - shown().length\n\n const { copied, failed: copyFailed, copy: copyText } = createCopyFeedback()\n const copy = async () => {\n const ok = await copyText(local.text)\n local.onCopy?.(ok)\n }\n\n return (\n <div\n data-slot=\"stack-trace\"\n data-format={parsed().format}\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n >\n <Show\n when={parsed().format !== 'unknown'}\n fallback={\n // Nothing recognised: the whole text, in the block that copies it.\n <CodeBlock size=\"sm\" title=\"Error output\" code={local.text} complete wrap />\n }\n >\n <div class=\"group/stack flex items-start gap-2\">\n <CircleAlert aria-hidden=\"true\" class=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <div class=\"min-w-0 flex-1 text-sm\">\n <Show\n when={parsed().header}\n fallback={<span class=\"text-muted-foreground\">Stack trace</span>}\n >\n {(header) => (\n <>\n <p class=\"m-0 whitespace-pre-wrap [overflow-wrap:anywhere]\">\n <Show when={header().type}>\n <ClippedText class=\"font-semibold text-destructive\" text={header().type!} />\n <Show when={header().message !== ''}>\n <span class=\"text-muted-foreground\">: </span>\n </Show>\n </Show>\n <ClippedText class=\"text-foreground\" text={header().message} />\n </p>\n <Show when={header().location}>\n <p class=\"m-0 font-code text-code text-muted-foreground [overflow-wrap:anywhere]\">\n <ClippedText text={header().location!} />\n </p>\n </Show>\n </>\n )}\n </Show>\n </div>\n <div class=\"flex items-center gap-1 opacity-0 transition-opacity group-focus-within/stack:opacity-100 group-hover/stack:opacity-100 [@media(hover:none)]:opacity-100\">\n <Button\n variant=\"ghost\"\n size=\"icon-2xs\"\n aria-label={\n copied() ? (local.copiedLabel ?? 'Copied') : (local.copyLabel ?? 'Copy stack trace')\n }\n title={copyFailed() ? '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 </Button>\n </div>\n </div>\n\n <ol\n role=\"list\"\n aria-label=\"Stack frames\"\n class=\"m-0 ms-2 flex min-w-0 list-none flex-col gap-px border-s border-border p-0 ps-2\"\n >\n <For each={shown()}>\n {(block) => (\n <Switch>\n <Match when={block.type === 'frame' && block}>\n {(entry) => (\n <FrameRow\n frame={(entry() as Extract<StackBlock, { type: 'frame' }>).frame}\n onOpen={local.onOpenFrame}\n />\n )}\n </Match>\n <Match when={block.type === 'text' && block}>\n {(entry) => (\n <TextRow text={(entry() as Extract<StackBlock, { type: 'text' }>).text} />\n )}\n </Match>\n <Match when={block.type === 'group' && block}>\n {(entry) => (\n <FrameGroup\n frames={(entry() as Extract<StackBlock, { type: 'group' }>).frames}\n defaultOpen={local.defaultDependenciesOpen}\n pageSize={pageSize()}\n onOpen={local.onOpenFrame}\n />\n )}\n </Match>\n </Switch>\n )}\n </For>\n </ol>\n <Show when={hidden() > 0}>\n <div class=\"ms-2\">\n <ShowMore\n hidden={hidden()}\n pageSize={pageSize()}\n onClick={() => setLimit(shown().length + pageSize())}\n />\n </div>\n </Show>\n </Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;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SAASe,SAAS,CAAC;OAAC,CAAA,CAAA;OAAA,OAAAkG;MAAA;KAAA,CAAA;IAAA;GAAA;EAAA,CAAA,CAAA;EAAA,OAAAvB;CAAA,EAAA,CAAA;AAOlE;AAACyB,eAAA,CAAA,OAAA,CAAA"}
1
+ {"version":3,"file":"stack-trace.js","names":["Check","LucideCheck","CircleAlert","LucideCircleAlert","Copy","LucideCopy","Package","LucidePackage","createMemo","createSignal","For","Match","Show","splitProps","Switch","createCopyFeedback","cn","Button","CodeBlock","TraceLine","boundLines","dedentLines","describeFrameGroup","frameLocation","groupStackEntries","parseStackTrace","fastIcon","text","onOpenFrame","frame","classify","collapseDependencies","defaultDependenciesOpen","maxBlocks","copyLabel","copiedLabel","onCopy","ok","STACK_TRACE_MAX_BLOCKS","TEXT_DISPLAY_LIMIT","DETAIL_LINE_LIMIT","DETAIL_CHAR_LIMIT","rowClass","interactiveClass","omissionNote","lines","chars","toLocaleString","FrameDetail","props","bounded","_el$","_tmpl$","_$insert","join","_$createComponent","when","omittedLines","omittedChars","children","_el$2","_tmpl$2","_el$3","firstChild","ClippedText","class","clipped","length","_el$4","_tmpl$3","_c$","_$memo","slice","_$effect","_$className","_el$5","_tmpl$4","_el$8","nextSibling","FrameGroup","frames","defaultOpen","pageSize","onOpen","open","setOpen","limit","setLimit","title","shown","hidden","icon","onOpenChange","_el$9","_tmpl$5","each","FrameRow","_$setAttribute","ShowMore","onClick","_el$0","_tmpl$6","variant","size","Math","min","location","first","kind","content","_el$1","async","function","_el$10","_tmpl$7","_el$11","_tmpl$8","_el$12","_tmpl$0","undefined","file","fallback","_el$14","_tmpl$1","_el$13","_tmpl$9","$$click","_p$","_v$","_v$2","e","t","detail","TextRow","_el$15","_tmpl$11","_c$2","_el$16","_tmpl$10","_el$19","StackTrace","local","rest","parsed","blocks","entries","filter","block","type","trim","max","floor","copied","failed","copyFailed","copy","copyText","_el$20","_tmpl$15","_$spread","_$mergeProps","format","code","complete","wrap","_el$21","_tmpl$12","_el$22","_el$23","header","_tmpl$16","_el$27","_tmpl$18","message","_tmpl$17","_el$29","_tmpl$19","_el$24","_tmpl$13","entry","_el$25","_tmpl$14","_$delegateEvents"],"sources":["../../../../src/components/composites/stack-trace/stack-trace.tsx"],"sourcesContent":["import {\n Check as LucideCheck,\n CircleAlert as LucideCircleAlert,\n Copy as LucideCopy,\n Package as LucidePackage,\n} from 'lucide-solid'\nimport {\n createMemo,\n createSignal,\n For,\n Match,\n Show,\n splitProps,\n Switch,\n type ComponentProps,\n} from 'solid-js'\nimport { createCopyFeedback } from '#lib/clipboard'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button'\nimport { CodeBlock } from '../../ui/code-block'\nimport { TraceLine } from '../../ui/trace'\nimport {\n boundLines,\n dedentLines,\n describeFrameGroup,\n frameLocation,\n groupStackEntries,\n parseStackTrace,\n type ParseStackTraceOptions,\n type StackBlock,\n type StackFrame,\n} from './parse-stack-trace'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst CircleAlert = fastIcon(LucideCircleAlert)\nconst Copy = fastIcon(LucideCopy)\nconst Package = fastIcon(LucidePackage)\n\n/**\n * StackTrace.\n *\n * A failed call and the frames it failed through. Put it in the body of the\n * `TraceLine` for the call that failed, or under a failing test; reach for\n * `CodeBlock` when the text is not a trace, and for `Terminal` when it is the\n * live output of a command rather than one error.\n *\n * ## The reader's code first\n *\n * A trace is mostly someone else's frames. Runs of dependency and runtime frames\n * (`node_modules`, `site-packages`, `.cargo/registry`, `node:` internals, Rust's\n * `std`) fold into one disclosure line that says what it holds, and a lone\n * dependency frame is dimmed rather than folded. When *none* of the frames is the\n * reader's, nothing folds: hiding the whole trace behind a button helps nobody.\n * Whose code a frame is comes from its path; a host that knows the project layout\n * passes `classify`.\n *\n * ## It never hides a line\n *\n * Every line of `text` is on screen in order, as a frame, as a header, or as\n * muted text, and a trace in a format this does not know is shown whole in a\n * `CodeBlock`, which also copies it. Copy writes `text` exactly as given, not a\n * reformatted version of what was parsed.\n *\n * ## Opening a frame is the host's decision\n *\n * A frame is a button only when `onOpenFrame` is supplied, and only when the\n * frame names a file; without it frames are plain text, because a control that\n * does nothing is a tab stop with no purpose. The component never builds a path\n * or tries to open one, the trace is untrusted text, and what a path in it means\n * on this machine is the host's call.\n *\n * Text is text throughout: frames, messages and source lines are rendered as text\n * nodes, long unbroken tokens wrap rather than widening the column, and what is\n * drawn is bounded with the omission stated every time: a text line or a header\n * message beyond 10 000 characters, a frame's printed lines beyond 40 lines or\n * 10 000 characters, and the frames of a folded group, which are built only while\n * it is open and then `maxBlocks` at a time. Copy and `onOpenFrame` still get all of\n * it.\n */\nexport type StackTraceProps = Omit<ComponentProps<'div'>, 'children'> & {\n /** The trace exactly as the runtime printed it. */\n text: string\n /** Make frames that name a file open it. Omit to render them as plain text. */\n onOpenFrame?: (frame: StackFrame) => void\n classify?: ParseStackTraceOptions['classify']\n /** Fold runs of dependency and runtime frames. Default true. */\n collapseDependencies?: boolean\n /** Start folded groups open. */\n defaultDependenciesOpen?: boolean\n /** Blocks (frames, groups, text) shown before \"show more\". Default 200. */\n maxBlocks?: number\n copyLabel?: string\n copiedLabel?: string\n /** Called after each copy attempt with whether the clipboard accepted it. */\n onCopy?: (ok: boolean) => void\n}\n\nexport const STACK_TRACE_MAX_BLOCKS = 200\nconst TEXT_DISPLAY_LIMIT = 10_000\n/** What a frame's own printed lines (a Python source line, a locals dump) may show. */\nconst DETAIL_LINE_LIMIT = 40\nconst DETAIL_CHAR_LIMIT = 10_000\n\nconst rowClass =\n 'flex min-w-0 flex-wrap items-baseline gap-x-2 rounded-md px-1.5 py-0.5 text-start text-xs outline-none'\nconst interactiveClass =\n 'w-full cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-primary-subtle focus-visible:border-ring'\n\nfunction omissionNote(lines: number, chars: number): string {\n return lines > 0\n ? `… ${lines.toLocaleString()} more ${lines === 1 ? 'line' : 'lines'} (${chars.toLocaleString()} characters) not shown`\n : `… ${chars.toLocaleString()} more characters not shown`\n}\n\n/** A frame's printed lines, bounded so one frame cannot be the whole page. */\nfunction FrameDetail(props: { lines: readonly string[] }) {\n const bounded = createMemo(() => boundLines(props.lines, DETAIL_LINE_LIMIT, DETAIL_CHAR_LIMIT))\n return (\n <>\n <pre class=\"m-0 ms-1.5 px-1.5 font-code text-code whitespace-pre-wrap text-muted-foreground [overflow-wrap:anywhere]\">\n {dedentLines(bounded().lines).join('\\n')}\n </pre>\n <Show when={bounded().omittedLines > 0 || bounded().omittedChars > 0}>\n <p class=\"m-0 ms-1.5 px-1.5 text-xs text-muted-foreground italic\">\n {omissionNote(bounded().omittedLines, bounded().omittedChars)}\n {' (copy has all of it)'}\n </p>\n </Show>\n </>\n )\n}\n\n/** Header text, cut to the display limit with what was cut stated. */\nfunction ClippedText(props: { text: string; class?: string }) {\n const clipped = () => props.text.length > TEXT_DISPLAY_LIMIT\n return (\n <>\n <span class={props.class}>\n {clipped() ? props.text.slice(0, TEXT_DISPLAY_LIMIT) : props.text}\n </span>\n <Show when={clipped()}>\n <span class=\"block text-xs text-muted-foreground italic\">\n … {(props.text.length - TEXT_DISPLAY_LIMIT).toLocaleString()} more characters not shown\n (copy has all of it)\n </span>\n </Show>\n </>\n )\n}\n\n/**\n * A folded run of dependency or runtime frames. Its rows are built only while it\n * is open and then a page at a time, so a run of ten thousand frames costs the\n * same as one of a few hundred until the reader asks for more.\n */\nfunction FrameGroup(props: {\n frames: readonly StackFrame[]\n defaultOpen?: boolean\n pageSize: number\n onOpen?: (frame: StackFrame) => void\n}) {\n const [open, setOpen] = createSignal(props.defaultOpen === true)\n const [limit, setLimit] = createSignal<number | undefined>()\n const title = createMemo(() => describeFrameGroup(props.frames))\n const shown = createMemo(() => props.frames.slice(0, limit() ?? props.pageSize))\n const hidden = () => props.frames.length - shown().length\n return (\n <TraceLine icon={<Package />} title={title()} open={open()} onOpenChange={setOpen}>\n <Show when={open()}>\n <ol role=\"list\" aria-label={title()} class=\"m-0 flex min-w-0 list-none flex-col gap-px p-0\">\n <For each={shown()}>{(frame) => <FrameRow frame={frame} onOpen={props.onOpen} />}</For>\n </ol>\n <Show when={hidden() > 0}>\n <ShowMore\n hidden={hidden()}\n pageSize={props.pageSize}\n onClick={() => setLimit(shown().length + props.pageSize)}\n />\n </Show>\n </Show>\n </TraceLine>\n )\n}\n\nfunction ShowMore(props: { hidden: number; pageSize: number; onClick: () => void }) {\n return (\n <div class=\"ps-1.5\">\n <Button variant=\"ghost\" size=\"2xs\" onClick={props.onClick}>\n Show {Math.min(props.hidden, props.pageSize).toLocaleString()} more (\n {props.hidden.toLocaleString()} hidden)\n </Button>\n </div>\n )\n}\n\nfunction FrameRow(props: { frame: StackFrame; onOpen?: (frame: StackFrame) => void }) {\n const location = () => frameLocation(props.frame)\n const first = () => props.frame.kind === 'first-party'\n const content = () => (\n <>\n <span\n class={cn('font-code text-code', {\n 'text-foreground': first(),\n 'text-muted-foreground': !first(),\n })}\n >\n {props.frame.async ? 'async ' : ''}\n {props.frame.function ?? '(anonymous)'}\n </span>\n <Show when={location()}>\n <span class=\"min-w-0 font-code text-code text-muted-foreground [overflow-wrap:anywhere]\">\n {location()}\n </span>\n </Show>\n {/* The dimming is a colour; the kind is also spoken. */}\n <Show when={!first()}>\n <span class=\"sr-only\">\n {props.frame.kind === 'dependency' ? 'in a dependency' : 'in the runtime'}\n </span>\n </Show>\n </>\n )\n return (\n <li data-slot=\"stack-frame\" data-kind={props.frame.kind} class=\"min-w-0\">\n <Show\n when={props.onOpen !== undefined && props.frame.file !== undefined}\n fallback={<div class={rowClass}>{content()}</div>}\n >\n <button\n type=\"button\"\n aria-label={`Open ${props.frame.async ? 'async ' : ''}${props.frame.function ?? '(anonymous)'} ${location()}`}\n class={cn(rowClass, interactiveClass)}\n onClick={() => props.onOpen?.(props.frame)}\n >\n {content()}\n </button>\n </Show>\n <Show when={props.frame.detail && props.frame.detail.length > 0}>\n <FrameDetail lines={props.frame.detail!} />\n </Show>\n </li>\n )\n}\n\nfunction TextRow(props: { text: string }) {\n const clipped = () => props.text.length > TEXT_DISPLAY_LIMIT\n return (\n <li class=\"min-w-0 px-1.5 py-0.5 font-code text-code whitespace-pre-wrap text-muted-foreground [overflow-wrap:anywhere]\">\n {clipped() ? props.text.slice(0, TEXT_DISPLAY_LIMIT) : props.text}\n <Show when={clipped()}>\n <span class=\"block font-sans text-xs italic\">\n … {(props.text.length - TEXT_DISPLAY_LIMIT).toLocaleString()} more characters not shown\n </span>\n </Show>\n </li>\n )\n}\n\nexport function StackTrace(props: StackTraceProps) {\n const [local, rest] = splitProps(props, [\n 'text',\n 'onOpenFrame',\n 'classify',\n 'collapseDependencies',\n 'defaultDependenciesOpen',\n 'maxBlocks',\n 'copyLabel',\n 'copiedLabel',\n 'onCopy',\n 'class',\n ])\n\n const parsed = createMemo(() => parseStackTrace(local.text, { classify: local.classify }))\n const blocks = createMemo<readonly StackBlock[]>(() =>\n groupStackEntries(parsed().entries, local.collapseDependencies !== false).filter(\n // A blank line between paragraphs of a trace carries nothing to draw.\n (block) => block.type !== 'text' || block.text.trim() !== ''\n )\n )\n const pageSize = () => Math.max(1, Math.floor(local.maxBlocks ?? STACK_TRACE_MAX_BLOCKS))\n const [limit, setLimit] = createSignal<number | undefined>()\n const shown = createMemo(() => blocks().slice(0, limit() ?? pageSize()))\n const hidden = () => blocks().length - shown().length\n\n const { copied, failed: copyFailed, copy: copyText } = createCopyFeedback()\n const copy = async () => {\n const ok = await copyText(local.text)\n local.onCopy?.(ok)\n }\n\n return (\n <div\n data-slot=\"stack-trace\"\n data-format={parsed().format}\n class={cn('flex min-w-0 flex-col gap-1', local.class)}\n {...rest}\n >\n <Show\n when={parsed().format !== 'unknown'}\n fallback={\n // Nothing recognised: the whole text, in the block that copies it.\n <CodeBlock size=\"sm\" title=\"Error output\" code={local.text} complete wrap />\n }\n >\n <div class=\"group/stack flex items-start gap-2\">\n <CircleAlert aria-hidden=\"true\" class=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <div class=\"min-w-0 flex-1 text-sm\">\n <Show\n when={parsed().header}\n fallback={<span class=\"text-muted-foreground\">Stack trace</span>}\n >\n {(header) => (\n <>\n <p class=\"m-0 whitespace-pre-wrap [overflow-wrap:anywhere]\">\n <Show when={header().type}>\n <ClippedText class=\"font-semibold text-destructive\" text={header().type!} />\n <Show when={header().message !== ''}>\n <span class=\"text-muted-foreground\">: </span>\n </Show>\n </Show>\n <ClippedText class=\"text-foreground\" text={header().message} />\n </p>\n <Show when={header().location}>\n <p class=\"m-0 font-code text-code text-muted-foreground [overflow-wrap:anywhere]\">\n <ClippedText text={header().location!} />\n </p>\n </Show>\n </>\n )}\n </Show>\n </div>\n <div class=\"flex items-center gap-1 opacity-0 transition-opacity group-focus-within/stack:opacity-100 group-hover/stack:opacity-100 [@media(hover:none)]:opacity-100\">\n <Button\n variant=\"ghost\"\n size=\"icon-2xs\"\n aria-label={\n copied() ? (local.copiedLabel ?? 'Copied') : (local.copyLabel ?? 'Copy stack trace')\n }\n title={copyFailed() ? '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 </Button>\n </div>\n </div>\n\n <ol\n role=\"list\"\n aria-label=\"Stack frames\"\n class=\"m-0 ms-2 flex min-w-0 list-none flex-col gap-px border-s border-border p-0 ps-2\"\n >\n <For each={shown()}>\n {(block) => (\n <Switch>\n <Match when={block.type === 'frame' && block}>\n {(entry) => (\n <FrameRow\n frame={(entry() as Extract<StackBlock, { type: 'frame' }>).frame}\n onOpen={local.onOpenFrame}\n />\n )}\n </Match>\n <Match when={block.type === 'text' && block}>\n {(entry) => (\n <TextRow text={(entry() as Extract<StackBlock, { type: 'text' }>).text} />\n )}\n </Match>\n <Match when={block.type === 'group' && block}>\n {(entry) => (\n <FrameGroup\n frames={(entry() as Extract<StackBlock, { type: 'group' }>).frames}\n defaultOpen={local.defaultDependenciesOpen}\n pageSize={pageSize()}\n onOpen={local.onOpenFrame}\n />\n )}\n </Match>\n </Switch>\n )}\n </For>\n </ol>\n <Show when={hidden() > 0}>\n <div class=\"ms-2\">\n <ShowMore\n hidden={hidden()}\n pageSize={pageSize()}\n onClick={() => setLimit(shown().length + pageSize())}\n />\n </div>\n </Show>\n </Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAMA,UAAQ0B,SAASzB,KAAW;AAClC,IAAMC,gBAAcwB,SAASvB,WAAiB;AAC9C,IAAMC,SAAOsB,SAASrB,IAAU;AAChC,IAAMC,YAAUoB,SAASnB,OAAa;AA6DtC,IAAa+B,yBAAyB;AACtC,IAAMC,qBAAqB;;AAE3B,IAAMC,oBAAoB;AAC1B,IAAMC,oBAAoB;AAE1B,IAAMC,WACJ;AACF,IAAMC,mBACJ;AAEF,SAASC,aAAaC,OAAeC,OAAuB;CAC1D,OAAOD,QAAQ,IACX,KAAKA,MAAME,eAAe,EAAC,QAASF,UAAU,IAAI,SAAS,QAAO,IAAKC,MAAMC,eAAe,EAAC,0BAC7F,KAAKD,MAAMC,eAAe,EAAC;AACjC;;AAGA,SAASC,YAAYC,OAAqC;CACxD,MAAMC,UAAU1C,iBAAiBY,WAAW6B,MAAMJ,OAAOL,mBAAmBC,iBAAiB,CAAC;CAC9F,OAAA,QAAA;EAAA,IAAAU,OAAAC,OAAA;EAAAC,OAAAF,YAGO9B,YAAY6B,QAAQ,CAAC,CAACL,KAAK,CAAC,CAACS,KAAK,IAAI,CAAC;EAAA,OAAAH;CAAA,EAAA,CAAA,GAAAI,gBAEzC3C,MAAI;EAAA,IAAC4C,OAAI;GAAA,OAAEN,QAAQ,CAAC,CAACO,eAAe,KAAKP,QAAQ,CAAC,CAACQ,eAAe;EAAC;EAAA,IAAAC,WAAA;GAAA,IAAAC,QAAAC,QAAA,GAAAC,QAAAF,MAAAG;GAA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wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,eASvD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,eASvD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,eASxD;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,eAa1E"}
@@ -1,5 +1,6 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { Heading, Text } from "../../ui/typography/typography.js";
3
+ import { fastIcon } from "../../../lib/fast-icon.js";
3
4
  import { Dynamic, createComponent, insert, mergeProps, spread, template } from "solid-js/web";
4
5
  import { ArrowDownRight, ArrowUpRight } from "lucide-solid";
5
6
  import { Show, splitProps } from "solid-js";
@@ -11,6 +12,8 @@ var _tmpl$4 = /*#__PURE__*/ template(`<dl data-slot=property-list>`);
11
12
  var _tmpl$5 = /*#__PURE__*/ template(`<dt data-slot=property-term>`);
12
13
  var _tmpl$6 = /*#__PURE__*/ template(`<dd data-slot=property-value>`);
13
14
  var _tmpl$7 = /*#__PURE__*/ template(`<div data-slot=property-row><span class="text-muted-foreground shrink-0"></span><span class="min-w-0 truncate text-end select-text">`);
15
+ var ArrowDownRight$1 = fastIcon(ArrowDownRight);
16
+ var ArrowUpRight$1 = fastIcon(ArrowUpRight);
14
17
  function Stat(props) {
15
18
  const [local, rest] = splitProps(props, [
16
19
  "class",
@@ -61,7 +64,7 @@ function Stat(props) {
61
64
  get children() {
62
65
  return createComponent(Dynamic, {
63
66
  get component() {
64
- return local.deltaTone === "down" ? ArrowDownRight : ArrowUpRight;
67
+ return local.deltaTone === "down" ? ArrowDownRight$1 : ArrowUpRight$1;
65
68
  },
66
69
  "aria-hidden": "true",
67
70
  get ["class"]() {
@@ -1 +1 @@
1
- {"version":3,"file":"stat.js","names":["ArrowDownRight","ArrowUpRight","Show","splitProps","Dynamic","cn","Heading","Text","label","value","unit","delta","deltaTone","accent","Stat","props","local","rest","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","numeric","children","when","unitSlot","variant","tone","deltaSlot","_el$4","_tmpl$2","_el$5","component","StatGroup","fit","_el$6","_tmpl$3","PropertyList","_el$7","_tmpl$4","PropertyTerm","_el$8","_tmpl$5","PropertyValue","_el$9","_tmpl$6","PropertyRow","term","_el$0","_tmpl$7","_el$1","_el$10"],"sources":["../../../../src/components/composites/stat/stat.tsx"],"sourcesContent":["import { ArrowDownRight, ArrowUpRight } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { Dynamic } from 'solid-js/web'\nimport { cn } from '#lib/utils'\nimport { Heading, Text } from '../../ui/typography'\n\n/**\n * Stat.\n *\n * A single measured number with its label and, optionally, its change. The\n * whole component is a decision about honesty: a value shown without its\n * comparison is not information, so `delta` carries the direction, the amount\n * and — through `deltaTone` — whether the direction is *good*. A rising number\n * is not always a rising outcome, and only the caller knows which way is which.\n *\n * `tabular-nums` on the value is what lets two stats in a row be compared\n * without the digits shifting under the reader.\n */\nexport type StatProps = ComponentProps<'div'> & {\n label: string\n value: JSX.Element\n /** A unit or qualifier after the value, e.g. \"ms\", \"of 10\". */\n unit?: string\n /** The change, e.g. \"+12% from last week\". */\n delta?: string\n /** Whether the change is an improvement. Decides the arrow and the colour. */\n deltaTone?: 'up' | 'down' | 'neutral'\n /** Draws the leading accent rule used for a row of headline numbers. */\n accent?: boolean\n}\n\nexport function Stat(props: StatProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'value',\n 'unit',\n 'delta',\n 'deltaTone',\n 'accent',\n 'children',\n ])\n\n return (\n <div\n data-slot=\"stat\"\n class={cn(\n 'flex min-w-0 flex-col gap-1 rounded-lg border border-border bg-card p-3',\n { 'border-t-2 border-t-primary': local.accent },\n local.class\n )}\n {...rest}\n >\n <div class=\"text-muted-foreground truncate text-xs font-medium\">{local.label}</div>\n <div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>\n <Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>\n {local.children}\n </div>\n )\n}\n\n/**\n * A row of stats that shares one gap and wraps as the window narrows.\n *\n * By default the column count steps with the *viewport* (two from `sm`, four from\n * `lg`), which is right for a group that spans the page. A group inside a pane\n * whose width is not the window's (a docked panel, a resizable column, a view\n * beside a sidebar) gets the wrong count from a viewport breakpoint. `fit` sizes\n * from the group's own width instead: as many tiles per row as fit at the\n * minimum tile width, each growing to share the remainder, however many stats\n * there are.\n */\nexport function StatGroup(props: ComponentProps<'div'> & { fit?: boolean }) {\n const [local, rest] = splitProps(props, ['class', 'fit'])\n return (\n <div\n data-slot=\"stat-group\"\n class={cn(\n 'grid gap-3',\n // 9.375rem is 150px at the default root size: room for a label of about\n // twenty characters and a six-digit value before the tile truncates.\n local.fit\n ? 'grid-cols-[repeat(auto-fill,minmax(9.375rem,1fr))]'\n : 'sm:grid-cols-2 lg:grid-cols-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * PropertyList.\n *\n * A definition list for read-only metadata: the details of a file, a session, a\n * build. This is a `<dl>`, not a table and not a grid of divs, because the\n * relationship being expressed is term-and-definition and the platform has an\n * element for exactly that.\n *\n * Values are selectable by default. Metadata is the thing users copy most and\n * get the least often: a commit hash behind a drag-to-select gesture is a small\n * daily failure.\n */\nexport function PropertyList(props: ComponentProps<'dl'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <dl\n data-slot=\"property-list\"\n class={cn('grid grid-cols-[auto_1fr] items-baseline gap-x-4 gap-y-2 text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyTerm(props: ComponentProps<'dt'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <dt\n data-slot=\"property-term\"\n class={cn('text-muted-foreground whitespace-nowrap', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyValue(props: ComponentProps<'dd'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <dd\n data-slot=\"property-value\"\n class={cn('min-w-0 break-words select-text', local.class)}\n {...rest}\n />\n )\n}\n\n/** A single term/value pair, for a list built one row at a time. */\nexport function PropertyRow(props: ComponentProps<'div'> & { term: string }) {\n const [local, rest] = splitProps(props, ['class', 'term', 'children'])\n\n return (\n <div\n data-slot=\"property-row\"\n class={cn('flex items-baseline justify-between gap-4 text-sm', local.class)}\n {...rest}\n >\n <span class=\"text-muted-foreground shrink-0\">{local.term}</span>\n <span class=\"min-w-0 truncate text-end select-text\">{local.children}</span>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,SAAgBc,KAAKC,OAAkB;CACrC,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAG;EAAAC,OAAAN,MAAAO,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWpB,GACL,2EACA,EAAE,+BAA+BW,MAAMH,OAAO,GAC9CG,MAAMU,KACR;EAAC,EAAA,GACGT,IAAI,GAAA,OAAA,IAAA;EAAAU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YxC,OAAiD;CAC3E,MAAM,CAACC,OAAOC,QAAQd,WAAWY,OAAO;EAAC;EAAS;EAAQ;CAAU,CAAC;CAErE,cAAA;EAAA,IAAA0C,QAAAC,QAAA,GAAAC,QAAAF,MAAApC,YAAAuC,SAAAD,MAAApC;EAAAC,OAAAiC,OAAAhC,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWpB,GAAG,qDAAqDW,MAAMU,KAAK;EAAC,EAAA,GACvET,IAAI,GAAA,OAAA,IAAA;EAAAU,OAAAgC,aAEsC3C,MAAMwC,IAAI;EAAA7B,OAAAiC,cACH5C,MAAMgB,QAAQ;EAAA,OAAAyB;CAAA,EAAA,CAAA;AAGzE"}
1
+ {"version":3,"file":"stat.js","names":["ArrowDownRight","LucideArrowDownRight","ArrowUpRight","LucideArrowUpRight","Show","splitProps","Dynamic","cn","Heading","Text","fastIcon","label","value","unit","delta","deltaTone","accent","Stat","props","local","rest","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","numeric","children","when","unitSlot","variant","tone","deltaSlot","_el$4","_tmpl$2","_el$5","component","StatGroup","fit","_el$6","_tmpl$3","PropertyList","_el$7","_tmpl$4","PropertyTerm","_el$8","_tmpl$5","PropertyValue","_el$9","_tmpl$6","PropertyRow","term","_el$0","_tmpl$7","_el$1","_el$10"],"sources":["../../../../src/components/composites/stat/stat.tsx"],"sourcesContent":["import {\n ArrowDownRight as LucideArrowDownRight,\n ArrowUpRight as LucideArrowUpRight,\n} from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { Dynamic } from 'solid-js/web'\nimport { cn } from '#lib/utils'\nimport { Heading, Text } from '../../ui/typography'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ArrowDownRight = fastIcon(LucideArrowDownRight)\nconst ArrowUpRight = fastIcon(LucideArrowUpRight)\n\n/**\n * Stat.\n *\n * A single measured number with its label and, optionally, its change. The\n * whole component is a decision about honesty: a value shown without its\n * comparison is not information, so `delta` carries the direction, the amount\n * and — through `deltaTone` — whether the direction is *good*. A rising number\n * is not always a rising outcome, and only the caller knows which way is which.\n *\n * `tabular-nums` on the value is what lets two stats in a row be compared\n * without the digits shifting under the reader.\n */\nexport type StatProps = ComponentProps<'div'> & {\n label: string\n value: JSX.Element\n /** A unit or qualifier after the value, e.g. \"ms\", \"of 10\". */\n unit?: string\n /** The change, e.g. \"+12% from last week\". */\n delta?: string\n /** Whether the change is an improvement. Decides the arrow and the colour. */\n deltaTone?: 'up' | 'down' | 'neutral'\n /** Draws the leading accent rule used for a row of headline numbers. */\n accent?: boolean\n}\n\nexport function Stat(props: StatProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'label',\n 'value',\n 'unit',\n 'delta',\n 'deltaTone',\n 'accent',\n 'children',\n ])\n\n return (\n <div\n data-slot=\"stat\"\n class={cn(\n 'flex min-w-0 flex-col gap-1 rounded-lg border border-border bg-card p-3',\n { 'border-t-2 border-t-primary': local.accent },\n local.class\n )}\n {...rest}\n >\n <div class=\"text-muted-foreground truncate text-xs font-medium\">{local.label}</div>\n <div class=\"flex items-baseline gap-1\">\n <Heading as=\"span\" size=\"page\" numeric>\n {local.value}\n </Heading>\n <Show when={local.unit}>\n {(unitSlot) => (\n <Text variant=\"caption\" tone=\"muted\">\n {unitSlot()}\n </Text>\n )}\n </Show>\n </div>\n <Show when={local.delta}>\n {(deltaSlot) => (\n <div class=\"text-foreground flex items-center gap-1 text-xs\">\n <Show when={local.deltaTone === 'up' || local.deltaTone === 'down'}>\n <Dynamic\n component={local.deltaTone === 'down' ? ArrowDownRight : ArrowUpRight}\n aria-hidden=\"true\"\n class={cn('size-3', {\n 'text-success': local.deltaTone === 'up',\n 'text-destructive': local.deltaTone === 'down',\n })}\n />\n </Show>\n <span class=\"tabular-nums\">{deltaSlot()}</span>\n </div>\n )}\n </Show>\n {local.children}\n </div>\n )\n}\n\n/**\n * A row of stats that shares one gap and wraps as the window narrows.\n *\n * By default the column count steps with the *viewport* (two from `sm`, four from\n * `lg`), which is right for a group that spans the page. A group inside a pane\n * whose width is not the window's (a docked panel, a resizable column, a view\n * beside a sidebar) gets the wrong count from a viewport breakpoint. `fit` sizes\n * from the group's own width instead: as many tiles per row as fit at the\n * minimum tile width, each growing to share the remainder, however many stats\n * there are.\n */\nexport function StatGroup(props: ComponentProps<'div'> & { fit?: boolean }) {\n const [local, rest] = splitProps(props, ['class', 'fit'])\n return (\n <div\n data-slot=\"stat-group\"\n class={cn(\n 'grid gap-3',\n // 9.375rem is 150px at the default root size: room for a label of about\n // twenty characters and a six-digit value before the tile truncates.\n local.fit\n ? 'grid-cols-[repeat(auto-fill,minmax(9.375rem,1fr))]'\n : 'sm:grid-cols-2 lg:grid-cols-4',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * PropertyList.\n *\n * A definition list for read-only metadata: the details of a file, a session, a\n * build. This is a `<dl>`, not a table and not a grid of divs, because the\n * relationship being expressed is term-and-definition and the platform has an\n * element for exactly that.\n *\n * Values are selectable by default. Metadata is the thing users copy most and\n * get the least often: a commit hash behind a drag-to-select gesture is a small\n * daily failure.\n */\nexport function PropertyList(props: ComponentProps<'dl'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <dl\n data-slot=\"property-list\"\n class={cn('grid grid-cols-[auto_1fr] items-baseline gap-x-4 gap-y-2 text-sm', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyTerm(props: ComponentProps<'dt'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <dt\n data-slot=\"property-term\"\n class={cn('text-muted-foreground whitespace-nowrap', local.class)}\n {...rest}\n />\n )\n}\n\nexport function PropertyValue(props: ComponentProps<'dd'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <dd\n data-slot=\"property-value\"\n class={cn('min-w-0 break-words select-text', local.class)}\n {...rest}\n />\n )\n}\n\n/** A single term/value pair, for a list built one row at a time. */\nexport function PropertyRow(props: ComponentProps<'div'> & { term: string }) {\n const [local, rest] = splitProps(props, ['class', 'term', 'children'])\n\n return (\n <div\n data-slot=\"property-row\"\n class={cn('flex items-baseline justify-between gap-4 text-sm', local.class)}\n {...rest}\n >\n <span class=\"text-muted-foreground shrink-0\">{local.term}</span>\n <span class=\"min-w-0 truncate text-end select-text\">{local.children}</span>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAMA,mBAAiBU,SAAST,cAAoB;AACpD,IAAMC,iBAAeQ,SAASP,YAAkB;AA2BhD,SAAgBc,KAAKC,OAAkB;CACrC,MAAM,CAACC,OAAOC,QAAQf,WAAWa,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAED,cAAA;EAAA,IAAAG,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAG;EAAAC,OAAAN,MAAAO,WAAA,EAAA,KAAA,WAAA;GAAA,OAGWrB,GACL,2EACA,EAAE,+BAA+BY,MAAMH,OAAO,GAC9CG,MAAMU,KACR;EAAC,EAAA,GACGT,IAAI,GAAA,OAAA,IAAA;EAAAU,OAAAP,aAEyDJ,MAAMR,KAAK;EAAAmB,OAAAL,OAAAM,gBAEzEvB,SAAO;GAACwB,IAAE;GAAQC,MAAI;GAAQC,SAAO;GAAA,IAAAC,WAAA;IAAA,OACnChB,MAAMP;GAAK;EAAA,CAAA,GAAA,IAAA;EAAAkB,OAAAL,OAAAM,gBAEb3B,MAAI;GAAA,IAACgC,OAAI;IAAA,OAAEjB,MAAMN;GAAI;GAAAsB,WAClBE,aAAQN,gBACPtB,MAAI;IAAC6B,SAAO;IAAWC,MAAI;IAAA,IAAAJ,WAAA;KAAA,OACzBE,SAAS;IAAC;GAAA,CAAA;EAEd,CAAA,GAAA,IAAA;EAAAP,OAAAT,MAAAU,gBAGJ3B,MAAI;GAAA,IAACgC,OAAI;IAAA,OAAEjB,MAAML;GA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/subagent/subagent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAElF,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAA;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,EACd,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,gBAAgB,GAAG,MAAM,GAAG,UAAU,CACvF,GAAG;IACF,wCAAwC;IACxC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACtB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wDAAwD;IACxD,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACnB,CAAA;AAED,2BAA2B;AAC3B,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,eA6E5C"}
1
+ {"version":3,"file":"subagent.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/subagent/subagent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAElF,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAA;AAMvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,EACd,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,gBAAgB,GAAG,MAAM,GAAG,UAAU,CACvF,GAAG;IACF,wCAAwC;IACxC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACtB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wDAAwD;IACxD,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACnB,CAAA;AAED,2BAA2B;AAC3B,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,eA6E5C"}
@@ -1,11 +1,13 @@
1
1
  import { ScrollArea } from "../../ui/scroll-area/scroll-area.js";
2
2
  import { Trace, TraceDetail, TraceError, TraceLine, formatDuration } from "../../ui/trace/trace.js";
3
+ import { fastIcon } from "../../../lib/fast-icon.js";
3
4
  import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
4
5
  import { Bot } from "lucide-solid";
5
6
  import { Show, children, splitProps } from "solid-js";
6
7
  // src/components/composites/subagent/subagent.tsx
7
8
  var _tmpl$ = /*#__PURE__*/ template(`<span class="inline-block max-w-72 truncate align-bottom">`);
8
9
  var _tmpl$2 = /*#__PURE__*/ template(`<div class="flex min-w-0 flex-col gap-1"><p class="m-0 font-medium text-foreground">Result`);
10
+ var Bot$1 = fastIcon(Bot);
9
11
  /** `3 steps`, `1 step`. */
10
12
  function stepCountLabel(count) {
11
13
  return `${count} ${count === 1 ? "step" : "steps"}`;
@@ -104,7 +106,7 @@ function Subagent(props) {
104
106
  });
105
107
  return createComponent(TraceLine, mergeProps({
106
108
  get icon() {
107
- return local.icon ?? createComponent(Bot, {});
109
+ return local.icon ?? createComponent(Bot$1, {});
108
110
  },
109
111
  get title() {
110
112
  return local.name;
@@ -1 +1 @@
1
- {"version":3,"file":"subagent.js","names":["Bot","children","resolveChildren","Show","splitProps","ScrollArea","formatDuration","Trace","TraceDetail","TraceError","TraceLine","name","task","status","model","duration","stepCount","result","errorText","meta","stepCountLabel","count","Subagent","props","local","rest","steps","toArray","length","hasError","undefined","hasResult","hasDetail","summary","parts","filter","part","join","hostMeta","_$createComponent","when","_el$","_tmpl$","_$insert","_$memo","detail","size","text","_el$2","_tmpl$2","firstChild","role","_$mergeProps","icon","title","description"],"sources":["../../../../src/components/composites/subagent/subagent.tsx"],"sourcesContent":["import { Bot } from 'lucide-solid'\nimport { children as resolveChildren, Show, splitProps, type JSX } from 'solid-js'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n formatDuration,\n Trace,\n TraceDetail,\n TraceError,\n TraceLine,\n type TraceLineProps,\n type TraceStatus,\n} from '../../ui/trace'\n\n/**\n * Subagent.\n *\n * Another agent the main one handed work to, as a `TraceLine`: its name, the task\n * it was given, its status, and — folded away — everything it did. The body is a\n * nested `Trace`, so a subagent's tool calls, reasoning and own subagents are the\n * same lines as the parent's, one level in; nothing about \"a run inside a run\"\n * needs a new visual. Reach for `Tool` when the call has an input and an output\n * and no steps of its own, and for `Task` when the items are a statement of work\n * rather than a record of what ran.\n *\n * ## The collapsed line is the summary\n *\n * Folded, the line carries what a reader scanning the turn needs: the name, the\n * task, the status, and — in the trailing text — the model, the number of steps\n * and how long it took. Each of those appears only when known: `model` and\n * `duration` are the host's, and the step count is the number of lines passed as\n * `children` unless the host knows better (`stepCount`, for a run whose earlier\n * steps are not loaded). No count is shown for a run with no steps.\n *\n * ## Result and failure\n *\n * `result` is a slot for the answer the subagent returned — usually prose or a\n * `CodeBlock` — below its steps, labelled \"Result\". `errorText` is a failure as\n * text. Neither is invented: a subagent that finished without a result shows\n * none, and one with no steps, result or error yet is a plain line (there is\n * nothing to open; the line becomes a disclosure when its first step arrives).\n *\n * A `Subagent` is a line: place it inside a `Trace`, and its `children` are\n * `TraceLine`s.\n */\nexport type SubagentProps = Omit<\n TraceLineProps,\n 'title' | 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'meta' | 'children'\n> & {\n /** The run's steps, as `TraceLine`s. */\n children?: JSX.Element\n /** The subagent's name. Rendered as text. */\n name: string\n /** The task it was given, on the line. */\n task?: JSX.Element\n status?: TraceStatus\n /** A model label, e.g. `sonnet-5`. Rendered as text. */\n model?: string\n /** Seconds the run took, if the host measured it. */\n duration?: number\n /** Overrides the count taken from `children`. */\n stepCount?: number\n /** What the subagent returned. */\n result?: JSX.Element\n errorText?: string\n /** Trailing text appended after the derived summary. */\n meta?: JSX.Element\n}\n\n/** `3 steps`, `1 step`. */\nexport function stepCountLabel(count: number): string {\n return `${count} ${count === 1 ? 'step' : 'steps'}`\n}\n\nexport function Subagent(props: SubagentProps) {\n const [local, rest] = splitProps(props, [\n 'name',\n 'task',\n 'status',\n 'model',\n 'duration',\n 'stepCount',\n 'result',\n 'errorText',\n 'icon',\n 'meta',\n 'children',\n ])\n // Resolved once: the steps are created once and keep their own state (an open\n // tool call, a scrolled output) while the run is folded and unfolded.\n const steps = resolveChildren(() => local.children)\n const count = () => local.stepCount ?? steps.toArray().length\n const hasError = () => local.errorText !== undefined && local.errorText !== ''\n const result = resolveChildren(() => local.result)\n const hasResult = () => result() != null\n const hasDetail = () => steps.toArray().length > 0 || hasResult() || hasError()\n\n const summary = () => {\n const parts = [\n local.model,\n count() > 0 ? stepCountLabel(count()) : undefined,\n formatDuration(local.duration),\n ].filter((part): part is string => part !== undefined && part !== '')\n return parts.length > 0 ? parts.join(' · ') : undefined\n }\n\n // A model label is host text and may be long; it must not widen the line.\n const hostMeta = resolveChildren(() => local.meta)\n const meta = () =>\n summary() || hostMeta() ? (\n <>\n <Show when={summary()}>\n <span class=\"inline-block max-w-72 truncate align-bottom\">{summary()}</span>\n </Show>\n {hostMeta()}\n </>\n ) : undefined\n\n const detail = () => (\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>\n <Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>\n <Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>\n </TraceDetail>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <Bot />}\n title={local.name}\n description={local.task}\n status={local.status}\n meta={meta()}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;AAqEA,SAAgBoB,eAAeC,OAAuB;CACpD,OAAO,GAAGA,MAAK,GAAIA,UAAU,IAAI,SAAS;AAC5C;AAEA,SAAgBC,SAASC,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQrB,WAAWmB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAGD,MAAMG,QAAQxB,eAAsBsB,MAAMvB,QAAQ;CAClD,MAAMoB,cAAcG,MAAMR,aAAaU,MAAMC,QAAQ,CAAC,CAACC;CACvD,MAAMC,iBAAiBL,MAAMN,cAAcY,KAAAA,KAAaN,MAAMN,cAAc;CAC5E,MAAMD,SAASf,eA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ACsC,OAAI;OAAA,OAAEvB,MAAMN,aAAa;MAAE,EAAA,CAAA;KAAA;IAAA,CAAA;IAAAqB,gBAExCpC,MAAI;KAAA,IAACqC,OAAI;MAAA,OAAET,UAAU;KAAC;KAAA,IAAA9B,WAAA;MAAA,IAAA+C,QAAAC,QAAA;MAAAD,MAAAE;MAAAP,OAAAK,OAAAT,gBAGlBlC,YAAU;OAAC8C,MAAI;OAAA,KAAA,gBAAA;QAAA,OAAsB,GAAG3B,MAAMb,KAAI;OAAS;OAAA,SAAA;OAAA,IAAAV,WAAA;QAAA,OACzDgB,OAAO;OAAC;MAAA,CAAA,GAAA,IAAA;MAAA,OAAA+B;KAAA;IAAA,CAAA;GAAA;EAAA;CAAA,CAAA;CAOnB,OAAAT,gBACG7B,WAAS0C,WAAA;EAAA,IACRC,OAAI;GAAA,OAAE7B,MAAM6B,QAAId,gBAAKvC,KAAG,CAAA,CAAA;EAAG;EAAA,IAC3BsD,QAAK;GAAA,OAAE9B,MAAMb;EAAI;EAAA,IACjB4C,cAAW;GAAA,OAAE/B,MAAMZ;EAAI;EAAA,IACvBC,SAAM;GAAA,OAAEW,MAAMX;EAAM;EAAA,IACpBM,OAAI;GAAA,OAAEA,KAAK;EAAC;CAAA,GACRM,MAAI,EAAA,IAAAxB,WAAA;EAAA,OAEP+B,UAAU,IAAIa,SAASf,KAAAA;CAAS,EAAA,CAAA,CAAA;AAGvC"}
1
+ {"version":3,"file":"subagent.js","names":["Bot","LucideBot","children","resolveChildren","Show","splitProps","ScrollArea","formatDuration","Trace","TraceDetail","TraceError","TraceLine","fastIcon","name","task","status","model","duration","stepCount","result","errorText","meta","stepCountLabel","count","Subagent","props","local","rest","steps","toArray","length","hasError","undefined","hasResult","hasDetail","summary","parts","filter","part","join","hostMeta","_$createComponent","when","_el$","_tmpl$","_$insert","_$memo","detail","size","text","_el$2","_tmpl$2","firstChild","role","_$mergeProps","icon","title","description"],"sources":["../../../../src/components/composites/subagent/subagent.tsx"],"sourcesContent":["import { Bot as LucideBot } from 'lucide-solid'\nimport { children as resolveChildren, Show, splitProps, type JSX } from 'solid-js'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n formatDuration,\n Trace,\n TraceDetail,\n TraceError,\n TraceLine,\n type TraceLineProps,\n type TraceStatus,\n} from '../../ui/trace'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Bot = fastIcon(LucideBot)\n\n/**\n * Subagent.\n *\n * Another agent the main one handed work to, as a `TraceLine`: its name, the task\n * it was given, its status, and — folded away — everything it did. The body is a\n * nested `Trace`, so a subagent's tool calls, reasoning and own subagents are the\n * same lines as the parent's, one level in; nothing about \"a run inside a run\"\n * needs a new visual. Reach for `Tool` when the call has an input and an output\n * and no steps of its own, and for `Task` when the items are a statement of work\n * rather than a record of what ran.\n *\n * ## The collapsed line is the summary\n *\n * Folded, the line carries what a reader scanning the turn needs: the name, the\n * task, the status, and — in the trailing text — the model, the number of steps\n * and how long it took. Each of those appears only when known: `model` and\n * `duration` are the host's, and the step count is the number of lines passed as\n * `children` unless the host knows better (`stepCount`, for a run whose earlier\n * steps are not loaded). No count is shown for a run with no steps.\n *\n * ## Result and failure\n *\n * `result` is a slot for the answer the subagent returned — usually prose or a\n * `CodeBlock` — below its steps, labelled \"Result\". `errorText` is a failure as\n * text. Neither is invented: a subagent that finished without a result shows\n * none, and one with no steps, result or error yet is a plain line (there is\n * nothing to open; the line becomes a disclosure when its first step arrives).\n *\n * A `Subagent` is a line: place it inside a `Trace`, and its `children` are\n * `TraceLine`s.\n */\nexport type SubagentProps = Omit<\n TraceLineProps,\n 'title' | 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'meta' | 'children'\n> & {\n /** The run's steps, as `TraceLine`s. */\n children?: JSX.Element\n /** The subagent's name. Rendered as text. */\n name: string\n /** The task it was given, on the line. */\n task?: JSX.Element\n status?: TraceStatus\n /** A model label, e.g. `sonnet-5`. Rendered as text. */\n model?: string\n /** Seconds the run took, if the host measured it. */\n duration?: number\n /** Overrides the count taken from `children`. */\n stepCount?: number\n /** What the subagent returned. */\n result?: JSX.Element\n errorText?: string\n /** Trailing text appended after the derived summary. */\n meta?: JSX.Element\n}\n\n/** `3 steps`, `1 step`. */\nexport function stepCountLabel(count: number): string {\n return `${count} ${count === 1 ? 'step' : 'steps'}`\n}\n\nexport function Subagent(props: SubagentProps) {\n const [local, rest] = splitProps(props, [\n 'name',\n 'task',\n 'status',\n 'model',\n 'duration',\n 'stepCount',\n 'result',\n 'errorText',\n 'icon',\n 'meta',\n 'children',\n ])\n // Resolved once: the steps are created once and keep their own state (an open\n // tool call, a scrolled output) while the run is folded and unfolded.\n const steps = resolveChildren(() => local.children)\n const count = () => local.stepCount ?? steps.toArray().length\n const hasError = () => local.errorText !== undefined && local.errorText !== ''\n const result = resolveChildren(() => local.result)\n const hasResult = () => result() != null\n const hasDetail = () => steps.toArray().length > 0 || hasResult() || hasError()\n\n const summary = () => {\n const parts = [\n local.model,\n count() > 0 ? stepCountLabel(count()) : undefined,\n formatDuration(local.duration),\n ].filter((part): part is string => part !== undefined && part !== '')\n return parts.length > 0 ? parts.join(' · ') : undefined\n }\n\n // A model label is host text and may be long; it must not widen the line.\n const hostMeta = resolveChildren(() => local.meta)\n const meta = () =>\n summary() || hostMeta() ? (\n <>\n <Show when={summary()}>\n <span class=\"inline-block max-w-72 truncate align-bottom\">{summary()}</span>\n </Show>\n {hostMeta()}\n </>\n ) : undefined\n\n const detail = () => (\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={steps.toArray().length > 0}>\n <Trace size=\"sm\" aria-label={`${local.name} steps`}>\n {steps()}\n </Trace>\n </Show>\n <Show when={hasError()}>\n <TraceError text={local.errorText ?? ''} />\n </Show>\n <Show when={hasResult()}>\n <div class=\"flex min-w-0 flex-col gap-1\">\n <p class=\"m-0 font-medium text-foreground\">Result</p>\n <ScrollArea role=\"region\" aria-label={`${local.name} result`} class=\"max-h-72\">\n {result()}\n </ScrollArea>\n </div>\n </Show>\n </TraceDetail>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <Bot />}\n title={local.name}\n description={local.task}\n status={local.status}\n meta={meta()}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;AAeA,IAAMA,QAAMY,SAASX,GAAS;;AA0D9B,SAAgBqB,eAAeC,OAAuB;CACpD,OAAO,GAAGA,MAAK,GAAIA,UAAU,IAAI,SAAS;AAC5C;AAEA,SAAgBC,SAASC,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQtB,WAAWoB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAU,CACX;CAGD,MAAMG,QAAQzB,eAAsBuB,MAAMxB,QAAQ;CAClD,MAAMqB,cAAcG,MAAMR,aAAaU,MAAMC,QAAQ,CAAC,CAACC;CACvD,MAAMC,iBAAiBL,MAAMN,cAAcY,KAAAA,KAAaN,MAAMN,cAAc;CAC5E,MAAMD,SAAShB,eAAsBuB,MAAMP,MAAM;CACjD,MAAMc,kBAAkBd,OAAO,KAAK;CACpC,MAAMe,kBAAkBN,MAAMC,QAAQ,CAAC,CAACC,SAAS,KAAKG,UAAU,KAAKF,SAAS;CAE9E,MAAMI,gBAAgB;EACpB,MAAMC,QAAQ;GACZV,MAAMV;GACNO,MAAM,IAAI,IAAID,eAAeC,MAAM,CAAC,IAAIS,KAAAA;GACxCzB,eAAemB,MAAMT,QAAQ;EAAC,CAC/B,CAACoB,QAAQC,SAAyBA,SAASN,KAAAA,KAAaM,SAAS,EAAE;EACpE,OAAOF,MAAMN,SAAS,IAAIM,MAAMG,KAAK,KAAK,IAAIP,KAAAA;CAChD;CAGA,MAAMQ,WAAWrC,eAAsBuB,MAAML,IAAI;CACjD,MAAMA,aACJc,QAAQ,KAAKK,SAAS,IAAC,CAAAC,gBAElBrC,MAAI;EAAA,IAACsC,OAAI;GAAA,OAAEP,QAAQ;EAAC;EA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AAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEnF;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAA;IAC3B,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAmFlD;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,4FAA4F;IAC5F,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACvB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,eAcpD;AAED,MAAM,MAAM,SAAS,GAAG,IAAI,CAC1B,cAAc,EACd,aAAa,GAAG,MAAM,GAAG,UAAU,GAAG,gBAAgB,GAAG,UAAU,CACpE,GAAG;IACF,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;IAC1B,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,eAmCpC"}
@@ -3,6 +3,7 @@ import { Attachment, AttachmentList } from "../../ui/attachment/attachment.js";
3
3
  import { Button } from "../../ui/button/button.js";
4
4
  import { ScrollArea } from "../../ui/scroll-area/scroll-area.js";
5
5
  import { TraceLine, TraceMark, WORK_STATUS_LABELS, WORK_TRACE_STATUS } from "../../ui/trace/trace.js";
6
+ import { fastIcon } from "../../../lib/fast-icon.js";
6
7
  import { className, createComponent, effect, insert, memo, mergeProps, setAttribute, spread, template } from "solid-js/web";
7
8
  import { ListChecks } from "lucide-solid";
8
9
  import { For, Index, Show, createMemo, createSignal, splitProps } from "solid-js";
@@ -14,6 +15,7 @@ var _tmpl$4 = /*#__PURE__*/ template(`<span class=sr-only> `);
14
15
  var _tmpl$5 = /*#__PURE__*/ template(`<p class="m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80">`);
15
16
  var _tmpl$6 = /*#__PURE__*/ template(`<li class="min-w-0 max-w-full">`);
16
17
  var _tmpl$7 = /*#__PURE__*/ template(`<ul role=list class="m-0 flex list-none flex-col gap-0.5 p-0">`);
18
+ var ListChecks$1 = fastIcon(ListChecks);
17
19
  var TASK_ITEM_STATUS_LABELS = WORK_STATUS_LABELS;
18
20
  /** Visible files per item before the rest go behind a toggle. */
19
21
  var VISIBLE_FILES = 6;
@@ -233,7 +235,7 @@ function Task(props) {
233
235
  });
234
236
  return createComponent(TraceLine, mergeProps({
235
237
  get icon() {
236
- return local.icon ?? createComponent(ListChecks, {});
238
+ return local.icon ?? createComponent(ListChecks$1, {});
237
239
  },
238
240
  get title() {
239
241
  return local.title;
@@ -1 +1 @@
1
- {"version":3,"file":"task.js","names":["ListChecks","createMemo","createSignal","For","Index","Show","splitProps","cn","Attachment","AttachmentList","Button","ScrollArea","TraceLine","TraceMark","WORK_STATUS_LABELS","WORK_TRACE_STATUS","name","kind","size","text","description","status","files","TASK_ITEM_STATUS_LABELS","VISIBLE_FILES","MAX_TEXT","bound","max","length","slice","taskProgress","items","done","total","some","item","undefined","filter","taskProgressLabel","progress","statusLabel","TaskItemRow","props","local","rest","showAllFiles","setShowAllFiles","shownFiles","hiddenFiles","_el$","_tmpl$2","_el$2","firstChild","_el$3","_$spread","_$mergeProps","class","_$insert","_$createComponent","slot","_$memo","completed","icon","_tmpl$3","when","children","_el$6","_tmpl$4","_el$8","_tmpl$5","each","file","_el$9","_tmpl$6","variant","_el$4","_tmpl$","type","onClick","value","_$effect","_p$","_v$","_v$2","e","_$setAttribute","t","_$className","label","TaskItemList","role","_el$0","_tmpl$7","itemsLabel","Task","derivedMeta","title","list","meta"],"sources":["../../../../src/components/composites/task/task.tsx"],"sourcesContent":["import { ListChecks } from 'lucide-solid'\nimport {\n createMemo,\n createSignal,\n For,\n Index,\n Show,\n splitProps,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Attachment, AttachmentList, type AttachmentKind } from '../../ui/attachment'\nimport { Button } from '../../ui/button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n TraceLine,\n TraceMark,\n WORK_STATUS_LABELS,\n WORK_TRACE_STATUS,\n type TraceLineProps,\n type WorkStatus,\n} from '../../ui/trace'\n\n/**\n * Task.\n *\n * One piece of work the agent is doing, as a `TraceLine` that opens onto its\n * items: a title, then a list in which each item is a sentence, optionally a\n * status, and optionally the files it touched. Reach for `Plan` when the list is\n * a proposal the person approves, for `Queue` when it is the agent's running\n * todo list, and for a `Trace` of tool calls when the items are things that\n * *ran*, a Task item is a statement about work, not a record of a call.\n *\n * ## Items wrap; lines do not\n *\n * A `TraceLine` truncates its title to one row, which is right for \"Read\n * src/app.tsx\" and wrong for \"Backfill locale from profile.language, falling\n * back to en\". Items are therefore their own rows with the same mark and colour\n * vocabulary as a Trace line but wrapping text, clamped to three lines so a\n * pasted paragraph cannot take the column. `TaskItemRow` and `TaskItemList` are\n * exported because `Plan` and `Queue` are built from them.\n *\n * ## Status is a claim\n *\n * An item shows a mark and speaks a word only when the host supplied `status`.\n * The \"2 of 4 done\" in the header is derived from those statuses and appears\n * only if at least one item has one; items without a status are counted in the\n * total and not in \"done\" (see `taskProgress`). A task with no items is a plain\n * line: there is nothing to open, and an empty disclosure is a control that\n * does nothing.\n *\n * ## Files are untrusted metadata\n *\n * File chips are `Attachment` chips with no handlers, so they are text: a name\n * is never a link or a path. Past six, the rest sit behind one toggle button\n * whose label changes in place, so keyboard focus survives opening and closing\n * it.\n */\nexport type TaskItemStatus = WorkStatus\n\nexport type TaskFile = Readonly<{\n name: string\n kind?: AttachmentKind\n /** Bytes. */\n size?: number\n}>\n\nexport type TaskItem = Readonly<{\n /** Only needed for the host's own bookkeeping; rows are kept by position. */\n id?: string\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n}>\n\nexport const TASK_ITEM_STATUS_LABELS: Readonly<Record<TaskItemStatus, string>> = WORK_STATUS_LABELS\n\n/** Visible files per item before the rest go behind a toggle. */\nconst VISIBLE_FILES = 6\n/** Characters of item text kept; the rest of a pasted wall is not a todo. */\nconst MAX_TEXT = 1_000\n\nfunction bound(text: string, max: number): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n\n/**\n * How many items are done, or nothing at all when no item carries a status.\n * Items without a status count toward the total: the host did not say they were\n * finished, so they are not.\n */\nexport function taskProgress(\n items: readonly Pick<TaskItem, 'status'>[]\n): Readonly<{ done: number; total: number }> | undefined {\n if (!items.some((item) => item.status !== undefined)) return undefined\n return {\n done: items.filter((item) => item.status === 'complete').length,\n total: items.length,\n }\n}\n\n/** `2 of 4 done`, in words. */\nexport function taskProgressLabel(progress: { done: number; total: number }): string {\n return `${progress.done} of ${progress.total} done`\n}\n\nexport type TaskItemRowProps = Omit<ComponentProps<'li'>, 'children'> & {\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n /** Spoken in place of the default status word. */\n statusLabel?: string\n}\n\nexport function TaskItemRow(props: TaskItemRowProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'text',\n 'description',\n 'status',\n 'files',\n 'statusLabel',\n ])\n const [showAllFiles, setShowAllFiles] = createSignal(false)\n const files = () => local.files ?? []\n const shownFiles = () => (showAllFiles() ? files() : files().slice(0, VISIBLE_FILES))\n const hiddenFiles = () => files().length - VISIBLE_FILES\n const text = () => bound(local.text, MAX_TEXT)\n\n return (\n <li\n data-slot=\"task-item\"\n data-status={local.status}\n class={cn('flex min-w-0 gap-2 rounded-md px-1.5 py-0.5', local.class)}\n {...rest}\n >\n <TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles()}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>\n </li>\n )\n}\n\nexport type TaskItemListProps = Omit<ComponentProps<'div'>, 'children'> & {\n /** The list's accessible name. A scrolling region without one is an unlabelled tab stop. */\n label: string\n children?: JSX.Element\n}\n\n/**\n * The items, bounded. Two hundred todo items must scroll inside their line and\n * not push the answer out of view; the region is keyboard-focusable and named,\n * which is what makes the overflow reachable without a pointer.\n */\nexport function TaskItemList(props: TaskItemListProps) {\n const [local, rest] = splitProps(props, ['class', 'label', 'children'])\n return (\n <ScrollArea\n role=\"region\"\n aria-label={local.label}\n class={cn('max-h-72', local.class)}\n {...rest}\n >\n <ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>\n </ScrollArea>\n )\n}\n\nexport type TaskProps = Omit<\n TraceLineProps,\n 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'children'\n> & {\n items: readonly TaskItem[]\n /** The item list's accessible name. Defaults to the title when it is a string. */\n itemsLabel?: string\n}\n\nexport function Task(props: TaskProps) {\n const [local, rest] = splitProps(props, ['items', 'itemsLabel', 'icon', 'meta', 'title'])\n const progress = createMemo(() => taskProgress(local.items))\n const derivedMeta = () => {\n const value = progress()\n return value ? taskProgressLabel(value) : undefined\n }\n const label = () =>\n local.itemsLabel ?? (typeof local.title === 'string' ? `${local.title} items` : 'Task items')\n\n const list = () => (\n <TaskItemList label={label()}>\n <Index each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </Index>\n </TaskItemList>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <ListChecks />}\n title={local.title}\n meta={local.meta ?? derivedMeta()}\n {...rest}\n >\n {local.items.length > 0 ? list : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA6EA,IAAauB,0BAAoET;;AAGjF,IAAMU,gBAAgB;;AAEtB,IAAMC,WAAW;AAEjB,SAASC,MAAMP,MAAcQ,KAAqB;CAChD,OAAOR,KAAKS,SAASD,MAAM,GAAGR,KAAKU,MAAM,GAAGF,GAAG,EAAC,KAAMR;AACxD;;;;;;AAOA,SAAgBW,aACdC,OACuD;CACvD,IAAI,CAACA,MAAMG,MAAMC,SAASA,KAAKd,WAAWe,KAAAA,CAAS,GAAG,OAAOA,KAAAA;CAC7D,OAAO;EACLJ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EAAA,OAEPtB,MAAMZ,MAAMH,SAAS,IAAIqE,OAAO7D,KAAAA;CAAS,EAAA,CAAA,CAAA;AAGhD"}
1
+ {"version":3,"file":"task.js","names":["ListChecks","LucideListChecks","createMemo","createSignal","For","Index","Show","splitProps","cn","Attachment","AttachmentList","Button","ScrollArea","TraceLine","TraceMark","WORK_STATUS_LABELS","WORK_TRACE_STATUS","fastIcon","name","kind","size","text","description","status","files","TASK_ITEM_STATUS_LABELS","VISIBLE_FILES","MAX_TEXT","bound","max","length","slice","taskProgress","items","done","total","some","item","undefined","filter","taskProgressLabel","progress","statusLabel","TaskItemRow","props","local","rest","showAllFiles","setShowAllFiles","shownFiles","hiddenFiles","_el$","_tmpl$2","_el$2","firstChild","_el$3","_$spread","_$mergeProps","class","_$insert","_$createComponent","slot","_$memo","completed","icon","_tmpl$3","when","children","_el$6","_tmpl$4","_el$8","_tmpl$5","each","file","_el$9","_tmpl$6","variant","_el$4","_tmpl$","type","onClick","value","_$effect","_p$","_v$","_v$2","e","_$setAttribute","t","_$className","label","TaskItemList","role","_el$0","_tmpl$7","itemsLabel","Task","derivedMeta","title","list","meta"],"sources":["../../../../src/components/composites/task/task.tsx"],"sourcesContent":["import { ListChecks as LucideListChecks } from 'lucide-solid'\nimport {\n createMemo,\n createSignal,\n For,\n Index,\n Show,\n splitProps,\n type ComponentProps,\n type JSX,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Attachment, AttachmentList, type AttachmentKind } from '../../ui/attachment'\nimport { Button } from '../../ui/button'\nimport { ScrollArea } from '../../ui/scroll-area'\nimport {\n TraceLine,\n TraceMark,\n WORK_STATUS_LABELS,\n WORK_TRACE_STATUS,\n type TraceLineProps,\n type WorkStatus,\n} from '../../ui/trace'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ListChecks = fastIcon(LucideListChecks)\n\n/**\n * Task.\n *\n * One piece of work the agent is doing, as a `TraceLine` that opens onto its\n * items: a title, then a list in which each item is a sentence, optionally a\n * status, and optionally the files it touched. Reach for `Plan` when the list is\n * a proposal the person approves, for `Queue` when it is the agent's running\n * todo list, and for a `Trace` of tool calls when the items are things that\n * *ran*, a Task item is a statement about work, not a record of a call.\n *\n * ## Items wrap; lines do not\n *\n * A `TraceLine` truncates its title to one row, which is right for \"Read\n * src/app.tsx\" and wrong for \"Backfill locale from profile.language, falling\n * back to en\". Items are therefore their own rows with the same mark and colour\n * vocabulary as a Trace line but wrapping text, clamped to three lines so a\n * pasted paragraph cannot take the column. `TaskItemRow` and `TaskItemList` are\n * exported because `Plan` and `Queue` are built from them.\n *\n * ## Status is a claim\n *\n * An item shows a mark and speaks a word only when the host supplied `status`.\n * The \"2 of 4 done\" in the header is derived from those statuses and appears\n * only if at least one item has one; items without a status are counted in the\n * total and not in \"done\" (see `taskProgress`). A task with no items is a plain\n * line: there is nothing to open, and an empty disclosure is a control that\n * does nothing.\n *\n * ## Files are untrusted metadata\n *\n * File chips are `Attachment` chips with no handlers, so they are text: a name\n * is never a link or a path. Past six, the rest sit behind one toggle button\n * whose label changes in place, so keyboard focus survives opening and closing\n * it.\n */\nexport type TaskItemStatus = WorkStatus\n\nexport type TaskFile = Readonly<{\n name: string\n kind?: AttachmentKind\n /** Bytes. */\n size?: number\n}>\n\nexport type TaskItem = Readonly<{\n /** Only needed for the host's own bookkeeping; rows are kept by position. */\n id?: string\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n}>\n\nexport const TASK_ITEM_STATUS_LABELS: Readonly<Record<TaskItemStatus, string>> = WORK_STATUS_LABELS\n\n/** Visible files per item before the rest go behind a toggle. */\nconst VISIBLE_FILES = 6\n/** Characters of item text kept; the rest of a pasted wall is not a todo. */\nconst MAX_TEXT = 1_000\n\nfunction bound(text: string, max: number): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n\n/**\n * How many items are done, or nothing at all when no item carries a status.\n * Items without a status count toward the total: the host did not say they were\n * finished, so they are not.\n */\nexport function taskProgress(\n items: readonly Pick<TaskItem, 'status'>[]\n): Readonly<{ done: number; total: number }> | undefined {\n if (!items.some((item) => item.status !== undefined)) return undefined\n return {\n done: items.filter((item) => item.status === 'complete').length,\n total: items.length,\n }\n}\n\n/** `2 of 4 done`, in words. */\nexport function taskProgressLabel(progress: { done: number; total: number }): string {\n return `${progress.done} of ${progress.total} done`\n}\n\nexport type TaskItemRowProps = Omit<ComponentProps<'li'>, 'children'> & {\n text: string\n description?: string\n status?: TaskItemStatus\n files?: readonly TaskFile[]\n /** Spoken in place of the default status word. */\n statusLabel?: string\n}\n\nexport function TaskItemRow(props: TaskItemRowProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'text',\n 'description',\n 'status',\n 'files',\n 'statusLabel',\n ])\n const [showAllFiles, setShowAllFiles] = createSignal(false)\n const files = () => local.files ?? []\n const shownFiles = () => (showAllFiles() ? files() : files().slice(0, VISIBLE_FILES))\n const hiddenFiles = () => files().length - VISIBLE_FILES\n const text = () => bound(local.text, MAX_TEXT)\n\n return (\n <li\n data-slot=\"task-item\"\n data-status={local.status}\n class={cn('flex min-w-0 gap-2 rounded-md px-1.5 py-0.5', local.class)}\n {...rest}\n >\n <TraceMark\n slot=\"task-item-mark\"\n class=\"mt-0.5\"\n status={local.status ? WORK_TRACE_STATUS[local.status] : undefined}\n completed={local.status === 'complete'}\n icon={\n local.status ? undefined : <span class=\"size-1 rounded-full bg-muted-foreground/60\" />\n }\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <p\n title={text()}\n class={cn(\n 'm-0 line-clamp-3 text-sm [overflow-wrap:anywhere] whitespace-pre-wrap text-foreground',\n {\n 'text-muted-foreground': local.status === 'complete' || local.status === 'skipped',\n 'text-destructive': local.status === 'failed',\n }\n )}\n >\n {text()}\n <Show when={local.status}>\n {(status) => (\n <span class=\"sr-only\"> {local.statusLabel ?? TASK_ITEM_STATUS_LABELS[status()]}</span>\n )}\n </Show>\n </p>\n <Show when={local.description}>\n {(description) => (\n <p class=\"m-0 line-clamp-3 text-xs [overflow-wrap:anywhere] text-muted-foreground/80\">\n {bound(description(), MAX_TEXT)}\n </p>\n )}\n </Show>\n <Show when={files().length > 0}>\n <AttachmentList aria-label=\"Files\" class=\"gap-1\">\n <For each={shownFiles()}>\n {(file) => (\n <li class=\"min-w-0 max-w-full\">\n <Attachment variant=\"chip\" name={file.name} kind={file.kind} size={file.size} />\n </li>\n )}\n </For>\n <Show when={hiddenFiles() > 0}>\n <li class=\"flex items-center\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"2xs\"\n aria-expanded={showAllFiles()}\n onClick={() => setShowAllFiles((value) => !value)}\n >\n {showAllFiles() ? 'Show fewer files' : `Show ${hiddenFiles()} more files`}\n </Button>\n </li>\n </Show>\n </AttachmentList>\n </Show>\n </div>\n </li>\n )\n}\n\nexport type TaskItemListProps = Omit<ComponentProps<'div'>, 'children'> & {\n /** The list's accessible name. A scrolling region without one is an unlabelled tab stop. */\n label: string\n children?: JSX.Element\n}\n\n/**\n * The items, bounded. Two hundred todo items must scroll inside their line and\n * not push the answer out of view; the region is keyboard-focusable and named,\n * which is what makes the overflow reachable without a pointer.\n */\nexport function TaskItemList(props: TaskItemListProps) {\n const [local, rest] = splitProps(props, ['class', 'label', 'children'])\n return (\n <ScrollArea\n role=\"region\"\n aria-label={local.label}\n class={cn('max-h-72', local.class)}\n {...rest}\n >\n <ul role=\"list\" class=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {local.children}\n </ul>\n </ScrollArea>\n )\n}\n\nexport type TaskProps = Omit<\n TraceLineProps,\n 'description' | 'href' | 'onSelect' | 'selectHaspopup' | 'children'\n> & {\n items: readonly TaskItem[]\n /** The item list's accessible name. Defaults to the title when it is a string. */\n itemsLabel?: string\n}\n\nexport function Task(props: TaskProps) {\n const [local, rest] = splitProps(props, ['items', 'itemsLabel', 'icon', 'meta', 'title'])\n const progress = createMemo(() => taskProgress(local.items))\n const derivedMeta = () => {\n const value = progress()\n return value ? taskProgressLabel(value) : undefined\n }\n const label = () =>\n local.itemsLabel ?? (typeof local.title === 'string' ? `${local.title} items` : 'Task items')\n\n const list = () => (\n <TaskItemList label={label()}>\n <Index each={local.items}>\n {(item) => (\n <TaskItemRow\n text={item().text}\n description={item().description}\n status={item().status}\n files={item().files}\n />\n )}\n </Index>\n </TaskItemList>\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <ListChecks />}\n title={local.title}\n meta={local.meta ?? derivedMeta()}\n {...rest}\n >\n {local.items.length > 0 ? list : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,IAAMA,eAAaiB,SAAShB,UAAgB;AAuD5C,IAAawB,0BAAoEV;;AAGjF,IAAMW,gBAAgB;;AAEtB,IAAMC,WAAW;AAEjB,SAASC,MAAMP,MAAcQ,KAAqB;CAChD,OAAOR,KAAKS,SAASD,MAAM,GAAGR,KAAKU,MAAM,GAAGF,GAAG,EAAC,KAAMR;AACxD;;;;;;AAOA,SAAgBW,aACdC,OACuD;CACvD,IAAI,CAACA,MAAMG,MAAMC,SAASA,KAAKd,WAAWe,KAAAA,CAAS,GAAG,OAAOA,KAAAA;CAC7D,OAAO;EACLJ,MAAMD,MAAMM,QAAQF,SAASA,KAAKd,WAAW,UAAU,CAAC,CAACO;EACzDK,OAAOF,MAAMH;CACf;AACF;;AAGA,SAAgBU,kBAAkBC,UAAmD;CACnF,OAAO,GAAGA,SAASP,KAAI,MAAOO,SAASN,MAAK;AAC9C;AAWA,SAAgBQ,YAAYC,OAAyB;CACnD,MAAM,CAACC,OAAOC,QAAQvC,WAAWqC,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;CAAa,CACd;CACD,MAAM,CAACG,cAAcC,mBAAmB7C,aAAa,KAAK;CAC1D,MAAMqB,cAAcqB,MAAMrB,SAAS,CAAA;CACnC,MAAMyB,mBAAoBF,aAAa,IAAIvB,MAAM,IAAIA,MAAM,CAAC,CAACO,MAAM,GAAGL,aAAa;C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EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAanE;AA6SD,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,GAAG,UAAU,CAwJ5E;AAED,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,QAAQ,EAAE,CAK/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASlD;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEnD"}
@@ -183,12 +183,28 @@ function toNumber(token) {
183
183
  return Number(token);
184
184
  }
185
185
  /**
186
+ * SGR results per interned style. Output repeats a handful of sequences
187
+ * (`\x1b[32m`, `\x1b[0m`) on every line, and the style they start from is
188
+ * interned, so a lookup replaces the parse and the intern key on each one.
189
+ */
190
+ var sgrCache = /* @__PURE__ */ new WeakMap();
191
+ var SGR_CACHE_LIMIT = 64;
192
+ /**
186
193
  * Apply one SGR parameter list to a style. Unknown parameters are skipped one
187
194
  * at a time, so a program using a code we ignore still gets the colours around
188
195
  * it. Extended colours (38/48) consume their operands whether or not they are
189
196
  * valid, so a malformed one cannot be re-read as unrelated codes.
190
197
  */
191
198
  function applySgr(current, params) {
199
+ let byParams = sgrCache.get(current);
200
+ const cached = byParams?.get(params);
201
+ if (cached) return cached;
202
+ const next = parseSgr(current, params);
203
+ if (!byParams) sgrCache.set(current, byParams = /* @__PURE__ */ new Map());
204
+ if (byParams.size < SGR_CACHE_LIMIT) byParams.set(params, next);
205
+ return next;
206
+ }
207
+ function parseSgr(current, params) {
192
208
  const style = { ...current };
193
209
  const tokens = params === "" ? ["0"] : params.split(";");
194
210
  for (let i = 0; i < tokens.length; i += 1) {