@adea-ai/ui 0.162.6 → 0.162.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.js +5 -5
  2. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  3. package/dist/components/composites/accent-picker/accent-picker.js +3 -3
  4. package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
  5. package/dist/components/composites/accent-picker/custom-color-popover.js +2 -2
  6. package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
  7. package/dist/components/composites/account-menu/account-menu.js +22 -22
  8. package/dist/components/composites/account-menu/account-menu.js.map +1 -1
  9. package/dist/components/composites/action-button/action-button.js +2 -2
  10. package/dist/components/composites/action-button/action-button.js.map +1 -1
  11. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +3 -3
  12. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  13. package/dist/components/composites/appearance-editor/appearance-choices.js +10 -10
  14. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  15. package/dist/components/composites/appearance-editor/appearance-editor.js +13 -13
  16. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  17. package/dist/components/composites/appearance-editor/appearance-rows.js +12 -12
  18. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  19. package/dist/components/composites/appearance-editor/font-settings-group.js +13 -13
  20. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  21. package/dist/components/composites/appearance-editor/theme-preview.js +1 -1
  22. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  23. package/dist/components/composites/catalog-browser/catalog-browser-group.js +9 -9
  24. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
  25. package/dist/components/composites/catalog-browser/catalog-browser.js +10 -10
  26. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -1
  27. package/dist/components/composites/catalog-browser/catalog-detail.js +1 -1
  28. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -1
  29. package/dist/components/composites/chain-of-thought/chain-of-thought.js +5 -5
  30. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -1
  31. package/dist/components/composites/chat/chat.js +7 -7
  32. package/dist/components/composites/chat/chat.js.map +1 -1
  33. package/dist/components/composites/checkpoint/checkpoint.js +5 -5
  34. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -1
  35. package/dist/components/composites/confirmation/confirmation.js +13 -13
  36. package/dist/components/composites/confirmation/confirmation.js.map +1 -1
  37. package/dist/components/composites/context/context.js +7 -7
  38. package/dist/components/composites/context/context.js.map +1 -1
  39. package/dist/components/composites/file-tree/build-file-tree.js +1 -1
  40. package/dist/components/composites/file-tree/build-file-tree.js.map +1 -1
  41. package/dist/components/composites/file-tree/file-tree.js +9 -9
  42. package/dist/components/composites/file-tree/file-tree.js.map +1 -1
  43. package/dist/components/composites/help-center/help-center.js +5 -5
  44. package/dist/components/composites/help-center/help-center.js.map +1 -1
  45. package/dist/components/composites/icon-picker/icon-picker.js +10 -10
  46. package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
  47. package/dist/components/composites/icon-picker/image-data-url.js.map +1 -1
  48. package/dist/components/composites/icon-picker/shell-icons.js +117 -117
  49. package/dist/components/composites/icon-picker/shell-icons.js.map +1 -1
  50. package/dist/components/composites/inline-citation/inline-citation.js +7 -7
  51. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  52. package/dist/components/composites/list-row/list-row-control.js +1 -1
  53. package/dist/components/composites/list-row/list-row-control.js.map +1 -1
  54. package/dist/components/composites/list-row/list-row.js +2 -2
  55. package/dist/components/composites/list-row/list-row.js.map +1 -1
  56. package/dist/components/composites/message-scroller/message-scroller.js +7 -7
  57. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -1
  58. package/dist/components/composites/message-scroller/scroll-anchor.js +1 -1
  59. package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -1
  60. package/dist/components/composites/model-selector/model-selector.js +12 -12
  61. package/dist/components/composites/model-selector/model-selector.js.map +1 -1
  62. package/dist/components/composites/plan/plan.js +5 -5
  63. package/dist/components/composites/plan/plan.js.map +1 -1
  64. package/dist/components/composites/prompt-input/prompt-input.js +3 -3
  65. package/dist/components/composites/prompt-input/prompt-input.js.map +1 -1
  66. package/dist/components/composites/queue/queue.js +13 -13
  67. package/dist/components/composites/queue/queue.js.map +1 -1
  68. package/dist/components/composites/reasoning/reasoning.js +5 -5
  69. package/dist/components/composites/reasoning/reasoning.js.map +1 -1
  70. package/dist/components/composites/scene-controls/scene-controls.js +16 -16
  71. package/dist/components/composites/scene-controls/scene-controls.js.map +1 -1
  72. package/dist/components/composites/settings/settings-layout.js +2 -2
  73. package/dist/components/composites/settings/settings-layout.js.map +1 -1
  74. package/dist/components/composites/settings/settings-navigation.js +2 -2
  75. package/dist/components/composites/settings/settings-navigation.js.map +1 -1
  76. package/dist/components/composites/settings/settings.js +5 -5
  77. package/dist/components/composites/settings/settings.js.map +1 -1
  78. package/dist/components/composites/sources/sources.js +5 -5
  79. package/dist/components/composites/sources/sources.js.map +1 -1
  80. package/dist/components/composites/stack-trace/parse-stack-trace.js +2 -2
  81. package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -1
  82. package/dist/components/composites/stack-trace/stack-trace.js +10 -10
  83. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
  84. package/dist/components/composites/stat/stat.js +6 -6
  85. package/dist/components/composites/stat/stat.js.map +1 -1
  86. package/dist/components/composites/subagent/subagent.js +5 -5
  87. package/dist/components/composites/subagent/subagent.js.map +1 -1
  88. package/dist/components/composites/suggestion/suggestion.js +2 -2
  89. package/dist/components/composites/suggestion/suggestion.js.map +1 -1
  90. package/dist/components/composites/task/task.js +5 -5
  91. package/dist/components/composites/task/task.js.map +1 -1
  92. package/dist/components/composites/terminal/ansi.js +1 -1
  93. package/dist/components/composites/terminal/ansi.js.map +1 -1
  94. package/dist/components/composites/terminal/terminal.js +18 -18
  95. package/dist/components/composites/terminal/terminal.js.map +1 -1
  96. package/dist/components/composites/test-results/test-results.js +17 -17
  97. package/dist/components/composites/test-results/test-results.js.map +1 -1
  98. package/dist/components/composites/tool/tool.js +5 -5
  99. package/dist/components/composites/tool/tool.js.map +1 -1
  100. package/dist/components/composites/tree/tree.js +6 -6
  101. package/dist/components/composites/tree/tree.js.map +1 -1
  102. package/dist/components/composites/update-dialog/channel-control.js +1 -1
  103. package/dist/components/composites/update-dialog/channel-control.js.map +1 -1
  104. package/dist/components/composites/update-dialog/update-dialog.js +23 -23
  105. package/dist/components/composites/update-dialog/update-dialog.js.map +1 -1
  106. package/dist/components/composites/workspace-mark/workspace-mark.js +2 -2
  107. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  108. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js +6 -6
  109. package/dist/components/composites/workspace-switcher/workspace-reorder-dialog.js.map +1 -1
  110. package/dist/components/composites/workspace-switcher/workspace-switcher.js +11 -11
  111. package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -1
  112. package/dist/components/conversation/atomic/chat-composer.js +1 -1
  113. package/dist/components/conversation/busy-send-button.js +10 -10
  114. package/dist/components/conversation/busy-send-button.js.map +1 -1
  115. package/dist/components/conversation/chat-composer.js +1 -1
  116. package/dist/components/conversation/composer-core.js +1 -1
  117. package/dist/components/conversation/composer-menu.js +2 -2
  118. package/dist/components/conversation/composer-menu.js.map +1 -1
  119. package/dist/components/conversation/conversation-avatar.js +7 -7
  120. package/dist/components/conversation/conversation-avatar.js.map +1 -1
  121. package/dist/components/conversation/conversation-pane.js +1 -1
  122. package/dist/components/conversation/conversation-pane.js.map +1 -1
  123. package/dist/components/conversation/conversation-surface.js +5 -5
  124. package/dist/components/conversation/conversation-surface.js.map +1 -1
  125. package/dist/components/conversation/internal/chat-composer-shell.js +9 -9
  126. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  127. package/dist/components/conversation/message-composer.js +9 -9
  128. package/dist/components/conversation/message-composer.js.map +1 -1
  129. package/dist/components/conversation/message-row.js +13 -13
  130. package/dist/components/conversation/message-row.js.map +1 -1
  131. package/dist/components/conversation/paste-token-editor.js +1 -1
  132. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  133. package/dist/components/conversation/scroll-follow.js +1 -1
  134. package/dist/components/conversation/thread-panel.js +5 -5
  135. package/dist/components/conversation/thread-panel.js.map +1 -1
  136. package/dist/components/conversation/transcript-composition.js +5 -5
  137. package/dist/components/conversation/transcript-composition.js.map +1 -1
  138. package/dist/components/layout/app-shell/app-shell.js +1 -1
  139. package/dist/components/layout/app-shell/app-shell.js.map +1 -1
  140. package/dist/components/layout/app-shell/skip-link.js +1 -1
  141. package/dist/components/layout/app-shell/skip-link.js.map +1 -1
  142. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +2 -2
  143. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  144. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +1 -1
  145. package/dist/components/layout/floating-preview/floating-preview.js +7 -7
  146. package/dist/components/layout/floating-preview/floating-preview.js.map +1 -1
  147. package/dist/components/layout/orbit-layout/orbit-layout.js +1 -1
  148. package/dist/components/layout/orbit-layout/orbit-layout.js.map +1 -1
  149. package/dist/components/layout/page/page.js +2 -2
  150. package/dist/components/layout/page/page.js.map +1 -1
  151. package/dist/components/layout/panel/panel.js +1 -1
  152. package/dist/components/layout/panel/panel.js.map +1 -1
  153. package/dist/components/layout/pixel-pane/pixel-pane.js +1 -1
  154. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js +5 -5
  155. package/dist/components/layout/pixel-resize-handle/pixel-resize-handle.js.map +1 -1
  156. package/dist/components/layout/shell-rail/shell-rail.js +5 -5
  157. package/dist/components/layout/shell-rail/shell-rail.js.map +1 -1
  158. package/dist/components/layout/shell-top-bar/shell-top-bar.js +2 -2
  159. package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -1
  160. package/dist/components/layout/side-rail/side-rail.js +2 -2
  161. package/dist/components/layout/side-rail/side-rail.js.map +1 -1
  162. package/dist/components/layout/sidebar-nav/sidebar-nav-resize-handle.js +1 -1
  163. package/dist/components/layout/sidebar-nav/sidebar-nav.js +5 -5
  164. package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
  165. package/dist/components/layout/split-layout/pane-focus.js.map +1 -1
  166. package/dist/components/layout/split-layout/resize-controller-core-retry.js +1 -1
  167. package/dist/components/layout/split-layout/resize-controller-core-retry.js.map +1 -1
  168. package/dist/components/layout/split-layout/resize-controller-core.js +1 -1
  169. package/dist/components/layout/split-layout/resize-controller-core.js.map +1 -1
  170. package/dist/components/layout/split-layout/split-layout.js +7 -7
  171. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  172. package/dist/components/layout/status-bar/status-bar.js +1 -1
  173. package/dist/components/layout/status-bar/status-bar.js.map +1 -1
  174. package/dist/components/layout/top-bar/top-bar.js +5 -5
  175. package/dist/components/layout/top-bar/top-bar.js.map +1 -1
  176. package/dist/components/layout/virtual-window/virtual-window.js +1 -1
  177. package/dist/components/layout/virtual-window/virtual-window.js.map +1 -1
  178. package/dist/components/motion/presence.js +1 -1
  179. package/dist/components/theme/appearance-panel.js +3 -3
  180. package/dist/components/theme/appearance-panel.js.map +1 -1
  181. package/dist/components/theme/lazy.js +3 -3
  182. package/dist/components/theme/lazy.js.map +1 -1
  183. package/dist/components/theme/script-projection.js +1 -1
  184. package/dist/components/theme/theme-catalogue-source.js +1 -1
  185. package/dist/components/theme/theme-document.js.map +1 -1
  186. package/dist/components/theme/theme-mode-toggle.js +7 -7
  187. package/dist/components/theme/theme-mode-toggle.js.map +1 -1
  188. package/dist/components/theme/theme-picker.js +2 -2
  189. package/dist/components/theme/theme-picker.js.map +1 -1
  190. package/dist/components/theme/theme-provider-value.js +1 -1
  191. package/dist/components/theme/theme-provider-value.js.map +1 -1
  192. package/dist/components/theme/theme-provider.js +1 -1
  193. package/dist/components/theme/theme-toggle.js +7 -7
  194. package/dist/components/theme/theme-toggle.js.map +1 -1
  195. package/dist/components/ui/accordion/accordion.js +13 -13
  196. package/dist/components/ui/accordion/accordion.js.map +1 -1
  197. package/dist/components/ui/alert/alert.js +12 -12
  198. package/dist/components/ui/alert/alert.js.map +1 -1
  199. package/dist/components/ui/alert-dialog/alert-dialog.js +14 -14
  200. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  201. package/dist/components/ui/annotation-surface/annotation-surface.js +2 -2
  202. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
  203. package/dist/components/ui/aspect-ratio/aspect-ratio.js +1 -1
  204. package/dist/components/ui/aspect-ratio/aspect-ratio.js.map +1 -1
  205. package/dist/components/ui/attachment/attachment.js +16 -16
  206. package/dist/components/ui/attachment/attachment.js.map +1 -1
  207. package/dist/components/ui/avatar/avatar.js +1 -1
  208. package/dist/components/ui/avatar/avatar.js.map +1 -1
  209. package/dist/components/ui/badge/badge.js +2 -2
  210. package/dist/components/ui/badge/badge.js.map +1 -1
  211. package/dist/components/ui/board/board.js +2 -2
  212. package/dist/components/ui/board/board.js.map +1 -1
  213. package/dist/components/ui/breadcrumb/breadcrumb.js +7 -7
  214. package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
  215. package/dist/components/ui/bubble/bubble.js +2 -2
  216. package/dist/components/ui/bubble/bubble.js.map +1 -1
  217. package/dist/components/ui/button/button.js +2 -2
  218. package/dist/components/ui/button-group/button-group.js +2 -2
  219. package/dist/components/ui/button-group/button-group.js.map +1 -1
  220. package/dist/components/ui/calendar/calendar.js +8 -8
  221. package/dist/components/ui/calendar/calendar.js.map +1 -1
  222. package/dist/components/ui/callout/callout.js +2 -2
  223. package/dist/components/ui/callout/callout.js.map +1 -1
  224. package/dist/components/ui/card/card.js +2 -2
  225. package/dist/components/ui/card/card.js.map +1 -1
  226. package/dist/components/ui/carousel/carousel.js +8 -8
  227. package/dist/components/ui/carousel/carousel.js.map +1 -1
  228. package/dist/components/ui/chart/chart.js +2 -2
  229. package/dist/components/ui/chart/chart.js.map +1 -1
  230. package/dist/components/ui/checkbox/checkbox.js +6 -6
  231. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  232. package/dist/components/ui/code-block/code-block.js +6 -6
  233. package/dist/components/ui/code-block/code-block.js.map +1 -1
  234. package/dist/components/ui/collapsible/collapsible.js +7 -7
  235. package/dist/components/ui/collapsible/collapsible.js.map +1 -1
  236. package/dist/components/ui/combobox/combobox.js +21 -21
  237. package/dist/components/ui/combobox/combobox.js.map +1 -1
  238. package/dist/components/ui/combobox/value-combobox.js +1 -1
  239. package/dist/components/ui/command/command.js +23 -23
  240. package/dist/components/ui/command/command.js.map +1 -1
  241. package/dist/components/ui/context-menu/context-menu.js +2 -2
  242. package/dist/components/ui/detail-panel/detail-panel.js +5 -5
  243. package/dist/components/ui/detail-panel/detail-panel.js.map +1 -1
  244. package/dist/components/ui/dialog/dialog-layer.js +2 -2
  245. package/dist/components/ui/dialog/dialog-layer.js.map +1 -1
  246. package/dist/components/ui/dialog/dialog.js +21 -21
  247. package/dist/components/ui/dialog/dialog.js.map +1 -1
  248. package/dist/components/ui/diff-block/diff-block.js +2 -2
  249. package/dist/components/ui/diff-block/diff-block.js.map +1 -1
  250. package/dist/components/ui/drawer/drawer.js +14 -14
  251. package/dist/components/ui/drawer/drawer.js.map +1 -1
  252. package/dist/components/ui/dropdown-menu/dropdown-menu.js +3 -3
  253. package/dist/components/ui/dropdown-menu/menu-parts.js +10 -10
  254. package/dist/components/ui/dropdown-menu/menu-parts.js.map +1 -1
  255. package/dist/components/ui/empty/empty-state.js +5 -5
  256. package/dist/components/ui/empty/empty-state.js.map +1 -1
  257. package/dist/components/ui/empty/empty.js +1 -1
  258. package/dist/components/ui/empty/empty.js.map +1 -1
  259. package/dist/components/ui/entity-icon/entity-icon.js +2 -2
  260. package/dist/components/ui/entity-icon/entity-icon.js.map +1 -1
  261. package/dist/components/ui/field/field.js +14 -14
  262. package/dist/components/ui/field/field.js.map +1 -1
  263. package/dist/components/ui/field/number-field.js +2 -2
  264. package/dist/components/ui/field/number-field.js.map +1 -1
  265. package/dist/components/ui/hover-card/hover-card.js +10 -10
  266. package/dist/components/ui/hover-card/hover-card.js.map +1 -1
  267. package/dist/components/ui/input/input-control.js +1 -1
  268. package/dist/components/ui/input/input-control.js.map +1 -1
  269. package/dist/components/ui/input/input.js +2 -2
  270. package/dist/components/ui/input/input.js.map +1 -1
  271. package/dist/components/ui/input-group/input-group.js +2 -2
  272. package/dist/components/ui/input-group/input-group.js.map +1 -1
  273. package/dist/components/ui/input-group/secret-input-group.js +2 -2
  274. package/dist/components/ui/input-otp/input-otp.js +2 -2
  275. package/dist/components/ui/input-otp/input-otp.js.map +1 -1
  276. package/dist/components/ui/item/item.js +2 -2
  277. package/dist/components/ui/item/item.js.map +1 -1
  278. package/dist/components/ui/kbd/kbd.js +2 -2
  279. package/dist/components/ui/kbd/kbd.js.map +1 -1
  280. package/dist/components/ui/label/label.js +1 -1
  281. package/dist/components/ui/label/label.js.map +1 -1
  282. package/dist/components/ui/marker/marker.js +2 -2
  283. package/dist/components/ui/marker/marker.js.map +1 -1
  284. package/dist/components/ui/menubar/menubar.js +7 -7
  285. package/dist/components/ui/menubar/menubar.js.map +1 -1
  286. package/dist/components/ui/message/message.js +3 -3
  287. package/dist/components/ui/message/message.js.map +1 -1
  288. package/dist/components/ui/modal-dialog/modal-dialog.js +2 -2
  289. package/dist/components/ui/modal-dialog/modal-dialog.js.map +1 -1
  290. package/dist/components/ui/native-select/native-select.js +5 -5
  291. package/dist/components/ui/native-select/native-select.js.map +1 -1
  292. package/dist/components/ui/navigation-menu/navigation-menu.js +18 -18
  293. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  294. package/dist/components/ui/pagination/pagination.js +28 -28
  295. package/dist/components/ui/pagination/pagination.js.map +1 -1
  296. package/dist/components/ui/popover/popover.js +15 -15
  297. package/dist/components/ui/popover/popover.js.map +1 -1
  298. package/dist/components/ui/progress/progress.js +5 -5
  299. package/dist/components/ui/progress/progress.js.map +1 -1
  300. package/dist/components/ui/questionnaire/questionnaire.js +10 -10
  301. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
  302. package/dist/components/ui/radio-group/radio-group.js +9 -9
  303. package/dist/components/ui/radio-group/radio-group.js.map +1 -1
  304. package/dist/components/ui/resizable/resizable.js +11 -11
  305. package/dist/components/ui/resizable/resizable.js.map +1 -1
  306. package/dist/components/ui/scroll-area/scroll-area.js +1 -1
  307. package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
  308. package/dist/components/ui/select/select.js +21 -21
  309. package/dist/components/ui/select/select.js.map +1 -1
  310. package/dist/components/ui/separator/separator.js +5 -5
  311. package/dist/components/ui/separator/separator.js.map +1 -1
  312. package/dist/components/ui/sheet/sheet.js +6 -6
  313. package/dist/components/ui/sheet/sheet.js.map +1 -1
  314. package/dist/components/ui/skeleton/skeleton.js +1 -1
  315. package/dist/components/ui/skeleton/skeleton.js.map +1 -1
  316. package/dist/components/ui/slider/slider.js +5 -5
  317. package/dist/components/ui/slider/slider.js.map +1 -1
  318. package/dist/components/ui/spinner/spinner.js +5 -5
  319. package/dist/components/ui/spinner/spinner.js.map +1 -1
  320. package/dist/components/ui/status-chip/status-chip.js +2 -2
  321. package/dist/components/ui/status-chip/status-chip.js.map +1 -1
  322. package/dist/components/ui/switch/switch.js +4 -4
  323. package/dist/components/ui/switch/switch.js.map +1 -1
  324. package/dist/components/ui/table/table.js +1 -1
  325. package/dist/components/ui/table/table.js.map +1 -1
  326. package/dist/components/ui/tabs/tabs.js +7 -7
  327. package/dist/components/ui/tabs/tabs.js.map +1 -1
  328. package/dist/components/ui/text-link/text-link.js +1 -1
  329. package/dist/components/ui/text-link/text-link.js.map +1 -1
  330. package/dist/components/ui/textarea/textarea.js +2 -2
  331. package/dist/components/ui/textarea/textarea.js.map +1 -1
  332. package/dist/components/ui/toast/toast.js +7 -7
  333. package/dist/components/ui/toast/toast.js.map +1 -1
  334. package/dist/components/ui/toggle/toggle.js +6 -6
  335. package/dist/components/ui/toggle/toggle.js.map +1 -1
  336. package/dist/components/ui/toggle-group/toggle-group.js +7 -8
  337. package/dist/components/ui/toggle-group/toggle-group.js.map +1 -1
  338. package/dist/components/ui/tooltip/deferred-tooltip.js +6 -6
  339. package/dist/components/ui/tooltip/deferred-tooltip.js.map +1 -1
  340. package/dist/components/ui/tooltip/lazy-tooltip.js +2 -2
  341. package/dist/components/ui/tooltip/tooltip.js +10 -10
  342. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  343. package/dist/components/ui/trace/trace.js +19 -19
  344. package/dist/components/ui/trace/trace.js.map +1 -1
  345. package/dist/components/ui/typography/typography.js +2 -2
  346. package/dist/lib/accent-presets.js +1 -1
  347. package/dist/lib/accent-roles.js +2 -2
  348. package/dist/lib/async-action.js +1 -1
  349. package/dist/lib/create-poll.js +1 -1
  350. package/dist/lib/create-poll.js.map +1 -1
  351. package/dist/lib/external-link.js +1 -1
  352. package/dist/lib/external-link.js.map +1 -1
  353. package/dist/lib/fast-icon.js +1 -1
  354. package/dist/lib/theme-css.js +1 -1
  355. package/dist/lib/theme-engine-light.js +1 -1
  356. package/dist/lib/theme-projection.js +2 -2
  357. package/dist/lib/theme-records.js +1 -1
  358. package/dist/lib/themes.js +1 -1
  359. package/dist/lib/themes.js.map +1 -1
  360. package/dist/lib/tooltip-focus-gate.js.map +1 -1
  361. package/dist/lib/utils.js +1 -1
  362. package/dist/vite/source-parser.js +1 -1
  363. package/dist/vite/tailwind-sources.js +1 -1
  364. package/package.json +7 -7
