@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,73 @@
1
+ /**
2
+ * A type-keyed dispatch registry for tool-result renderers -- a tiny plugin
3
+ * system so a host app can teach `<lyra-tool-result-view>` how to draw the
4
+ * result of e.g. a `get_weather` or `run_query` tool call without this
5
+ * library knowing anything about either. Dispatch is a two-step lookup
6
+ * (elipa-inspired): an exact match on the tool's name first, falling back to
7
+ * a facade/shape-based `matches(payload)` scan when no name matches --
8
+ * useful when several tool names share one result shape (e.g. every
9
+ * "*_search" tool returning `{ results: [...] }`) or when the caller doesn't
10
+ * reliably know the tool name at all.
11
+ */
12
+ /**
13
+ * One registered renderer. Either `render` is present directly, or `load` is
14
+ * -- a definition registered purely as `{ load }` is expected to resolve (via
15
+ * dynamic `import()`, typically) to the real `render`/`matches` pair on
16
+ * first use, so a host app can code-split a rarely-used or heavy renderer
17
+ * (e.g. one pulling in a charting library) instead of paying for it on every
18
+ * page that merely registers it.
19
+ *
20
+ * `matches` is only ever consulted *before* `load` resolves when it's
21
+ * supplied inline at registration time -- a definition that needs
22
+ * shape-based dispatch and also wants to lazy-load its `render` should
23
+ * register a lightweight synchronous `matches` up front alongside `load`;
24
+ * one that dispatches purely by exact tool-name key doesn't need `matches`
25
+ * at all, loaded or not.
26
+ */
27
+ export interface ToolRendererDefinition {
28
+ /**
29
+ * Renders `result` (and the tool-call `args` that produced it, when
30
+ * available) as UI. Typed loosely as `unknown` rather than Lit's
31
+ * `TemplateResult` so any lit-html-renderable value works too (a plain
32
+ * string, a DOM node, an array of templates) -- consumers already own
33
+ * their own Lit import and don't need this module to add one.
34
+ */
35
+ render?: (result: unknown, args: unknown) => unknown;
36
+ /** Facade/shape-based dispatch predicate -- see the module doc's dispatch order. */
37
+ matches?: (payload: unknown) => boolean;
38
+ /**
39
+ * Lazy loader for a code-split renderer. Resolves to either a definition
40
+ * directly, or a `{ default }`-shaped module namespace object (so
41
+ * `load: () => import('./my-renderer.js')` works unmodified when that
42
+ * module's default export is itself a `ToolRendererDefinition`).
43
+ */
44
+ load?: () => Promise<ToolRendererDefinition | {
45
+ default: ToolRendererDefinition;
46
+ }>;
47
+ }
48
+ /** A tool-name -> renderer-definition registry, as consulted by `findToolRenderer()`. */
49
+ export type ToolRendererRegistry = Map<string, ToolRendererDefinition>;
50
+ /** Registers (or overwrites) the renderer for `name` in the default registry. */
51
+ export declare function registerToolRenderer(name: string, def: ToolRendererDefinition): void;
52
+ /** The module-level default registry `registerToolRenderer()` writes to and `<lyra-tool-result-view>` reads from when no `registry` prop is set. */
53
+ export declare function getDefaultToolRendererRegistry(): ToolRendererRegistry;
54
+ /**
55
+ * Finds the renderer definition for `toolName`/`payload` in `registry`
56
+ * (the default registry when omitted), in dispatch order:
57
+ * 1. An exact `toolName` key match.
58
+ * 2. Failing that, the first entry (in registration order -- a `Map`
59
+ * already iterates that way) whose `matches(payload)` returns `true`.
60
+ * 3. `undefined` -- the caller falls back to `<lyra-json-viewer>`.
61
+ */
62
+ export declare function findToolRenderer(toolName: string, payload: unknown, registry?: ToolRendererRegistry): ToolRendererDefinition | undefined;
63
+ /**
64
+ * Resolves `def` to a definition guaranteed to carry a real `render` --
65
+ * awaiting and unwrapping `def.load()` (caching the result so a lazy
66
+ * definition's `load()` runs at most once no matter how many times it's
67
+ * dispatched to) when `def.load` is present, or returning `def` as-is
68
+ * otherwise. A rejected `load()` is *not* cached -- the definition stays
69
+ * registered, so a later resolution attempt (e.g. after a transient network
70
+ * failure) gets a fresh `load()` call rather than being stuck replaying one
71
+ * failed promise forever.
72
+ */
73
+ export declare function loadToolRenderer(def: ToolRendererDefinition): Promise<ToolRendererDefinition>;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * A type-keyed dispatch registry for tool-result renderers -- a tiny plugin
3
+ * system so a host app can teach `<lyra-tool-result-view>` how to draw the
4
+ * result of e.g. a `get_weather` or `run_query` tool call without this
5
+ * library knowing anything about either. Dispatch is a two-step lookup
6
+ * (elipa-inspired): an exact match on the tool's name first, falling back to
7
+ * a facade/shape-based `matches(payload)` scan when no name matches --
8
+ * useful when several tool names share one result shape (e.g. every
9
+ * "*_search" tool returning `{ results: [...] }`) or when the caller doesn't
10
+ * reliably know the tool name at all.
11
+ */
12
+ /** The module-level registry every `<lyra-tool-result-view>` dispatches against by default (see its `registry` prop to opt a given instance into a different one instead). */
13
+ const defaultRegistry = new Map();
14
+ /**
15
+ * Resolved-`load()` cache, keyed by *definition object identity* rather than
16
+ * by tool name. Keying by name would let two different registries that
17
+ * happen to reuse the same tool-name string (a default-registry entry and an
18
+ * unrelated custom-registry entry, say) silently share one cached module --
19
+ * identity keying makes that impossible while still giving every distinct
20
+ * definition the "call `load()` at most once" behavior a repeatedly-dispatched
21
+ * lazy renderer needs.
22
+ */
23
+ let loadCache = new WeakMap();
24
+ /** Registers (or overwrites) the renderer for `name` in the default registry. */
25
+ export function registerToolRenderer(name, def) {
26
+ defaultRegistry.set(name, def);
27
+ }
28
+ /** The module-level default registry `registerToolRenderer()` writes to and `<lyra-tool-result-view>` reads from when no `registry` prop is set. */
29
+ export function getDefaultToolRendererRegistry() {
30
+ return defaultRegistry;
31
+ }
32
+ /**
33
+ * Finds the renderer definition for `toolName`/`payload` in `registry`
34
+ * (the default registry when omitted), in dispatch order:
35
+ * 1. An exact `toolName` key match.
36
+ * 2. Failing that, the first entry (in registration order -- a `Map`
37
+ * already iterates that way) whose `matches(payload)` returns `true`.
38
+ * 3. `undefined` -- the caller falls back to `<lyra-json-viewer>`.
39
+ */
40
+ export function findToolRenderer(toolName, payload, registry = defaultRegistry) {
41
+ const exact = registry.get(toolName);
42
+ if (exact)
43
+ return exact;
44
+ for (const def of registry.values()) {
45
+ if (def.matches?.(payload))
46
+ return def;
47
+ }
48
+ return undefined;
49
+ }
50
+ function isModuleWrapper(mod) {
51
+ return 'default' in mod && typeof mod.default === 'object' && mod.default !== null;
52
+ }
53
+ /**
54
+ * Resolves `def` to a definition guaranteed to carry a real `render` --
55
+ * awaiting and unwrapping `def.load()` (caching the result so a lazy
56
+ * definition's `load()` runs at most once no matter how many times it's
57
+ * dispatched to) when `def.load` is present, or returning `def` as-is
58
+ * otherwise. A rejected `load()` is *not* cached -- the definition stays
59
+ * registered, so a later resolution attempt (e.g. after a transient network
60
+ * failure) gets a fresh `load()` call rather than being stuck replaying one
61
+ * failed promise forever.
62
+ */
63
+ export function loadToolRenderer(def) {
64
+ if (!def.load)
65
+ return Promise.resolve(def);
66
+ const cached = loadCache.get(def);
67
+ if (cached)
68
+ return cached;
69
+ const promise = def.load().then((mod) => (isModuleWrapper(mod) ? mod.default : mod));
70
+ loadCache.set(def, promise);
71
+ promise.catch(() => loadCache.delete(def));
72
+ return promise;
73
+ }
74
+ /**
75
+ * @internal Test-only utility: empties the default registry and its `load()` cache so
76
+ * one test's `registerToolRenderer()` calls can't leak into the next. Mirrors
77
+ * the fact that this module (like `toaster.ts`'s per-placement region map) is
78
+ * deliberately singleton, module-level state -- there is no per-instance
79
+ * registry to construct fresh in a test's own `fixture()` call instead. Not
80
+ * part of the public API; not re-exported from the root barrel -- a
81
+ * consuming app has no legitimate reason to wipe this page's entire
82
+ * registered-renderer registry at runtime, only a test suite resetting
83
+ * state between cases (import directly from this module, as the test suite
84
+ * already does).
85
+ */
86
+ export function clearToolRenderers() {
87
+ defaultRegistry.clear();
88
+ loadCache = new WeakMap();
89
+ }
@@ -0,0 +1,58 @@
1
+ import { type TemplateResult, type PropertyValues } from 'lit';
2
+ import { LyraElement } from '../../internal/lyra-element.js';
3
+ import { type ToolRendererRegistry } from './registry.js';
4
+ import '../skeleton/skeleton.js';
5
+ import '../json-viewer/json-viewer.js';
6
+ /**
7
+ * `<lyra-tool-result-view>` — renders a tool call's result via whichever
8
+ * custom renderer a host app has registered for it (see `registerToolRenderer()`
9
+ * in `registry.ts`), falling back to `<lyra-json-viewer>` whenever no
10
+ * renderer matches, a candidate renderer's `matches()` predicate throws during
11
+ * dispatch, a renderer's optional `load()` rejects, or its `render()` throws.
12
+ * This component owns none of the actual visual weight of a
13
+ * populated tool result — that's entirely whatever the registered renderer
14
+ * returns; this is just the dispatch + fallback + loading-state shell.
15
+ *
16
+ * Dispatch runs against `registry` when set, otherwise against the
17
+ * module-level default registry `registerToolRenderer()` writes to — see
18
+ * `findToolRenderer()`'s two-step (exact name, then shape-based `matches()`)
19
+ * lookup order for the full rule.
20
+ *
21
+ * `fallback` only implements `"json"` today (an unconditional
22
+ * `<lyra-json-viewer>`) but is still accepted/reflected as an attribute so a
23
+ * consumer's markup that already sets `fallback="…"` for some future value
24
+ * doesn't need to change again once more fallback kinds land.
25
+ *
26
+ * @customElement lyra-tool-result-view
27
+ * @event lyra-render-error - `detail: { toolName, error }` — fired immediately
28
+ * before falling back to `<lyra-json-viewer>`, whether because no renderer
29
+ * matched, a candidate renderer's `matches()` predicate threw during dispatch,
30
+ * a renderer's `load()` rejected, or its `render()` threw.
31
+ * @csspart base - The root wrapper around the resolved renderer's output (or the loading/fallback view).
32
+ */
33
+ export declare class LyraToolResultView extends LyraElement {
34
+ static styles: import("lit").CSSResultGroup[];
35
+ /** Custom registry to dispatch against instead of the module-level default one (see `registry.ts`). */
36
+ registry?: ToolRendererRegistry;
37
+ /** The tool's name — the primary dispatch key (see `findToolRenderer()`). */
38
+ toolName: string;
39
+ /** The tool call's result payload, handed to the matched renderer's `render()` (and to `matches()` for shape-based dispatch, and to the `<lyra-json-viewer>` fallback). */
40
+ result: unknown;
41
+ /** The tool call's original arguments, if available — handed to the matched renderer's `render()` alongside `result`. */
42
+ args: unknown;
43
+ /** Forward-compatible fallback-kind selector — see the class doc; only `"json"` is implemented today. */
44
+ fallback: string;
45
+ private renderState;
46
+ private generation;
47
+ private resolvedLazy?;
48
+ protected willUpdate(changed: PropertyValues): void;
49
+ private resolve;
50
+ private renderWith;
51
+ private fail;
52
+ render(): TemplateResult;
53
+ }
54
+ declare global {
55
+ interface HTMLElementTagNameMap {
56
+ 'lyra-tool-result-view': LyraToolResultView;
57
+ }
58
+ }
@@ -0,0 +1,152 @@
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 } 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 { findToolRenderer, getDefaultToolRendererRegistry, loadToolRenderer, } from './registry.js';
12
+ import { styles } from './tool-result-view.styles.js';
13
+ import '../skeleton/skeleton.js';
14
+ import '../json-viewer/json-viewer.js';
15
+ const FALLBACK_STATE = { kind: 'fallback' };
16
+ /**
17
+ * `<lyra-tool-result-view>` — renders a tool call's result via whichever
18
+ * custom renderer a host app has registered for it (see `registerToolRenderer()`
19
+ * in `registry.ts`), falling back to `<lyra-json-viewer>` whenever no
20
+ * renderer matches, a candidate renderer's `matches()` predicate throws during
21
+ * dispatch, a renderer's optional `load()` rejects, or its `render()` throws.
22
+ * This component owns none of the actual visual weight of a
23
+ * populated tool result — that's entirely whatever the registered renderer
24
+ * returns; this is just the dispatch + fallback + loading-state shell.
25
+ *
26
+ * Dispatch runs against `registry` when set, otherwise against the
27
+ * module-level default registry `registerToolRenderer()` writes to — see
28
+ * `findToolRenderer()`'s two-step (exact name, then shape-based `matches()`)
29
+ * lookup order for the full rule.
30
+ *
31
+ * `fallback` only implements `"json"` today (an unconditional
32
+ * `<lyra-json-viewer>`) but is still accepted/reflected as an attribute so a
33
+ * consumer's markup that already sets `fallback="…"` for some future value
34
+ * doesn't need to change again once more fallback kinds land.
35
+ *
36
+ * @customElement lyra-tool-result-view
37
+ * @event lyra-render-error - `detail: { toolName, error }` — fired immediately
38
+ * before falling back to `<lyra-json-viewer>`, whether because no renderer
39
+ * matched, a candidate renderer's `matches()` predicate threw during dispatch,
40
+ * a renderer's `load()` rejected, or its `render()` threw.
41
+ * @csspart base - The root wrapper around the resolved renderer's output (or the loading/fallback view).
42
+ */
43
+ export class LyraToolResultView extends LyraElement {
44
+ constructor() {
45
+ super(...arguments);
46
+ /** The tool's name — the primary dispatch key (see `findToolRenderer()`). */
47
+ this.toolName = '';
48
+ /** Forward-compatible fallback-kind selector — see the class doc; only `"json"` is implemented today. */
49
+ this.fallback = 'json';
50
+ this.renderState = FALLBACK_STATE;
51
+ // Bumped on every resolve() call so a stale in-flight load() (superseded by
52
+ // a newer toolName/result/args/registry before it settles) can detect it's
53
+ // no longer current and skip writing its result over a more recent one.
54
+ this.generation = 0;
55
+ }
56
+ static { this.styles = [LyraElement.styles, styles]; }
57
+ willUpdate(changed) {
58
+ if (!this.hasUpdated ||
59
+ changed.has('toolName') ||
60
+ changed.has('result') ||
61
+ changed.has('args') ||
62
+ changed.has('registry')) {
63
+ void this.resolve();
64
+ }
65
+ }
66
+ async resolve() {
67
+ const generation = ++this.generation;
68
+ const registry = this.registry ?? getDefaultToolRendererRegistry();
69
+ let def;
70
+ try {
71
+ def = findToolRenderer(this.toolName, this.result, registry);
72
+ }
73
+ catch (error) {
74
+ this.fail(error);
75
+ return;
76
+ }
77
+ if (!def) {
78
+ this.fail(new Error(`<lyra-tool-result-view>: no renderer registered for tool "${this.toolName}"`));
79
+ return;
80
+ }
81
+ if (def.load) {
82
+ if (this.resolvedLazy?.def === def) {
83
+ this.renderWith(this.resolvedLazy.resolved);
84
+ return;
85
+ }
86
+ this.renderState = { kind: 'loading' };
87
+ let resolved;
88
+ try {
89
+ resolved = await loadToolRenderer(def);
90
+ }
91
+ catch (error) {
92
+ if (generation !== this.generation)
93
+ return;
94
+ this.fail(error);
95
+ return;
96
+ }
97
+ if (generation !== this.generation)
98
+ return;
99
+ this.resolvedLazy = { def, resolved };
100
+ this.renderWith(resolved);
101
+ return;
102
+ }
103
+ this.renderWith(def);
104
+ }
105
+ renderWith(def) {
106
+ if (!def.render) {
107
+ this.fail(new Error(`<lyra-tool-result-view>: renderer for tool "${this.toolName}" has no render()`));
108
+ return;
109
+ }
110
+ try {
111
+ this.renderState = { kind: 'rendered', template: def.render(this.result, this.args) };
112
+ }
113
+ catch (error) {
114
+ this.fail(error);
115
+ }
116
+ }
117
+ fail(error) {
118
+ this.emit('lyra-render-error', { toolName: this.toolName, error });
119
+ this.renderState = FALLBACK_STATE;
120
+ }
121
+ render() {
122
+ const state = this.renderState;
123
+ return html `
124
+ <div part="base">
125
+ ${state.kind === 'loading'
126
+ ? html `<lyra-skeleton variant="rect" height="4rem"></lyra-skeleton>`
127
+ : state.kind === 'rendered'
128
+ ? state.template
129
+ : html `<lyra-json-viewer .data=${this.result}></lyra-json-viewer>`}
130
+ </div>
131
+ `;
132
+ }
133
+ }
134
+ __decorate([
135
+ property({ attribute: false })
136
+ ], LyraToolResultView.prototype, "registry", void 0);
137
+ __decorate([
138
+ property({ attribute: 'tool-name' })
139
+ ], LyraToolResultView.prototype, "toolName", void 0);
140
+ __decorate([
141
+ property({ attribute: false })
142
+ ], LyraToolResultView.prototype, "result", void 0);
143
+ __decorate([
144
+ property({ attribute: false })
145
+ ], LyraToolResultView.prototype, "args", void 0);
146
+ __decorate([
147
+ property({ reflect: true })
148
+ ], LyraToolResultView.prototype, "fallback", void 0);
149
+ __decorate([
150
+ state()
151
+ ], LyraToolResultView.prototype, "renderState", void 0);
152
+ defineElement('tool-result-view', LyraToolResultView);
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,13 @@
1
+ import { css } from 'lit';
2
+ // Deliberately minimal -- most visual weight comes from whatever the
3
+ // registered renderer's own template contributes; this wrapper only needs to
4
+ // not collapse to a zero-height inline box while a renderer/skeleton/
5
+ // json-viewer child lays itself out.
6
+ export const styles = css `
7
+ :host {
8
+ display: block;
9
+ }
10
+ [part='base'] {
11
+ display: block;
12
+ }
13
+ `;
@@ -0,0 +1,151 @@
1
+ import { type TemplateResult, type PropertyValues } from 'lit';
2
+ import { LyraElement } from '../../internal/lyra-element.js';
3
+ import '../checkbox/checkbox.js';
4
+ import '../switch/switch.js';
5
+ /** One selectable agent tool. `category` groups the row; tools with no
6
+ * `category` (or an empty one) fall into the trailing "Other" bucket. */
7
+ export interface ToolSelectDialogTool {
8
+ id: string;
9
+ name: string;
10
+ description?: string;
11
+ category?: string;
12
+ /** Literal icon hint (e.g. an emoji), rendered next to `name` -- same
13
+ * "opaque string, not a registry lookup" convention as `<lyra-tool-call-chip>`'s `icon`. */
14
+ icon?: string;
15
+ /** Individually gates this tool regardless of `useDefaults`/`selected` -- e.g. a tool that
16
+ * requires admin approval before it can ever be enabled. */
17
+ disabled?: boolean;
18
+ /** Supporting text shown under a `disabled` row (e.g. "requires admin approval"). Ignored when `disabled` is falsy. */
19
+ disabledReason?: string;
20
+ }
21
+ /** Predicate deciding whether `tool` matches a (already-trimmed, already-lowercased) `query`.
22
+ * Mirrors `<lyra-combobox>`'s `OptionFilter` convention -- override `filter` to replace the
23
+ * built-in case-insensitive name/description substring match entirely. */
24
+ export type ToolSelectFilter = (tool: ToolSelectDialogTool, query: string) => boolean;
25
+ export interface ToolSelectionChangeDetail {
26
+ selected: string[];
27
+ useDefaults: boolean;
28
+ }
29
+ /**
30
+ * Reason the dialog was dismissed, forwarded as the `lyra-close` event detail
31
+ * -- mirrors `<lyra-dialog>`'s own `DialogCloseReason` shape. `'escape'`/
32
+ * `'backdrop'` come from the dialog's own built-in dismiss triggers; any
33
+ * other string is whatever a caller passes to `close()` directly (e.g. a
34
+ * consumer's own footer Done button).
35
+ */
36
+ export type ToolSelectDialogCloseReason = 'escape' | 'backdrop' | 'api' | string;
37
+ /**
38
+ * `<lyra-tool-select-dialog>` — a category-grouped, filterable, searchable
39
+ * tool-enablement dialog for picking which agent tools are available in a
40
+ * conversation.
41
+ *
42
+ * This renders its own dialog panel rather than nesting a `<lyra-dialog>` in
43
+ * its shadow template. Shared overlay infrastructure coordinates stacking,
44
+ * focus trapping, Escape/backdrop dismissal, and focus return with every
45
+ * other overlay in the same document.
46
+ *
47
+ * `useDefaults` is a single top-level switch: while `true`, every per-tool
48
+ * checkbox below renders disabled (still reflecting whatever `selected`
49
+ * holds — a consumer should populate that with its own default tool set
50
+ * whenever `useDefaults` is true) and a hint explains that turning the
51
+ * switch off is how to customize. Turning it off is the "customize"
52
+ * affordance — it's the only thing that both flips `useDefaults` to `false`
53
+ * *and* unlocks the per-tool checkboxes for editing, so there's exactly one
54
+ * control for that transition rather than a separate button duplicating it.
55
+ *
56
+ * There is no built-in footer/close button — like `<lyra-dialog>`, dismissal
57
+ * happens via Escape, a backdrop click, or a consumer's own `footer`-slotted
58
+ * action calling `close()`. This also means the search input is the very
59
+ * first focusable element in the panel with no special-casing needed, so
60
+ * it's what receives focus on open (see `updated()`).
61
+ *
62
+ * @customElement lyra-tool-select-dialog
63
+ * @slot footer - Optional action buttons (e.g. a "Done" button), rendered in a bottom row.
64
+ * Changes already apply live via `lyra-change`, so this is optional.
65
+ * @event lyra-change - The enabled-tool selection or the `useDefaults` toggle changed.
66
+ * `detail: { selected: string[], useDefaults: boolean }`.
67
+ * @event lyra-close - `detail: ToolSelectDialogCloseReason`. Fired exactly once per dismissal,
68
+ * via Escape, a backdrop click, or a `close()` call.
69
+ * @csspart backdrop - The full-viewport scrim behind the panel.
70
+ * @csspart panel - The dialog panel itself (`role="dialog"` while open).
71
+ * @csspart header - The wrapper around the title/subtitle.
72
+ * @csspart title - The dialog's heading.
73
+ * @csspart subtitle - The "N of M tools enabled" summary line.
74
+ * @csspart search-row - The wrapper around the search input.
75
+ * @csspart search-input - The filter text input.
76
+ * @csspart defaults-row - The wrapper around the use-defaults switch and its hint.
77
+ * @csspart defaults-toggle - The built-in `<lyra-switch>` bound to `useDefaults`.
78
+ * @csspart defaults-hint - The "turn off to customize" hint, shown only while `useDefaults` is true.
79
+ * @csspart body - The scrollable wrapper around the grouped tool list.
80
+ * @csspart empty - The "no tools" / "no matches" message.
81
+ * @csspart category - A single category's wrapper (`role="group"`).
82
+ * @csspart category-heading - A category's heading.
83
+ * @csspart category-count - The terse, `aria-hidden` tool count next to a category heading
84
+ * (the heading's accessible name gets the full sentence from an sr-only sibling instead).
85
+ * @csspart category-list - The `<ul>` of tool rows within a category.
86
+ * @csspart tool-row - A single tool's `<li>` row.
87
+ * @csspart tool-checkbox - A row's `<lyra-checkbox>`.
88
+ * @csspart tool-name - A row's name text (plus its `icon`, if set).
89
+ * @csspart tool-icon - A row's leading icon glyph, when `icon` is set.
90
+ * @csspart tool-description - A row's optional description text.
91
+ * @csspart tool-disabled-reason - A disabled row's `disabledReason` text, slotted inside
92
+ * `tool-checkbox` (alongside `tool-name`/`tool-description`) so it contributes to the
93
+ * checkbox's accessible name/description instead of going unannounced.
94
+ * @csspart footer - The wrapper around the `footer` slot.
95
+ */
96
+ export declare class LyraToolSelectDialog extends LyraElement {
97
+ static styles: import("lit").CSSResultGroup[];
98
+ /** Whether the dialog is open. Set this (or call `close()`) — there is no separate `show()`/`hide()` pair. */
99
+ open: boolean;
100
+ /** The full set of tools a consumer offers, across all categories. */
101
+ tools: ToolSelectDialogTool[];
102
+ /** The currently-enabled tool ids. */
103
+ selected: string[];
104
+ /** Whether the conversation is using the default tool set (`true`) or a custom selection (`false`) — see the class doc for the exact interaction with `selected`/per-tool editing. */
105
+ useDefaults: boolean;
106
+ /** The dialog's visible heading and accessible name. */
107
+ label: string;
108
+ searchPlaceholder: string;
109
+ /** Overrides the built-in case-insensitive name/description substring match. */
110
+ filter: ToolSelectFilter | null;
111
+ private query;
112
+ private hasFooterSlot;
113
+ private releaseScrollLock?;
114
+ private overlay?;
115
+ private readonly titleId;
116
+ private readonly categoryIds;
117
+ protected willUpdate(changed: PropertyValues): void;
118
+ protected updated(changed: PropertyValues): void;
119
+ connectedCallback(): void;
120
+ disconnectedCallback(): void;
121
+ private activateOverlay;
122
+ private onFooterSlotChange;
123
+ /**
124
+ * Close the dialog and return focus to whatever had it before the dialog
125
+ * opened. `reason` is forwarded as the `lyra-close` detail — built-in
126
+ * triggers pass `'escape'`/`'backdrop'`; a consumer's own close affordance
127
+ * (e.g. a footer Done button) should call this directly with its own
128
+ * reason string, so every dismissal path funnels through the same event
129
+ * instead of the consumer having to also toggle `open` itself.
130
+ */
131
+ close(reason?: ToolSelectDialogCloseReason): void;
132
+ private onBackdropClick;
133
+ private emitChange;
134
+ private onSearchInput;
135
+ private onDefaultsToggle;
136
+ private onToolToggle;
137
+ private categoryId;
138
+ /** Tools grouped by `category` (first-seen order), with an uncategorized
139
+ * bucket always last, then filtered by the active search query -- a
140
+ * category left with zero matches is dropped entirely rather than
141
+ * rendered as an empty heading. */
142
+ private get groups();
143
+ private renderTool;
144
+ private renderCategory;
145
+ render(): TemplateResult;
146
+ }
147
+ declare global {
148
+ interface HTMLElementTagNameMap {
149
+ 'lyra-tool-select-dialog': LyraToolSelectDialog;
150
+ }
151
+ }