@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
@@ -9,7 +9,28 @@ import { property } from 'lit/decorators.js';
9
9
  import { LyraElement } from '../../internal/lyra-element.js';
10
10
  import { defineElement } from '../../internal/prefix.js';
11
11
  import { playIcon, pauseIcon } from '../../internal/icons.js';
12
+ import { finiteCount, finiteDuration, MAX_TIMEOUT_MS } from '../../internal/numbers.js';
12
13
  import { styles } from './playback.styles.js';
14
+ const MIN_INTERVAL_MS = 16; // ~one animation frame; prevents a near-zero-delay tick loop
15
+ // Deduplicated per distinct bad value (like the analogous one-time warnings
16
+ // in lyra-heatmap/lyra-word-cloud) rather than a single once-ever flag, so a
17
+ // later, genuinely different bad value is never silently swallowed by an
18
+ // earlier, unrelated one.
19
+ const warnedInvalidIntervals = new Set();
20
+ function warnInvalidInterval(value) {
21
+ if (warnedInvalidIntervals.has(value))
22
+ return;
23
+ warnedInvalidIntervals.add(value);
24
+ // The clamp fires for any value outside the timer-safe range, so report the
25
+ // reason that actually applies instead of collapsing every bad value into
26
+ // one misleading "non-finite or non-positive" message.
27
+ const reason = !Number.isFinite(value)
28
+ ? 'non-finite'
29
+ : value < MIN_INTERVAL_MS
30
+ ? `below the ${MIN_INTERVAL_MS}ms floor`
31
+ : `above the ${MAX_TIMEOUT_MS}ms ceiling`;
32
+ console.warn(`<lyra-playback> interval-ms (${value}) is ${reason}; clamping to ${MIN_INTERVAL_MS}ms.`);
33
+ }
13
34
  /**
14
35
  * `<lyra-playback>` — steps an index through `[0, length)` on a fixed
15
36
  * interval (play/pause), the common building block behind ad-hoc
@@ -19,7 +40,9 @@ import { styles } from './playback.styles.js';
19
40
  * @event lyra-play - Fired when playback starts.
20
41
  * @event lyra-pause - Fired when playback stops (including auto-pause).
21
42
  * @event lyra-step - `detail: { index }`, fired on every tick and manual step.
22
- * @csspart base, play-button, slider
43
+ * @csspart base - The playback controls wrapper.
44
+ * @csspart play-button - The play/pause button.
45
+ * @csspart slider - The playback position slider.
23
46
  */