@@ -1,3 +1,6 @@
1
+ import { className, createComponent, effect, insert, memo, readShallow, setAttribute, setStyleProperty, spread, template } from "@solidjs/web";
2
+ import { Check as Check$1, CircleCheck as CircleCheck$1, CircleMinus as CircleMinus$1, CircleX as CircleX$1, Copy as Copy$1, FlaskConical as FlaskConical$1, LoaderCircle as LoaderCircle$1 } from "@lucide/solid";
3
+ import { For, Show, createEffect, createMemo, createSignal, omit } from "solid-js";
1
4
  import { createCopyFeedback } from "../../../lib/clipboard.js";
2
5
  import { cn } from "../../../lib/utils.js";
3
6
  import { Button } from "../../ui/button/button.js";
@@ -6,9 +9,6 @@ import { Trace, TraceDetail, TraceLine } from "../../ui/trace/trace.js";
6
9
  import { StackTrace } from "../stack-trace/stack-trace.js";
7
10
  import { boundedEntries, describeCount, firstFailureRenderPath, formatDuration, listedCounts, reconcileCounts, sameFailure, siblingKey, suiteState } from "./test-results-model.js";
8
11
  import { fastIcon } from "../../../lib/fast-icon.js";
9
- import { className, createComponent, effect, insert, memo, readShallow, setAttribute, setStyleProperty, spread, template } from "@solidjs/web";
10
- import { Check, CircleCheck, CircleMinus, CircleX, Copy, FlaskConical, LoaderCircle } from "@lucide/solid";
11
- import { For, Show, createEffect, createMemo, createSignal, omit } from "solid-js";
12
12
  // src/components/composites/test-results/test-results.tsx
13
13
  var _tmpl$ = /* @__PURE__ */ template(`<span class="flex items-center gap-1 whitespace-nowrap"><!><!>`);
14
14
  var _tmpl$2 = /* @__PURE__ */ template(`<div aria-hidden=true data-slot=test-results-bar class="flex h-1.5 w-full gap-px overflow-hidden rounded-full bg-muted">`);
