@aceshooting/lyra-ui 1.2.0 → 2.1.0

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 (384) hide show
  1. package/README.md +98 -14
  2. package/custom-elements.json +30279 -12124
  3. package/dist/components/app-rail/app-rail-item.d.ts +30 -0
  4. package/dist/components/app-rail/app-rail-item.js +68 -0
  5. package/dist/components/app-rail/app-rail-item.styles.d.ts +1 -0
  6. package/dist/components/app-rail/app-rail-item.styles.js +65 -0
  7. package/dist/components/app-rail/app-rail.d.ts +168 -0
  8. package/dist/components/app-rail/app-rail.js +419 -0
  9. package/dist/components/app-rail/app-rail.styles.d.ts +1 -0
  10. package/dist/components/app-rail/app-rail.styles.js +128 -0
  11. package/dist/components/attachment-chip/attachment-chip.d.ts +141 -0
  12. package/dist/components/attachment-chip/attachment-chip.js +356 -0
  13. package/dist/components/attachment-chip/attachment-chip.styles.d.ts +1 -0
  14. package/dist/components/attachment-chip/attachment-chip.styles.js +184 -0
  15. package/dist/components/attachment-trigger/attachment-trigger.d.ts +96 -0
  16. package/dist/components/attachment-trigger/attachment-trigger.js +270 -0
  17. package/dist/components/attachment-trigger/attachment-trigger.styles.d.ts +1 -0
  18. package/dist/components/attachment-trigger/attachment-trigger.styles.js +90 -0
  19. package/dist/components/chart/bar-chart.js +2 -18
  20. package/dist/components/chart/box-plot.d.ts +25 -1
  21. package/dist/components/chart/box-plot.js +147 -7
  22. package/dist/components/chart/box-plot.styles.js +13 -0
  23. package/dist/components/chart/bubble-chart.js +2 -18
  24. package/dist/components/chart/chart-loader.d.ts +44 -13
  25. package/dist/components/chart/chart-loader.js +65 -18
  26. package/dist/components/chart/chart.d.ts +55 -12
  27. package/dist/components/chart/chart.js +247 -49
  28. package/dist/components/chart/doughnut-chart.js +2 -18
  29. package/dist/components/chart/histogram-bin.d.ts +7 -1
  30. package/dist/components/chart/histogram-bin.js +32 -14
  31. package/dist/components/chart/histogram.js +8 -16
  32. package/dist/components/chart/line-chart.js +2 -18
  33. package/dist/components/chart/lite-chart.d.ts +134 -3
  34. package/dist/components/chart/lite-chart.js +382 -67
  35. package/dist/components/chart/lite-chart.styles.js +9 -0
  36. package/dist/components/chart/pie-chart.js +2 -18
  37. package/dist/components/chart/polar-area-chart.js +2 -18
  38. package/dist/components/chart/radar-chart.js +2 -18
  39. package/dist/components/chart/scatter-chart.js +2 -18
  40. package/dist/components/chat-composer/chat-composer.d.ts +133 -0
  41. package/dist/components/chat-composer/chat-composer.js +366 -0
  42. package/dist/components/chat-composer/chat-composer.styles.d.ts +1 -0
  43. package/dist/components/chat-composer/chat-composer.styles.js +145 -0
  44. package/dist/components/chat-message/chat-message.d.ts +141 -0
  45. package/dist/components/chat-message/chat-message.js +331 -0
  46. package/dist/components/chat-message/chat-message.styles.d.ts +1 -0
  47. package/dist/components/chat-message/chat-message.styles.js +203 -0
  48. package/dist/components/checkbox/checkbox.d.ts +117 -0
  49. package/dist/components/checkbox/checkbox.js +353 -0
  50. package/dist/components/checkbox/checkbox.styles.d.ts +1 -0
  51. package/dist/components/checkbox/checkbox.styles.js +77 -0
  52. package/dist/components/chip/chip-group.d.ts +56 -0
  53. package/dist/components/chip/chip-group.js +130 -0
  54. package/dist/components/chip/chip-group.styles.d.ts +1 -0
  55. package/dist/components/chip/chip-group.styles.js +57 -0
  56. package/dist/components/chip/chip.d.ts +64 -0
  57. package/dist/components/chip/chip.js +122 -0
  58. package/dist/components/chip/chip.styles.d.ts +1 -0
  59. package/dist/components/chip/chip.styles.js +115 -0
  60. package/dist/components/citation-badge/citation-badge.d.ts +113 -0
  61. package/dist/components/citation-badge/citation-badge.js +318 -0
  62. package/dist/components/citation-badge/citation-badge.styles.d.ts +1 -0
  63. package/dist/components/citation-badge/citation-badge.styles.js +96 -0
  64. package/dist/components/code-block/code-block.d.ts +127 -0
  65. package/dist/components/code-block/code-block.js +382 -0
  66. package/dist/components/code-block/code-block.styles.d.ts +1 -0
  67. package/dist/components/code-block/code-block.styles.js +187 -0
  68. package/dist/components/code-block/code-loader.d.ts +87 -0
  69. package/dist/components/code-block/code-loader.js +142 -0
  70. package/dist/components/combobox/combobox.d.ts +65 -6
  71. package/dist/components/combobox/combobox.js +258 -48
  72. package/dist/components/combobox/combobox.styles.js +3 -3
  73. package/dist/components/combobox/option.d.ts +5 -1
  74. package/dist/components/combobox/option.js +35 -0
  75. package/dist/components/context-meter/context-meter.d.ts +53 -0
  76. package/dist/components/context-meter/context-meter.js +159 -0
  77. package/dist/components/context-meter/context-meter.styles.d.ts +1 -0
  78. package/dist/components/context-meter/context-meter.styles.js +114 -0
  79. package/dist/components/conversation-item/conversation-item.d.ts +125 -0
  80. package/dist/components/conversation-item/conversation-item.js +331 -0
  81. package/dist/components/conversation-item/conversation-item.styles.d.ts +1 -0
  82. package/dist/components/conversation-item/conversation-item.styles.js +155 -0
  83. package/dist/components/date-picker/calendar-core.d.ts +24 -0
  84. package/dist/components/date-picker/calendar-core.js +51 -4
  85. package/dist/components/date-picker/date-input.d.ts +100 -9
  86. package/dist/components/date-picker/date-input.js +383 -66
  87. package/dist/components/date-picker/date-picker.d.ts +35 -4
  88. package/dist/components/date-picker/date-picker.js +171 -44
  89. package/dist/components/dialog/confirm.d.ts +40 -0
  90. package/dist/components/dialog/confirm.js +76 -0
  91. package/dist/components/dialog/dialog.d.ts +129 -0
  92. package/dist/components/dialog/dialog.js +288 -0
  93. package/dist/components/dialog/dialog.styles.d.ts +1 -0
  94. package/dist/components/dialog/dialog.styles.js +96 -0
  95. package/dist/components/dock-panel/dock-panel.d.ts +142 -0
  96. package/dist/components/dock-panel/dock-panel.js +359 -0
  97. package/dist/components/dock-panel/dock-panel.styles.d.ts +1 -0
  98. package/dist/components/dock-panel/dock-panel.styles.js +159 -0
  99. package/dist/components/document-preview/document-preview.d.ts +143 -0
  100. package/dist/components/document-preview/document-preview.js +388 -0
  101. package/dist/components/document-preview/document-preview.styles.d.ts +1 -0
  102. package/dist/components/document-preview/document-preview.styles.js +191 -0
  103. package/dist/components/empty/empty.d.ts +1 -2
  104. package/dist/components/empty/empty.js +18 -12
  105. package/dist/components/empty/empty.styles.js +0 -3
  106. package/dist/components/export-button/csv.js +1 -1
  107. package/dist/components/export-button/export-button.d.ts +12 -0
  108. package/dist/components/export-button/export-button.js +35 -5
  109. package/dist/components/export-button/export-button.styles.js +5 -1
  110. package/dist/components/file-input/accept.js +2 -0
  111. package/dist/components/file-input/file-input.d.ts +10 -1
  112. package/dist/components/file-input/file-input.js +36 -5
  113. package/dist/components/flag/flag.d.ts +29 -13
  114. package/dist/components/flag/flag.js +54 -14
  115. package/dist/components/flag/flag.styles.js +1 -1
  116. package/dist/components/flag/language-map.d.ts +4 -1
  117. package/dist/components/flag/language-map.js +6 -3
  118. package/dist/components/gauge/gauge.d.ts +10 -1
  119. package/dist/components/gauge/gauge.js +41 -13
  120. package/dist/components/generation-status/generation-status.d.ts +117 -0
  121. package/dist/components/generation-status/generation-status.js +327 -0
  122. package/dist/components/generation-status/generation-status.styles.d.ts +1 -0
  123. package/dist/components/generation-status/generation-status.styles.js +84 -0
  124. package/dist/components/graph/graph.d.ts +37 -3
  125. package/dist/components/graph/graph.js +132 -20
  126. package/dist/components/heatmap/calendar-grid.d.ts +19 -7
  127. package/dist/components/heatmap/calendar-grid.js +42 -18
  128. package/dist/components/heatmap/heatmap-scale.d.ts +11 -1
  129. package/dist/components/heatmap/heatmap-scale.js +14 -2
  130. package/dist/components/heatmap/heatmap.d.ts +227 -12
  131. package/dist/components/heatmap/heatmap.js +488 -93
  132. package/dist/components/json-viewer/json-viewer.d.ts +70 -0
  133. package/dist/components/json-viewer/json-viewer.js +361 -0
  134. package/dist/components/json-viewer/json-viewer.styles.d.ts +1 -0
  135. package/dist/components/json-viewer/json-viewer.styles.js +177 -0
  136. package/dist/components/kbd/kbd.d.ts +77 -0
  137. package/dist/components/kbd/kbd.js +231 -0
  138. package/dist/components/kbd/kbd.styles.d.ts +1 -0
  139. package/dist/components/kbd/kbd.styles.js +52 -0
  140. package/dist/components/live-region/live-region.d.ts +90 -0
  141. package/dist/components/live-region/live-region.js +189 -0
  142. package/dist/components/live-region/live-region.styles.d.ts +1 -0
  143. package/dist/components/live-region/live-region.styles.js +10 -0
  144. package/dist/components/map/map.d.ts +32 -7
  145. package/dist/components/map/map.js +133 -32
  146. package/dist/components/markdown/markdown-loader.d.ts +58 -0
  147. package/dist/components/markdown/markdown-loader.js +77 -0
  148. package/dist/components/markdown/markdown.d.ts +119 -0
  149. package/dist/components/markdown/markdown.js +389 -0
  150. package/dist/components/markdown/markdown.styles.d.ts +1 -0
  151. package/dist/components/markdown/markdown.styles.js +88 -0
  152. package/dist/components/media-card/media-card.d.ts +130 -0
  153. package/dist/components/media-card/media-card.js +273 -0
  154. package/dist/components/media-card/media-card.styles.d.ts +1 -0
  155. package/dist/components/media-card/media-card.styles.js +132 -0
  156. package/dist/components/mention-popover/mention-popover.d.ts +203 -0
  157. package/dist/components/mention-popover/mention-popover.js +493 -0
  158. package/dist/components/mention-popover/mention-popover.styles.d.ts +1 -0
  159. package/dist/components/mention-popover/mention-popover.styles.js +101 -0
  160. package/dist/components/menu/menu-item.d.ts +91 -0
  161. package/dist/components/menu/menu-item.js +206 -0
  162. package/dist/components/menu/menu-item.styles.d.ts +1 -0
  163. package/dist/components/menu/menu-item.styles.js +75 -0
  164. package/dist/components/menu/menu.d.ts +167 -0
  165. package/dist/components/menu/menu.js +461 -0
  166. package/dist/components/menu/menu.styles.d.ts +1 -0
  167. package/dist/components/menu/menu.styles.js +67 -0
  168. package/dist/components/model-select/model-select.d.ts +170 -0
  169. package/dist/components/model-select/model-select.js +588 -0
  170. package/dist/components/model-select/model-select.styles.d.ts +1 -0
  171. package/dist/components/model-select/model-select.styles.js +203 -0
  172. package/dist/components/model-settings-panel/model-settings-panel.d.ts +93 -0
  173. package/dist/components/model-settings-panel/model-settings-panel.js +209 -0
  174. package/dist/components/model-settings-panel/model-settings-panel.styles.d.ts +1 -0
  175. package/dist/components/model-settings-panel/model-settings-panel.styles.js +82 -0
  176. package/dist/components/playback/playback.d.ts +19 -3
  177. package/dist/components/playback/playback.js +109 -33
  178. package/dist/components/playback/playback.styles.js +6 -1
  179. package/dist/components/responsive-panel/responsive-panel.d.ts +163 -0
  180. package/dist/components/responsive-panel/responsive-panel.js +363 -0
  181. package/dist/components/responsive-panel/responsive-panel.styles.d.ts +1 -0
  182. package/dist/components/responsive-panel/responsive-panel.styles.js +103 -0
  183. package/dist/components/result-card/result-card.d.ts +50 -0
  184. package/dist/components/result-card/result-card.js +89 -0
  185. package/dist/components/result-card/result-card.styles.d.ts +1 -0
  186. package/dist/components/result-card/result-card.styles.js +49 -0
  187. package/dist/components/result-card/result-field.d.ts +36 -0
  188. package/dist/components/result-card/result-field.js +87 -0
  189. package/dist/components/result-card/result-field.styles.d.ts +1 -0
  190. package/dist/components/result-card/result-field.styles.js +32 -0
  191. package/dist/components/select/select.d.ts +84 -4
  192. package/dist/components/select/select.js +251 -36
  193. package/dist/components/skeleton/skeleton.d.ts +3 -0
  194. package/dist/components/skeleton/skeleton.js +7 -1
  195. package/dist/components/skeleton/skeleton.styles.js +5 -4
  196. package/dist/components/slider/slider.d.ts +141 -0
  197. package/dist/components/slider/slider.js +467 -0
  198. package/dist/components/slider/slider.styles.d.ts +1 -0
  199. package/dist/components/slider/slider.styles.js +87 -0
  200. package/dist/components/source-card/source-card.d.ts +104 -0
  201. package/dist/components/source-card/source-card.js +195 -0
  202. package/dist/components/source-card/source-card.styles.d.ts +1 -0
  203. package/dist/components/source-card/source-card.styles.js +69 -0
  204. package/dist/components/source-list/source-list.d.ts +63 -0
  205. package/dist/components/source-list/source-list.js +130 -0
  206. package/dist/components/source-list/source-list.styles.d.ts +1 -0
  207. package/dist/components/source-list/source-list.styles.js +59 -0
  208. package/dist/components/sparkline/sparkline.js +58 -20
  209. package/dist/components/split/split.d.ts +224 -5
  210. package/dist/components/split/split.js +617 -43
  211. package/dist/components/split/split.styles.js +47 -0
  212. package/dist/components/stat/stat.d.ts +15 -4
  213. package/dist/components/stat/stat.js +53 -12
  214. package/dist/components/stream-status/stream-status.d.ts +126 -0
  215. package/dist/components/stream-status/stream-status.js +292 -0
  216. package/dist/components/stream-status/stream-status.styles.d.ts +1 -0
  217. package/dist/components/stream-status/stream-status.styles.js +103 -0
  218. package/dist/components/streaming-text/streaming-text.d.ts +104 -0
  219. package/dist/components/streaming-text/streaming-text.js +224 -0
  220. package/dist/components/streaming-text/streaming-text.styles.d.ts +1 -0
  221. package/dist/components/streaming-text/streaming-text.styles.js +63 -0
  222. package/dist/components/switch/switch.d.ts +103 -0
  223. package/dist/components/switch/switch.js +250 -0
  224. package/dist/components/switch/switch.styles.d.ts +1 -0
  225. package/dist/components/switch/switch.styles.js +75 -0
  226. package/dist/components/table/table.d.ts +89 -5
  227. package/dist/components/table/table.js +243 -26
  228. package/dist/components/table/table.styles.js +6 -1
  229. package/dist/components/tabs/tabs.d.ts +74 -0
  230. package/dist/components/tabs/tabs.js +254 -0
  231. package/dist/components/tabs/tabs.styles.d.ts +1 -0
  232. package/dist/components/tabs/tabs.styles.js +74 -0
  233. package/dist/components/thinking-panel/thinking-panel.d.ts +123 -0
  234. package/dist/components/thinking-panel/thinking-panel.js +260 -0
  235. package/dist/components/thinking-panel/thinking-panel.styles.d.ts +1 -0
  236. package/dist/components/thinking-panel/thinking-panel.styles.js +123 -0
  237. package/dist/components/time-range/time-range.d.ts +59 -2
  238. package/dist/components/time-range/time-range.js +163 -67
  239. package/dist/components/toast/toast-item.d.ts +12 -2
  240. package/dist/components/toast/toast-item.js +106 -44
  241. package/dist/components/toast/toast-item.styles.js +59 -28
  242. package/dist/components/toast/toast.js +17 -5
  243. package/dist/components/toast/toaster.js +10 -1
  244. package/dist/components/tool-approval-dialog/tool-approval-dialog.d.ts +131 -0
  245. package/dist/components/tool-approval-dialog/tool-approval-dialog.js +329 -0
  246. package/dist/components/tool-approval-dialog/tool-approval-dialog.styles.d.ts +1 -0
  247. package/dist/components/tool-approval-dialog/tool-approval-dialog.styles.js +160 -0
  248. package/dist/components/tool-call-chip/tool-call-chip.d.ts +105 -0
  249. package/dist/components/tool-call-chip/tool-call-chip.js +349 -0
  250. package/dist/components/tool-call-chip/tool-call-chip.styles.d.ts +1 -0
  251. package/dist/components/tool-call-chip/tool-call-chip.styles.js +203 -0
  252. package/dist/components/tool-param-form/tool-param-form.d.ts +206 -0
  253. package/dist/components/tool-param-form/tool-param-form.js +610 -0
  254. package/dist/components/tool-param-form/tool-param-form.styles.d.ts +1 -0
  255. package/dist/components/tool-param-form/tool-param-form.styles.js +75 -0
  256. package/dist/components/tool-result-dialog/tool-result-dialog.d.ts +122 -0
  257. package/dist/components/tool-result-dialog/tool-result-dialog.js +358 -0
  258. package/dist/components/tool-result-dialog/tool-result-dialog.styles.d.ts +1 -0
  259. package/dist/components/tool-result-dialog/tool-result-dialog.styles.js +176 -0
  260. package/dist/components/tool-result-view/registry.d.ts +73 -0
  261. package/dist/components/tool-result-view/registry.js +89 -0
  262. package/dist/components/tool-result-view/tool-result-view.d.ts +58 -0
  263. package/dist/components/tool-result-view/tool-result-view.js +152 -0
  264. package/dist/components/tool-result-view/tool-result-view.styles.d.ts +1 -0
  265. package/dist/components/tool-result-view/tool-result-view.styles.js +13 -0
  266. package/dist/components/tool-select-dialog/tool-select-dialog.d.ts +151 -0
  267. package/dist/components/tool-select-dialog/tool-select-dialog.js +350 -0
  268. package/dist/components/tool-select-dialog/tool-select-dialog.styles.d.ts +1 -0
  269. package/dist/components/tool-select-dialog/tool-select-dialog.styles.js +191 -0
  270. package/dist/components/tree/tree-node.d.ts +15 -3
  271. package/dist/components/tree/tree-node.js +20 -7
  272. package/dist/components/tree/tree.d.ts +25 -10
  273. package/dist/components/tree/tree.js +39 -31
  274. package/dist/components/typing-indicator/typing-indicator.d.ts +70 -0
  275. package/dist/components/typing-indicator/typing-indicator.js +108 -0
  276. package/dist/components/typing-indicator/typing-indicator.styles.d.ts +1 -0
  277. package/dist/components/typing-indicator/typing-indicator.styles.js +132 -0
  278. package/dist/components/virtual-list/virtual-list.d.ts +210 -0
  279. package/dist/components/virtual-list/virtual-list.js +607 -0
  280. package/dist/components/virtual-list/virtual-list.styles.d.ts +1 -0
  281. package/dist/components/virtual-list/virtual-list.styles.js +56 -0
  282. package/dist/components/widget/widget.d.ts +5 -4
  283. package/dist/components/widget/widget.js +54 -120
  284. package/dist/components/widget/widget.styles.js +8 -2
  285. package/dist/components/word-cloud/word-cloud-layout.d.ts +7 -0
  286. package/dist/components/word-cloud/word-cloud-layout.js +29 -2
  287. package/dist/components/word-cloud/word-cloud.d.ts +28 -2
  288. package/dist/components/word-cloud/word-cloud.js +69 -19
  289. package/dist/components/word-cloud/word-cloud.styles.js +16 -3
  290. package/dist/internal/anchored-validity.d.ts +1 -0
  291. package/dist/internal/anchored-validity.js +86 -0
  292. package/dist/internal/announcer.d.ts +57 -0
  293. package/dist/internal/announcer.js +71 -0
  294. package/dist/internal/form-associated.d.ts +8 -0
  295. package/dist/internal/form-associated.js +98 -15
  296. package/dist/internal/group-by-recency.d.ts +50 -0
  297. package/dist/internal/group-by-recency.js +80 -0
  298. package/dist/internal/numbers.d.ts +12 -0
  299. package/dist/internal/numbers.js +26 -0
  300. package/dist/internal/overlay-manager.d.ts +51 -0
  301. package/dist/internal/overlay-manager.js +523 -0
  302. package/dist/internal/positioner.js +27 -3
  303. package/dist/internal/rtl.d.ts +23 -0
  304. package/dist/internal/rtl.js +28 -0
  305. package/dist/internal/safe-url.d.ts +12 -0
  306. package/dist/internal/safe-url.js +41 -0
  307. package/dist/internal/scroll-lock.d.ts +10 -5
  308. package/dist/internal/scroll-lock.js +30 -14
  309. package/dist/internal/tokens.styles.js +22 -10
  310. package/dist/lyra.d.ts +133 -31
  311. package/dist/lyra.js +96 -26
  312. package/llms-full.txt +4546 -183
  313. package/llms.txt +21 -5
  314. package/package.json +41 -6
  315. package/dist/components/chart/bar-chart.stories.d.ts +0 -5
  316. package/dist/components/chart/bar-chart.stories.js +0 -20
  317. package/dist/components/chart/box-plot.stories.d.ts +0 -5
  318. package/dist/components/chart/box-plot.stories.js +0 -29
  319. package/dist/components/chart/bubble-chart.stories.d.ts +0 -5
  320. package/dist/components/chart/bubble-chart.stories.js +0 -26
  321. package/dist/components/chart/chart.stories.d.ts +0 -32
  322. package/dist/components/chart/chart.stories.js +0 -141
  323. package/dist/components/chart/doughnut-chart.stories.d.ts +0 -5
  324. package/dist/components/chart/doughnut-chart.stories.js +0 -26
  325. package/dist/components/chart/histogram.stories.d.ts +0 -5
  326. package/dist/components/chart/histogram.stories.js +0 -17
  327. package/dist/components/chart/line-chart.stories.d.ts +0 -22
  328. package/dist/components/chart/line-chart.stories.js +0 -99
  329. package/dist/components/chart/lite-chart.stories.d.ts +0 -14
  330. package/dist/components/chart/lite-chart.stories.js +0 -114
  331. package/dist/components/chart/pie-chart.stories.d.ts +0 -5
  332. package/dist/components/chart/pie-chart.stories.js +0 -26
  333. package/dist/components/chart/polar-area-chart.stories.d.ts +0 -5
  334. package/dist/components/chart/polar-area-chart.stories.js +0 -20
  335. package/dist/components/chart/radar-chart.stories.d.ts +0 -5
  336. package/dist/components/chart/radar-chart.stories.js +0 -20
  337. package/dist/components/chart/scatter-chart.stories.d.ts +0 -5
  338. package/dist/components/chart/scatter-chart.stories.js +0 -31
  339. package/dist/components/combobox/combobox.stories.d.ts +0 -24
  340. package/dist/components/combobox/combobox.stories.js +0 -102
  341. package/dist/components/date-picker/date-input.stories.d.ts +0 -10
  342. package/dist/components/date-picker/date-input.stories.js +0 -48
  343. package/dist/components/date-picker/date-picker.stories.d.ts +0 -10
  344. package/dist/components/date-picker/date-picker.stories.js +0 -25
  345. package/dist/components/empty/empty.stories.d.ts +0 -7
  346. package/dist/components/empty/empty.stories.js +0 -34
  347. package/dist/components/export-button/export-button.stories.d.ts +0 -7
  348. package/dist/components/export-button/export-button.stories.js +0 -37
  349. package/dist/components/file-input/file-input.stories.d.ts +0 -7
  350. package/dist/components/file-input/file-input.stories.js +0 -19
  351. package/dist/components/flag/flag.stories.d.ts +0 -6
  352. package/dist/components/flag/flag.stories.js +0 -31
  353. package/dist/components/gauge/gauge.stories.d.ts +0 -8
  354. package/dist/components/gauge/gauge.stories.js +0 -19
  355. package/dist/components/graph/graph.stories.d.ts +0 -8
  356. package/dist/components/graph/graph.stories.js +0 -68
  357. package/dist/components/heatmap/heatmap.stories.d.ts +0 -27
  358. package/dist/components/heatmap/heatmap.stories.js +0 -179
  359. package/dist/components/map/map.stories.d.ts +0 -15
  360. package/dist/components/map/map.stories.js +0 -135
  361. package/dist/components/playback/playback.stories.d.ts +0 -7
  362. package/dist/components/playback/playback.stories.js +0 -16
  363. package/dist/components/select/select.stories.d.ts +0 -21
  364. package/dist/components/select/select.stories.js +0 -91
  365. package/dist/components/skeleton/skeleton.stories.d.ts +0 -5
  366. package/dist/components/skeleton/skeleton.stories.js +0 -16
  367. package/dist/components/sparkline/sparkline.stories.d.ts +0 -11
  368. package/dist/components/sparkline/sparkline.stories.js +0 -39
  369. package/dist/components/split/split.stories.d.ts +0 -7
  370. package/dist/components/split/split.stories.js +0 -36
  371. package/dist/components/stat/stat.stories.d.ts +0 -9
  372. package/dist/components/stat/stat.stories.js +0 -81
  373. package/dist/components/table/table.stories.d.ts +0 -12
  374. package/dist/components/table/table.stories.js +0 -67
  375. package/dist/components/time-range/time-range.stories.d.ts +0 -8
  376. package/dist/components/time-range/time-range.stories.js +0 -26
  377. package/dist/components/toast/toast.stories.d.ts +0 -8
  378. package/dist/components/toast/toast.stories.js +0 -72
  379. package/dist/components/tree/tree.stories.d.ts +0 -9
  380. package/dist/components/tree/tree.stories.js +0 -52
  381. package/dist/components/widget/widget.stories.d.ts +0 -9
  382. package/dist/components/widget/widget.stories.js +0 -74
  383. package/dist/components/word-cloud/word-cloud.stories.d.ts +0 -10
  384. package/dist/components/word-cloud/word-cloud.stories.js +0 -55