24
47
  export class LyraPlayback extends LyraElement {
25
48
  constructor() {
@@ -27,7 +50,10 @@ export class LyraPlayback extends LyraElement {
27
50
  this.length = 0;
28
51
  this.index = 0;
29
52
  this.intervalMs = 900;
30
- this.playing = false;
53
+ // `playing` is declared via `static properties` above (noAccessor) with a
54
+ // hand-written accessor below, so a direct `el.playing = true/false`
55
+ // assignment always drives the real timer — not just calls through
56
+ // play()/pause().
31
57
  this.loop = true;
32
58
  /**
33
59
  * Re-declared as a Lit reactive property (shadowing the inherited plain
@@ -37,11 +63,41 @@ export class LyraPlayback extends LyraElement {
37
63
  * `reflect: true` preserves the native attribute-reflection behavior.
38
64
  */
39
65
  this.hidden = false;
66
+ this._playing = false;
40
67
  }
41
68
  static { this.styles = [LyraElement.styles, styles]; }
42
- /** Largest index reachable at the current `length` (never negative). */
69
+ static { this.properties = {
70
+ playing: { type: Boolean, reflect: true, noAccessor: true },
71
+ loop: { type: Boolean },
72
+ }; }
73
+ get playing() {
74
+ return this._playing;
75
+ }
76
+ set playing(next) {
77
+ const old = this._playing;
78
+ if (next === old)
79
+ return;
80
+ this._playing = next;
81
+ if (next) {
82
+ if (finiteCount(this.length) <= 1) {
83
+ this._playing = false;
84
+ return;
85
+ }
86
+ this.emit('lyra-play');
87
+ this.scheduleTick();
88
+ }
89
+ else {
90
+ window.clearTimeout(this.timer);
91
+ this.timer = undefined;
92
+ this.emit('lyra-pause');
93
+ }
94
+ this.requestUpdate('playing', old);
95
+ }
96
+ /** Largest index reachable at the current `length` (never negative, and
97
+ * never NaN — a non-finite `length` falls back to 0 rather than leaking a
98
+ * literal "NaN" into the rendered slider's `max` attribute). */
43
99
  get maxIndex() {
44
- return Math.max(0, this.length - 1);
100
+ return Math.max(0, finiteCount(this.length) - 1);
45
101
  }
46
102
  disconnectedCallback() {
47
103
  super.disconnectedCallback();
@@ -50,6 +106,19 @@ export class LyraPlayback extends LyraElement {
50
106
  willUpdate(changed) {
51
107
  if (changed.has('hidden') && this.hidden)
52
108
  this.pause();
109
+ // A non-finite `length`/`index` (e.g. externally assigned NaN) must not
110
+ // linger: `maxIndex` already falls back to a safe value for rendering,
111
+ // but `next()`/`previous()` compare `index`/`length` directly and would
112
+ // otherwise stay permanently bricked (NaN comparisons are always
113
+ // false). Checked unconditionally — not just under the `length` branch
114
+ // below — so a corrupted `index` alone still self-heals on the very next
115
+ // update, without requiring `length` to also change.
116
+ const length = finiteCount(this.length);
117
+ const index = finiteCount(this.index);
118
+ if (length !== this.length)
119
+ this.length = length;
120
+ if (index !== this.index)
121
+ this.index = index;
53
122
  if (changed.has('length')) {
54
123
  // If length is externally reduced to <= 1 while playing, the timer
55
124
  // would otherwise keep firing forever — and the play button (the only
@@ -65,24 +134,19 @@ export class LyraPlayback extends LyraElement {
65
134
  }
66
135
  /** Start playback; no-op if there's nothing to advance through. */
67
136
  play() {
68
- if (this.playing || this.length <= 1)
137
+ if (this.playing || finiteCount(this.length) <= 1)
69
138
  return;
70
139
  this.playing = true;
71
- this.emit('lyra-play');
72
- this.scheduleTick();
73
140
  }
74
141
  /** Stop playback. */
75
142
  pause() {
76
143
  if (!this.playing)
77
144
  return;
78
- window.clearTimeout(this.timer);
79
- this.timer = undefined;
80
145
  this.playing = false;
81
- this.emit('lyra-pause');
82
146
  }
83
147
  /** Toggle between playing and paused. */
84
148
  toggle() {
85
- this.playing ? this.pause() : this.play();
149
+ this.playing = !this.playing;
86
150
  }
87
151
  // A self-rescheduling `setTimeout` (rather than one long-lived
88
152
  // `setInterval`) so `intervalMs` is re-read fresh before every tick, the
@@ -90,19 +154,32 @@ export class LyraPlayback extends LyraElement {
90
154
  // `interval-ms` live takes effect on the very next step instead of only
91
155
  // after a pause/play cycle.
92
156
  scheduleTick() {
93
- this.timer = window.setTimeout(() => {
157
+ const rawDelay = this.intervalMs;
158
+ const delay = finiteDuration(rawDelay, MIN_INTERVAL_MS, MIN_INTERVAL_MS);
159
+ if (delay !== rawDelay)
160
+ warnInvalidInterval(rawDelay);
161
+ // Self-identifying: a synchronous pause()+play() (or a synchronous
162
+ // play() from a 'lyra-pause'/'lyra-step' listener) invoked while this
163
+ // callback is running schedules its own new timer and overwrites
164
+ // `this.timer` before this callback resumes. Only the timer that is
165
+ // still the current one is allowed to reschedule itself — every other,
166
+ // now-superseded chain quietly stops instead of spawning a second,
167
+ // untracked chain that pause()/disconnectedCallback() can never reach.
168
+ const id = window.setTimeout(() => {
94
169
  this.tick();
95
- if (this.playing)
170
+ if (this.playing && this.timer === id)
96
171
  this.scheduleTick();
97
- }, this.intervalMs);
172
+ }, delay);
173
+ this.timer = id;
98
174
  }
99
175
  tick() {
100
- const next = this.index + 1;
101
- if (next >= this.length) {
176
+ const length = finiteCount(this.length);
177
+ const next = finiteCount(this.index) + 1;
178
+ if (next >= length) {
102
179
  if (this.loop)
103
180
  this.setIndex(0);
104
181
  else {
105
- this.setIndex(this.length - 1);
182
+ this.setIndex(length - 1);
106
183
  this.pause();
107
184
  }
108
185
  }
@@ -111,32 +188,37 @@ export class LyraPlayback extends LyraElement {
111
188
  }
112
189
  }
113
190
  setIndex(i) {
114
- this.index = i;
191
+ this.index = finiteCount(i, 0, this.maxIndex);
115
192
  this.emit('lyra-step', { index: this.index });
116
193
  }
117
194
  /** Advance one step without starting playback. */
118
195
  next() {
119
- if (this.index + 1 < this.length)
120
- this.setIndex(this.index + 1);
196
+ const index = finiteCount(this.index);
197
+ if (index + 1 < finiteCount(this.length))
198
+ this.setIndex(index + 1);
121
199
  }
122
200
  /** Go back one step without starting playback. */
123
201
  previous() {
124
- if (this.index > 0)
125
- this.setIndex(this.index - 1);
202
+ const index = finiteCount(this.index);
203
+ if (index > 0)
204
+ this.setIndex(index - 1);
126
205
  }
127
206
  /** Jump to an explicit index, pausing playback. */
128
207
  goTo(index) {
129
208
  this.pause();
130
- this.setIndex(Math.min(this.maxIndex, Math.max(0, index)));
209
+ this.setIndex(finiteCount(index, 0, this.maxIndex));
131
210
  }
132
211
  render() {
212
+ const maxIndex = this.maxIndex;
213
+ const index = finiteCount(this.index, 0, maxIndex);
214
+ const disabled = finiteCount(this.length) <= 1;
133
215
  return html `
134
216
  <div part="base">
135
217
  <button
136
218
  part="play-button"
137
219
  type="button"
138
220
  aria-label=${this.playing ? 'Pause' : 'Play'}
139
- ?disabled=${this.length <= 1}
221
+ ?disabled=${disabled}
140
222
  @click=${() => this.toggle()}
141
223
  >
142
224
  ${this.playing ? pauseIcon() : playIcon()}
@@ -145,10 +227,10 @@ export class LyraPlayback extends LyraElement {
145
227
  part="slider"
146
228
  type="range"
147
229
  min="0"
148
- max=${this.maxIndex}
149
- .value=${String(this.index)}
230
+ max=${maxIndex}
231
+ .value=${String(index)}
150
232
  aria-label="Playback position"
151
- ?disabled=${this.length <= 1}
233
+ ?disabled=${disabled}
152
234
  @input=${(e) => this.goTo(Number(e.target.value))}
153
235
  />
154
236
  </div>
@@ -164,12 +246,6 @@ __decorate([
164
246
  __decorate([
165
247
  property({ type: Number, attribute: 'interval-ms' })
166
248
  ], LyraPlayback.prototype, "intervalMs", void 0);
167
- __decorate([
168
- property({ type: Boolean, reflect: true })
169
- ], LyraPlayback.prototype, "playing", void 0);
170
- __decorate([
171
- property({ type: Boolean })
172
- ], LyraPlayback.prototype, "loop", void 0);
173
249
  __decorate([
174
250
  property({ type: Boolean, reflect: true })
175
251
  ], LyraPlayback.prototype, "hidden", void 0);
@@ -4,6 +4,11 @@ export const styles = css `
4
4
  display: inline-flex;
5
5
  align-items: center;
6
6
  gap: var(--lyra-space-s);
7
+ /* Derived from --lyra-icon-button-size (0.35 * 2.5rem = 0.875rem, the
8
+ prior bare literal) so the rendered play/pause SVG icon (icons render
9
+ at width/height: 1em, so this font-size directly controls its pixel
10
+ size) tracks the button's own token instead of drifting from it. */
11
+ --lyra-playback-icon-size: calc(var(--lyra-icon-button-size) * 0.35);
7
12
  }
8
13
  [part='base'] {
9
14
  display: flex;
@@ -21,7 +26,7 @@ export const styles = css `
21
26
  display: inline-flex;
22
27
  align-items: center;
23
28
  justify-content: center;
24
- font-size: 0.875rem;
29
+ font-size: var(--lyra-playback-icon-size);
25
30
  }
26
31
  [part='play-button']:hover {
27
32
  border-color: var(--lyra-color-brand);
@@ -0,0 +1,163 @@
1
+ import { type TemplateResult, type PropertyValues } from 'lit';
2
+ import { LyraElement } from '../../internal/lyra-element.js';
3
+ /** The `mode` property's literal value -- `'auto'` tracks the viewport
4
+ * breakpoint live; `'inline'`/`'overlay'` force that presentation
5
+ * regardless of viewport width. */
6
+ export type ResponsivePanelMode = 'inline' | 'overlay' | 'auto';
7
+ /** What `mode` actually resolves to once the breakpoint is taken into
8
+ * account -- `'auto'` never appears here. */
9
+ export type ResponsivePanelEffectiveMode = 'inline' | 'overlay';
10
+ export type ResponsivePanelVariant = 'fullscreen' | 'bottom-sheet';
11
+ /** Reason the panel was closed, forwarded as the `lyra-close` event detail --
12
+ * mirrors lyra-dialog's own `DialogCloseReason` shape. `'escape'` and
13
+ * `'backdrop'` are emitted by the overlay presentation's own built-in
14
+ * dismiss triggers (they can't occur while inline, since there's no
15
+ * backdrop/document-keydown trap wired up then); any other string is
16
+ * whatever a caller passes to `close()`. */
17
+ export type ResponsivePanelCloseReason = 'escape' | 'backdrop' | 'api' | string;
18
+ export interface ResponsivePanelModeChangeDetail {
19
+ mode: ResponsivePanelEffectiveMode;
20
+ }
21
+ /**
22
+ * Pure resolution of the `mode` prop + current viewport into the actual
23
+ * presentation. Kept separate from the `matchMedia` listener wiring below so
24
+ * it's independently unit-testable, and so the live-viewport-response logic
25
+ * can be exercised in tests by calling it (or the instance method that wraps
26
+ * it) directly instead of needing control over the real browser window,
27
+ * which `@web/test-runner` doesn't give.
28
+ */
29
+ export declare function resolveEffectiveMode(mode: ResponsivePanelMode, belowBreakpoint: boolean): ResponsivePanelEffectiveMode;
30
+ /**
31
+ * `<lyra-responsive-panel>` — the same slotted content either docked inline
32
+ * in the page's normal layout flow (desktop) or presented as a full-screen/
33
+ * bottom-sheet overlay (mobile), depending on viewport width. Typical uses:
34
+ * a settings panel or a conversation-history sidebar that's a permanent
35
+ * docked pane on a wide screen but a modal on a phone.
36
+ *
37
+ * Breakpoint detection uses `matchMedia('(max-width: ' + mobileBreakpoint +
38
+ * ')')`, re-evaluated live while connected -- resizing/rotating a device
39
+ * that crosses the breakpoint while `mode="auto"` (the default) updates the
40
+ * effective presentation without unmounting or re-creating the slotted
41
+ * content: inline and overlay presentation share the exact same shadow DOM
42
+ * structure (only a css class, and the overlay-only `role`/`aria-modal`
43
+ * attributes and backdrop element, differ), so lit-html's diffing keeps
44
+ * `[part="body"]` and its `<slot>` as the same DOM node across the
45
+ * transition -- scroll position and focus inside the slotted content survive
46
+ * it for free. When an open inline panel becomes modal, focus already inside
47
+ * is preserved and outside focus moves to the first available target. Closing
48
+ * still returns to the opener captured by the original inline open.
49
+ *
50
+ * The overlay presentation uses the library's shared overlay coordinator for
51
+ * focus trapping, Escape/backdrop dismissal, inerting, and stack ordering,
52
+ * while retaining this component's own responsive rendering and close event.
53
+ *
54
+ * Accessible name (overlay presentation only -- the inline presentation has
55
+ * no dialog semantics to name): `label`, when set, is used verbatim. When
56
+ * `label` is empty, this falls back to the `header` slot's content -- a
57
+ * heading element (`h1`–`h6` or `[role="heading"]`) among the slotted header
58
+ * content wins if present, otherwise the header slot's full text content is
59
+ * used, mirroring lyra-dialog's `detectHeading()`/`headingText` fallback (see
60
+ * dialog.ts's module doc for why this uses `aria-label`, a copied string,
61
+ * rather than `aria-labelledby`: the header content is light DOM while
62
+ * `[part="panel"]` lives in this element's shadow tree, and an ID-reference
63
+ * attribute can't resolve across that boundary). A panel opened without
64
+ * either `label` or header content still renders `role="dialog"` with no
65
+ * accessible name -- set one of the two to avoid that.
66
+ *
67
+ * @customElement lyra-responsive-panel
68
+ * @slot - The panel body.
69
+ * @slot header - Optional header content, rendered above the body.
70
+ * @slot footer - Optional footer content (e.g. action buttons), rendered below the body.
71
+ * @event lyra-close - `detail: ResponsivePanelCloseReason`. Fired by the overlay presentation's
72
+ * built-in dismiss triggers (Escape, backdrop click) and by any `close()` call, in either
73
+ * presentation -- a plain `open = false` property write does not fire it (matching
74
+ * lyra-dialog's own precedent: only going through `close()` counts as a dismissal), and this
75
+ * is deliberately the same event/semantics in both presentations, rather than only being
76
+ * meaningful for the overlay case, so a consumer only has to wire up one listener regardless
77
+ * of which presentation is currently active.
78
+ * @event lyra-mode-change - `detail: ResponsivePanelModeChangeDetail`. Fired whenever the
79
+ * *effective* mode (not the `mode` prop's literal value, which may be `'auto'`) changes between
80
+ * `'inline'` and `'overlay'` -- crossing the breakpoint while `mode="auto"`, or the host
81
+ * reassigning `mode` to a value that changes the effective presentation. Never fired for the
82
+ * initial render, only for a live change thereafter.
83
+ * @csspart base - The root wrapper; `display: none` while closed, positioned `fixed` while open
84
+ * and in the overlay presentation.
85
+ * @csspart backdrop - The full-viewport scrim behind the panel -- only rendered in the overlay
86
+ * presentation.
87
+ * @csspart panel - The panel surface itself (`role="dialog"` while open and in the overlay
88
+ * presentation).
89
+ * @csspart header - The wrapper around the `header` slot.
90
+ * @csspart body - The wrapper around the default slot.
91
+ * @csspart footer - The wrapper around the `footer` slot.
92
+ */
93
+ export declare class LyraResponsivePanel extends LyraElement {
94
+ static styles: import("lit").CSSResultGroup[];
95
+ /** Whether the panel is open. In the inline presentation this just means visible/mounted; in
96
+ * the overlay presentation this is the actual modal open/closed state. */
97
+ open: boolean;
98
+ /** `'auto'` (default) tracks `mobile-breakpoint` live; `'inline'`/`'overlay'` force that
99
+ * presentation regardless of viewport width. */
100
+ mode: ResponsivePanelMode;
101
+ /** Only affects the overlay presentation's visual treatment -- `'fullscreen'` (default) covers
102
+ * the whole viewport; `'bottom-sheet'` slides up from the bottom and doesn't cover the full
103
+ * height. */
104
+ variant: ResponsivePanelVariant;
105
+ /** Accessible name for the overlay presentation's `role="dialog"`. Unused in the inline
106
+ * presentation, which has no dialog semantics to name. When empty, falls back to the `header`
107
+ * slot's content -- see the class doc for the full fallback order. */
108
+ label: string;
109
+ /** CSS length passed to `matchMedia` as `(max-width: <this>)` to decide, in `mode="auto"`,
110
+ * whether the effective presentation is `'overlay'` (below/at this width) or `'inline'`
111
+ * (above it). */
112
+ mobileBreakpoint: string;
113
+ private belowBreakpoint;
114
+ private effectiveMode;
115
+ private hasHeaderSlot;
116
+ private hasFooterSlot;
117
+ /** Fallback accessible name sourced from the `header` slot's content -- see `detectHeadingText()`. */
118
+ private headingText?;
119
+ private mediaQuery?;
120
+ private releaseScrollLock?;
121
+ private lastTrigger?;
122
+ private overlayHandle?;
123
+ /** Whether the overlay-only mechanics (scroll-lock and shared overlay registration) are currently
124
+ * engaged -- derived from `effectiveMode === 'overlay' && open`, tracked separately from those
125
+ * two properties so willUpdate can diff "was engaged" vs "should be engaged now" regardless of
126
+ * which of the two changed. */
127
+ private overlayChromeActive;
128
+ private focusOverlayAfterUpdate;
129
+ private isFirstUpdate;
130
+ protected willUpdate(changed: PropertyValues): void;
131
+ protected updated(changed: PropertyValues): void;
132
+ connectedCallback(): void;
133
+ disconnectedCallback(): void;
134
+ private activateOverlayChrome;
135
+ private deactivateOverlayChrome;
136
+ private setupMediaQuery;
137
+ private onMediaChange;
138
+ /** The breakpoint-response logic itself, kept callable independently of the
139
+ * `matchMedia` listener that normally drives it -- tests invoke this
140
+ * directly to simulate crossing the breakpoint. */
141
+ private handleBreakpointChange;
142
+ private onHeaderSlotChange;
143
+ private onFooterSlotChange;
144
+ private detectHeadingText;
145
+ /**
146
+ * Close the panel. `reason` is forwarded as the `lyra-close` detail --
147
+ * built-in overlay triggers pass `'escape'`/`'backdrop'`; a consumer's own
148
+ * close affordance (e.g. a footer button, or a docked panel's own toggle)
149
+ * should call this directly with its own reason string. Fires in both
150
+ * presentations (see the class doc's `lyra-close` note) but only returns
151
+ * focus to the trigger that opened it when the overlay presentation is
152
+ * active, since the inline presentation never took focus away from
153
+ * anything to begin with.
154
+ */
155
+ close(reason?: ResponsivePanelCloseReason): void;
156
+ private onBackdropClick;
157
+ render(): TemplateResult;
158
+ }
159
+ declare global {
160
+ interface HTMLElementTagNameMap {
161
+ 'lyra-responsive-panel': LyraResponsivePanel;
162
+ }
163
+ }