@@ -25,24 +25,24 @@ var _tmpl$12 = /* @__PURE__ */ template(`<span class=text-muted-foreground> test
25
25
  var _tmpl$13 = /* @__PURE__ */ template(`<span class=text-muted-foreground> tests reported (<!> listed)`);
26
26
  var _tmpl$14 = /* @__PURE__ */ template(`<span class=text-muted-foreground>in `);
27
27
  var _tmpl$15 = /* @__PURE__ */ template(`<p class="m-0 text-xs text-muted-foreground">Counts are from the tests listed below.`);
28
- var Check$1 = fastIcon(Check);
29
- var CircleCheck$1 = fastIcon(CircleCheck);
30
- var CircleMinus$1 = fastIcon(CircleMinus);
31
- var CircleX$1 = fastIcon(CircleX);
32
- var Copy$1 = fastIcon(Copy);
33
- var FlaskConical$1 = fastIcon(FlaskConical);
34
- var LoaderCircle$1 = fastIcon(LoaderCircle);
28
+ var Check = fastIcon(Check$1);
29
+ var CircleCheck = fastIcon(CircleCheck$1);
30
+ var CircleMinus = fastIcon(CircleMinus$1);
31
+ var CircleX = fastIcon(CircleX$1);
32
+ var Copy = fastIcon(Copy$1);
33
+ var FlaskConical = fastIcon(FlaskConical$1);
34
+ var LoaderCircle = fastIcon(LoaderCircle$1);
35
35
  var TEST_RESULTS_LIST_LIMIT = 50;
36
36
  var OUTCOME_ICON = {
37
- failed: () => createComponent(CircleX$1, {
37
+ failed: () => createComponent(CircleX, {
38
38
  "aria-hidden": "true",
39
39
  class: "size-3.5 text-destructive"
40
40
  }),
41
- passed: () => createComponent(CircleCheck$1, {
41
+ passed: () => createComponent(CircleCheck, {
42
42
  "aria-hidden": "true",
43
43
  class: "size-3.5 text-success"
44
44
  }),
45
- skipped: () => createComponent(CircleMinus$1, {
45
+ skipped: () => createComponent(CircleMinus, {
46
46
  "aria-hidden": "true",
47
47
  class: "size-3.5 text-muted-foreground"
48
48
  })
@@ -272,10 +272,10 @@ function FailureMessage(props) {
272
272
  return copied();
273
273
  },
274
274
  get fallback() {
275
- return createComponent(Copy$1, { "aria-hidden": "true" });
275
+ return createComponent(Copy, { "aria-hidden": "true" });
276
276
  },
277
277
  get children() {
278
- return createComponent(Check$1, { "aria-hidden": "true" });
278
+ return createComponent(Check, { "aria-hidden": "true" });
279
279
  }
280
280
  }), memo(() => {
281
281
  return copied() ? "Copied" : "Copy message";
@@ -408,7 +408,7 @@ function SuiteLine(props) {
408
408
  };
409
409
  return createComponent(TraceLine, {
410
410
  get icon() {
411
- return createComponent(FlaskConical$1, {});
411
+ return createComponent(FlaskConical, {});
412
412
  },
413
413
  get title() {
414
414
  return suite().name;
@@ -552,7 +552,7 @@ function TestResults(props) {
552
552
  return _c$5() ? (() => {
553
553
  var _el$24 = _tmpl$11();
554
554
  var _el$25 = _el$24.firstChild;
555
- insert(_el$24, createComponent(LoaderCircle$1, {
555
+ insert(_el$24, createComponent(LoaderCircle, {
556
556
  "aria-hidden": "true",
557
557
  class: "size-3.5 motion-safe:animate-spin"
558
558
  }), _el$25);
@@ -1 +1 @@
1
- {"version":3,"file":"test-results.js","names":["<CircleX aria-hidden=\"true\" class=\"size-3.5 text-destructive\" />","class=\"size-3.5 text-destructive\"","<CircleCheck aria-hidden=\"true\" class=\"size-3.5 text-success\" />","class=\"size-3.5 text-success\"","<CircleMinus aria-hidden=\"true\" class=\"size-3.5 text-muted-foreground\" />","class=\"size-3.5 text-muted-foreground\"","<span class=\"flex items-center gap-1 whitespace-nowrap\" data-outcome={props.line.outcome}>\n {OUTCOME_ICON[props.line.outcome]()}\n {describeCount(props.line)}\n </span>","<Show when={visible().length > 0}>\n <div\n aria-hidden=\"true\"\n data-slot=\"test-results-bar\"\n class=\"flex h-1.5 w-full gap-px overflow-hidden rounded-full bg-muted\"\n >\n <For each={visible()}>\n {(line) => (\n <span\n class={cn('min-w-1', SEGMENT_CLASS[line.outcome])}\n style={{ flex: `${line.count} 1 0` }}\n />\n )}\n </For>\n </div>\n </Show>","<For each={visible()}>\n {(line) => (\n <span\n class={cn('min-w-1', SEGMENT_CLASS[line.outcome])}\n style={{ flex: `${line.count} 1 0` }}\n />\n )}\n </For>","flex: `${line.count} 1 0`","<For each={visibleKeys()}>\n {(key) => {\n const entry = createMemo(() => page().byKey.get(key)!)\n return props.children(\n () => entry().item,\n () => entry().index,\n key\n )\n }}\n </For>","<Show when={hidden() > 0}>\n <li class=\"px-1.5 py-0.5\">\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setShown(shown() + props.limit)}>\n Show {Math.min(hidden(), props.limit).toLocaleString()} more {props.noun} (\n {hidden().toLocaleString()} hidden)\n </Button>\n </li>\n </Show>","<Button variant=\"ghost\" size=\"2xs\" onClick={() => setShown(shown() + props.limit)}>\n Show {Math.min(hidden(), props.limit).toLocaleString()} more {props.noun} (\n {hidden().toLocaleString()} hidden)\n </Button>","variant=\"ghost\"","size=\"2xs\"","onClick={() => setShown(shown() + props.limit)}","Math.min(hidden(), props.limit).toLocaleString()","props.noun","hidden().toLocaleString()","<Show when={clipped()}>\n <div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground\">\n <span class=\"italic\">\n <Show\n when={!all()}\n fallback={`All ${props.text.length.toLocaleString()} characters shown.`}\n >\n Showing the first {cut().toLocaleString()} of {props.text.length.toLocaleString()}{' '}\n characters (copy has all of it).\n </Show>\n </span>\n <Show when={!all()}>\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>\n </Show>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>\n </div>\n </Show>","{cut().toLocaleString()}","{props.text.length.toLocaleString()}","<Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>","onClick={() => setAll(true)}","props.text.length.toLocaleString()","<div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground\">\n <span class=\"italic\">\n <Show\n when={!all()}\n fallback={`All ${props.text.length.toLocaleString()} characters shown.`}\n >\n Showing the first {cut().toLocaleString()} of {props.text.length.toLocaleString()}{' '}\n characters (copy has all of it).\n </Show>\n </span>\n <Show when={!all()}>\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>\n </Show>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>\n </div>","<Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>","onClick={() => void copy()}","<Show when={copied()} fallback={<Copy aria-hidden=\"true\" />}>\n <Check aria-hidden=\"true\" />\n </Show>","<Copy aria-hidden=\"true\" />","<Check aria-hidden=\"true\" />","copied() ? 'Copied' : 'Copy message'","<TraceLine\n title={test().name}\n status={state()?.status}\n statusLabel={state()?.label}\n meta={formatDuration(test().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {hasDetail() ? (\n // A closed test builds nothing: the body is made when it is opened, so a diff or\n // stack is not parsed for every test of an open suite.\n <Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>\n ) : undefined}\n </TraceLine>","onOpenChange={handleOpenChange}","{hasDetail() ? (\n // A closed test builds nothing: the body is made when it is opened, so a diff or\n // stack is not parsed for every test of an open suite.\n <Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>\n ) : undefined}","<Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>","<TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>","class=\"flex flex-col gap-2\"","<Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>","<FailureMessage text={test().message!} />","<Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>","<DiffBlock patch={test().diff!} complete title=\"Expected and received\" />","title=\"Expected and received\"","<Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>","<StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />","<TraceLine\n icon={<FlaskConical />}\n title={suite().name}\n description={description()}\n status={\n state() === 'failed'\n ? 'error'\n : state() === 'running'\n ? 'running'\n : state() === 'passed'\n ? 'success'\n : undefined\n }\n statusLabel={\n state() === 'failed'\n ? 'Has failing tests'\n : state() === 'passed'\n ? 'All listed tests passed'\n : undefined\n }\n meta={formatDuration(suite().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {children() ? (\n <div>\n <Show when={open()}>\n <Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </div>\n ) : undefined}\n </TraceLine>","<FlaskConical />","state() === 'failed'\n ? 'error'\n : state() === 'running'\n ? 'running'\n : state() === 'passed'\n ? 'success'\n : undefined","state() === 'failed'\n ? 'Has failing tests'\n : state() === 'passed'\n ? 'All listed tests passed'\n : undefined","{children() ? (\n <div>\n <Show when={open()}>\n <Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </div>\n ) : undefined}","<Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>","size=\"sm\"","<Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>","itemKey={siblingKey}","noun=\"tests\"","<TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />","keyed={key}","holdsFailure() ? failure() : undefined","<Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>","noun=\"suites\"","<SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />","suite={nested}","<LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />","class=\"size-3.5 motion-safe:animate-spin\"","<span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>","<div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>","<For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>","<CountReadout line={line} />","<span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>","<Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>","<span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>","<SummaryBar lines={counts().lines} />","<div class=\"flex flex-col gap-1.5\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>\n <SummaryBar lines={counts().lines} />\n <Show when={counts().basis === 'listed' && counts().lines.length > 0}>\n <p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>\n </Show>\n </div>","<p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>","<Show when={local.suites.length > 0}>\n <Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>","<Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>","<Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>","<SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />","depth={0}","<p class=\"m-0 text-sm text-muted-foreground\">No test results</p>","<section\n data-slot=\"test-results\"\n aria-label={local.label ?? 'Test results'}\n aria-busy={local.running ? 'true' : undefined}\n class={cn('flex min-w-0 flex-col gap-2', local.class)}\n {...rest}\n >\n <Show\n when={!nothing()}\n fallback={<p class=\"m-0 text-sm text-muted-foreground\">No test results</p>}\n >\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>\n <SummaryBar lines={counts().lines} />\n <Show when={counts().basis === 'listed' && counts().lines.length > 0}>\n <p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>\n </Show>\n </div>\n <Show when={local.suites.length > 0}>\n <Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </Show>\n </section>","Check","LucideCheck","CircleCheck","LucideCircleCheck","CircleMinus","LucideCircleMinus","CircleX","LucideCircleX","Copy","LucideCopy","FlaskConical","LucideFlaskConical","LoaderCircle","LucideLoaderCircle","_$readShallow","_$setStyleProperty"],"sources":["../../../../src/components/composites/test-results/test-results.tsx"],"sourcesContent":["import {\n Check as LucideCheck,\n CircleCheck as LucideCircleCheck,\n CircleMinus as LucideCircleMinus,\n CircleX as LucideCircleX,\n Copy as LucideCopy,\n FlaskConical as LucideFlaskConical,\n LoaderCircle as LucideLoaderCircle,\n} from '@lucide/solid'\nimport { createMemo, createEffect, createSignal, For, Show, omit, type Accessor } from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { createCopyFeedback } from '#lib/clipboard'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button'\nimport { DiffBlock } from '../../ui/diff-block'\nimport { Trace, TraceDetail, TraceLine, type TraceStatus } from '../../ui/trace'\nimport { StackTrace, type StackTraceProps } from '../stack-trace'\nimport {\n boundedEntries,\n describeCount,\n firstFailureRenderPath,\n formatDuration,\n listedCounts,\n reconcileCounts,\n sameFailure,\n siblingKey,\n suiteState,\n type CountLine,\n type TestCase,\n type TestCaseStatus,\n type TestOutcome,\n type TestSuite,\n type TestSummary,\n type FirstFailureRenderPath,\n} from './test-results-model'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst CircleCheck = fastIcon(LucideCircleCheck)\nconst CircleMinus = fastIcon(LucideCircleMinus)\nconst CircleX = fastIcon(LucideCircleX)\nconst Copy = fastIcon(LucideCopy)\nconst FlaskConical = fastIcon(LucideFlaskConical)\nconst LoaderCircle = fastIcon(LucideLoaderCircle)\n\n/**\n * TestResults.\n *\n * A test run: how it went in words and in a segmented bar, then the suites it\n * ran as `Trace` lines, each opening onto its tests, and a failing test opening\n * onto its message, diff and stack. It is for a run the host can structure; reach\n * for `Terminal` when all there is to show is the command's output, and for\n * `StackTrace` alone when one call failed outside a test.\n *\n * ## Counts are claims\n *\n * Nothing is computed that the host did not supply data for, and nothing the host\n * supplied is quietly recomputed. `summary` is the host's own tally and is shown\n * as given. If tests are listed and their number for an outcome does not match, the\n * listed number is shown beside it, \"40 passed (2 listed)\", which is also how a\n * host that lists only its failures reads. Without a `summary` the counts shown are\n * those of the tests listed, and the component says so; it does not present them as\n * the run's totals. A suite is marked failed or passed only from the tests listed in\n * it, and its spoken label says \"listed\" so it claims no more than that.\n *\n * ## Not colour-only\n *\n * The bar is decoration: every segment has a counterpart in the words beside it,\n * each with its own shape (a cross, a tick, a dash). Segments are separated by a\n * gap and never narrower than a visible sliver, so one failure in five thousand\n * tests is still on the bar.\n *\n * ## Bounded\n *\n * Suites and tests are listed `listLimit` at a time with \"show more\", and a suite's\n * tests are not rendered until it is open. The first failure in reading order opens\n * when its row is visible; a failure beyond a \"show more\" boundary stays unmounted\n * until its page is revealed. When a running result first reports a failure, its\n * suite and test open once. Later updates preserve the user's disclosure choices.\n *\n * Failure details are text: the message is a `pre`, the diff goes to `DiffBlock`\n * and the stack to `StackTrace`. If a stack already begins with the message, pass\n * only the stack; nothing here de-duplicates what the host sends.\n */\nexport type TestResultsProps = Omit<ComponentProps<'section'>, 'children'> & {\n suites: readonly TestSuite[]\n /** The host's own counts. Shown as given; see the component comment. */\n summary?: TestSummary\n /** The run is still going. */\n running?: boolean\n /** Suites, or tests within a suite, listed before \"show more\". Default 50. */\n listLimit?: number\n /** Passed to each failure's `StackTrace`. */\n onOpenFrame?: StackTraceProps['onOpenFrame']\n /** The section's accessible name. Default \"Test results\". */\n label?: string\n}\n\nexport const TEST_RESULTS_LIST_LIMIT = 50\n\nconst OUTCOME_ICON: Readonly<Record<TestOutcome, () => JSX.Element>> = {\n failed: () => <CircleX aria-hidden=\"true\" class=\"size-3.5 text-destructive\" />,\n passed: () => <CircleCheck aria-hidden=\"true\" class=\"size-3.5 text-success\" />,\n skipped: () => <CircleMinus aria-hidden=\"true\" class=\"size-3.5 text-muted-foreground\" />,\n}\n\nfunction CountReadout(props: { line: CountLine }) {\n return (\n <span class=\"flex items-center gap-1 whitespace-nowrap\" data-outcome={props.line.outcome}>\n {OUTCOME_ICON[props.line.outcome]()}\n {describeCount(props.line)}\n </span>\n )\n}\n\n// Segments are drawn in this order so the bar reads the same in every run.\nconst SEGMENT_CLASS: Readonly<Record<TestOutcome, string>> = {\n failed: 'bg-destructive',\n passed: 'bg-success',\n skipped: 'bg-muted-foreground/40',\n}\n\nfunction SummaryBar(props: { lines: readonly CountLine[] }) {\n const visible = () => props.lines.filter((line) => line.count > 0)\n return (\n <Show when={visible().length > 0}>\n <div\n aria-hidden=\"true\"\n data-slot=\"test-results-bar\"\n class=\"flex h-1.5 w-full gap-px overflow-hidden rounded-full bg-muted\"\n >\n <For each={visible()}>\n {(line) => (\n <span\n class={cn('min-w-1', SEGMENT_CLASS[line.outcome])}\n style={{ flex: `${line.count} 1 0` }}\n />\n )}\n </For>\n </div>\n </Show>\n )\n}\n\nconst TRACE_STATUS: Readonly<Record<TestCaseStatus, { status: TraceStatus; label: string }>> = {\n passed: { status: 'success', label: 'Passed' },\n failed: { status: 'error', label: 'Failed' },\n skipped: { status: 'cancelled', label: 'Skipped' },\n running: { status: 'running', label: 'Running' },\n pending: { status: 'pending', label: 'Not run yet' },\n}\n\n/**\n * Keep keyboard focus through a reorder. Solid moves a keyed row's node instead\n * of replacing it, and a browser blurs a focused element that is moved, so an\n * immutable reorder would drop the reader's place onto the body even though the\n * node and its open state survive. The focused element is noted just before the\n * rows move and given focus back just after, but only when nothing else has taken\n * focus meanwhile, and only inside a test run, so a reader who has moved on is\n * never pulled back and an unrelated element is never refocused.\n */\nfunction keepFocusThroughReorder(keys: Accessor<readonly string[]>) {\n // The compute runs before the rows move and the apply after, so the compute\n // notes the focused element and the apply hands focus back to it.\n createEffect(\n () => {\n keys()\n const active = typeof document === 'undefined' ? null : document.activeElement\n return active instanceof HTMLElement && active.closest('[data-slot=\"test-results\"]')\n ? active\n : undefined\n },\n (element) => {\n if (!element || !element.isConnected) return\n const active = document.activeElement\n if (active === null || active === document.body) element.focus({ preventScroll: true })\n }\n )\n}\n\n/** A list that shows its first `limit` items and offers the rest. */\nfunction Bounded<T>(props: {\n items: readonly T[]\n itemKey: (item: T, index: number) => string\n limit: number\n noun: string\n children: (item: Accessor<T>, index: Accessor<number>, key: string) => JSX.Element\n}) {\n const [shown, setShown] = createSignal(() => props.limit)\n const page = createMemo(() => boundedEntries(props.items, shown(), props.itemKey))\n const visible = () => page().entries\n const visibleKeys = createMemo(() => visible().map((entry) => entry.key))\n keepFocusThroughReorder(visibleKeys)\n const hidden = () => props.items.length - visible().length\n return (\n <>\n <For each={visibleKeys()}>\n {(key) => {\n const entry = createMemo(() => page().byKey.get(key)!)\n return props.children(\n () => entry().item,\n () => entry().index,\n key\n )\n }}\n </For>\n <Show when={hidden() > 0}>\n <li class=\"px-1.5 py-0.5\">\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setShown(shown() + props.limit)}>\n Show {Math.min(hidden(), props.limit).toLocaleString()} more {props.noun} (\n {hidden().toLocaleString()} hidden)\n </Button>\n </li>\n </Show>\n </>\n )\n}\n\n/** Characters of a failure message drawn before the rest is offered. */\nexport const TEST_RESULTS_MESSAGE_LIMIT = 4_000\n\n/**\n * A failed test's message, which a runner may print at any length: a captured\n * log, a serialized object, a long assertion. It opens on its own for the first\n * failure, so it is bounded where the diff and stack are already bounded: the\n * body scrolls past a fixed height, only the first characters are drawn until the\n * reader asks for the rest, and Copy writes all of it.\n */\nfunction FailureMessage(props: { text: string; onCopy?: (ok: boolean) => void }) {\n const [all, setAll] = createSignal(false)\n const { copied, failed: copyFailed, copy: copyText } = createCopyFeedback()\n const clipped = () => props.text.length > TEST_RESULTS_MESSAGE_LIMIT\n const cut = () => {\n // Never inside a surrogate pair, which would draw a replacement character.\n const last = props.text.charCodeAt(TEST_RESULTS_MESSAGE_LIMIT - 1)\n return last >= 0xd800 && last <= 0xdbff\n ? TEST_RESULTS_MESSAGE_LIMIT - 1\n : TEST_RESULTS_MESSAGE_LIMIT\n }\n const shown = () => (clipped() && !all() ? props.text.slice(0, cut()) : props.text)\n const copy = async () => {\n const ok = await copyText(props.text)\n props.onCopy?.(ok)\n }\n return (\n <>\n {/* A region that scrolls is a tab stop and needs a name. */}\n <pre\n data-slot=\"test-results-message\"\n tabindex=\"0\"\n role=\"group\"\n aria-label=\"Failure message\"\n class=\"m-0 max-h-64 overflow-auto font-code text-code whitespace-pre-wrap text-foreground [overflow-wrap:anywhere]\"\n >\n {shown()}\n </pre>\n <Show when={clipped()}>\n <div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground\">\n <span class=\"italic\">\n <Show\n when={!all()}\n fallback={`All ${props.text.length.toLocaleString()} characters shown.`}\n >\n Showing the first {cut().toLocaleString()} of {props.text.length.toLocaleString()}{' '}\n characters (copy has all of it).\n </Show>\n </span>\n <Show when={!all()}>\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>\n </Show>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>\n </div>\n </Show>\n </>\n )\n}\n\n/**\n * The open state of a line on the way to the first failure, as a writable\n * derivation: it starts from `initial`, opens when a new failure arrives that\n * the reader has not collapsed, and otherwise keeps what the reader chose.\n */\nfunction followFailure(\n failure: Accessor<FirstFailureRenderPath | undefined>,\n initial: () => boolean,\n collapsed: () => FirstFailureRenderPath | undefined\n) {\n let previous: FirstFailureRenderPath | undefined\n return (wasOpen: boolean | undefined): boolean => {\n const current = failure()\n const changed = !sameFailure(current, previous)\n previous = current\n if (wasOpen === undefined) return initial()\n return current && changed && !sameFailure(current, collapsed()) ? true : wasOpen\n }\n}\n\nfunction TestLine(props: {\n test: Accessor<TestCase>\n keyed: string\n failure?: FirstFailureRenderPath\n onOpenFrame?: TestResultsProps['onOpenFrame']\n}) {\n const test = () => props.test()\n const state = () => (test().status ? TRACE_STATUS[test().status as TestCaseStatus] : undefined)\n // Whether there is anything to disclose. Read once per change, so the disclosure\n // exists while closed without anything below it being built.\n const hasDetail = createMemo(() => Boolean(test().message || test().diff || test().stack))\n // Only the last suite on the failure's path is given it, so a key among\n // this suite's tests is enough to know the failure is this test.\n const failureKey = createMemo(\n () => (props.failure?.test === props.keyed ? props.failure : undefined),\n { equals: sameFailure }\n )\n let collapsedFailure: FirstFailureRenderPath | undefined\n const [open, setOpen] = createSignal<boolean>(\n followFailure(\n failureKey,\n () => failureKey() !== undefined,\n () => collapsedFailure\n )\n )\n\n const handleOpenChange = (next: boolean) => {\n if (!next && failureKey()) collapsedFailure = failureKey()\n else if (next) collapsedFailure = undefined\n setOpen(next)\n }\n\n return (\n <TraceLine\n title={test().name}\n status={state()?.status}\n statusLabel={state()?.label}\n meta={formatDuration(test().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {hasDetail() ? (\n // A closed test builds nothing: the body is made when it is opened, so a diff or\n // stack is not parsed for every test of an open suite.\n <Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>\n ) : undefined}\n </TraceLine>\n )\n}\n\nfunction SuiteLine(props: {\n suite: Accessor<TestSuite>\n /** This suite's key among its siblings. */\n keyed: string\n /** How many suites enclose this one. */\n depth: number\n limit: number\n /** The first failure, given only to suites on the way to it. */\n failure?: FirstFailureRenderPath\n onOpenFrame?: TestResultsProps['onOpenFrame']\n}) {\n const suite = () => props.suite()\n const counts = createMemo(() => listedCounts([suite()]))\n const state = createMemo(() => suiteState(counts()))\n const children = () => (suite().tests?.length ?? 0) + (suite().suites?.length ?? 0) > 0\n // The parent passes the failure down only while it is on the way to it, so\n // one comparison at this suite's own depth settles whether it is on the path.\n // Memoised: each level reads its parent's, so a bare function would re-run the\n // whole chain above it on every read and cost exponential time in the depth.\n const failure = createMemo(\n () => (props.failure?.suites[props.depth] === props.keyed ? props.failure : undefined),\n { equals: sameFailure }\n )\n const holdsFailure = createMemo(() => failure()?.suites.length === props.depth + 1)\n let collapsedFailure: FirstFailureRenderPath | undefined\n const [open, setOpen] = createSignal<boolean>(\n followFailure(\n failure,\n () => state() === 'failed',\n () => collapsedFailure\n )\n )\n\n const handleOpenChange = (next: boolean) => {\n if (!next && failure()) collapsedFailure = failure()\n else if (next) collapsedFailure = undefined\n setOpen(next)\n }\n\n const description = () => {\n const parts = [\n suite().file,\n counts().failed > 0 ? `${counts().failed.toLocaleString()} failed` : undefined,\n ]\n return parts.filter(Boolean).join(' · ') || undefined\n }\n return (\n <TraceLine\n icon={<FlaskConical />}\n title={suite().name}\n description={description()}\n status={\n state() === 'failed'\n ? 'error'\n : state() === 'running'\n ? 'running'\n : state() === 'passed'\n ? 'success'\n : undefined\n }\n statusLabel={\n state() === 'failed'\n ? 'Has failing tests'\n : state() === 'passed'\n ? 'All listed tests passed'\n : undefined\n }\n meta={formatDuration(suite().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {children() ? (\n <div>\n <Show when={open()}>\n <Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </div>\n ) : undefined}\n </TraceLine>\n )\n}\n\nexport function TestResults(props: TestResultsProps) {\n const local = props\n const rest = omit(\n props,\n 'suites',\n 'summary',\n 'running',\n 'listLimit',\n 'onOpenFrame',\n 'label',\n 'class'\n )\n\n const listed = createMemo(() => listedCounts(local.suites))\n const counts = createMemo(() => reconcileCounts(local.summary, listed()))\n const limit = () => Math.max(1, Math.floor(local.listLimit ?? TEST_RESULTS_LIST_LIMIT))\n const failure = createMemo(() => firstFailureRenderPath(local.suites), {\n equals: sameFailure,\n })\n const duration = () => formatDuration(local.summary?.durationMs, 'long')\n const nothing = () =>\n counts().lines.length === 0 &&\n counts().reportedTotal === undefined &&\n local.suites.length === 0 &&\n !local.running\n\n return (\n <section\n data-slot=\"test-results\"\n aria-label={local.label ?? 'Test results'}\n aria-busy={local.running ? 'true' : undefined}\n class={cn('flex min-w-0 flex-col gap-2', local.class)}\n {...rest}\n >\n <Show\n when={!nothing()}\n fallback={<p class=\"m-0 text-sm text-muted-foreground\">No test results</p>}\n >\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>\n <SummaryBar lines={counts().lines} />\n <Show when={counts().basis === 'listed' && counts().lines.length > 0}>\n <p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>\n </Show>\n </div>\n <Show when={local.suites.length > 0}>\n <Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </Show>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAMiF,UAAQ,SAASC,KAAW;AAClC,IAAMC,gBAAc,SAASC,WAAiB;AAC9C,IAAMC,gBAAc,SAASC,WAAiB;AAC9C,IAAMC,YAAU,SAASC,OAAa;AACtC,IAAMC,SAAO,SAASC,IAAU;AAChC,IAAMC,iBAAe,SAASC,YAAkB;AAChD,IAAMC,iBAAe,SAASC,YAAkB;AAuDhD,IAAa,0BAA0B;AAEvC,IAAM,eAAiE;CACrE,cAAc9F,gBAAAA,WAAAA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yD,IAAA,SAAA,SAAA;OAAzD,OAAA,QAAwC,UAAxC,IAAyD;OAAzD,OAAA;MAAyD,EAAA,CAAA,IAD3D,KAAA;KAEM;IAAC,EAAA,CAAD,GA7BRA,MA8BK;IA/BP,OAAA,QAgCEM,gBAAAA,YAAAA,EAAY,IAAA,QAAA;KAAO,OAAA,OAAO,CAAC,CAAC;IAAK,EAAG,CAAA,GAhCtCC,MAoCK;IApCL,OAAA,eAiCE;;MAAY,OAAA,CAAA,EAAA,OAAO,CAAC,CAAC,UAAU,YAAY,OAAO,CAAC,CAAC,MAAM,SAAS;KAE7D,CAAA;KAFN,aAAA;MAEM,OAAA,KAAA,IADJC,SAAuF,IADzF,KAAA;KAEM;IAAC,EAAA,CAAD,GAnCRD,MAoCK;IApCL,OAAA;GAoCK,EAAA,CAAA,GACLE,gBAAAA,MAAAA;IAAM,IAAA,OAAA;KAAM,OAAA,MAAM,OAAO,SAAS;IAAC;IAAnC,IAAA,WAAA;KACEC,OAAAA,gBAAAA,OAAAA;MAAO,cAAW;MAAlB,IAAA,WAAA;OACEC,OAAAA,gBAAAA,SAAAA;QAAS,IAAA,QAAA;SAAO,OAAA,MAAM;QAAM;QAAEvB,SAAS;QAAY,IAAA,QAAA;SAAO,OAAA,MAAM;QAAC;QAAEM,MAAK;QAAxEiB,WACI,OAAO,QAAQ,QACfC,gBAAAA,WAAAA;SACS;SACPrB,OAAO;SACPsB,OAAO;SACP,IAAA,QAAA;UAAO,OAAA,MAAM;SAAC;SACd,IAAA,UAAA;UAAS,OAAA,QAAQ;SAAC;SAClB,IAAA,cAAA;UAAa,OAAA,MAAM;SAAW;QAC/B,CAAA;OAEI,CAAA;MACJ;;IACH;GApDP,CAAA,CAAA,IAFWC,SAA+D;EAuDrE;CAAC,EAAA,CAAD,CACC;CAlEX,OACEC;AAmEJ"}
1
+ {"version":3,"file":"test-results.js","names":["<CircleX aria-hidden=\"true\" class=\"size-3.5 text-destructive\" />","class=\"size-3.5 text-destructive\"","<CircleCheck aria-hidden=\"true\" class=\"size-3.5 text-success\" />","class=\"size-3.5 text-success\"","<CircleMinus aria-hidden=\"true\" class=\"size-3.5 text-muted-foreground\" />","class=\"size-3.5 text-muted-foreground\"","<span class=\"flex items-center gap-1 whitespace-nowrap\" data-outcome={props.line.outcome}>\n {OUTCOME_ICON[props.line.outcome]()}\n {describeCount(props.line)}\n </span>","<Show when={visible().length > 0}>\n <div\n aria-hidden=\"true\"\n data-slot=\"test-results-bar\"\n class=\"flex h-1.5 w-full gap-px overflow-hidden rounded-full bg-muted\"\n >\n <For each={visible()}>\n {(line) => (\n <span\n class={cn('min-w-1', SEGMENT_CLASS[line.outcome])}\n style={{ flex: `${line.count} 1 0` }}\n />\n )}\n </For>\n </div>\n </Show>","<For each={visible()}>\n {(line) => (\n <span\n class={cn('min-w-1', SEGMENT_CLASS[line.outcome])}\n style={{ flex: `${line.count} 1 0` }}\n />\n )}\n </For>","flex: `${line.count} 1 0`","<For each={visibleKeys()}>\n {(key) => {\n const entry = createMemo(() => page().byKey.get(key)!)\n return props.children(\n () => entry().item,\n () => entry().index,\n key\n )\n }}\n </For>","<Show when={hidden() > 0}>\n <li class=\"px-1.5 py-0.5\">\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setShown(shown() + props.limit)}>\n Show {Math.min(hidden(), props.limit).toLocaleString()} more {props.noun} (\n {hidden().toLocaleString()} hidden)\n </Button>\n </li>\n </Show>","<Button variant=\"ghost\" size=\"2xs\" onClick={() => setShown(shown() + props.limit)}>\n Show {Math.min(hidden(), props.limit).toLocaleString()} more {props.noun} (\n {hidden().toLocaleString()} hidden)\n </Button>","variant=\"ghost\"","size=\"2xs\"","onClick={() => setShown(shown() + props.limit)}","Math.min(hidden(), props.limit).toLocaleString()","props.noun","hidden().toLocaleString()","<Show when={clipped()}>\n <div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground\">\n <span class=\"italic\">\n <Show\n when={!all()}\n fallback={`All ${props.text.length.toLocaleString()} characters shown.`}\n >\n Showing the first {cut().toLocaleString()} of {props.text.length.toLocaleString()}{' '}\n characters (copy has all of it).\n </Show>\n </span>\n <Show when={!all()}>\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>\n </Show>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>\n </div>\n </Show>","{cut().toLocaleString()}","{props.text.length.toLocaleString()}","<Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>","onClick={() => setAll(true)}","props.text.length.toLocaleString()","<div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground\">\n <span class=\"italic\">\n <Show\n when={!all()}\n fallback={`All ${props.text.length.toLocaleString()} characters shown.`}\n >\n Showing the first {cut().toLocaleString()} of {props.text.length.toLocaleString()}{' '}\n characters (copy has all of it).\n </Show>\n </span>\n <Show when={!all()}>\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>\n </Show>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>\n </div>","<Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>","onClick={() => void copy()}","<Show when={copied()} fallback={<Copy aria-hidden=\"true\" />}>\n <Check aria-hidden=\"true\" />\n </Show>","<Copy aria-hidden=\"true\" />","<Check aria-hidden=\"true\" />","copied() ? 'Copied' : 'Copy message'","<TraceLine\n title={test().name}\n status={state()?.status}\n statusLabel={state()?.label}\n meta={formatDuration(test().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {hasDetail() ? (\n // A closed test builds nothing: the body is made when it is opened, so a diff or\n // stack is not parsed for every test of an open suite.\n <Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>\n ) : undefined}\n </TraceLine>","onOpenChange={handleOpenChange}","{hasDetail() ? (\n // A closed test builds nothing: the body is made when it is opened, so a diff or\n // stack is not parsed for every test of an open suite.\n <Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>\n ) : undefined}","<Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>","<TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>","class=\"flex flex-col gap-2\"","<Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>","<FailureMessage text={test().message!} />","<Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>","<DiffBlock patch={test().diff!} complete title=\"Expected and received\" />","title=\"Expected and received\"","<Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>","<StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />","<TraceLine\n icon={<FlaskConical />}\n title={suite().name}\n description={description()}\n status={\n state() === 'failed'\n ? 'error'\n : state() === 'running'\n ? 'running'\n : state() === 'passed'\n ? 'success'\n : undefined\n }\n statusLabel={\n state() === 'failed'\n ? 'Has failing tests'\n : state() === 'passed'\n ? 'All listed tests passed'\n : undefined\n }\n meta={formatDuration(suite().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {children() ? (\n <div>\n <Show when={open()}>\n <Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </div>\n ) : undefined}\n </TraceLine>","<FlaskConical />","state() === 'failed'\n ? 'error'\n : state() === 'running'\n ? 'running'\n : state() === 'passed'\n ? 'success'\n : undefined","state() === 'failed'\n ? 'Has failing tests'\n : state() === 'passed'\n ? 'All listed tests passed'\n : undefined","{children() ? (\n <div>\n <Show when={open()}>\n <Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </div>\n ) : undefined}","<Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>","size=\"sm\"","<Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>","itemKey={siblingKey}","noun=\"tests\"","<TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />","keyed={key}","holdsFailure() ? failure() : undefined","<Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>","noun=\"suites\"","<SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />","suite={nested}","<LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />","class=\"size-3.5 motion-safe:animate-spin\"","<span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>","<div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>","<For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>","<CountReadout line={line} />","<span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>","<Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>","<span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>","<SummaryBar lines={counts().lines} />","<div class=\"flex flex-col gap-1.5\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>\n <SummaryBar lines={counts().lines} />\n <Show when={counts().basis === 'listed' && counts().lines.length > 0}>\n <p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>\n </Show>\n </div>","<p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>","<Show when={local.suites.length > 0}>\n <Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>","<Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>","<Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>","<SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />","depth={0}","<p class=\"m-0 text-sm text-muted-foreground\">No test results</p>","<section\n data-slot=\"test-results\"\n aria-label={local.label ?? 'Test results'}\n aria-busy={local.running ? 'true' : undefined}\n class={cn('flex min-w-0 flex-col gap-2', local.class)}\n {...rest}\n >\n <Show\n when={!nothing()}\n fallback={<p class=\"m-0 text-sm text-muted-foreground\">No test results</p>}\n >\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>\n <SummaryBar lines={counts().lines} />\n <Show when={counts().basis === 'listed' && counts().lines.length > 0}>\n <p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>\n </Show>\n </div>\n <Show when={local.suites.length > 0}>\n <Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </Show>\n </section>","LucideCheck","LucideCircleCheck","LucideCircleMinus","LucideCircleX","LucideCopy","LucideFlaskConical","LucideLoaderCircle","_$insert","_$effect","_$setAttribute","_$readShallow","_$className","_$setStyleProperty","_$spread"],"sources":["../../../../src/components/composites/test-results/test-results.tsx"],"sourcesContent":["import {\n Check as LucideCheck,\n CircleCheck as LucideCircleCheck,\n CircleMinus as LucideCircleMinus,\n CircleX as LucideCircleX,\n Copy as LucideCopy,\n FlaskConical as LucideFlaskConical,\n LoaderCircle as LucideLoaderCircle,\n} from '@lucide/solid'\nimport { createMemo, createEffect, createSignal, For, Show, omit, type Accessor } from 'solid-js'\nimport { type ComponentProps, type JSX } from '@solidjs/web'\nimport { createCopyFeedback } from '#lib/clipboard'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button'\nimport { DiffBlock } from '../../ui/diff-block'\nimport { Trace, TraceDetail, TraceLine, type TraceStatus } from '../../ui/trace'\nimport { StackTrace, type StackTraceProps } from '../stack-trace'\nimport {\n boundedEntries,\n describeCount,\n firstFailureRenderPath,\n formatDuration,\n listedCounts,\n reconcileCounts,\n sameFailure,\n siblingKey,\n suiteState,\n type CountLine,\n type TestCase,\n type TestCaseStatus,\n type TestOutcome,\n type TestSuite,\n type TestSummary,\n type FirstFailureRenderPath,\n} from './test-results-model'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Check = fastIcon(LucideCheck)\nconst CircleCheck = fastIcon(LucideCircleCheck)\nconst CircleMinus = fastIcon(LucideCircleMinus)\nconst CircleX = fastIcon(LucideCircleX)\nconst Copy = fastIcon(LucideCopy)\nconst FlaskConical = fastIcon(LucideFlaskConical)\nconst LoaderCircle = fastIcon(LucideLoaderCircle)\n\n/**\n * TestResults.\n *\n * A test run: how it went in words and in a segmented bar, then the suites it\n * ran as `Trace` lines, each opening onto its tests, and a failing test opening\n * onto its message, diff and stack. It is for a run the host can structure; reach\n * for `Terminal` when all there is to show is the command's output, and for\n * `StackTrace` alone when one call failed outside a test.\n *\n * ## Counts are claims\n *\n * Nothing is computed that the host did not supply data for, and nothing the host\n * supplied is quietly recomputed. `summary` is the host's own tally and is shown\n * as given. If tests are listed and their number for an outcome does not match, the\n * listed number is shown beside it, \"40 passed (2 listed)\", which is also how a\n * host that lists only its failures reads. Without a `summary` the counts shown are\n * those of the tests listed, and the component says so; it does not present them as\n * the run's totals. A suite is marked failed or passed only from the tests listed in\n * it, and its spoken label says \"listed\" so it claims no more than that.\n *\n * ## Not colour-only\n *\n * The bar is decoration: every segment has a counterpart in the words beside it,\n * each with its own shape (a cross, a tick, a dash). Segments are separated by a\n * gap and never narrower than a visible sliver, so one failure in five thousand\n * tests is still on the bar.\n *\n * ## Bounded\n *\n * Suites and tests are listed `listLimit` at a time with \"show more\", and a suite's\n * tests are not rendered until it is open. The first failure in reading order opens\n * when its row is visible; a failure beyond a \"show more\" boundary stays unmounted\n * until its page is revealed. When a running result first reports a failure, its\n * suite and test open once. Later updates preserve the user's disclosure choices.\n *\n * Failure details are text: the message is a `pre`, the diff goes to `DiffBlock`\n * and the stack to `StackTrace`. If a stack already begins with the message, pass\n * only the stack; nothing here de-duplicates what the host sends.\n */\nexport type TestResultsProps = Omit<ComponentProps<'section'>, 'children'> & {\n suites: readonly TestSuite[]\n /** The host's own counts. Shown as given; see the component comment. */\n summary?: TestSummary\n /** The run is still going. */\n running?: boolean\n /** Suites, or tests within a suite, listed before \"show more\". Default 50. */\n listLimit?: number\n /** Passed to each failure's `StackTrace`. */\n onOpenFrame?: StackTraceProps['onOpenFrame']\n /** The section's accessible name. Default \"Test results\". */\n label?: string\n}\n\nexport const TEST_RESULTS_LIST_LIMIT = 50\n\nconst OUTCOME_ICON: Readonly<Record<TestOutcome, () => JSX.Element>> = {\n failed: () => <CircleX aria-hidden=\"true\" class=\"size-3.5 text-destructive\" />,\n passed: () => <CircleCheck aria-hidden=\"true\" class=\"size-3.5 text-success\" />,\n skipped: () => <CircleMinus aria-hidden=\"true\" class=\"size-3.5 text-muted-foreground\" />,\n}\n\nfunction CountReadout(props: { line: CountLine }) {\n return (\n <span class=\"flex items-center gap-1 whitespace-nowrap\" data-outcome={props.line.outcome}>\n {OUTCOME_ICON[props.line.outcome]()}\n {describeCount(props.line)}\n </span>\n )\n}\n\n// Segments are drawn in this order so the bar reads the same in every run.\nconst SEGMENT_CLASS: Readonly<Record<TestOutcome, string>> = {\n failed: 'bg-destructive',\n passed: 'bg-success',\n skipped: 'bg-muted-foreground/40',\n}\n\nfunction SummaryBar(props: { lines: readonly CountLine[] }) {\n const visible = () => props.lines.filter((line) => line.count > 0)\n return (\n <Show when={visible().length > 0}>\n <div\n aria-hidden=\"true\"\n data-slot=\"test-results-bar\"\n class=\"flex h-1.5 w-full gap-px overflow-hidden rounded-full bg-muted\"\n >\n <For each={visible()}>\n {(line) => (\n <span\n class={cn('min-w-1', SEGMENT_CLASS[line.outcome])}\n style={{ flex: `${line.count} 1 0` }}\n />\n )}\n </For>\n </div>\n </Show>\n )\n}\n\nconst TRACE_STATUS: Readonly<Record<TestCaseStatus, { status: TraceStatus; label: string }>> = {\n passed: { status: 'success', label: 'Passed' },\n failed: { status: 'error', label: 'Failed' },\n skipped: { status: 'cancelled', label: 'Skipped' },\n running: { status: 'running', label: 'Running' },\n pending: { status: 'pending', label: 'Not run yet' },\n}\n\n/**\n * Keep keyboard focus through a reorder. Solid moves a keyed row's node instead\n * of replacing it, and a browser blurs a focused element that is moved, so an\n * immutable reorder would drop the reader's place onto the body even though the\n * node and its open state survive. The focused element is noted just before the\n * rows move and given focus back just after, but only when nothing else has taken\n * focus meanwhile, and only inside a test run, so a reader who has moved on is\n * never pulled back and an unrelated element is never refocused.\n */\nfunction keepFocusThroughReorder(keys: Accessor<readonly string[]>) {\n // The compute runs before the rows move and the apply after, so the compute\n // notes the focused element and the apply hands focus back to it.\n createEffect(\n () => {\n keys()\n const active = typeof document === 'undefined' ? null : document.activeElement\n return active instanceof HTMLElement && active.closest('[data-slot=\"test-results\"]')\n ? active\n : undefined\n },\n (element) => {\n if (!element || !element.isConnected) return\n const active = document.activeElement\n if (active === null || active === document.body) element.focus({ preventScroll: true })\n }\n )\n}\n\n/** A list that shows its first `limit` items and offers the rest. */\nfunction Bounded<T>(props: {\n items: readonly T[]\n itemKey: (item: T, index: number) => string\n limit: number\n noun: string\n children: (item: Accessor<T>, index: Accessor<number>, key: string) => JSX.Element\n}) {\n const [shown, setShown] = createSignal(() => props.limit)\n const page = createMemo(() => boundedEntries(props.items, shown(), props.itemKey))\n const visible = () => page().entries\n const visibleKeys = createMemo(() => visible().map((entry) => entry.key))\n keepFocusThroughReorder(visibleKeys)\n const hidden = () => props.items.length - visible().length\n return (\n <>\n <For each={visibleKeys()}>\n {(key) => {\n const entry = createMemo(() => page().byKey.get(key)!)\n return props.children(\n () => entry().item,\n () => entry().index,\n key\n )\n }}\n </For>\n <Show when={hidden() > 0}>\n <li class=\"px-1.5 py-0.5\">\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setShown(shown() + props.limit)}>\n Show {Math.min(hidden(), props.limit).toLocaleString()} more {props.noun} (\n {hidden().toLocaleString()} hidden)\n </Button>\n </li>\n </Show>\n </>\n )\n}\n\n/** Characters of a failure message drawn before the rest is offered. */\nexport const TEST_RESULTS_MESSAGE_LIMIT = 4_000\n\n/**\n * A failed test's message, which a runner may print at any length: a captured\n * log, a serialized object, a long assertion. It opens on its own for the first\n * failure, so it is bounded where the diff and stack are already bounded: the\n * body scrolls past a fixed height, only the first characters are drawn until the\n * reader asks for the rest, and Copy writes all of it.\n */\nfunction FailureMessage(props: { text: string; onCopy?: (ok: boolean) => void }) {\n const [all, setAll] = createSignal(false)\n const { copied, failed: copyFailed, copy: copyText } = createCopyFeedback()\n const clipped = () => props.text.length > TEST_RESULTS_MESSAGE_LIMIT\n const cut = () => {\n // Never inside a surrogate pair, which would draw a replacement character.\n const last = props.text.charCodeAt(TEST_RESULTS_MESSAGE_LIMIT - 1)\n return last >= 0xd800 && last <= 0xdbff\n ? TEST_RESULTS_MESSAGE_LIMIT - 1\n : TEST_RESULTS_MESSAGE_LIMIT\n }\n const shown = () => (clipped() && !all() ? props.text.slice(0, cut()) : props.text)\n const copy = async () => {\n const ok = await copyText(props.text)\n props.onCopy?.(ok)\n }\n return (\n <>\n {/* A region that scrolls is a tab stop and needs a name. */}\n <pre\n data-slot=\"test-results-message\"\n tabindex=\"0\"\n role=\"group\"\n aria-label=\"Failure message\"\n class=\"m-0 max-h-64 overflow-auto font-code text-code whitespace-pre-wrap text-foreground [overflow-wrap:anywhere]\"\n >\n {shown()}\n </pre>\n <Show when={clipped()}>\n <div class=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground\">\n <span class=\"italic\">\n <Show\n when={!all()}\n fallback={`All ${props.text.length.toLocaleString()} characters shown.`}\n >\n Showing the first {cut().toLocaleString()} of {props.text.length.toLocaleString()}{' '}\n characters (copy has all of it).\n </Show>\n </span>\n <Show when={!all()}>\n <Button variant=\"ghost\" size=\"2xs\" onClick={() => setAll(true)}>\n Show all {props.text.length.toLocaleString()} characters\n </Button>\n </Show>\n <Button\n variant=\"ghost\"\n size=\"2xs\"\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 {copied() ? 'Copied' : 'Copy message'}\n </Button>\n </div>\n </Show>\n </>\n )\n}\n\n/**\n * The open state of a line on the way to the first failure, as a writable\n * derivation: it starts from `initial`, opens when a new failure arrives that\n * the reader has not collapsed, and otherwise keeps what the reader chose.\n */\nfunction followFailure(\n failure: Accessor<FirstFailureRenderPath | undefined>,\n initial: () => boolean,\n collapsed: () => FirstFailureRenderPath | undefined\n) {\n let previous: FirstFailureRenderPath | undefined\n return (wasOpen: boolean | undefined): boolean => {\n const current = failure()\n const changed = !sameFailure(current, previous)\n previous = current\n if (wasOpen === undefined) return initial()\n return current && changed && !sameFailure(current, collapsed()) ? true : wasOpen\n }\n}\n\nfunction TestLine(props: {\n test: Accessor<TestCase>\n keyed: string\n failure?: FirstFailureRenderPath\n onOpenFrame?: TestResultsProps['onOpenFrame']\n}) {\n const test = () => props.test()\n const state = () => (test().status ? TRACE_STATUS[test().status as TestCaseStatus] : undefined)\n // Whether there is anything to disclose. Read once per change, so the disclosure\n // exists while closed without anything below it being built.\n const hasDetail = createMemo(() => Boolean(test().message || test().diff || test().stack))\n // Only the last suite on the failure's path is given it, so a key among\n // this suite's tests is enough to know the failure is this test.\n const failureKey = createMemo(\n () => (props.failure?.test === props.keyed ? props.failure : undefined),\n { equals: sameFailure }\n )\n let collapsedFailure: FirstFailureRenderPath | undefined\n const [open, setOpen] = createSignal<boolean>(\n followFailure(\n failureKey,\n () => failureKey() !== undefined,\n () => collapsedFailure\n )\n )\n\n const handleOpenChange = (next: boolean) => {\n if (!next && failureKey()) collapsedFailure = failureKey()\n else if (next) collapsedFailure = undefined\n setOpen(next)\n }\n\n return (\n <TraceLine\n title={test().name}\n status={state()?.status}\n statusLabel={state()?.label}\n meta={formatDuration(test().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {hasDetail() ? (\n // A closed test builds nothing: the body is made when it is opened, so a diff or\n // stack is not parsed for every test of an open suite.\n <Show when={open()}>\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={test().message}>\n <FailureMessage text={test().message!} />\n </Show>\n <Show when={test().diff}>\n <DiffBlock patch={test().diff!} complete title=\"Expected and received\" />\n </Show>\n <Show when={test().stack}>\n <StackTrace text={test().stack!} onOpenFrame={props.onOpenFrame} />\n </Show>\n </TraceDetail>\n </Show>\n ) : undefined}\n </TraceLine>\n )\n}\n\nfunction SuiteLine(props: {\n suite: Accessor<TestSuite>\n /** This suite's key among its siblings. */\n keyed: string\n /** How many suites enclose this one. */\n depth: number\n limit: number\n /** The first failure, given only to suites on the way to it. */\n failure?: FirstFailureRenderPath\n onOpenFrame?: TestResultsProps['onOpenFrame']\n}) {\n const suite = () => props.suite()\n const counts = createMemo(() => listedCounts([suite()]))\n const state = createMemo(() => suiteState(counts()))\n const children = () => (suite().tests?.length ?? 0) + (suite().suites?.length ?? 0) > 0\n // The parent passes the failure down only while it is on the way to it, so\n // one comparison at this suite's own depth settles whether it is on the path.\n // Memoised: each level reads its parent's, so a bare function would re-run the\n // whole chain above it on every read and cost exponential time in the depth.\n const failure = createMemo(\n () => (props.failure?.suites[props.depth] === props.keyed ? props.failure : undefined),\n { equals: sameFailure }\n )\n const holdsFailure = createMemo(() => failure()?.suites.length === props.depth + 1)\n let collapsedFailure: FirstFailureRenderPath | undefined\n const [open, setOpen] = createSignal<boolean>(\n followFailure(\n failure,\n () => state() === 'failed',\n () => collapsedFailure\n )\n )\n\n const handleOpenChange = (next: boolean) => {\n if (!next && failure()) collapsedFailure = failure()\n else if (next) collapsedFailure = undefined\n setOpen(next)\n }\n\n const description = () => {\n const parts = [\n suite().file,\n counts().failed > 0 ? `${counts().failed.toLocaleString()} failed` : undefined,\n ]\n return parts.filter(Boolean).join(' · ') || undefined\n }\n return (\n <TraceLine\n icon={<FlaskConical />}\n title={suite().name}\n description={description()}\n status={\n state() === 'failed'\n ? 'error'\n : state() === 'running'\n ? 'running'\n : state() === 'passed'\n ? 'success'\n : undefined\n }\n statusLabel={\n state() === 'failed'\n ? 'Has failing tests'\n : state() === 'passed'\n ? 'All listed tests passed'\n : undefined\n }\n meta={formatDuration(suite().durationMs)}\n open={open()}\n onOpenChange={handleOpenChange}\n >\n {children() ? (\n <div>\n <Show when={open()}>\n <Trace size=\"sm\" aria-label={`${suite().name} tests`}>\n <Bounded\n items={suite().tests ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"tests\"\n >\n {(test, _index, key) => (\n <TestLine\n test={test}\n keyed={key}\n failure={holdsFailure() ? failure() : undefined}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n <Bounded\n items={suite().suites ?? []}\n itemKey={siblingKey}\n limit={props.limit}\n noun=\"suites\"\n >\n {(nested, _index, key) => (\n <SuiteLine\n suite={nested}\n keyed={key}\n depth={props.depth + 1}\n limit={props.limit}\n failure={failure()}\n onOpenFrame={props.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </div>\n ) : undefined}\n </TraceLine>\n )\n}\n\nexport function TestResults(props: TestResultsProps) {\n const local = props\n const rest = omit(\n props,\n 'suites',\n 'summary',\n 'running',\n 'listLimit',\n 'onOpenFrame',\n 'label',\n 'class'\n )\n\n const listed = createMemo(() => listedCounts(local.suites))\n const counts = createMemo(() => reconcileCounts(local.summary, listed()))\n const limit = () => Math.max(1, Math.floor(local.listLimit ?? TEST_RESULTS_LIST_LIMIT))\n const failure = createMemo(() => firstFailureRenderPath(local.suites), {\n equals: sameFailure,\n })\n const duration = () => formatDuration(local.summary?.durationMs, 'long')\n const nothing = () =>\n counts().lines.length === 0 &&\n counts().reportedTotal === undefined &&\n local.suites.length === 0 &&\n !local.running\n\n return (\n <section\n data-slot=\"test-results\"\n aria-label={local.label ?? 'Test results'}\n aria-busy={local.running ? 'true' : undefined}\n class={cn('flex min-w-0 flex-col gap-2', local.class)}\n {...rest}\n >\n <Show\n when={!nothing()}\n fallback={<p class=\"m-0 text-sm text-muted-foreground\">No test results</p>}\n >\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm\">\n <Show when={local.running}>\n <span class=\"flex items-center gap-1 text-info\">\n <LoaderCircle aria-hidden=\"true\" class=\"size-3.5 motion-safe:animate-spin\" />\n Running\n </span>\n </Show>\n <For each={counts().lines}>{(line) => <CountReadout line={line} />}</For>\n <Show\n when={\n counts().lines.length === 0 &&\n !counts().totalNote &&\n counts().reportedTotal !== undefined\n }\n >\n <span class=\"text-muted-foreground\">\n {counts().reportedTotal?.toLocaleString()} tests reported\n </span>\n </Show>\n <Show when={counts().totalNote}>\n {(note) => (\n <span class=\"text-muted-foreground\">\n {note().reported.toLocaleString()} tests reported (\n {note().listed.toLocaleString()} listed)\n </span>\n )}\n </Show>\n <Show when={duration()}>\n <span class=\"text-muted-foreground\">in {duration()}</span>\n </Show>\n </div>\n <SummaryBar lines={counts().lines} />\n <Show when={counts().basis === 'listed' && counts().lines.length > 0}>\n <p class=\"m-0 text-xs text-muted-foreground\">Counts are from the tests listed below.</p>\n </Show>\n </div>\n <Show when={local.suites.length > 0}>\n <Trace aria-label=\"Test suites\">\n <Bounded items={local.suites} itemKey={siblingKey} limit={limit()} noun=\"suites\">\n {(suite, _index, key) => (\n <SuiteLine\n suite={suite}\n keyed={key}\n depth={0}\n limit={limit()}\n failure={failure()}\n onOpenFrame={local.onOpenFrame}\n />\n )}\n </Bounded>\n </Trace>\n </Show>\n </Show>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAM,QAAQ,SAASiF,OAAW;AAClC,IAAM,cAAc,SAASC,aAAiB;AAC9C,IAAM,cAAc,SAASC,aAAiB;AAC9C,IAAM,UAAU,SAASC,SAAa;AACtC,IAAM,OAAO,SAASC,MAAU;AAChC,IAAM,eAAe,SAASC,cAAkB;AAChD,IAAM,eAAe,SAASC,cAAkB;AAuDhD,IAAa,0BAA0B;AAEvC,IAAM,eAAiE;CACrE,cAAcvF,gBAAAA,SAAAA;EAAS,eAAY;EAAOC,OAAM;CAA6B,CAAA;CAC7E,cAAcC,gBAAAA,aAAAA;EAAa,eAAY;EAAOC,OAAM;CAAyB,CAAA;CAC7E,eAAeC,gBAAAA,aAAAA;EAAa,eAAY;EAAOC,OAAM;CAAkC,CAAA;AACzF;AAEA,SAAS,aAAa,OA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;IA/BPuB,OAAA,QAgCEjB,gBAAAA,YAAAA,EAAY,IAAA,QAAA;KAAO,OAAA,OAAO,CAAC,CAAC;IAAK,EAAG,CAAA,GAhCtCC,MAoCK;IApCLgB,OAAA,eAiCE;;MAAY,OAAA,CAAA,EAAA,OAAO,CAAC,CAAC,UAAU,YAAY,OAAO,CAAC,CAAC,MAAM,SAAS;KAE7D,CAAA;KAFN,aAAA;MAEM,OAAA,KAAA,IADJf,SAAuF,IADzF,KAAA;KAEM;IAAC,EAAA,CAAD,GAnCRD,MAoCK;IApCL,OAAA;GAoCK,EAAA,CAAA,GACLE,gBAAAA,MAAAA;IAAM,IAAA,OAAA;KAAM,OAAA,MAAM,OAAO,SAAS;IAAC;IAAnC,IAAA,WAAA;KACEC,OAAAA,gBAAAA,OAAAA;MAAO,cAAW;MAAlB,IAAA,WAAA;OACEC,OAAAA,gBAAAA,SAAAA;QAAS,IAAA,QAAA;SAAO,OAAA,MAAM;QAAM;QAAEvB,SAAS;QAAY,IAAA,QAAA;SAAO,OAAA,MAAM;QAAC;QAAEM,MAAK;QAAxEiB,WACI,OAAO,QAAQ,QACfC,gBAAAA,WAAAA;SACS;SACPrB,OAAO;SACPsB,OAAO;SACP,IAAA,QAAA;UAAO,OAAA,MAAM;SAAC;SACd,IAAA,UAAA;UAAS,OAAA,QAAQ;SAAC;SAClB,IAAA,cAAA;UAAa,OAAA,MAAM;SAAW;QAC/B,CAAA;OAEI,CAAA;MACJ;;IACH;GApDP,CAAA,CAAA,IAFWC,SAA+D;EAuDrE;CAAC,EAAA,CAAD,CACC;CAlEX,OACEC;AAmEJ"}
@@ -1,16 +1,16 @@
1
+ import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
2
+ import { Wrench as Wrench$1 } from "@lucide/solid";
3
+ import { Show, children, createMemo, omit } from "solid-js";
1
4
  import { Badge } from "../../ui/badge/badge.js";
2
5
  import { CodeBlock } from "../../ui/code-block/code-block.js";
3
6
  import { TRACE_STATUS_LABELS, TraceDetail, TraceError, TraceLine } from "../../ui/trace/trace.js";
4
7
  import { formatToolValue } from "./format-tool-value.js";
5
8
  import { fastIcon } from "../../../lib/fast-icon.js";
6
- import { createComponent, insert, memo, mergeProps, template } from "@solidjs/web";
7
- import { Wrench } from "@lucide/solid";
8
- import { Show, children, createMemo, omit } from "solid-js";
9
9
  // src/components/composites/tool/tool.tsx
10
10
  var _tmpl$ = /* @__PURE__ */ template(`<p class="m-0 px-1 text-xs text-muted-foreground">Showing the first <!> characters.`);
11
11
  var _tmpl$2 = /* @__PURE__ */ template(`<div class="flex min-w-0 flex-col gap-1"><!><!>`);
12
12
  var _tmpl$3 = /* @__PURE__ */ template(`<span class="flex items-center gap-2"><!><!>`);
13
- var Wrench$1 = fastIcon(Wrench);
13
+ var Wrench = fastIcon(Wrench$1);
14
14
  /**
15
15
  * The words spoken (and, for the last three, shown) for each status. `denied` is
16
16
  * a decision about the call; `cancelled` is the run being stopped while the call
@@ -188,7 +188,7 @@ function Tool(props) {
188
188
  })() : local.meta;
189
189
  return createComponent(TraceLine, mergeProps({
190
190
  get icon() {
191
- return local.icon ?? createComponent(Wrench$1, {});
191
+ return local.icon ?? createComponent(Wrench, {});
192
192
  },
193
193
  get title() {
194
194
  return local.name;
@@ -1 +1 @@
1
- {"version":3,"file":"tool.js","names":["<Show when={props.truncated}>\n <p class=\"m-0 px-1 text-xs text-muted-foreground\">\n Showing the first {props.maxChars.toLocaleString('en')} characters.\n </p>\n </Show>","<p class=\"m-0 px-1 text-xs text-muted-foreground\">\n Showing the first {props.maxChars.toLocaleString('en')} characters.\n </p>","<CodeBlock\n size=\"sm\"\n title={props.title}\n language={formatted().language}\n code={formatted().text}\n complete={props.complete ?? true}\n maxHeight={SECTION_MAX_HEIGHT}\n wrap={formatted().language === 'text'}\n />","size=\"sm\"","maxHeight={SECTION_MAX_HEIGHT}","<div class=\"flex min-w-0 flex-col gap-1\">\n <CodeBlock\n size=\"sm\"\n title={props.title}\n language={formatted().language}\n code={formatted().text}\n complete={props.complete ?? true}\n maxHeight={SECTION_MAX_HEIGHT}\n wrap={formatted().language === 'text'}\n />\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </div>","<TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />","<TraceError text={formatted().text}>\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </TraceError>","<TraceDetail class=\"flex flex-col gap-2\">\n <Show when={hasInput()}>\n <Section title=\"Input\" value={local.input} maxChars={maxChars()} />\n </Show>\n <Show when={hasOutput()}>\n <Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />\n </Show>\n <Show when={hasError()}>\n <ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />\n </Show>\n {extra()}\n </TraceDetail>","class=\"flex flex-col gap-2\"","<Show when={hasInput()}>\n <Section title=\"Input\" value={local.input} maxChars={maxChars()} />\n </Show>","<Section title=\"Input\" value={local.input} maxChars={maxChars()} />","title=\"Input\"","<Show when={hasOutput()}>\n <Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />\n </Show>","<Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />","title=\"Output\"","<Show when={hasError()}>\n <ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />\n </Show>","<ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />","extra()","<Badge\n aria-hidden=\"true\"\n size=\"sm\"\n variant={local.status === 'awaiting-approval' ? 'warning' : 'outline'}\n >\n {TOOL_STATUS_LABELS[local.status]}\n </Badge>","<span class=\"flex items-center gap-2\">\n <Badge\n aria-hidden=\"true\"\n size=\"sm\"\n variant={local.status === 'awaiting-approval' ? 'warning' : 'outline'}\n >\n {TOOL_STATUS_LABELS[local.status]}\n </Badge>\n {local.meta}\n </span>","<TraceLine\n icon={local.icon ?? <Wrench />}\n title={local.name}\n description={local.description}\n status={local.status ? TRACE_STATUS[local.status] : undefined}\n statusLabel={local.status ? TOOL_STATUS_LABELS[local.status] : undefined}\n meta={wordBadge()}\n defaultOpen={local.defaultOpen ?? local.status === 'awaiting-approval'}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>","<Wrench />","local.status ? TRACE_STATUS[local.status] : undefined","local.status ? TOOL_STATUS_LABELS[local.status] : undefined","Wrench","LucideWrench","resolveChildren"],"sources":["../../../../src/components/composites/tool/tool.tsx"],"sourcesContent":["import { Wrench as LucideWrench } from '@lucide/solid'\nimport { children as resolveChildren, createMemo, Show, omit } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { Badge } from '../../ui/badge'\nimport { CodeBlock } from '../../ui/code-block'\nimport {\n TRACE_STATUS_LABELS,\n TraceDetail,\n TraceError,\n TraceLine,\n type TraceLineProps,\n type TraceStatus,\n} from '../../ui/trace'\nimport { formatToolValue, TOOL_VALUE_MAX_CHARS } from './format-tool-value'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Wrench = fastIcon(LucideWrench)\n\n/**\n * Tool.\n *\n * One tool call, from what was asked to what came back, as a `TraceLine`: the\n * tool's name and a short description on the line, and, when there is anything\n * to show, an input section, an output section and an error underneath. Reach\n * for `Subagent` when the \"tool\" is another agent with steps of its own, for a\n * bare `CodeBlock` when the point is the output itself and not the call that made\n * it, and for a confirmation (passed as `children`) when the reader has to decide\n * something about the call.\n *\n * ## Everything is optional, and absence is not a claim\n *\n * A call with no `status` shows no mark at all, an event that merely arrived is\n * not \"done\". `input`, `output` and `errorText` each render a section only when\n * the host passed them: no empty \"Output\" box under a call that is still running,\n * and no invented \"No output\" under one that failed. An error with no output is\n * just the error. A call with nothing to expand is a plain line, not a\n * disclosure that opens onto nothing.\n *\n * Two statuses are words, not only marks, because the glyphs for them are easy to\n * misread: `awaiting-approval` and `denied` also show a badge. Both are spoken\n * once (the badge is hidden from assistive technology and the status word is\n * read in its place). A call awaiting approval opens by default, since it is the\n * one state in which the reader has something to do. The component never decides\n * whether an approval is allowed: the controls live in `children`, supplied by\n * the host, or are absent.\n *\n * ## Payloads are untrusted and unbounded\n *\n * `input` and `output` are `unknown`, whatever the model sent and the tool\n * returned. They go through `formatToolValue`, which cannot throw (circular\n * references, `BigInt`, throwing getters) and stops after `maxChars`; a cut view\n * says so rather than presenting half a document as the whole. Sections render in\n * a small `CodeBlock` with a capped height. A string is shown as given; anything\n * structured is pretty-printed JSON. The sections mount only when the line is\n * opened, so a transcript of hundreds of calls formats none of them until asked.\n *\n * A `Tool` is a line: place it inside a `Trace`.\n */\nexport type ToolStatus =\n | 'pending'\n | 'running'\n | 'success'\n | 'error'\n | 'awaiting-approval'\n | 'denied'\n | 'cancelled'\n\n/**\n * The words spoken (and, for the last three, shown) for each status. `denied` is\n * a decision about the call; `cancelled` is the run being stopped while the call\n * was in flight. Give a call `cancelled` only when the host knows that call was\n * stopped: a run ending does not by itself say what became of each call.\n */\nexport const TOOL_STATUS_LABELS: Readonly<Record<ToolStatus, string>> = {\n ...TRACE_STATUS_LABELS,\n 'awaiting-approval': 'Awaiting approval',\n denied: 'Denied',\n}\n\nconst TRACE_STATUS: Readonly<Record<ToolStatus, TraceStatus>> = {\n pending: 'pending',\n running: 'running',\n success: 'success',\n error: 'error',\n 'awaiting-approval': 'pending',\n denied: 'cancelled',\n cancelled: 'cancelled',\n}\n\nexport type ToolProps = Omit<\n TraceLineProps,\n 'title' | 'status' | 'statusLabel' | 'href' | 'onSelect' | 'selectHaspopup' | 'children'\n> & {\n /** The tool's name, as the host knows it. Rendered as text. */\n name: string\n /** What this call is for: a path, a query, a command. */\n description?: JSX.Element\n status?: ToolStatus\n /** What the model asked the tool to do. Any value; omit it to show no section. */\n input?: unknown\n /** What the tool returned. Any value; omit it to show no section. */\n output?: unknown\n errorText?: string\n /** Characters of each section shown before it is cut. Defaults to 20,000. */\n maxChars?: number\n /** Extra detail below the sections: an approval, a link to the full output. */\n children?: JSX.Element\n}\n\nconst SECTION_MAX_HEIGHT = '16rem'\n\nfunction TruncatedNote(props: { truncated: boolean; maxChars: number }) {\n return (\n <Show when={props.truncated}>\n <p class=\"m-0 px-1 text-xs text-muted-foreground\">\n Showing the first {props.maxChars.toLocaleString('en')} characters.\n </p>\n </Show>\n )\n}\n\nfunction Section(props: { title: string; value: unknown; maxChars: number; complete?: boolean }) {\n const formatted = createMemo(() => formatToolValue(props.value, { maxChars: props.maxChars }))\n return (\n <div class=\"flex min-w-0 flex-col gap-1\">\n <CodeBlock\n size=\"sm\"\n title={props.title}\n language={formatted().language}\n code={formatted().text}\n complete={props.complete ?? true}\n maxHeight={SECTION_MAX_HEIGHT}\n wrap={formatted().language === 'text'}\n />\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </div>\n )\n}\n\nfunction ErrorSection(props: { text: string; maxChars: number }) {\n const formatted = createMemo(() => formatToolValue(props.text, { maxChars: props.maxChars }))\n return (\n <TraceError text={formatted().text}>\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </TraceError>\n )\n}\n\nexport function Tool(props: ToolProps) {\n const local = props\n const rest = omit(\n props,\n 'name',\n 'description',\n 'status',\n 'input',\n 'output',\n 'errorText',\n 'maxChars',\n 'icon',\n 'meta',\n 'defaultOpen',\n 'children'\n )\n const maxChars = () => local.maxChars ?? TOOL_VALUE_MAX_CHARS\n const hasInput = () => local.input !== undefined\n const hasOutput = () => local.output !== undefined\n const hasError = () => local.errorText !== undefined && local.errorText !== ''\n // Resolved once: a host's approval controls are created once and keep their\n // state and focus however often the line is folded.\n const extra = resolveChildren(() => local.children)\n const hasDetail = () => hasInput() || hasOutput() || hasError() || extra.toArray().length > 0\n\n const detail = () => (\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={hasInput()}>\n <Section title=\"Input\" value={local.input} maxChars={maxChars()} />\n </Show>\n <Show when={hasOutput()}>\n <Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />\n </Show>\n <Show when={hasError()}>\n <ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />\n </Show>\n {extra()}\n </TraceDetail>\n )\n\n // Words as well as marks for the states whose glyph is easy to misread. The\n // badge is hidden from assistive technology: the status word is already spoken.\n const wordBadge = () =>\n local.status === 'awaiting-approval' ||\n local.status === 'denied' ||\n local.status === 'cancelled' ? (\n <span class=\"flex items-center gap-2\">\n <Badge\n aria-hidden=\"true\"\n size=\"sm\"\n variant={local.status === 'awaiting-approval' ? 'warning' : 'outline'}\n >\n {TOOL_STATUS_LABELS[local.status]}\n </Badge>\n {local.meta}\n </span>\n ) : (\n local.meta\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <Wrench />}\n title={local.name}\n description={local.description}\n status={local.status ? TRACE_STATUS[local.status] : undefined}\n statusLabel={local.status ? TOOL_STATUS_LABELS[local.status] : undefined}\n meta={wordBadge()}\n defaultOpen={local.defaultOpen ?? local.status === 'awaiting-approval'}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,IAAMyB,WAAS,SAASC,MAAY;;;;;;;AAyDpC,IAAa,qBAA2D;CACtE,GAAG;CACH,qBAAqB;CACrB,QAAQ;AACV;AAEA,IAAM,eAA0D;CAC9D,SAAS;CACT,SAAS;CACT,SAAS;CACT,OAAO;CACP,qBAAqB;CACrB,QAAQ;CACR,WAAW;AACb;AAsBA,IAAM,qBAAqB;AAE3B,SAAS,cAAc,OAAiD;CACtE,OACE1B,WAAAA;;GAAY,OAAA,CAAA,CAAA,MAAM;EAIZ,CAAA,CAAC,CAAD,WAHJ;GAEG,IAAA,OAAA,OAAA;G,YAFH,KAAA,W;GACoB,OAAA,YAAA;IAAC,OAAA,MAAM,SAAS,eAAe,IAAI;GAAC,GADxDC,KAEG;GAFH,OAAA;EAEG,EAAA,CAAA,IAHL,KAAA;CAIM,CAAA;AAEV;AAEA,SAAS,QAAQ,OAAgF;CAC/F,MAAM,YA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L,IAAA,UAAA;IAAS,OAAA,MAAM,WAAW,sBAAsB,YAAY;GAAS;GAHvE,IAAA,WAAA;IAKG,OAAA,mBAAmB,MAAM;GACrB;EAPTiB,CAAAA,GAAAA,KASM;EATN,OAAA,aAQE;GAAC,OAAA,MAAM;EAAI,GARbA,MASM;EATN,OAAA;CASM,EAAA,CAAA,IAEN,MAAM;CAGV,OACEC,gBAAAA,WAAAA,WAAAA;EACE,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQC,gBAAAA,UAAAA,CAAS,CAAA;EAAC;EAC9B,IAAA,QAAA;GAAO,OAAA,MAAM;EAAI;EACjB,IAAA,cAAA;GAAa,OAAA,MAAM;EAAW;EAC9B,IAAA,SAAA;GAAQC,OAAAA,WAAAA;IAAM,OAAA,CAAA,CAAA,MAAA;GAA8C,CAAA,CAAC,CAAD,IAArC,aAAa,MAAM,UAAU,KAAA;EAAS;EAC7D,IAAA,cAAA;GAAaC,OAAAA,WAAAA;IAAM,OAAA,CAAA,CAAA,MAAA;GAAoD,CAAA,CAAC,CAAD,IAA3C,mBAAmB,MAAM,UAAU,KAAA;EAAS;EACxE,IAAA,OAAA;GAAM,OAAA,UAAU;EAAC;EACjB,IAAA,cAAA;GAAa,OAAA,MAAM,eAAe,MAAM,WAAW;EAAmB;CAI7D,GAHL,MARN,EAAA,IAAA,WAAA;EAUG,OAAA,UAAU,IAAI,SAAS,KAAA;CACf,EAAA,CAAA,CAAA;AAEf"}
1
+ {"version":3,"file":"tool.js","names":["<Show when={props.truncated}>\n <p class=\"m-0 px-1 text-xs text-muted-foreground\">\n Showing the first {props.maxChars.toLocaleString('en')} characters.\n </p>\n </Show>","<p class=\"m-0 px-1 text-xs text-muted-foreground\">\n Showing the first {props.maxChars.toLocaleString('en')} characters.\n </p>","<CodeBlock\n size=\"sm\"\n title={props.title}\n language={formatted().language}\n code={formatted().text}\n complete={props.complete ?? true}\n maxHeight={SECTION_MAX_HEIGHT}\n wrap={formatted().language === 'text'}\n />","size=\"sm\"","maxHeight={SECTION_MAX_HEIGHT}","<div class=\"flex min-w-0 flex-col gap-1\">\n <CodeBlock\n size=\"sm\"\n title={props.title}\n language={formatted().language}\n code={formatted().text}\n complete={props.complete ?? true}\n maxHeight={SECTION_MAX_HEIGHT}\n wrap={formatted().language === 'text'}\n />\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </div>","<TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />","<TraceError text={formatted().text}>\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </TraceError>","<TraceDetail class=\"flex flex-col gap-2\">\n <Show when={hasInput()}>\n <Section title=\"Input\" value={local.input} maxChars={maxChars()} />\n </Show>\n <Show when={hasOutput()}>\n <Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />\n </Show>\n <Show when={hasError()}>\n <ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />\n </Show>\n {extra()}\n </TraceDetail>","class=\"flex flex-col gap-2\"","<Show when={hasInput()}>\n <Section title=\"Input\" value={local.input} maxChars={maxChars()} />\n </Show>","<Section title=\"Input\" value={local.input} maxChars={maxChars()} />","title=\"Input\"","<Show when={hasOutput()}>\n <Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />\n </Show>","<Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />","title=\"Output\"","<Show when={hasError()}>\n <ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />\n </Show>","<ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />","extra()","<Badge\n aria-hidden=\"true\"\n size=\"sm\"\n variant={local.status === 'awaiting-approval' ? 'warning' : 'outline'}\n >\n {TOOL_STATUS_LABELS[local.status]}\n </Badge>","<span class=\"flex items-center gap-2\">\n <Badge\n aria-hidden=\"true\"\n size=\"sm\"\n variant={local.status === 'awaiting-approval' ? 'warning' : 'outline'}\n >\n {TOOL_STATUS_LABELS[local.status]}\n </Badge>\n {local.meta}\n </span>","<TraceLine\n icon={local.icon ?? <Wrench />}\n title={local.name}\n description={local.description}\n status={local.status ? TRACE_STATUS[local.status] : undefined}\n statusLabel={local.status ? TOOL_STATUS_LABELS[local.status] : undefined}\n meta={wordBadge()}\n defaultOpen={local.defaultOpen ?? local.status === 'awaiting-approval'}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>","<Wrench />","local.status ? TRACE_STATUS[local.status] : undefined","local.status ? TOOL_STATUS_LABELS[local.status] : undefined","LucideWrench","_$insert","resolveChildren"],"sources":["../../../../src/components/composites/tool/tool.tsx"],"sourcesContent":["import { Wrench as LucideWrench } from '@lucide/solid'\nimport { children as resolveChildren, createMemo, Show, omit } from 'solid-js'\nimport { type JSX } from '@solidjs/web'\nimport { Badge } from '../../ui/badge'\nimport { CodeBlock } from '../../ui/code-block'\nimport {\n TRACE_STATUS_LABELS,\n TraceDetail,\n TraceError,\n TraceLine,\n type TraceLineProps,\n type TraceStatus,\n} from '../../ui/trace'\nimport { formatToolValue, TOOL_VALUE_MAX_CHARS } from './format-tool-value'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst Wrench = fastIcon(LucideWrench)\n\n/**\n * Tool.\n *\n * One tool call, from what was asked to what came back, as a `TraceLine`: the\n * tool's name and a short description on the line, and, when there is anything\n * to show, an input section, an output section and an error underneath. Reach\n * for `Subagent` when the \"tool\" is another agent with steps of its own, for a\n * bare `CodeBlock` when the point is the output itself and not the call that made\n * it, and for a confirmation (passed as `children`) when the reader has to decide\n * something about the call.\n *\n * ## Everything is optional, and absence is not a claim\n *\n * A call with no `status` shows no mark at all, an event that merely arrived is\n * not \"done\". `input`, `output` and `errorText` each render a section only when\n * the host passed them: no empty \"Output\" box under a call that is still running,\n * and no invented \"No output\" under one that failed. An error with no output is\n * just the error. A call with nothing to expand is a plain line, not a\n * disclosure that opens onto nothing.\n *\n * Two statuses are words, not only marks, because the glyphs for them are easy to\n * misread: `awaiting-approval` and `denied` also show a badge. Both are spoken\n * once (the badge is hidden from assistive technology and the status word is\n * read in its place). A call awaiting approval opens by default, since it is the\n * one state in which the reader has something to do. The component never decides\n * whether an approval is allowed: the controls live in `children`, supplied by\n * the host, or are absent.\n *\n * ## Payloads are untrusted and unbounded\n *\n * `input` and `output` are `unknown`, whatever the model sent and the tool\n * returned. They go through `formatToolValue`, which cannot throw (circular\n * references, `BigInt`, throwing getters) and stops after `maxChars`; a cut view\n * says so rather than presenting half a document as the whole. Sections render in\n * a small `CodeBlock` with a capped height. A string is shown as given; anything\n * structured is pretty-printed JSON. The sections mount only when the line is\n * opened, so a transcript of hundreds of calls formats none of them until asked.\n *\n * A `Tool` is a line: place it inside a `Trace`.\n */\nexport type ToolStatus =\n | 'pending'\n | 'running'\n | 'success'\n | 'error'\n | 'awaiting-approval'\n | 'denied'\n | 'cancelled'\n\n/**\n * The words spoken (and, for the last three, shown) for each status. `denied` is\n * a decision about the call; `cancelled` is the run being stopped while the call\n * was in flight. Give a call `cancelled` only when the host knows that call was\n * stopped: a run ending does not by itself say what became of each call.\n */\nexport const TOOL_STATUS_LABELS: Readonly<Record<ToolStatus, string>> = {\n ...TRACE_STATUS_LABELS,\n 'awaiting-approval': 'Awaiting approval',\n denied: 'Denied',\n}\n\nconst TRACE_STATUS: Readonly<Record<ToolStatus, TraceStatus>> = {\n pending: 'pending',\n running: 'running',\n success: 'success',\n error: 'error',\n 'awaiting-approval': 'pending',\n denied: 'cancelled',\n cancelled: 'cancelled',\n}\n\nexport type ToolProps = Omit<\n TraceLineProps,\n 'title' | 'status' | 'statusLabel' | 'href' | 'onSelect' | 'selectHaspopup' | 'children'\n> & {\n /** The tool's name, as the host knows it. Rendered as text. */\n name: string\n /** What this call is for: a path, a query, a command. */\n description?: JSX.Element\n status?: ToolStatus\n /** What the model asked the tool to do. Any value; omit it to show no section. */\n input?: unknown\n /** What the tool returned. Any value; omit it to show no section. */\n output?: unknown\n errorText?: string\n /** Characters of each section shown before it is cut. Defaults to 20,000. */\n maxChars?: number\n /** Extra detail below the sections: an approval, a link to the full output. */\n children?: JSX.Element\n}\n\nconst SECTION_MAX_HEIGHT = '16rem'\n\nfunction TruncatedNote(props: { truncated: boolean; maxChars: number }) {\n return (\n <Show when={props.truncated}>\n <p class=\"m-0 px-1 text-xs text-muted-foreground\">\n Showing the first {props.maxChars.toLocaleString('en')} characters.\n </p>\n </Show>\n )\n}\n\nfunction Section(props: { title: string; value: unknown; maxChars: number; complete?: boolean }) {\n const formatted = createMemo(() => formatToolValue(props.value, { maxChars: props.maxChars }))\n return (\n <div class=\"flex min-w-0 flex-col gap-1\">\n <CodeBlock\n size=\"sm\"\n title={props.title}\n language={formatted().language}\n code={formatted().text}\n complete={props.complete ?? true}\n maxHeight={SECTION_MAX_HEIGHT}\n wrap={formatted().language === 'text'}\n />\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </div>\n )\n}\n\nfunction ErrorSection(props: { text: string; maxChars: number }) {\n const formatted = createMemo(() => formatToolValue(props.text, { maxChars: props.maxChars }))\n return (\n <TraceError text={formatted().text}>\n <TruncatedNote truncated={formatted().truncated} maxChars={props.maxChars} />\n </TraceError>\n )\n}\n\nexport function Tool(props: ToolProps) {\n const local = props\n const rest = omit(\n props,\n 'name',\n 'description',\n 'status',\n 'input',\n 'output',\n 'errorText',\n 'maxChars',\n 'icon',\n 'meta',\n 'defaultOpen',\n 'children'\n )\n const maxChars = () => local.maxChars ?? TOOL_VALUE_MAX_CHARS\n const hasInput = () => local.input !== undefined\n const hasOutput = () => local.output !== undefined\n const hasError = () => local.errorText !== undefined && local.errorText !== ''\n // Resolved once: a host's approval controls are created once and keep their\n // state and focus however often the line is folded.\n const extra = resolveChildren(() => local.children)\n const hasDetail = () => hasInput() || hasOutput() || hasError() || extra.toArray().length > 0\n\n const detail = () => (\n <TraceDetail class=\"flex flex-col gap-2\">\n <Show when={hasInput()}>\n <Section title=\"Input\" value={local.input} maxChars={maxChars()} />\n </Show>\n <Show when={hasOutput()}>\n <Section\n title=\"Output\"\n value={local.output}\n maxChars={maxChars()}\n complete={local.status !== 'running'}\n />\n </Show>\n <Show when={hasError()}>\n <ErrorSection text={local.errorText ?? ''} maxChars={maxChars()} />\n </Show>\n {extra()}\n </TraceDetail>\n )\n\n // Words as well as marks for the states whose glyph is easy to misread. The\n // badge is hidden from assistive technology: the status word is already spoken.\n const wordBadge = () =>\n local.status === 'awaiting-approval' ||\n local.status === 'denied' ||\n local.status === 'cancelled' ? (\n <span class=\"flex items-center gap-2\">\n <Badge\n aria-hidden=\"true\"\n size=\"sm\"\n variant={local.status === 'awaiting-approval' ? 'warning' : 'outline'}\n >\n {TOOL_STATUS_LABELS[local.status]}\n </Badge>\n {local.meta}\n </span>\n ) : (\n local.meta\n )\n\n return (\n <TraceLine\n icon={local.icon ?? <Wrench />}\n title={local.name}\n description={local.description}\n status={local.status ? TRACE_STATUS[local.status] : undefined}\n statusLabel={local.status ? TOOL_STATUS_LABELS[local.status] : undefined}\n meta={wordBadge()}\n defaultOpen={local.defaultOpen ?? local.status === 'awaiting-approval'}\n {...rest}\n >\n {hasDetail() ? detail : undefined}\n </TraceLine>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,IAAM,SAAS,SAASyB,QAAY;;;;;;;AAyDpC,IAAa,qBAA2D;CACtE,GAAG;CACH,qBAAqB;CACrB,QAAQ;AACV;AAEA,IAAM,eAA0D;CAC9D,SAAS;CACT,SAAS;CACT,SAAS;CACT,OAAO;CACP,qBAAqB;CACrB,QAAQ;CACR,WAAW;AACb;AAsBA,IAAM,qBAAqB;AAE3B,SAAS,cAAc,OAAiD;CACtE,OACEzB,WAAAA;;GAAY,OAAA,CAAA,CAAA,MAAM;EAIZ,CAAA,CAAC,CAAD,WAHJ;GAEG,IAAA,OAAA,OAAA;G,YAFH,KAAA,W;GACoB0B,OAAA,YAAA;IAAC,OAAA,MAAM,SAAS,eAAe,IAAI;G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AM,WAAW,qBACf;EASM,IAAA,QAAA,QAAA;EATN,IAAA,QAAA,MAAA;;EACEC,OAAAA,OAAAA,gBAAAA,OAAAA;GACE,eAAY;GACZhB,MAAK;GACL,IAAA,UAAA;IAAS,OAAA,MAAM,WAAW,sBAAsB,YAAY;GAAS;GAHvE,IAAA,WAAA;IAKG,OAAA,mBAAmB,MAAM;GACrB;EAPTiB,CAAAA,GAAAA,KASM;EATNM,OAAA,aAQE;GAAC,OAAA,MAAM;EAAI,GARbN,MASM;EATN,OAAA;CASM,EAAA,CAAA,IAEN,MAAM;CAGV,OACEC,gBAAAA,WAAAA,WAAAA;EACE,IAAA,OAAA;GAAM,OAAA,MAAM,QAAQC,gBAAAA,QAAAA,CAAS,CAAA;EAAC;EAC9B,IAAA,QAAA;GAAO,OAAA,MAAM;EAAI;EACjB,IAAA,cAAA;GAAa,OAAA,MAAM;EAAW;EAC9B,IAAA,SAAA;GAAQC,OAAAA,WAAAA;IAAM,OAAA,CAAA,CAAA,MAAA;GAA8C,CAAA,CAAC,CAAD,IAArC,aAAa,MAAM,UAAU,KAAA;EAAS;EAC7D,IAAA,cAAA;GAAaC,OAAAA,WAAAA;IAAM,OAAA,CAAA,CAAA,MAAA;GAAoD,CAAA,CAAC,CAAD,IAA3C,mBAAmB,MAAM,UAAU,KAAA;EAAS;EACxE,IAAA,OAAA;GAAM,OAAA,UAAU;EAAC;EACjB,IAAA,cAAA;GAAa,OAAA,MAAM,eAAe,MAAM,WAAW;EAAmB;CAI7D,GAHL,MARN,EAAA,IAAA,WAAA;EAUG,OAAA,UAAU,IAAI,SAAS,KAAA;CACf,EAAA,CAAA,CAAA;AAEf"}
@@ -1,10 +1,10 @@
1
+ import { addEvent, className, createComponent, delegateEvents, effect, insert, memo, readShallow, ref, setAttribute, setStyleProperty, spread, template } from "@solidjs/web";
2
+ import { ChevronRight as ChevronRight$1 } from "@lucide/solid";
3
+ import { For, createContext, createEffect, createMemo, createProjection, createUniqueId, omit, onCleanup, useContext } from "solid-js";
1
4
  import { cn } from "../../../lib/utils.js";
2
5
  import { indexTreeItems, treeNavigationAction, typeaheadIndex } from "./tree-navigation.js";
3
6
  import { fastIcon } from "../../../lib/fast-icon.js";
4
7
  import { forwardRef } from "../../../lib/refs.js";
5
- import { addEvent, className, createComponent, delegateEvents, effect, insert, memo, readShallow, ref, setAttribute, setStyleProperty, spread, template } from "@solidjs/web";
6
- import { ChevronRight } from "@lucide/solid";
7
- import { For, createContext, createEffect, createMemo, createProjection, createUniqueId, omit, onCleanup, useContext } from "solid-js";
8
8
  // src/components/composites/tree/tree.tsx
9
9
  var _tmpl$ = /* @__PURE__ */ template(`<div>`);
10
10
  var _tmpl$2 = /* @__PURE__ */ template(`<div><span></span><span class="min-w-0 flex-1 truncate"></span><!>`);
@@ -15,7 +15,7 @@ var _tmpl$6 = /* @__PURE__ */ template(`<span>`);
15
15
  var _tmpl$7 = /* @__PURE__ */ template(`<div data-slot=tree-sticky-header>`);
16
16
  var _tmpl$8 = /* @__PURE__ */ template(`<div aria-hidden=true class="border-b border-border bg-background">`);
17
17
  var _tmpl$9 = /* @__PURE__ */ template(`<button type=button tabindex=-1 class="flex min-h-row-sm w-full min-w-0 items-center gap-1.5 pe-1.5 text-left text-sm outline-none hover:bg-surface-hover"><span class="flex size-3.5 shrink-0 items-center justify-center text-muted-foreground">`);
18
- var ChevronRight$1 = fastIcon(ChevronRight);
18
+ var ChevronRight = fastIcon(ChevronRight$1);
19
19
  var TreeContext = createContext(null);
20
20
  function useTreeContext() {
21
21
  const tree = useContext(TreeContext);
@@ -415,7 +415,7 @@ function TreeRow(props) {
415
415
  return !!local.item.expandable;
416
416
  });
417
417
  return () => {
418
- return _c$2() ? createComponent(ChevronRight$1, {
418
+ return _c$2() ? createComponent(ChevronRight, {
419
419
  "aria-hidden": "true",
420
420
  get "class"() {
421
421
  return cn("size-3.5 transition-transform", local.item.expanded && "rotate-90");
@@ -518,7 +518,7 @@ function TreeStickyHeader(props) {
518
518
  var _el$13 = _el$12.firstChild;
519
519
  _el$12._$$click = () => props.onSelect?.(item.id);
520
520
  addEvent(_el$12, "mousedown", handleMarkerMouseDown, true);
521
- insert(_el$13, createComponent(ChevronRight$1, {
521
+ insert(_el$13, createComponent(ChevronRight, {
522
522
  "aria-hidden": "true",
523
523
  class: "size-3.5 rotate-90"
524
524
  }));