@@ -0,0 +1,122 @@
1
+ import { type TemplateResult, type PropertyValues } from 'lit';
2
+ import { LyraElement } from '../../internal/lyra-element.js';
3
+ /** Same status vocabulary as `<lyra-tool-call-chip>`. */
4
+ export type ToolResultStatus = 'pending' | 'running' | 'success' | 'error' | 'denied';
5
+ /**
6
+ * Reason the dialog was dismissed, forwarded as the `lyra-dialog-close` event
7
+ * detail -- mirrors `<lyra-dialog>`'s own `DialogCloseReason` shape.
8
+ * `'escape'`/`'backdrop'` come from the dialog's own built-in dismiss
9
+ * triggers, `'close-button'` from the built-in header close button, and any
10
+ * other string is whatever a caller passes to `close()` directly (e.g. a
11
+ * consumer's own footer action).
12
+ */
13
+ export type ToolResultDialogCloseReason = 'escape' | 'backdrop' | 'close-button' | 'api' | (string & Record<never, never>);
14
+ /**
15
+ * `<lyra-tool-result-dialog>` — a full tool-call detail overlay: a status/
16
+ * duration header plus a `body` slot where a consumer typically places a
17
+ * `<lyra-tabs>` with Input/Preview/JSON/Raw panels. This component knows
18
+ * nothing about what's inside that slot — it only supplies the modal chrome
19
+ * around it.
20
+ *
21
+ * This is its own standalone overlay implementation (`role="dialog"`,
22
+ * focus-trapped, Escape/backdrop-dismissible, scroll-locking) rather than
23
+ * nesting a `<lyra-dialog>` in its shadow template — see `<lyra-dialog>`'s
24
+ * own header comment for why a new overlay component in this library
25
+ * duplicates that pattern locally instead of composing the previous one:
26
+ * slot-forwarding into a nested `<lyra-dialog>` would put a forwarding
27
+ * `<slot>` where a light-DOM-scanning descendant (e.g. a slotted
28
+ * `<lyra-tabs>`'s own `Array.from(this.children)` scan) expects real
29
+ * projected content.
30
+ *
31
+ * `maximized` toggles between a constrained modal size and a near-fullscreen
32
+ * size within the same open dialog and open/close lifecycle — unlike
33
+ * `<lyra-widget>`'s fullscreen mode, there's no non-modal resting state to
34
+ * return to, so no separate scroll-lock/focus-trap bookkeeping is needed for
35
+ * the transition itself.
36
+ *
37
+ * Stacking: opening more than one of these dialogs at once is supported --
38
+ * Escape and the Tab focus trap only ever act on the topmost open instance,
39
+ * so instances beneath it stay open and untouched until the one on top closes.
40
+ *
41
+ * @customElement lyra-tool-result-dialog
42
+ * @slot body - The dialog's main content — typically a `<lyra-tabs>` with
43
+ * Input/Preview/JSON/Raw panels, entirely consumer-assembled.
44
+ * @slot footer - Optional action buttons, rendered in a bottom row.
45
+ * @event lyra-dialog-close - `detail: ToolResultDialogCloseReason`. Fired
46
+ * exactly once per dismissal, via Escape, a backdrop click, the built-in
47
+ * close button, or a `close()` call.
48
+ * @event lyra-maximize-change - `detail: boolean` (the new `maximized`
49
+ * state), fired when the header's maximize/restore toggle is clicked.
50
+ * @csspart backdrop - The full-viewport scrim behind the panel.
51
+ * @csspart panel - The dialog panel itself (`role="dialog"` while open).
52
+ * @csspart header - The row containing the tool name, status, duration, and toggle/close buttons.
53
+ * @csspart title - The wrapper around the tool name, status, and duration.
54
+ * @csspart tool-name - The `tool-name` text.
55
+ * @csspart status - The status badge (icon + text).
56
+ * @csspart duration - The formatted `duration-ms` text.
57
+ * @csspart header-actions - The wrapper around the maximize and close buttons.
58
+ * @csspart maximize-button - The built-in maximize/restore toggle button.
59
+ * @csspart close-button - The built-in close button.
60
+ * @csspart body - The wrapper around the `body` slot.
61
+ * @csspart footer - The wrapper around the `footer` slot.
62
+ */
63
+ export declare class LyraToolResultDialog extends LyraElement {
64
+ static styles: import("lit").CSSResultGroup[];
65
+ /**
66
+ * Whether the dialog is open. Set this (or call `close()`) — there is no
67
+ * separate `show()`/`hide()` pair. Both paths restore focus to the trigger
68
+ * element identically; only `close()` additionally fires
69
+ * `lyra-dialog-close`, since a direct assignment carries no reason string
70
+ * to attach to that event.
71
+ */
72
+ open: boolean;
73
+ /** The tool's name, rendered prominently in the header. */
74
+ toolName: string;
75
+ /**
76
+ * The tool call's current lifecycle state — drives the header's status
77
+ * badge. An out-of-union value (e.g. a stray `status` attribute, or a
78
+ * direct property assignment from an untyped caller) is treated as
79
+ * `'pending'` rather than crashing render.
80
+ */
81
+ status: ToolResultStatus;
82
+ /** How long the call took, in milliseconds. Omitted from the header entirely when unset. */
83
+ durationMs?: number;
84
+ /** Near-fullscreen presentation of the same open dialog. */
85
+ maximized: boolean;
86
+ private hasFooterSlot;
87
+ private releaseScrollLock?;
88
+ private overlay?;
89
+ private readonly titleId;
90
+ protected willUpdate(changed: PropertyValues): void;
91
+ protected updated(changed: PropertyValues): void;
92
+ connectedCallback(): void;
93
+ disconnectedCallback(): void;
94
+ private onFooterSlotChange;
95
+ /**
96
+ * Close the dialog and return focus to whatever had it before the dialog
97
+ * opened. `reason` is forwarded as the `lyra-dialog-close` detail --
98
+ * built-in triggers pass `'escape'`/`'backdrop'`/`'close-button'`; a
99
+ * consumer's own close affordance (e.g. a footer action button) should
100
+ * call this directly with its own reason string, so every dismissal path
101
+ * funnels through the same event instead of the consumer having to also
102
+ * toggle `open` itself.
103
+ *
104
+ * Focus restoration follows the `open` lifecycle, so a direct `.open =
105
+ * false` assignment restores focus identically to calling `close()` -- the
106
+ * one thing a direct assignment still can't do is fire
107
+ * `lyra-dialog-close`, since there's no reason string to attach without
108
+ * going through this method.
109
+ */
110
+ close(reason?: ToolResultDialogCloseReason): void;
111
+ private onBackdropClick;
112
+ private onCloseButtonClick;
113
+ private toggleMaximized;
114
+ private activateOverlay;
115
+ private deactivateOverlay;
116
+ render(): TemplateResult;
117
+ }
118
+ declare global {
119
+ interface HTMLElementTagNameMap {
120
+ 'lyra-tool-result-dialog': LyraToolResultDialog;
121
+ }
122
+ }
@@ -0,0 +1,358 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, svg, nothing, } from 'lit';
8
+ import { property, state } from 'lit/decorators.js';
9
+ import { LyraElement } from '../../internal/lyra-element.js';
10
+ import { defineElement } from '../../internal/prefix.js';
11
+ import { lockScroll } from '../../internal/scroll-lock.js';
12
+ import { activateOverlay } from '../../internal/overlay-manager.js';
13
+ import { nextId } from '../../internal/a11y.js';
14
+ import { closeIcon, expandIcon } from '../../internal/icons.js';
15
+ import { styles } from './tool-result-dialog.styles.js';
16
+ // Mirrors the shared icon set's viewBox/stroke conventions
17
+ // (internal/icons.ts's chevronIcon()/closeIcon()/etc.) without adding
18
+ // tool-result-specific glyphs to that module -- it's off limits here -- so
19
+ // these still read as part of the same visual language as the rest of the
20
+ // library's inline icons. Same approach lyra-checkbox's/lyra-chat-message's
21
+ // own local glyphs take for the identical reason.
22
+ const ICON_VIEW_BOX = '0 0 24 24';
23
+ const ICON_STROKE_WIDTH = '1.75';
24
+ function icon(paths) {
25
+ return svg `
26
+ <svg
27
+ width="1em"
28
+ height="1em"
29
+ viewBox=${ICON_VIEW_BOX}
30
+ fill="none"
31
+ stroke="currentColor"
32
+ stroke-width=${ICON_STROKE_WIDTH}
33
+ stroke-linecap="round"
34
+ stroke-linejoin="round"
35
+ aria-hidden="true"
36
+ focusable="false"
37
+ >${paths}</svg>
38
+ `;
39
+ }
40
+ /** A "restore from maximized" glyph -- the mirror image of `expandIcon()`,
41
+ * arrows pointing inward toward the center instead of outward toward the
42
+ * corners, same as lyra-widget's fullscreen-exit affordance reuses
43
+ * `closeIcon()` for the analogous "undo the expanded state" action. A
44
+ * distinct glyph (not `closeIcon()`) is used here because this dialog
45
+ * already has its own, separate close button right next to it -- two
46
+ * identical "x" icons side by side would be ambiguous about which one
47
+ * dismisses the dialog and which one only un-maximizes it. */
48
+ function shrinkIcon() {
49
+ return icon(svg `
50
+ <polyline points="4 14 10 14 10 20"></polyline>
51
+ <polyline points="20 10 14 10 14 4"></polyline>
52
+ <line x1="14" y1="10" x2="21" y2="3"></line>
53
+ <line x1="3" y1="21" x2="10" y2="14"></line>
54
+ `);
55
+ }
56
+ function pendingIcon() {
57
+ return icon(svg `<circle cx="12" cy="12" r="9"></circle><polyline points="12 7 12 12 15 14"></polyline>`);
58
+ }
59
+ /** A three-quarter arc, spun by the `[status="running"] [part="status"] svg`
60
+ * CSS animation -- a full circle wouldn't visibly convey rotation. */
61
+ function runningIcon() {
62
+ return icon(svg `<path d="M21 12a9 9 0 1 1-9-9"></path>`);
63
+ }
64
+ function successIcon() {
65
+ return icon(svg `<circle cx="12" cy="12" r="9"></circle><polyline points="8 12.5 11 15.5 16 9.5"></polyline>`);
66
+ }
67
+ function errorIcon() {
68
+ return icon(svg `
69
+ <circle cx="12" cy="12" r="9"></circle>
70
+ <line x1="9" y1="9" x2="15" y2="15"></line>
71
+ <line x1="15" y1="9" x2="9" y2="15"></line>
72
+ `);
73
+ }
74
+ /** A "blocked" glyph (circle + diagonal slash) -- distinct from `errorIcon()`
75
+ * since a denial is a policy rejection, not a runtime failure. */
76
+ function deniedIcon() {
77
+ return icon(svg `<circle cx="12" cy="12" r="9"></circle><line x1="6" y1="18" x2="18" y2="6"></line>`);
78
+ }
79
+ const STATUS_ICON = {
80
+ pending: pendingIcon,
81
+ running: runningIcon,
82
+ success: successIcon,
83
+ error: errorIcon,
84
+ denied: deniedIcon,
85
+ };
86
+ /** Visible (not just color-coded) text for every status. */
87
+ const STATUS_LABEL = {
88
+ pending: 'Pending',
89
+ running: 'Running',
90
+ success: 'Success',
91
+ error: 'Error',
92
+ denied: 'Denied',
93
+ };
94
+ const STATUS_VALUES = new Set(Object.keys(STATUS_LABEL));
95
+ /**
96
+ * Normalizes `status` at the attribute boundary -- an out-of-union value
97
+ * (markup a caller doesn't fully control, or a raw string from an untyped
98
+ * consumer) falls back to `'pending'` here rather than reaching
99
+ * STATUS_ICON/STATUS_LABEL as a bad lookup key and crashing `render()`. This
100
+ * only covers attribute parsing; a `.status = ...` assignment made directly
101
+ * as a property bypasses converters entirely, which is why `render()` below
102
+ * also falls back at the STATUS_ICON/STATUS_LABEL lookup itself.
103
+ */
104
+ const statusConverter = {
105
+ fromAttribute(value) {
106
+ return value !== null && STATUS_VALUES.has(value) ? value : 'pending';
107
+ },
108
+ toAttribute(value) {
109
+ return value;
110
+ },
111
+ };
112
+ /** `820` -> `"820ms"`; `1500` -> `"1.5s"`; `2000` -> `"2s"`. Sub-second
113
+ * durations are the common case for a single tool call, so they get the
114
+ * more precise unit; once a call runs a full second or longer, trimming to
115
+ * (at most) one decimal place of seconds reads better than a 4-5 digit
116
+ * millisecond count. */
117
+ function formatDuration(ms) {
118
+ if (!Number.isFinite(ms) || ms < 1000) {
119
+ return `${Math.round(Math.max(0, ms))}ms`;
120
+ }
121
+ const seconds = ms / 1000;
122
+ const rounded = Math.round(seconds * 10) / 10;
123
+ return `${Number.isInteger(rounded) ? rounded.toFixed(0) : rounded.toFixed(1)}s`;
124
+ }
125
+ /**
126
+ * `<lyra-tool-result-dialog>` — a full tool-call detail overlay: a status/
127
+ * duration header plus a `body` slot where a consumer typically places a
128
+ * `<lyra-tabs>` with Input/Preview/JSON/Raw panels. This component knows
129
+ * nothing about what's inside that slot — it only supplies the modal chrome
130
+ * around it.
131
+ *
132
+ * This is its own standalone overlay implementation (`role="dialog"`,
133
+ * focus-trapped, Escape/backdrop-dismissible, scroll-locking) rather than
134
+ * nesting a `<lyra-dialog>` in its shadow template — see `<lyra-dialog>`'s
135
+ * own header comment for why a new overlay component in this library
136
+ * duplicates that pattern locally instead of composing the previous one:
137
+ * slot-forwarding into a nested `<lyra-dialog>` would put a forwarding
138
+ * `<slot>` where a light-DOM-scanning descendant (e.g. a slotted
139
+ * `<lyra-tabs>`'s own `Array.from(this.children)` scan) expects real
140
+ * projected content.
141
+ *
142
+ * `maximized` toggles between a constrained modal size and a near-fullscreen
143
+ * size within the same open dialog and open/close lifecycle — unlike
144
+ * `<lyra-widget>`'s fullscreen mode, there's no non-modal resting state to
145
+ * return to, so no separate scroll-lock/focus-trap bookkeeping is needed for
146
+ * the transition itself.
147
+ *
148
+ * Stacking: opening more than one of these dialogs at once is supported --
149
+ * Escape and the Tab focus trap only ever act on the topmost open instance,
150
+ * so instances beneath it stay open and untouched until the one on top closes.
151
+ *
152
+ * @customElement lyra-tool-result-dialog
153
+ * @slot body - The dialog's main content — typically a `<lyra-tabs>` with
154
+ * Input/Preview/JSON/Raw panels, entirely consumer-assembled.
155
+ * @slot footer - Optional action buttons, rendered in a bottom row.
156
+ * @event lyra-dialog-close - `detail: ToolResultDialogCloseReason`. Fired
157
+ * exactly once per dismissal, via Escape, a backdrop click, the built-in
158
+ * close button, or a `close()` call.
159
+ * @event lyra-maximize-change - `detail: boolean` (the new `maximized`
160
+ * state), fired when the header's maximize/restore toggle is clicked.
161
+ * @csspart backdrop - The full-viewport scrim behind the panel.
162
+ * @csspart panel - The dialog panel itself (`role="dialog"` while open).
163
+ * @csspart header - The row containing the tool name, status, duration, and toggle/close buttons.
164
+ * @csspart title - The wrapper around the tool name, status, and duration.
165
+ * @csspart tool-name - The `tool-name` text.
166
+ * @csspart status - The status badge (icon + text).
167
+ * @csspart duration - The formatted `duration-ms` text.
168
+ * @csspart header-actions - The wrapper around the maximize and close buttons.
169
+ * @csspart maximize-button - The built-in maximize/restore toggle button.
170
+ * @csspart close-button - The built-in close button.
171
+ * @csspart body - The wrapper around the `body` slot.
172
+ * @csspart footer - The wrapper around the `footer` slot.
173
+ */
174
+ export class LyraToolResultDialog extends LyraElement {
175
+ constructor() {
176
+ super(...arguments);
177
+ /**
178
+ * Whether the dialog is open. Set this (or call `close()`) — there is no
179
+ * separate `show()`/`hide()` pair. Both paths restore focus to the trigger
180
+ * element identically; only `close()` additionally fires
181
+ * `lyra-dialog-close`, since a direct assignment carries no reason string
182
+ * to attach to that event.
183
+ */
184
+ this.open = false;
185
+ /** The tool's name, rendered prominently in the header. */
186
+ this.toolName = '';
187
+ /**
188
+ * The tool call's current lifecycle state — drives the header's status
189
+ * badge. An out-of-union value (e.g. a stray `status` attribute, or a
190
+ * direct property assignment from an untyped caller) is treated as
191
+ * `'pending'` rather than crashing render.
192
+ */
193
+ this.status = 'pending';
194
+ /** Near-fullscreen presentation of the same open dialog. */
195
+ this.maximized = false;
196
+ this.hasFooterSlot = false;
197
+ this.titleId = nextId('tool-result-dialog-title');
198
+ this.onFooterSlotChange = (e) => {
199
+ this.hasFooterSlot = e.target.assignedElements({ flatten: true }).length > 0;
200
+ };
201
+ this.onBackdropClick = () => {
202
+ this.overlay?.dismissBackdrop();
203
+ };
204
+ this.onCloseButtonClick = () => {
205
+ this.close('close-button');
206
+ };
207
+ this.toggleMaximized = () => {
208
+ this.maximized = !this.maximized;
209
+ this.emit('lyra-maximize-change', this.maximized);
210
+ };
211
+ }
212
+ static { this.styles = [LyraElement.styles, styles]; }
213
+ willUpdate(changed) {
214
+ if (!this.hasUpdated) {
215
+ this.hasFooterSlot = Array.from(this.children).some((el) => el.getAttribute('slot') === 'footer');
216
+ }
217
+ if (changed.has('open')) {
218
+ if (this.open) {
219
+ this.activateOverlay();
220
+ }
221
+ else {
222
+ this.deactivateOverlay();
223
+ }
224
+ }
225
+ }
226
+ // Runs after render so the manager can resolve the panel and its composed
227
+ // focus targets, including controls projected through either slot.
228
+ updated(changed) {
229
+ if (changed.has('open') && this.open) {
230
+ this.overlay?.focusInitial();
231
+ }
232
+ }
233
+ connectedCallback() {
234
+ super.connectedCallback();
235
+ // A reconnect (e.g. a drag-and-drop reparent keeping this same element
236
+ // instance) fires disconnectedCallback then connectedCallback
237
+ // synchronously with no update in between, so willUpdate never reruns to
238
+ // notice `open` is still true -- restore the scroll lock/trap it dropped.
239
+ if (this.hasUpdated && this.open) {
240
+ if (this.overlay?.isActive()) {
241
+ this.overlay.resume();
242
+ this.releaseScrollLock ??= lockScroll(this.ownerDocument);
243
+ }
244
+ else {
245
+ this.activateOverlay();
246
+ }
247
+ queueMicrotask(() => this.overlay?.focusInitial());
248
+ }
249
+ }
250
+ disconnectedCallback() {
251
+ super.disconnectedCallback();
252
+ this.releaseScrollLock?.();
253
+ this.releaseScrollLock = undefined;
254
+ this.overlay?.suspend();
255
+ }
256
+ /**
257
+ * Close the dialog and return focus to whatever had it before the dialog
258
+ * opened. `reason` is forwarded as the `lyra-dialog-close` detail --
259
+ * built-in triggers pass `'escape'`/`'backdrop'`/`'close-button'`; a
260
+ * consumer's own close affordance (e.g. a footer action button) should
261
+ * call this directly with its own reason string, so every dismissal path
262
+ * funnels through the same event instead of the consumer having to also
263
+ * toggle `open` itself.
264
+ *
265
+ * Focus restoration follows the `open` lifecycle, so a direct `.open =
266
+ * false` assignment restores focus identically to calling `close()` -- the
267
+ * one thing a direct assignment still can't do is fire
268
+ * `lyra-dialog-close`, since there's no reason string to attach without
269
+ * going through this method.
270
+ */
271
+ close(reason = 'api') {
272
+ if (!this.open)
273
+ return;
274
+ this.open = false;
275
+ this.emit('lyra-dialog-close', reason);
276
+ }
277
+ activateOverlay() {
278
+ if (this.overlay?.isActive())
279
+ return;
280
+ this.releaseScrollLock ??= lockScroll(this.ownerDocument);
281
+ this.overlay = activateOverlay({
282
+ host: this,
283
+ panel: () => this.shadowRoot?.querySelector('[part="panel"]') ?? null,
284
+ onEscape: () => this.close('escape'),
285
+ onBackdrop: () => this.close('backdrop'),
286
+ });
287
+ }
288
+ deactivateOverlay() {
289
+ this.releaseScrollLock?.();
290
+ this.releaseScrollLock = undefined;
291
+ this.overlay?.deactivate();
292
+ this.overlay = undefined;
293
+ }
294
+ render() {
295
+ const hasDuration = this.durationMs != null;
296
+ return html `
297
+ <div part="backdrop" @click=${this.onBackdropClick}></div>
298
+ <div
299
+ part="panel"
300
+ role=${this.open ? 'dialog' : nothing}
301
+ aria-modal=${this.open ? 'true' : nothing}
302
+ aria-labelledby=${this.titleId}
303
+ tabindex="-1"
304
+ >
305
+ <div part="header">
306
+ <div part="title">
307
+ <span part="tool-name" id=${this.titleId}>${this.toolName || 'Tool call'}</span>
308
+ <span part="status"
309
+ >${(STATUS_ICON[this.status] ?? STATUS_ICON.pending)()}<span
310
+ >${STATUS_LABEL[this.status] ?? STATUS_LABEL.pending}</span
311
+ ></span
312
+ >
313
+ ${hasDuration ? html `<span part="duration">${formatDuration(this.durationMs)}</span>` : nothing}
314
+ </div>
315
+ <div part="header-actions">
316
+ <button
317
+ part="maximize-button"
318
+ type="button"
319
+ aria-pressed=${this.maximized ? 'true' : 'false'}
320
+ aria-label=${this.maximized ? 'Restore' : 'Maximize'}
321
+ @click=${this.toggleMaximized}
322
+ >
323
+ ${this.maximized ? shrinkIcon() : expandIcon()}
324
+ </button>
325
+ <button part="close-button" type="button" aria-label="Close" @click=${this.onCloseButtonClick}>
326
+ ${closeIcon()}
327
+ </button>
328
+ </div>
329
+ </div>
330
+ <div part="body">
331
+ <slot name="body"></slot>
332
+ </div>
333
+ <div part="footer" ?hidden=${!this.hasFooterSlot}>
334
+ <slot name="footer" @slotchange=${this.onFooterSlotChange}></slot>
335
+ </div>
336
+ </div>
337
+ `;
338
+ }
339
+ }
340
+ __decorate([
341
+ property({ type: Boolean, reflect: true })
342
+ ], LyraToolResultDialog.prototype, "open", void 0);
343
+ __decorate([
344
+ property({ attribute: 'tool-name' })
345
+ ], LyraToolResultDialog.prototype, "toolName", void 0);
346
+ __decorate([
347
+ property({ reflect: true, converter: statusConverter })
348
+ ], LyraToolResultDialog.prototype, "status", void 0);
349
+ __decorate([
350
+ property({ type: Number, attribute: 'duration-ms' })
351
+ ], LyraToolResultDialog.prototype, "durationMs", void 0);
352
+ __decorate([
353
+ property({ type: Boolean, reflect: true })
354
+ ], LyraToolResultDialog.prototype, "maximized", void 0);
355
+ __decorate([
356
+ state()
357
+ ], LyraToolResultDialog.prototype, "hasFooterSlot", void 0);
358
+ defineElement('tool-result-dialog', LyraToolResultDialog);
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,176 @@
1
+ import { css } from 'lit';
2
+ export const styles = css `
3
+ :host {
4
+ /* Backdrop scrim color -- component-specific so a host can retheme it
5
+ without a raw literal leaking into the public API (no shared
6
+ --wa-*-overlay token exists in the design system to resolve through,
7
+ same rationale as lyra-dialog's --lyra-dialog-overlay-color and
8
+ lyra-widget's --lyra-widget-overlay-color). */
9
+ --lyra-tool-result-dialog-overlay-color: rgb(0 0 0 / 0.5);
10
+ /* Inset applied to the panel while [maximized] -- overridable the same
11
+ way lyra-widget's --lyra-widget-fullscreen-inset is, e.g. to leave a
12
+ persistent app rail visible. */
13
+ --lyra-tool-result-dialog-maximized-inset: var(--lyra-space-l);
14
+ display: none;
15
+ position: fixed;
16
+ inset: 0;
17
+ z-index: var(--lyra-overlay-stack-index, 1000);
18
+ align-items: center;
19
+ justify-content: center;
20
+ padding: var(--lyra-space-l);
21
+ }
22
+ :host([open]) {
23
+ display: flex;
24
+ }
25
+ [part='backdrop'] {
26
+ position: absolute;
27
+ inset: 0;
28
+ background: var(--lyra-tool-result-dialog-overlay-color);
29
+ }
30
+ [part='panel'] {
31
+ position: relative;
32
+ display: flex;
33
+ flex-direction: column;
34
+ inline-size: min(48rem, 100%);
35
+ max-block-size: 100%;
36
+ background: var(--lyra-color-surface);
37
+ border: 1px solid var(--lyra-color-border);
38
+ border-radius: var(--lyra-radius);
39
+ box-shadow: var(--lyra-shadow);
40
+ overflow: hidden;
41
+ transition:
42
+ inline-size var(--lyra-transition-base),
43
+ block-size var(--lyra-transition-base);
44
+ }
45
+ :host([maximized]) [part='panel'] {
46
+ position: fixed;
47
+ inset: var(--lyra-tool-result-dialog-maximized-inset);
48
+ inline-size: auto;
49
+ max-block-size: none;
50
+ }
51
+ [part='header'] {
52
+ display: flex;
53
+ flex-wrap: wrap;
54
+ align-items: center;
55
+ gap: var(--lyra-space-s);
56
+ padding: var(--lyra-space-m) var(--lyra-space-l);
57
+ border-block-end: 1px solid var(--lyra-color-border);
58
+ }
59
+ [part='title'] {
60
+ display: flex;
61
+ flex-wrap: wrap;
62
+ align-items: center;
63
+ gap: var(--lyra-space-s);
64
+ flex: 1 1 auto;
65
+ min-inline-size: 0;
66
+ }
67
+ [part='tool-name'] {
68
+ font-weight: 600;
69
+ overflow: hidden;
70
+ text-overflow: ellipsis;
71
+ white-space: nowrap;
72
+ }
73
+ [part='status'] {
74
+ display: inline-flex;
75
+ align-items: center;
76
+ gap: 0.25rem;
77
+ padding: 0.125rem var(--lyra-space-xs);
78
+ border-radius: var(--lyra-radius);
79
+ font-size: 0.75rem;
80
+ font-weight: 600;
81
+ color: var(--lyra-color-text-quiet);
82
+ background: transparent;
83
+ }
84
+ [part='status'] svg {
85
+ inline-size: 1em;
86
+ block-size: 1em;
87
+ }
88
+ /* pending stays the neutral/quiet treatment above -- it's the resting
89
+ state before a tool call has done anything worth calling out. */
90
+ :host([status='running']) [part='status'] {
91
+ color: var(--lyra-color-brand);
92
+ background: var(--lyra-color-brand-quiet);
93
+ }
94
+ :host([status='success']) [part='status'] {
95
+ color: var(--lyra-color-success);
96
+ background: var(--lyra-color-success-quiet);
97
+ }
98
+ :host([status='error']) [part='status'] {
99
+ color: var(--lyra-color-danger);
100
+ background: var(--lyra-color-danger-quiet);
101
+ }
102
+ /* 'denied' is a policy rejection, not a runtime failure -- the warning
103
+ (not danger) tinted-background reads that distinction without relying on
104
+ the status text alone. */
105
+ :host([status='denied']) [part='status'] {
106
+ color: var(--lyra-color-warning);
107
+ background: var(--lyra-color-warning-quiet);
108
+ }
109
+ :host([status='running']) [part='status'] svg {
110
+ animation: lyra-tool-result-dialog-spin 1s linear infinite;
111
+ }
112
+ [part='duration'] {
113
+ font-size: 0.75rem;
114
+ color: var(--lyra-color-text-quiet);
115
+ white-space: nowrap;
116
+ }
117
+ [part='header-actions'] {
118
+ display: flex;
119
+ align-items: center;
120
+ gap: var(--lyra-space-xs);
121
+ flex: 0 0 auto;
122
+ }
123
+ [part='maximize-button'],
124
+ [part='close-button'] {
125
+ display: inline-flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ min-inline-size: var(--lyra-icon-button-size);
129
+ min-block-size: var(--lyra-icon-button-size);
130
+ border: none;
131
+ background: transparent;
132
+ color: var(--lyra-color-text-quiet);
133
+ border-radius: var(--lyra-radius);
134
+ cursor: pointer;
135
+ }
136
+ [part='maximize-button']:hover,
137
+ [part='close-button']:hover {
138
+ background: var(--lyra-color-brand-quiet);
139
+ color: var(--lyra-color-brand);
140
+ }
141
+ [part='maximize-button']:focus-visible,
142
+ [part='close-button']:focus-visible {
143
+ outline: var(--lyra-focus-ring-width) solid var(--lyra-focus-ring-color);
144
+ outline-offset: var(--lyra-focus-ring-offset);
145
+ }
146
+ [part='body'] {
147
+ flex: 1 1 auto;
148
+ min-block-size: 0;
149
+ padding: var(--lyra-space-l);
150
+ overflow: auto;
151
+ }
152
+ [part='footer'] {
153
+ display: flex;
154
+ align-items: center;
155
+ justify-content: flex-end;
156
+ gap: var(--lyra-space-s);
157
+ padding: var(--lyra-space-m) var(--lyra-space-l);
158
+ border-block-start: 1px solid var(--lyra-color-border);
159
+ }
160
+ [part='footer'][hidden] {
161
+ display: none;
162
+ }
163
+ @keyframes lyra-tool-result-dialog-spin {
164
+ to {
165
+ transform: rotate(360deg);
166
+ }
167
+ }
168
+ @media (prefers-reduced-motion: reduce) {
169
+ [part='panel'] {
170
+ transition: none !important;
171
+ }
172
+ :host([status='running']) [part='status'] svg {
173
+ animation: none !important;
174
+ }
175
+ }
176
+ `;