@aceshooting/lyra-ui 26.0.0 → 27.0.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 (1475) hide show
  1. package/CHANGELOG.md +63 -675
  2. package/README.md +281 -1130
  3. package/design-tokens.json +1 -1
  4. package/dist/ai/types.d.ts +5 -5
  5. package/dist/autoloader.js +1 -1
  6. package/dist/cli/agent-registry.mjs +1 -0
  7. package/dist/cli/component-inventory.mjs +1 -1
  8. package/dist/cli/init-agents.mjs +40 -0
  9. package/dist/cli/is-main-module.mjs +1 -0
  10. package/dist/cli/lyra-rename-ledger.mjs +1 -1
  11. package/dist/cli/lyra-ui.mjs +11 -0
  12. package/dist/cli/migrate-wa.mjs +4 -2
  13. package/dist/cli/migration-contract.json +1 -1
  14. package/dist/cli/migration-renames.mjs +1 -1
  15. package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.class.d.ts +1 -1
  16. package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.class.js +2 -2
  17. package/dist/components/agent-tools/approval-queue/approval-queue.class.js +1 -1
  18. package/dist/components/agent-tools/confirm-bar/confirm-bar.class.d.ts +2 -2
  19. package/dist/components/agent-tools/confirm-bar/confirm-bar.class.js +2 -2
  20. package/dist/components/agent-tools/connector-manager/connector-manager.class.d.ts +4 -2
  21. package/dist/components/agent-tools/connector-manager/connector-manager.class.js +6 -3
  22. package/dist/components/agent-tools/connector-manager/connector-manager.d.ts +1 -1
  23. package/dist/components/agent-tools/connector-manager/connector-manager.js +1 -1
  24. package/dist/components/agent-tools/connector-manager/connector-manager.styles.js +1 -1
  25. package/dist/components/agent-tools/context-inspector/context-inspector.class.d.ts +2 -2
  26. package/dist/components/agent-tools/context-inspector/context-inspector.class.js +6 -6
  27. package/dist/components/agent-tools/eval-dataset/eval-dataset.class.d.ts +8 -33
  28. package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +27 -4
  29. package/dist/components/agent-tools/eval-dataset/eval-dataset.d.ts +1 -1
  30. package/dist/components/agent-tools/eval-dataset/eval-dataset.js +1 -1
  31. package/dist/components/agent-tools/eval-dataset/eval-dataset.styles.js +1 -1
  32. package/dist/components/agent-tools/evaluation-run/evaluation-run.class.js +1 -1
  33. package/dist/components/agent-tools/permission-grant/permission-grant.class.d.ts +4 -2
  34. package/dist/components/agent-tools/permission-grant/permission-grant.class.js +6 -3
  35. package/dist/components/agent-tools/permission-grant/permission-grant.d.ts +1 -1
  36. package/dist/components/agent-tools/permission-grant/permission-grant.js +1 -1
  37. package/dist/components/agent-tools/permission-grant/permission-grant.styles.js +1 -1
  38. package/dist/components/agent-tools/prompt-studio/prompt-studio.class.d.ts +1 -1
  39. package/dist/components/agent-tools/prompt-studio/prompt-studio.class.js +2 -2
  40. package/dist/components/agent-tools/schema-viewer/schema-viewer.class.d.ts +3 -1
  41. package/dist/components/agent-tools/schema-viewer/schema-viewer.class.js +1 -1
  42. package/dist/components/agent-tools/stack-trace/stack-trace.class.js +1 -1
  43. package/dist/components/agent-tools/task-list/task-list.class.d.ts +2 -2
  44. package/dist/components/agent-tools/task-list/task-list.class.js +2 -2
  45. package/dist/components/agent-tools/terminal/terminal.class.d.ts +1 -1
  46. package/dist/components/agent-tools/terminal/terminal.class.js +4 -4
  47. package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.d.ts +15 -9
  48. package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.js +1 -1
  49. package/dist/components/agent-tools/tool-call-block/tool-call-block.class.d.ts +2 -2
  50. package/dist/components/agent-tools/tool-call-block/tool-call-block.class.js +1 -1
  51. package/dist/components/agent-tools/tool-call-block/tool-call-block.styles.js +1 -1
  52. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +2 -7
  53. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.styles.js +1 -1
  54. package/dist/components/agent-tools/tool-param-form/tool-param-constraints.js +1 -1
  55. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.d.ts +3 -5
  56. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +1 -1
  57. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.class.d.ts +2 -5
  58. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.styles.js +1 -1
  59. package/dist/components/agent-tools/tool-result-view/registry.d.ts +4 -12
  60. package/dist/components/agent-tools/tool-result-view/tool-result-view.class.d.ts +2 -2
  61. package/dist/components/agent-tools/tool-result-view/tool-result-view.class.js +1 -1
  62. package/dist/components/agent-tools/tool-status.d.ts +7 -0
  63. package/dist/components/agent-tools/tool-status.styles.js +1 -0
  64. package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js +1 -1
  65. package/dist/components/agent-tools/tool-timeline/tool-timeline.d.ts +1 -1
  66. package/dist/components/agent-tools/tool-timeline/tool-timeline.js +1 -1
  67. package/dist/components/agent-tools/trace-tree/trace-tree.class.js +2 -2
  68. package/dist/components/charts/chart/box-plot.class.d.ts +1 -1
  69. package/dist/components/charts/chart/box-plot.class.js +1 -1
  70. package/dist/components/charts/chart/box-plot.styles.js +1 -1
  71. package/dist/components/charts/chart/chart-surface-shared.js +1 -0
  72. package/dist/components/charts/chart/chart-surface.styles.js +1 -1
  73. package/dist/components/charts/chart/chart-table-sampling.js +1 -1
  74. package/dist/components/charts/chart/chart.class.d.ts +2 -2
  75. package/dist/components/charts/chart/chart.class.js +2 -2
  76. package/dist/components/charts/chart/chart.styles.js +1 -1
  77. package/dist/components/charts/chart/histogram.class.js +1 -1
  78. package/dist/components/charts/chart/lite-chart.class.d.ts +1 -1
  79. package/dist/components/charts/chart/lite-chart.class.js +4 -4
  80. package/dist/components/conversation/catalog-picker-element.d.ts +28 -13
  81. package/dist/components/conversation/catalog-picker-element.js +1 -1
  82. package/dist/components/conversation/catalog-picker-trigger.styles.js +1 -0
  83. package/dist/components/conversation/chat-message/chat-message.class.js +1 -1
  84. package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
  85. package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +1 -1
  86. package/dist/components/conversation/chat-viewport/chat-viewport.class.js +1 -1
  87. package/dist/components/conversation/code-block/code-block-shared.js +1 -1
  88. package/dist/components/conversation/conversation-item/conversation-item.class.js +1 -1
  89. package/dist/components/conversation/generation-metrics/generation-metrics.class.js +2 -2
  90. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  91. package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
  92. package/dist/components/conversation/message-actions/message-actions.class.js +1 -1
  93. package/dist/components/conversation/model-select/model-select.class.d.ts +7 -34
  94. package/dist/components/conversation/model-select/model-select.class.js +3 -3
  95. package/dist/components/conversation/model-select/model-select.styles.js +1 -1
  96. package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +7 -2
  97. package/dist/components/conversation/prompt-input/prompt-input.class.js +5 -2
  98. package/dist/components/conversation/prompt-queue/prompt-queue.class.js +1 -1
  99. package/dist/components/conversation/realtime-session/realtime-session.class.js +1 -1
  100. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.js +1 -1
  101. package/dist/components/conversation/stream-status/stream-status.class.js +1 -1
  102. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +10 -27
  103. package/dist/components/conversation/voice-picker/voice-picker.class.js +3 -3
  104. package/dist/components/conversation/voice-picker/voice-picker.styles.js +1 -1
  105. package/dist/components/data/condition-builder/condition-builder.class.js +1 -1
  106. package/dist/components/data/data-grid/data-grid.class.js +1 -1
  107. package/dist/components/data/document-library/document-library.class.d.ts +2 -2
  108. package/dist/components/data/document-library/document-library.class.js +2 -2
  109. package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +3 -3
  110. package/dist/components/data/graph-query-builder/graph-query-builder.class.js +1 -1
  111. package/dist/components/data/heatmap/heatmap.class.js +2 -2
  112. package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +1 -1
  113. package/dist/components/data/sequence-strip/sequence-strip.class.js +1 -1
  114. package/dist/components/data/table/table.class.d.ts +10 -195
  115. package/dist/components/data/table/table.class.js +2 -2
  116. package/dist/components/data/table/table.styles.js +1 -1
  117. package/dist/components/data/timeline/timeline.class.js +1 -1
  118. package/dist/components/data/tree/tree.class.js +1 -1
  119. package/dist/components/forms/button/button.class.d.ts +3 -3
  120. package/dist/components/forms/button/button.class.js +1 -1
  121. package/dist/components/forms/catalog-picker-base.js +1 -1
  122. package/dist/components/forms/checkbox/checkbox.class.d.ts +13 -34
  123. package/dist/components/forms/checkbox/checkbox.class.js +3 -3
  124. package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +3 -3
  125. package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
  126. package/dist/components/forms/code-editor/code-editor.class.js +1 -1
  127. package/dist/components/forms/color-picker/color-picker.class.js +1 -1
  128. package/dist/components/forms/combobox/combobox.class.d.ts +6 -6
  129. package/dist/components/forms/combobox/combobox.class.js +3 -2
  130. package/dist/components/forms/combobox/option.class.d.ts +3 -0
  131. package/dist/components/forms/combobox/option.class.js +2 -2
  132. package/dist/components/forms/date-picker/date-input.class.d.ts +10 -11
  133. package/dist/components/forms/date-picker/date-input.class.js +4 -3
  134. package/dist/components/forms/date-picker/date-input.styles.js +1 -1
  135. package/dist/components/forms/date-picker/date-picker.class.d.ts +6 -0
  136. package/dist/components/forms/date-picker/date-picker.class.js +1 -1
  137. package/dist/components/forms/date-picker/date-picker.styles.js +1 -1
  138. package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
  139. package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
  140. package/dist/components/forms/input/input.styles.js +1 -1
  141. package/dist/components/forms/input/time-input.class.d.ts +1 -1
  142. package/dist/components/forms/input/time-input.class.js +1 -1
  143. package/dist/components/forms/input/time-input.styles.js +1 -1
  144. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +5 -5
  145. package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
  146. package/dist/components/forms/otp-input/otp-input.class.js +1 -0
  147. package/dist/components/forms/phone-input/phone-input.class.d.ts +7 -9
  148. package/dist/components/forms/phone-input/phone-input.class.js +6 -5
  149. package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
  150. package/dist/components/forms/radio/radio-group.class.d.ts +4 -4
  151. package/dist/components/forms/radio/radio-group.class.js +1 -1
  152. package/dist/components/forms/radio/radio.class.d.ts +11 -19
  153. package/dist/components/forms/radio/radio.class.js +2 -2
  154. package/dist/components/forms/rubric-form/rubric-form.class.d.ts +3 -5
  155. package/dist/components/forms/rubric-form/rubric-form.class.js +1 -1
  156. package/dist/components/forms/select/select.class.d.ts +5 -7
  157. package/dist/components/forms/select/select.class.js +3 -2
  158. package/dist/components/forms/slider/slider.class.d.ts +3 -3
  159. package/dist/components/forms/slider/slider.class.js +1 -1
  160. package/dist/components/forms/slider/slider.styles.js +1 -1
  161. package/dist/components/forms/swatch-picker/swatch-picker.class.js +1 -1
  162. package/dist/components/forms/switch/switch.class.d.ts +11 -36
  163. package/dist/components/forms/switch/switch.class.js +2 -2
  164. package/dist/components/forms/textarea/textarea.class.js +1 -0
  165. package/dist/components/forms/textarea/textarea.styles.js +1 -1
  166. package/dist/components/forms/time-range/time-range.class.d.ts +5 -3
  167. package/dist/components/forms/time-range/time-range.class.js +1 -1
  168. package/dist/components/forms/time-range/time-range.styles.js +1 -1
  169. package/dist/components/forms/toggle-group/toggle-group.class.d.ts +2 -2
  170. package/dist/components/forms/toggle-group/toggle-group.class.js +1 -1
  171. package/dist/components/forms/token-input/token-input.class.d.ts +3 -3
  172. package/dist/components/forms/token-input/token-input.class.js +1 -1
  173. package/dist/components/layout/app-rail/app-rail-item.class.js +1 -1
  174. package/dist/components/layout/app-rail/app-rail.class.d.ts +2 -2
  175. package/dist/components/layout/app-rail/app-rail.class.js +1 -1
  176. package/dist/components/layout/breadcrumb/breadcrumb-item.class.js +1 -1
  177. package/dist/components/layout/card/card.class.js +1 -1
  178. package/dist/components/layout/carousel/carousel.class.js +1 -1
  179. package/dist/components/layout/command-palette/command-palette.class.d.ts +6 -2
  180. package/dist/components/layout/command-palette/command-palette.class.js +1 -1
  181. package/dist/components/layout/dashboard-grid/dashboard-grid.class.js +1 -1
  182. package/dist/components/layout/details/accordion.class.js +1 -1
  183. package/dist/components/layout/dock-panel/dock-panel.class.d.ts +1 -1
  184. package/dist/components/layout/dock-panel/dock-panel.class.js +1 -1
  185. package/dist/components/layout/drilldown-panel/drilldown-panel.class.js +2 -2
  186. package/dist/components/layout/filter-bar/filter-bar.class.d.ts +3 -2
  187. package/dist/components/layout/filter-bar/filter-bar.class.js +18 -15
  188. package/dist/components/layout/filter-bar/filter-bar.styles.js +1 -1
  189. package/dist/components/layout/menu/menu.class.d.ts +1 -1
  190. package/dist/components/layout/menu/menu.class.js +1 -1
  191. package/dist/components/layout/multi-split/multi-split.class.d.ts +1 -1
  192. package/dist/components/layout/multi-split/multi-split.class.js +1 -1
  193. package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
  194. package/dist/components/layout/page/page.class.d.ts +1 -1
  195. package/dist/components/layout/page/page.class.js +1 -1
  196. package/dist/components/layout/responsive-panel/responsive-panel.class.d.ts +1 -1
  197. package/dist/components/layout/responsive-panel/responsive-panel.class.js +1 -1
  198. package/dist/components/layout/scroller/scroller.class.js +1 -1
  199. package/dist/components/layout/segmented/segmented.class.js +1 -1
  200. package/dist/components/layout/stepper/stepper.class.js +2 -2
  201. package/dist/components/layout/tab-group/tab-group.class.js +1 -1
  202. package/dist/components/layout/virtual-list/virtual-list.class.d.ts +1 -1
  203. package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
  204. package/dist/components/layout/widget/widget.class.d.ts +1 -1
  205. package/dist/components/layout/widget/widget.class.js +3 -3
  206. package/dist/components/media/drop-zone/drop-zone.class.d.ts +10 -0
  207. package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
  208. package/dist/components/media/file-input/file-input.class.d.ts +3 -3
  209. package/dist/components/media/file-input/file-input.class.js +2 -2
  210. package/dist/components/media/file-input/file-intake.d.ts +5 -1
  211. package/dist/components/media/file-input/file-intake.js +1 -1
  212. package/dist/components/media/flag/flag.class.js +1 -1
  213. package/dist/components/media/image-viewer/image-viewer.styles.js +1 -1
  214. package/dist/components/media/lightbox/lightbox.class.js +1 -1
  215. package/dist/components/media/map/map.class.js +2 -2
  216. package/dist/components/media/qr-code/qr-code-loader.js +1 -1
  217. package/dist/components/media/qr-code/qr-code.class.js +1 -1
  218. package/dist/components/media/video/video.class.js +3 -3
  219. package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
  220. package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts +2 -2
  221. package/dist/components/media/zoomable-frame/zoomable-frame.class.js +1 -1
  222. package/dist/components/overlays/alert/alert.class.d.ts +3 -3
  223. package/dist/components/overlays/alert/alert.class.js +1 -1
  224. package/dist/components/overlays/badge/badge.class.d.ts +2 -2
  225. package/dist/components/overlays/badge/badge.class.js +1 -1
  226. package/dist/components/overlays/badge/tag.class.d.ts +3 -1
  227. package/dist/components/overlays/badge/tag.class.js +3 -2
  228. package/dist/components/overlays/badge/tag.styles.js +1 -1
  229. package/dist/components/overlays/callout/callout.class.d.ts +2 -2
  230. package/dist/components/overlays/callout/callout.class.js +1 -1
  231. package/dist/components/overlays/chip/chip.class.d.ts +4 -2
  232. package/dist/components/overlays/chip/chip.class.js +2 -2
  233. package/dist/components/overlays/dialog/dialog.class.d.ts +1 -1
  234. package/dist/components/overlays/dialog/dialog.class.js +1 -1
  235. package/dist/components/overlays/overlay/overlay-shared.d.ts +9 -0
  236. package/dist/components/overlays/overlay/overlay-shared.js +1 -1
  237. package/dist/components/overlays/overlay/popover.class.d.ts +2 -2
  238. package/dist/components/overlays/overlay/popover.class.js +1 -1
  239. package/dist/components/overlays/overlay/tooltip.class.d.ts +1 -1
  240. package/dist/components/overlays/overlay/tooltip.class.js +1 -1
  241. package/dist/components/overlays/progress/progress-bar.class.d.ts +5 -22
  242. package/dist/components/overlays/progress/progress-bar.class.js +4 -4
  243. package/dist/components/overlays/progress/progress-base.d.ts +25 -0
  244. package/dist/components/overlays/progress/progress-base.js +1 -0
  245. package/dist/components/overlays/progress/progress-ring.class.d.ts +3 -24
  246. package/dist/components/overlays/progress/progress-ring.class.js +4 -4
  247. package/dist/components/overlays/rating/rating.class.d.ts +3 -3
  248. package/dist/components/overlays/rating/rating.class.js +1 -1
  249. package/dist/components/retrieval/chunk-inspector/chunk-inspector.class.d.ts +4 -2
  250. package/dist/components/retrieval/chunk-inspector/chunk-inspector.class.js +4 -4
  251. package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.js +1 -1
  252. package/dist/components/retrieval/entity-dossier/entity-dossier.class.d.ts +1 -1
  253. package/dist/components/retrieval/graph/graph-canvas.js +1 -1
  254. package/dist/components/retrieval/graph/graph-model.js +1 -1
  255. package/dist/components/retrieval/graph/graph.class.d.ts +1 -3
  256. package/dist/components/retrieval/graph/graph.class.js +1 -1
  257. package/dist/components/retrieval/grounding-summary/grounding-summary.class.d.ts +1 -1
  258. package/dist/components/retrieval/grounding-summary/grounding-summary.class.js +2 -2
  259. package/dist/components/retrieval/knowledge-base/knowledge-base.class.d.ts +1 -1
  260. package/dist/components/retrieval/knowledge-base/knowledge-base.class.js +2 -2
  261. package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.class.js +1 -1
  262. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +1 -0
  263. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +2 -1
  264. package/dist/components/retrieval/memory-panel/memory-panel.class.d.ts +6 -2
  265. package/dist/components/retrieval/memory-panel/memory-panel.class.js +2 -2
  266. package/dist/components/retrieval/memory-panel/memory-panel.styles.js +1 -1
  267. package/dist/components/retrieval/node-palette/node-palette.class.js +1 -1
  268. package/dist/components/retrieval/path-strip/path-strip.class.js +1 -1
  269. package/dist/components/retrieval/provenance-panel/provenance-panel.class.d.ts +1 -1
  270. package/dist/components/retrieval/research-progress/research-progress.class.d.ts +5 -1
  271. package/dist/components/retrieval/research-progress/research-progress.class.js +3 -3
  272. package/dist/components/retrieval/research-progress/research-progress.d.ts +1 -1
  273. package/dist/components/retrieval/research-progress/research-progress.js +1 -1
  274. package/dist/components/retrieval/research-progress/research-progress.styles.js +1 -1
  275. package/dist/components/retrieval/retrieval-compare/retrieval-compare.class.d.ts +6 -2
  276. package/dist/components/retrieval/retrieval-compare/retrieval-compare.class.js +2 -2
  277. package/dist/components/retrieval/retrieval-compare/retrieval-compare.styles.js +1 -1
  278. package/dist/components/retrieval/retrieval-results/retrieval-results.class.d.ts +2 -2
  279. package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +3 -2
  280. package/dist/components/retrieval/retrieval-search/retrieval-search.class.js +3 -3
  281. package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.d.ts +6 -2
  282. package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.js +2 -2
  283. package/dist/components/retrieval/retrieval-trace/retrieval-trace.styles.js +1 -1
  284. package/dist/components/retrieval/source-picker/source-picker.class.js +1 -1
  285. package/dist/components/utility/copy-button/copy-button.class.js +1 -1
  286. package/dist/components/utility/diff-view/diff-view.class.js +1 -1
  287. package/dist/components/utility/export-button/export-button.class.d.ts +1 -1
  288. package/dist/components/utility/export-button/export-button.class.js +1 -1
  289. package/dist/components/utility/icon/dompurify-loader.js +1 -1
  290. package/dist/components/utility/json-viewer/json-viewer.class.js +2 -2
  291. package/dist/components/utility/known-date/known-date.class.js +1 -1
  292. package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
  293. package/dist/components/utility/mutation-observer/mutation-observer.class.js +1 -1
  294. package/dist/components/utility/random-content/random-content.class.d.ts +1 -1
  295. package/dist/components/utility/random-content/random-content.class.js +1 -1
  296. package/dist/components/utility/tour/tour.class.d.ts +1 -1
  297. package/dist/components/utility/tour/tour.class.js +1 -1
  298. package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
  299. package/dist/components/viewers/archive-viewer/archive-viewer.styles.js +1 -1
  300. package/dist/components/viewers/calendar-viewer/calendar-viewer.class.d.ts +3 -1
  301. package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
  302. package/dist/components/viewers/contact-viewer/contact-viewer.class.d.ts +3 -1
  303. package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
  304. package/dist/components/viewers/csv-viewer/csv-viewer.class.d.ts +2 -2
  305. package/dist/components/viewers/csv-viewer/csv-viewer.class.js +4 -18
  306. package/dist/components/viewers/csv-viewer/csv-viewer.styles.js +1 -1
  307. package/dist/components/viewers/dataset-viewer/dataset-viewer.class.d.ts +2 -2
  308. package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +4 -18
  309. package/dist/components/viewers/dataset-viewer/dataset-viewer.styles.js +1 -1
  310. package/dist/components/viewers/document-preview/document-preview.class.d.ts +1 -1
  311. package/dist/components/viewers/document-preview/document-preview.class.js +3 -16
  312. package/dist/components/viewers/document-viewer/ooxml-part-guard.js +1 -0
  313. package/dist/components/viewers/docx-viewer/docx-loader.js +1 -1
  314. package/dist/components/viewers/docx-viewer/docx-resource-guard.js +1 -1
  315. package/dist/components/viewers/docx-viewer/docx-viewer.class.d.ts +3 -3
  316. package/dist/components/viewers/docx-viewer/docx-viewer.class.js +3 -3
  317. package/dist/components/viewers/ebook-viewer/ebook-loader.js +1 -1
  318. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.d.ts +1 -1
  319. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +2 -1
  320. package/dist/components/viewers/ebook-viewer/epub-resource-guard.js +1 -1
  321. package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +1 -1
  322. package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -2
  323. package/dist/components/viewers/geojson-view/geojson-viewer.class.d.ts +1 -4
  324. package/dist/components/viewers/geojson-view/geojson-viewer.class.js +1 -1
  325. package/dist/components/viewers/highlight-layer/highlight-layer.class.js +1 -1
  326. package/dist/components/viewers/html-viewer/html-viewer.class.d.ts +3 -1
  327. package/dist/components/viewers/html-viewer/html-viewer.class.js +1 -1
  328. package/dist/components/viewers/html-viewer/html-viewer.styles.js +1 -1
  329. package/dist/components/viewers/notebook-viewer/dompurify-loader.js +1 -1
  330. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +1 -1
  331. package/dist/components/viewers/page-rail/page-rail.class.js +2 -2
  332. package/dist/components/viewers/passive-markup.js +1 -1
  333. package/dist/components/viewers/pdf-viewer/pdf-loader.js +1 -1
  334. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +2 -2
  335. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +4 -4
  336. package/dist/components/viewers/pptx-viewer/pptx-loader.js +1 -1
  337. package/dist/components/viewers/pptx-viewer/pptx-resource-guard.js +1 -1
  338. package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
  339. package/dist/components/viewers/region-highlight-layer.js +15 -2
  340. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.d.ts +2 -2
  341. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +4 -18
  342. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.styles.js +1 -1
  343. package/dist/components/viewers/svg-viewer/svg-viewer.class.d.ts +1 -1
  344. package/dist/components/viewers/svg-viewer/svg-viewer.class.js +2 -15
  345. package/dist/components/viewers/svg-viewer/svg-viewer.styles.js +1 -1
  346. package/dist/components/viewers/table-viewer-shared.js +15 -1
  347. package/dist/components/viewers/table-viewer-shared.styles.js +1 -0
  348. package/dist/events.d.ts +19 -18
  349. package/dist/framework-types.d.ts +1 -1
  350. package/dist/internal/accessibility-visibility.d.ts +3 -1
  351. package/dist/internal/accessibility-visibility.js +1 -1
  352. package/dist/internal/accessible-text-controller.js +1 -1
  353. package/dist/internal/active-element.d.ts +11 -0
  354. package/dist/internal/active-element.js +1 -1
  355. package/dist/internal/adjacent-runs.js +1 -1
  356. package/dist/internal/approval-wait-until.d.ts +7 -0
  357. package/dist/internal/approval-wait-until.js +1 -0
  358. package/dist/internal/aria-controls.js +1 -1
  359. package/dist/internal/catalog-picker.d.ts +2 -2
  360. package/dist/internal/catalog-picker.js +1 -1
  361. package/dist/internal/composed-tree.d.ts +18 -0
  362. package/dist/internal/composed-tree.js +1 -1
  363. package/dist/internal/copy-feedback.js +1 -0
  364. package/dist/internal/css-length.js +1 -1
  365. package/dist/internal/css-motion-time.js +1 -1
  366. package/dist/internal/css-number.js +1 -0
  367. package/dist/internal/default-strings.generated.js +1 -1
  368. package/dist/internal/deferred-focus-return.d.ts +33 -0
  369. package/dist/internal/deferred-focus-return.js +1 -1
  370. package/dist/internal/fixed-containing-block.js +1 -1
  371. package/dist/internal/form-associated.d.ts +38 -2
  372. package/dist/internal/form-associated.js +1 -1
  373. package/dist/internal/form-control-element.d.ts +13 -0
  374. package/dist/internal/form-control-element.js +1 -0
  375. package/dist/internal/form-control.styles.js +1 -1
  376. package/dist/internal/inherited-attribute-hub.js +1 -1
  377. package/dist/internal/locale-loaders.generated.js +1 -1
  378. package/dist/internal/localization-types.d.ts +1 -1
  379. package/dist/internal/localization.js +1 -1
  380. package/dist/internal/modal-surface-controller.js +1 -1
  381. package/dist/internal/object-guards.js +1 -1
  382. package/dist/internal/optional-peer-capabilities.d.ts +3 -1
  383. package/dist/internal/optional-peer-capabilities.js +1 -1
  384. package/dist/internal/orientation-breakpoint.js +1 -1
  385. package/dist/internal/overlay-manager.d.ts +6 -1
  386. package/dist/internal/overlay-manager.js +1 -1
  387. package/dist/internal/overlay-stack.d.ts +7 -3
  388. package/dist/internal/overlay-stack.js +1 -1
  389. package/dist/internal/package-metadata.js +1 -1
  390. package/dist/internal/persisted-restore.js +1 -1
  391. package/dist/internal/popup-controller.js +1 -0
  392. package/dist/internal/rendered-tree-traversal.d.ts +3 -1
  393. package/dist/internal/rendered-tree-traversal.js +1 -1
  394. package/dist/internal/retry-forwarder.js +1 -0
  395. package/dist/internal/roving-toolbar.js +1 -1
  396. package/dist/internal/scoped-definitions.generated.js +1 -1
  397. package/dist/internal/score-tiers.d.ts +4 -0
  398. package/dist/internal/score-tiers.js +1 -0
  399. package/dist/internal/semantic-variant.d.ts +7 -0
  400. package/dist/internal/semantic-variant.js +1 -0
  401. package/dist/internal/shared-unions.d.ts +1 -1
  402. package/dist/internal/viewer-search.js +1 -1
  403. package/dist/lyra.d.ts +1 -1
  404. package/dist/testing/happy-dom-shims.d.ts +18 -0
  405. package/dist/testing/happy-dom-shims.js +1 -1
  406. package/dist/testing/index.d.ts +1 -1
  407. package/dist/testing/index.js +1 -1
  408. package/llms/components/lr-accordion-item.md +1 -1
  409. package/llms/components/lr-accordion.md +1 -1
  410. package/llms/components/lr-alert.md +2 -2
  411. package/llms/components/lr-app-rail-group.md +1 -1
  412. package/llms/components/lr-app-rail-item.md +1 -1
  413. package/llms/components/lr-app-rail.md +1 -1
  414. package/llms/components/lr-attachment-chip.md +1 -10
  415. package/llms/components/lr-attachment-trigger.md +0 -10
  416. package/llms/components/lr-avatar.md +4 -8
  417. package/llms/components/lr-badge.md +16 -20
  418. package/llms/components/lr-box-plot.md +1 -1
  419. package/llms/components/lr-breadcrumb-item.md +1 -1
  420. package/llms/components/lr-breadcrumb.md +1 -1
  421. package/llms/components/lr-button-group.md +1 -1
  422. package/llms/components/lr-button.md +1 -1
  423. package/llms/components/lr-calendar.md +1 -1
  424. package/llms/components/lr-callout.md +3 -13
  425. package/llms/components/lr-card.md +1 -1
  426. package/llms/components/lr-carousel-item.md +1 -1
  427. package/llms/components/lr-carousel.md +1 -1
  428. package/llms/components/lr-chart.md +5 -7
  429. package/llms/components/lr-checkbox-group.md +1 -1
  430. package/llms/components/lr-checkbox.md +2 -1
  431. package/llms/components/lr-chip.md +3 -17
  432. package/llms/components/lr-chunk-inspector.md +2 -1
  433. package/llms/components/lr-citation-badge.md +2 -2
  434. package/llms/components/lr-code-block.md +0 -10
  435. package/llms/components/lr-code-editor.md +1 -1
  436. package/llms/components/lr-color-picker.md +1 -1
  437. package/llms/components/lr-combobox.md +6 -3
  438. package/llms/components/lr-command-palette.md +5 -2
  439. package/llms/components/lr-commit-card.md +1 -3
  440. package/llms/components/lr-condition-builder.md +1 -1
  441. package/llms/components/lr-confirm-bar.md +7 -13
  442. package/llms/components/lr-connector-manager.md +3 -1
  443. package/llms/components/lr-context-inspector.md +1 -1
  444. package/llms/components/lr-context-meter.md +1 -1
  445. package/llms/components/lr-control-group.md +1 -1
  446. package/llms/components/lr-copy-button.md +8 -10
  447. package/llms/components/lr-country-picker.md +1 -1
  448. package/llms/components/lr-currency-picker.md +1 -1
  449. package/llms/components/lr-dashboard-grid.md +1 -1
  450. package/llms/components/lr-data-grid.md +1 -1
  451. package/llms/components/lr-date-input.md +1 -1
  452. package/llms/components/lr-date-picker.md +11 -4
  453. package/llms/components/lr-details.md +1 -1
  454. package/llms/components/lr-dialog.md +8 -31
  455. package/llms/components/lr-diff-view.md +1 -1
  456. package/llms/components/lr-divider.md +1 -1
  457. package/llms/components/lr-dock-panel.md +1 -1
  458. package/llms/components/lr-document-library.md +1 -1
  459. package/llms/components/lr-drawer.md +1 -13
  460. package/llms/components/lr-drilldown-panel.md +1 -1
  461. package/llms/components/lr-drop-zone.md +4 -0
  462. package/llms/components/lr-dropdown-item.md +1 -1
  463. package/llms/components/lr-ebook-viewer.md +4 -3
  464. package/llms/components/lr-emoji-picker.md +1 -1
  465. package/llms/components/lr-entity-chip.md +2 -2
  466. package/llms/components/lr-env-list.md +1 -1
  467. package/llms/components/lr-eval-dataset.md +4 -19
  468. package/llms/components/lr-export-button.md +3 -3
  469. package/llms/components/lr-file-icon.md +0 -5
  470. package/llms/components/lr-file-input.md +3 -5
  471. package/llms/components/lr-file-tree.md +1 -1
  472. package/llms/components/lr-filter-bar.md +5 -1
  473. package/llms/components/lr-flag.md +1 -2
  474. package/llms/components/lr-flow-canvas.md +1 -1
  475. package/llms/components/lr-flow-controls.md +1 -1
  476. package/llms/components/lr-flow-minimap.md +2 -2
  477. package/llms/components/lr-flow-node.md +1 -1
  478. package/llms/components/lr-flow-run-status.md +1 -1
  479. package/llms/components/lr-format-bytes.md +2 -3
  480. package/llms/components/lr-format-date.md +2 -3
  481. package/llms/components/lr-format-number.md +1 -1
  482. package/llms/components/lr-funnel.md +1 -1
  483. package/llms/components/lr-gauge.md +1 -1
  484. package/llms/components/lr-generation-metrics.md +1 -1
  485. package/llms/components/lr-graph-query-builder.md +1 -1
  486. package/llms/components/lr-heatmap.md +1 -1
  487. package/llms/components/lr-icon-button.md +1 -1
  488. package/llms/components/lr-icon.md +1 -1
  489. package/llms/components/lr-input.md +1 -1
  490. package/llms/components/lr-intersection-observer.md +1 -1
  491. package/llms/components/lr-json-viewer.md +1 -1
  492. package/llms/components/lr-knowledge-graph-explorer.md +2 -2
  493. package/llms/components/lr-known-date.md +1 -1
  494. package/llms/components/lr-lite-chart.md +3 -4
  495. package/llms/components/lr-live-region.md +1 -1
  496. package/llms/components/lr-locale-picker.md +1 -1
  497. package/llms/components/lr-map.md +1 -3
  498. package/llms/components/lr-media-card.md +1 -10
  499. package/llms/components/lr-memory-panel.md +2 -0
  500. package/llms/components/lr-mention-popover.md +3 -3
  501. package/llms/components/lr-menu-item.md +1 -1
  502. package/llms/components/lr-menu-label.md +1 -1
  503. package/llms/components/lr-menu.md +1 -1
  504. package/llms/components/lr-menubar-item.md +1 -1
  505. package/llms/components/lr-menubar.md +1 -1
  506. package/llms/components/lr-message-actions.md +1 -11
  507. package/llms/components/lr-message-parts.md +3 -5
  508. package/llms/components/lr-model-select.md +2 -4
  509. package/llms/components/lr-multi-split.md +1 -1
  510. package/llms/components/lr-mutation-observer.md +2 -2
  511. package/llms/components/lr-native-time-input.md +1 -1
  512. package/llms/components/lr-navigation-menu-item.md +1 -1
  513. package/llms/components/lr-navigation-menu.md +1 -1
  514. package/llms/components/lr-number-input.md +1 -1
  515. package/llms/components/lr-option.md +1 -1
  516. package/llms/components/lr-otp-input.md +1 -1
  517. package/llms/components/lr-page.md +1 -1
  518. package/llms/components/lr-pagination.md +1 -1
  519. package/llms/components/lr-pan-zoom.md +1 -3
  520. package/llms/components/lr-permission-grant.md +3 -1
  521. package/llms/components/lr-phone-input.md +7 -5
  522. package/llms/components/lr-poll-status.md +1 -1
  523. package/llms/components/lr-popover.md +5 -9
  524. package/llms/components/lr-popup.md +1 -3
  525. package/llms/components/lr-progress-bar.md +2 -1
  526. package/llms/components/lr-progress-ring.md +4 -8
  527. package/llms/components/lr-prompt-input.md +3 -1
  528. package/llms/components/lr-prompt-studio.md +4 -4
  529. package/llms/components/lr-radio-button.md +2 -2
  530. package/llms/components/lr-radio-group.md +1 -1
  531. package/llms/components/lr-radio.md +3 -2
  532. package/llms/components/lr-random-content.md +1 -1
  533. package/llms/components/lr-rating.md +2 -3
  534. package/llms/components/lr-relative-time.md +2 -3
  535. package/llms/components/lr-reorder-item.md +1 -1
  536. package/llms/components/lr-reorder-list.md +1 -1
  537. package/llms/components/lr-research-progress.md +2 -0
  538. package/llms/components/lr-resize-observer.md +1 -1
  539. package/llms/components/lr-responsive-panel.md +1 -1
  540. package/llms/components/lr-retrieval-compare.md +2 -0
  541. package/llms/components/lr-retrieval-trace.md +2 -0
  542. package/llms/components/lr-rubric-form.md +1 -1
  543. package/llms/components/lr-scroller.md +1 -1
  544. package/llms/components/lr-segmented.md +1 -1
  545. package/llms/components/lr-select.md +1 -1
  546. package/llms/components/lr-sequence-playback.md +1 -2
  547. package/llms/components/lr-sequence-strip.md +1 -1
  548. package/llms/components/lr-signature-pad.md +1 -1
  549. package/llms/components/lr-skeleton.md +2 -4
  550. package/llms/components/lr-slider.md +1 -1
  551. package/llms/components/lr-sparkline.md +1 -1
  552. package/llms/components/lr-split-panel.md +1 -1
  553. package/llms/components/lr-stat.md +1 -1
  554. package/llms/components/lr-stepper.md +1 -1
  555. package/llms/components/lr-swatch-picker.md +1 -1
  556. package/llms/components/lr-switch.md +2 -1
  557. package/llms/components/lr-tab-group.md +1 -1
  558. package/llms/components/lr-tab-panel.md +1 -1
  559. package/llms/components/lr-tab.md +1 -1
  560. package/llms/components/lr-table.md +3 -3
  561. package/llms/components/lr-task-list.md +3 -3
  562. package/llms/components/lr-test-results.md +2 -4
  563. package/llms/components/lr-textarea.md +1 -1
  564. package/llms/components/lr-time-input.md +1 -1
  565. package/llms/components/lr-time-range.md +5 -4
  566. package/llms/components/lr-time-zone-picker.md +1 -1
  567. package/llms/components/lr-timeline-item.md +1 -1
  568. package/llms/components/lr-timeline.md +1 -1
  569. package/llms/components/lr-toggle-group.md +1 -1
  570. package/llms/components/lr-toggle.md +1 -1
  571. package/llms/components/lr-token-input.md +1 -1
  572. package/llms/components/lr-tool-approval-dialog.md +12 -10
  573. package/llms/components/lr-tool-call-block.md +1 -1
  574. package/llms/components/lr-tool-call-chip.md +1 -3
  575. package/llms/components/lr-tool-result-view.md +3 -3
  576. package/llms/components/lr-tool-timeline.md +2 -2
  577. package/llms/components/lr-tooltip.md +8 -11
  578. package/llms/components/lr-tour.md +2 -2
  579. package/llms/components/lr-tree-item.md +1 -1
  580. package/llms/components/lr-tree.md +1 -1
  581. package/llms/components/lr-unit-picker.md +1 -1
  582. package/llms/components/lr-usage-badge.md +1 -3
  583. package/llms/components/lr-video.md +1 -2
  584. package/llms/components/lr-virtual-list.md +1 -1
  585. package/llms/components/lr-visually-hidden.md +1 -1
  586. package/llms/components/lr-voice-picker.md +1 -1
  587. package/llms/components/lr-widget.md +1 -1
  588. package/llms/components/lr-word-cloud.md +1 -1
  589. package/llms/components/lr-zoomable-frame.md +1 -6
  590. package/llms/migration.md +96 -2
  591. package/llms/peers.md +3 -2
  592. package/llms/shared/ai-and-peers.md +2 -2
  593. package/llms/shared/events-and-types.md +4 -1
  594. package/llms/shared/imports-and-registration.md +2 -2
  595. package/llms/shared/localization-and-rtl.md +18 -18
  596. package/llms/shared/styles-and-tokens.md +1 -1
  597. package/llms/shared/testing-and-utilities.md +44 -43
  598. package/llms/shared.md +71 -67
  599. package/llms.txt +14 -12
  600. package/locales.json +1002 -1002
  601. package/package.json +16 -6879
  602. package/registrations.json +1 -1
  603. package/skills/compose-lyra-interfaces/SKILL.md +60 -0
  604. package/skills/compose-lyra-interfaces/agents/openai.yaml +4 -0
  605. package/skills/compose-lyra-interfaces/references/composition-patterns.md +77 -0
  606. package/skills/lyra-ui/SKILL.md +145 -0
  607. package/skills/lyra-ui/commands/frontend.md +37 -0
  608. package/skills/lyra-ui/commands/migrate.md +44 -0
  609. package/skills/lyra-ui/commands/new-component.md +19 -0
  610. package/skills/lyra-ui/commands/review.md +247 -0
  611. package/skills/lyra-ui/commands/update.md +30 -0
  612. package/skills/lyra-ui/reporting.md +137 -0
  613. package/custom-elements.json +0 -1
  614. package/dist/internal/side-effect-only.d.ts +0 -1
  615. package/dist/translations/am/agent-tools.js +0 -1
  616. package/dist/translations/am/charts.js +0 -1
  617. package/dist/translations/am/conversation.js +0 -1
  618. package/dist/translations/am/data.js +0 -1
  619. package/dist/translations/am/forms.js +0 -1
  620. package/dist/translations/am/layout.js +0 -1
  621. package/dist/translations/am/media.js +0 -1
  622. package/dist/translations/am/overlays.js +0 -1
  623. package/dist/translations/am/retrieval.js +0 -1
  624. package/dist/translations/am/shared.js +0 -1
  625. package/dist/translations/am/utility.js +0 -1
  626. package/dist/translations/am/viewers.js +0 -5
  627. package/dist/translations/am.js +0 -1
  628. package/dist/translations/ar/agent-tools.js +0 -1
  629. package/dist/translations/ar/charts.js +0 -1
  630. package/dist/translations/ar/conversation.js +0 -1
  631. package/dist/translations/ar/data.js +0 -1
  632. package/dist/translations/ar/forms.js +0 -1
  633. package/dist/translations/ar/layout.js +0 -1
  634. package/dist/translations/ar/media.js +0 -1
  635. package/dist/translations/ar/overlays.js +0 -1
  636. package/dist/translations/ar/retrieval.js +0 -1
  637. package/dist/translations/ar/shared.js +0 -1
  638. package/dist/translations/ar/utility.js +0 -1
  639. package/dist/translations/ar/viewers.js +0 -5
  640. package/dist/translations/ar.js +0 -1
  641. package/dist/translations/bho/agent-tools.js +0 -1
  642. package/dist/translations/bho/charts.js +0 -1
  643. package/dist/translations/bho/conversation.js +0 -1
  644. package/dist/translations/bho/data.js +0 -1
  645. package/dist/translations/bho/forms.js +0 -1
  646. package/dist/translations/bho/layout.js +0 -1
  647. package/dist/translations/bho/media.js +0 -1
  648. package/dist/translations/bho/overlays.js +0 -1
  649. package/dist/translations/bho/retrieval.js +0 -1
  650. package/dist/translations/bho/shared.js +0 -1
  651. package/dist/translations/bho/utility.js +0 -1
  652. package/dist/translations/bho/viewers.js +0 -5
  653. package/dist/translations/bho.js +0 -1
  654. package/dist/translations/bn/agent-tools.js +0 -1
  655. package/dist/translations/bn/charts.js +0 -1
  656. package/dist/translations/bn/conversation.js +0 -1
  657. package/dist/translations/bn/data.js +0 -1
  658. package/dist/translations/bn/forms.js +0 -1
  659. package/dist/translations/bn/layout.js +0 -1
  660. package/dist/translations/bn/media.js +0 -1
  661. package/dist/translations/bn/overlays.js +0 -1
  662. package/dist/translations/bn/retrieval.js +0 -1
  663. package/dist/translations/bn/shared.js +0 -1
  664. package/dist/translations/bn/utility.js +0 -1
  665. package/dist/translations/bn/viewers.js +0 -5
  666. package/dist/translations/bn.js +0 -1
  667. package/dist/translations/cs/agent-tools.js +0 -1
  668. package/dist/translations/cs/charts.js +0 -1
  669. package/dist/translations/cs/conversation.js +0 -1
  670. package/dist/translations/cs/data.js +0 -1
  671. package/dist/translations/cs/forms.js +0 -1
  672. package/dist/translations/cs/layout.js +0 -1
  673. package/dist/translations/cs/media.js +0 -1
  674. package/dist/translations/cs/overlays.js +0 -1
  675. package/dist/translations/cs/retrieval.js +0 -1
  676. package/dist/translations/cs/shared.js +0 -1
  677. package/dist/translations/cs/utility.js +0 -1
  678. package/dist/translations/cs/viewers.js +0 -5
  679. package/dist/translations/cs.js +0 -1
  680. package/dist/translations/da/agent-tools.js +0 -1
  681. package/dist/translations/da/charts.js +0 -1
  682. package/dist/translations/da/conversation.js +0 -1
  683. package/dist/translations/da/data.js +0 -1
  684. package/dist/translations/da/forms.js +0 -1
  685. package/dist/translations/da/layout.js +0 -1
  686. package/dist/translations/da/media.js +0 -1
  687. package/dist/translations/da/overlays.js +0 -1
  688. package/dist/translations/da/retrieval.js +0 -1
  689. package/dist/translations/da/shared.js +0 -1
  690. package/dist/translations/da/utility.js +0 -1
  691. package/dist/translations/da/viewers.js +0 -5
  692. package/dist/translations/da.js +0 -1
  693. package/dist/translations/de/agent-tools.js +0 -1
  694. package/dist/translations/de/charts.js +0 -1
  695. package/dist/translations/de/conversation.js +0 -1
  696. package/dist/translations/de/data.js +0 -1
  697. package/dist/translations/de/forms.js +0 -1
  698. package/dist/translations/de/layout.js +0 -1
  699. package/dist/translations/de/media.js +0 -1
  700. package/dist/translations/de/overlays.js +0 -1
  701. package/dist/translations/de/retrieval.js +0 -1
  702. package/dist/translations/de/shared.js +0 -1
  703. package/dist/translations/de/utility.js +0 -1
  704. package/dist/translations/de/viewers.js +0 -5
  705. package/dist/translations/de-CH/agent-tools.js +0 -1
  706. package/dist/translations/de-CH/charts.js +0 -1
  707. package/dist/translations/de-CH/conversation.js +0 -1
  708. package/dist/translations/de-CH/data.js +0 -1
  709. package/dist/translations/de-CH/forms.js +0 -1
  710. package/dist/translations/de-CH/layout.js +0 -1
  711. package/dist/translations/de-CH/media.js +0 -1
  712. package/dist/translations/de-CH/overlays.js +0 -1
  713. package/dist/translations/de-CH/retrieval.js +0 -1
  714. package/dist/translations/de-CH/shared.js +0 -1
  715. package/dist/translations/de-CH/utility.js +0 -1
  716. package/dist/translations/de-CH/viewers.js +0 -1
  717. package/dist/translations/de-CH.js +0 -1
  718. package/dist/translations/de.js +0 -1
  719. package/dist/translations/el/agent-tools.js +0 -1
  720. package/dist/translations/el/charts.js +0 -1
  721. package/dist/translations/el/conversation.js +0 -1
  722. package/dist/translations/el/data.js +0 -1
  723. package/dist/translations/el/forms.js +0 -1
  724. package/dist/translations/el/layout.js +0 -1
  725. package/dist/translations/el/media.js +0 -1
  726. package/dist/translations/el/overlays.js +0 -1
  727. package/dist/translations/el/retrieval.js +0 -1
  728. package/dist/translations/el/shared.js +0 -1
  729. package/dist/translations/el/utility.js +0 -1
  730. package/dist/translations/el/viewers.js +0 -5
  731. package/dist/translations/el.js +0 -1
  732. package/dist/translations/es/agent-tools.js +0 -1
  733. package/dist/translations/es/charts.js +0 -1
  734. package/dist/translations/es/conversation.js +0 -1
  735. package/dist/translations/es/data.js +0 -1
  736. package/dist/translations/es/forms.js +0 -1
  737. package/dist/translations/es/layout.js +0 -1
  738. package/dist/translations/es/media.js +0 -1
  739. package/dist/translations/es/overlays.js +0 -1
  740. package/dist/translations/es/retrieval.js +0 -1
  741. package/dist/translations/es/shared.js +0 -1
  742. package/dist/translations/es/utility.js +0 -1
  743. package/dist/translations/es/viewers.js +0 -5
  744. package/dist/translations/es.js +0 -1
  745. package/dist/translations/fa/agent-tools.js +0 -1
  746. package/dist/translations/fa/charts.js +0 -1
  747. package/dist/translations/fa/conversation.js +0 -1
  748. package/dist/translations/fa/data.js +0 -1
  749. package/dist/translations/fa/forms.js +0 -1
  750. package/dist/translations/fa/layout.js +0 -1
  751. package/dist/translations/fa/media.js +0 -1
  752. package/dist/translations/fa/overlays.js +0 -1
  753. package/dist/translations/fa/retrieval.js +0 -1
  754. package/dist/translations/fa/shared.js +0 -1
  755. package/dist/translations/fa/utility.js +0 -1
  756. package/dist/translations/fa/viewers.js +0 -5
  757. package/dist/translations/fa-AF/agent-tools.js +0 -1
  758. package/dist/translations/fa-AF/charts.js +0 -1
  759. package/dist/translations/fa-AF/conversation.js +0 -1
  760. package/dist/translations/fa-AF/data.js +0 -1
  761. package/dist/translations/fa-AF/forms.js +0 -1
  762. package/dist/translations/fa-AF/layout.js +0 -1
  763. package/dist/translations/fa-AF/media.js +0 -1
  764. package/dist/translations/fa-AF/overlays.js +0 -1
  765. package/dist/translations/fa-AF/retrieval.js +0 -1
  766. package/dist/translations/fa-AF/shared.js +0 -1
  767. package/dist/translations/fa-AF/utility.js +0 -1
  768. package/dist/translations/fa-AF/viewers.js +0 -5
  769. package/dist/translations/fa-AF.js +0 -1
  770. package/dist/translations/fa.js +0 -1
  771. package/dist/translations/fi/agent-tools.js +0 -1
  772. package/dist/translations/fi/charts.js +0 -1
  773. package/dist/translations/fi/conversation.js +0 -1
  774. package/dist/translations/fi/data.js +0 -1
  775. package/dist/translations/fi/forms.js +0 -1
  776. package/dist/translations/fi/layout.js +0 -1
  777. package/dist/translations/fi/media.js +0 -1
  778. package/dist/translations/fi/overlays.js +0 -1
  779. package/dist/translations/fi/retrieval.js +0 -1
  780. package/dist/translations/fi/shared.js +0 -1
  781. package/dist/translations/fi/utility.js +0 -1
  782. package/dist/translations/fi/viewers.js +0 -5
  783. package/dist/translations/fi.js +0 -1
  784. package/dist/translations/fr/agent-tools.js +0 -1
  785. package/dist/translations/fr/charts.js +0 -1
  786. package/dist/translations/fr/conversation.js +0 -1
  787. package/dist/translations/fr/data.js +0 -1
  788. package/dist/translations/fr/forms.js +0 -1
  789. package/dist/translations/fr/layout.js +0 -1
  790. package/dist/translations/fr/media.js +0 -1
  791. package/dist/translations/fr/overlays.js +0 -1
  792. package/dist/translations/fr/retrieval.js +0 -1
  793. package/dist/translations/fr/shared.js +0 -1
  794. package/dist/translations/fr/utility.js +0 -1
  795. package/dist/translations/fr/viewers.js +0 -5
  796. package/dist/translations/fr.js +0 -1
  797. package/dist/translations/gu/agent-tools.js +0 -1
  798. package/dist/translations/gu/charts.js +0 -1
  799. package/dist/translations/gu/conversation.js +0 -1
  800. package/dist/translations/gu/data.js +0 -1
  801. package/dist/translations/gu/forms.js +0 -1
  802. package/dist/translations/gu/layout.js +0 -1
  803. package/dist/translations/gu/media.js +0 -1
  804. package/dist/translations/gu/overlays.js +0 -1
  805. package/dist/translations/gu/retrieval.js +0 -1
  806. package/dist/translations/gu/shared.js +0 -1
  807. package/dist/translations/gu/utility.js +0 -1
  808. package/dist/translations/gu/viewers.js +0 -5
  809. package/dist/translations/gu.js +0 -1
  810. package/dist/translations/ha/agent-tools.js +0 -1
  811. package/dist/translations/ha/charts.js +0 -1
  812. package/dist/translations/ha/conversation.js +0 -1
  813. package/dist/translations/ha/data.js +0 -1
  814. package/dist/translations/ha/forms.js +0 -1
  815. package/dist/translations/ha/layout.js +0 -1
  816. package/dist/translations/ha/media.js +0 -1
  817. package/dist/translations/ha/overlays.js +0 -1
  818. package/dist/translations/ha/retrieval.js +0 -1
  819. package/dist/translations/ha/shared.js +0 -1
  820. package/dist/translations/ha/utility.js +0 -1
  821. package/dist/translations/ha/viewers.js +0 -5
  822. package/dist/translations/ha.js +0 -1
  823. package/dist/translations/he/agent-tools.js +0 -1
  824. package/dist/translations/he/charts.js +0 -1
  825. package/dist/translations/he/conversation.js +0 -1
  826. package/dist/translations/he/data.js +0 -1
  827. package/dist/translations/he/forms.js +0 -1
  828. package/dist/translations/he/layout.js +0 -1
  829. package/dist/translations/he/media.js +0 -1
  830. package/dist/translations/he/overlays.js +0 -1
  831. package/dist/translations/he/retrieval.js +0 -1
  832. package/dist/translations/he/shared.js +0 -1
  833. package/dist/translations/he/utility.js +0 -1
  834. package/dist/translations/he/viewers.js +0 -5
  835. package/dist/translations/he.js +0 -1
  836. package/dist/translations/hi/agent-tools.js +0 -1
  837. package/dist/translations/hi/charts.js +0 -1
  838. package/dist/translations/hi/conversation.js +0 -1
  839. package/dist/translations/hi/data.js +0 -1
  840. package/dist/translations/hi/forms.js +0 -1
  841. package/dist/translations/hi/layout.js +0 -1
  842. package/dist/translations/hi/media.js +0 -1
  843. package/dist/translations/hi/overlays.js +0 -1
  844. package/dist/translations/hi/retrieval.js +0 -1
  845. package/dist/translations/hi/shared.js +0 -1
  846. package/dist/translations/hi/utility.js +0 -1
  847. package/dist/translations/hi/viewers.js +0 -5
  848. package/dist/translations/hi.js +0 -1
  849. package/dist/translations/hr/agent-tools.js +0 -1
  850. package/dist/translations/hr/charts.js +0 -1
  851. package/dist/translations/hr/conversation.js +0 -1
  852. package/dist/translations/hr/data.js +0 -1
  853. package/dist/translations/hr/forms.js +0 -1
  854. package/dist/translations/hr/layout.js +0 -1
  855. package/dist/translations/hr/media.js +0 -1
  856. package/dist/translations/hr/overlays.js +0 -1
  857. package/dist/translations/hr/retrieval.js +0 -1
  858. package/dist/translations/hr/shared.js +0 -1
  859. package/dist/translations/hr/utility.js +0 -1
  860. package/dist/translations/hr/viewers.js +0 -5
  861. package/dist/translations/hr.js +0 -1
  862. package/dist/translations/hu/agent-tools.js +0 -1
  863. package/dist/translations/hu/charts.js +0 -1
  864. package/dist/translations/hu/conversation.js +0 -1
  865. package/dist/translations/hu/data.js +0 -1
  866. package/dist/translations/hu/forms.js +0 -1
  867. package/dist/translations/hu/layout.js +0 -1
  868. package/dist/translations/hu/media.js +0 -1
  869. package/dist/translations/hu/overlays.js +0 -1
  870. package/dist/translations/hu/retrieval.js +0 -1
  871. package/dist/translations/hu/shared.js +0 -1
  872. package/dist/translations/hu/utility.js +0 -1
  873. package/dist/translations/hu/viewers.js +0 -5
  874. package/dist/translations/hu.js +0 -1
  875. package/dist/translations/id/agent-tools.js +0 -1
  876. package/dist/translations/id/charts.js +0 -1
  877. package/dist/translations/id/conversation.js +0 -1
  878. package/dist/translations/id/data.js +0 -1
  879. package/dist/translations/id/forms.js +0 -1
  880. package/dist/translations/id/layout.js +0 -1
  881. package/dist/translations/id/media.js +0 -1
  882. package/dist/translations/id/overlays.js +0 -1
  883. package/dist/translations/id/retrieval.js +0 -1
  884. package/dist/translations/id/shared.js +0 -1
  885. package/dist/translations/id/utility.js +0 -1
  886. package/dist/translations/id/viewers.js +0 -5
  887. package/dist/translations/id.js +0 -1
  888. package/dist/translations/ig/agent-tools.js +0 -1
  889. package/dist/translations/ig/charts.js +0 -1
  890. package/dist/translations/ig/conversation.js +0 -1
  891. package/dist/translations/ig/data.js +0 -1
  892. package/dist/translations/ig/forms.js +0 -1
  893. package/dist/translations/ig/layout.js +0 -1
  894. package/dist/translations/ig/media.js +0 -1
  895. package/dist/translations/ig/overlays.js +0 -1
  896. package/dist/translations/ig/retrieval.js +0 -1
  897. package/dist/translations/ig/shared.js +0 -1
  898. package/dist/translations/ig/utility.js +0 -1
  899. package/dist/translations/ig/viewers.js +0 -5
  900. package/dist/translations/ig.js +0 -1
  901. package/dist/translations/it/agent-tools.js +0 -1
  902. package/dist/translations/it/charts.js +0 -1
  903. package/dist/translations/it/conversation.js +0 -1
  904. package/dist/translations/it/data.js +0 -1
  905. package/dist/translations/it/forms.js +0 -1
  906. package/dist/translations/it/layout.js +0 -1
  907. package/dist/translations/it/media.js +0 -1
  908. package/dist/translations/it/overlays.js +0 -1
  909. package/dist/translations/it/retrieval.js +0 -1
  910. package/dist/translations/it/shared.js +0 -1
  911. package/dist/translations/it/utility.js +0 -1
  912. package/dist/translations/it/viewers.js +0 -5
  913. package/dist/translations/it.js +0 -1
  914. package/dist/translations/ja/agent-tools.js +0 -1
  915. package/dist/translations/ja/charts.js +0 -1
  916. package/dist/translations/ja/conversation.js +0 -1
  917. package/dist/translations/ja/data.js +0 -1
  918. package/dist/translations/ja/forms.js +0 -1
  919. package/dist/translations/ja/layout.js +0 -1
  920. package/dist/translations/ja/media.js +0 -1
  921. package/dist/translations/ja/overlays.js +0 -1
  922. package/dist/translations/ja/retrieval.js +0 -1
  923. package/dist/translations/ja/shared.js +0 -1
  924. package/dist/translations/ja/utility.js +0 -1
  925. package/dist/translations/ja/viewers.js +0 -4
  926. package/dist/translations/ja.js +0 -1
  927. package/dist/translations/jv/agent-tools.js +0 -1
  928. package/dist/translations/jv/charts.js +0 -1
  929. package/dist/translations/jv/conversation.js +0 -1
  930. package/dist/translations/jv/data.js +0 -1
  931. package/dist/translations/jv/forms.js +0 -1
  932. package/dist/translations/jv/layout.js +0 -1
  933. package/dist/translations/jv/media.js +0 -1
  934. package/dist/translations/jv/overlays.js +0 -1
  935. package/dist/translations/jv/retrieval.js +0 -1
  936. package/dist/translations/jv/shared.js +0 -1
  937. package/dist/translations/jv/utility.js +0 -1
  938. package/dist/translations/jv/viewers.js +0 -5
  939. package/dist/translations/jv.js +0 -1
  940. package/dist/translations/kk/agent-tools.js +0 -1
  941. package/dist/translations/kk/charts.js +0 -1
  942. package/dist/translations/kk/conversation.js +0 -1
  943. package/dist/translations/kk/data.js +0 -1
  944. package/dist/translations/kk/forms.js +0 -1
  945. package/dist/translations/kk/layout.js +0 -1
  946. package/dist/translations/kk/media.js +0 -1
  947. package/dist/translations/kk/overlays.js +0 -1
  948. package/dist/translations/kk/retrieval.js +0 -1
  949. package/dist/translations/kk/shared.js +0 -1
  950. package/dist/translations/kk/utility.js +0 -1
  951. package/dist/translations/kk/viewers.js +0 -5
  952. package/dist/translations/kk.js +0 -1
  953. package/dist/translations/kn/agent-tools.js +0 -1
  954. package/dist/translations/kn/charts.js +0 -1
  955. package/dist/translations/kn/conversation.js +0 -1
  956. package/dist/translations/kn/data.js +0 -1
  957. package/dist/translations/kn/forms.js +0 -1
  958. package/dist/translations/kn/layout.js +0 -1
  959. package/dist/translations/kn/media.js +0 -1
  960. package/dist/translations/kn/overlays.js +0 -1
  961. package/dist/translations/kn/retrieval.js +0 -1
  962. package/dist/translations/kn/shared.js +0 -1
  963. package/dist/translations/kn/utility.js +0 -1
  964. package/dist/translations/kn/viewers.js +0 -5
  965. package/dist/translations/kn.js +0 -1
  966. package/dist/translations/ko/agent-tools.js +0 -1
  967. package/dist/translations/ko/charts.js +0 -1
  968. package/dist/translations/ko/conversation.js +0 -1
  969. package/dist/translations/ko/data.js +0 -1
  970. package/dist/translations/ko/forms.js +0 -1
  971. package/dist/translations/ko/layout.js +0 -1
  972. package/dist/translations/ko/media.js +0 -1
  973. package/dist/translations/ko/overlays.js +0 -1
  974. package/dist/translations/ko/retrieval.js +0 -1
  975. package/dist/translations/ko/shared.js +0 -1
  976. package/dist/translations/ko/utility.js +0 -1
  977. package/dist/translations/ko/viewers.js +0 -5
  978. package/dist/translations/ko.js +0 -1
  979. package/dist/translations/ln/agent-tools.js +0 -1
  980. package/dist/translations/ln/charts.js +0 -1
  981. package/dist/translations/ln/conversation.js +0 -1
  982. package/dist/translations/ln/data.js +0 -1
  983. package/dist/translations/ln/forms.js +0 -1
  984. package/dist/translations/ln/layout.js +0 -1
  985. package/dist/translations/ln/media.js +0 -1
  986. package/dist/translations/ln/overlays.js +0 -1
  987. package/dist/translations/ln/retrieval.js +0 -1
  988. package/dist/translations/ln/shared.js +0 -1
  989. package/dist/translations/ln/utility.js +0 -1
  990. package/dist/translations/ln/viewers.js +0 -5
  991. package/dist/translations/ln.js +0 -1
  992. package/dist/translations/ml/agent-tools.js +0 -1
  993. package/dist/translations/ml/charts.js +0 -1
  994. package/dist/translations/ml/conversation.js +0 -1
  995. package/dist/translations/ml/data.js +0 -1
  996. package/dist/translations/ml/forms.js +0 -1
  997. package/dist/translations/ml/layout.js +0 -1
  998. package/dist/translations/ml/media.js +0 -1
  999. package/dist/translations/ml/overlays.js +0 -1
  1000. package/dist/translations/ml/retrieval.js +0 -1
  1001. package/dist/translations/ml/shared.js +0 -1
  1002. package/dist/translations/ml/utility.js +0 -1
  1003. package/dist/translations/ml/viewers.js +0 -5
  1004. package/dist/translations/ml.js +0 -1
  1005. package/dist/translations/mr/agent-tools.js +0 -1
  1006. package/dist/translations/mr/charts.js +0 -1
  1007. package/dist/translations/mr/conversation.js +0 -1
  1008. package/dist/translations/mr/data.js +0 -1
  1009. package/dist/translations/mr/forms.js +0 -1
  1010. package/dist/translations/mr/layout.js +0 -1
  1011. package/dist/translations/mr/media.js +0 -1
  1012. package/dist/translations/mr/overlays.js +0 -1
  1013. package/dist/translations/mr/retrieval.js +0 -1
  1014. package/dist/translations/mr/shared.js +0 -1
  1015. package/dist/translations/mr/utility.js +0 -1
  1016. package/dist/translations/mr/viewers.js +0 -5
  1017. package/dist/translations/mr.js +0 -1
  1018. package/dist/translations/ms/agent-tools.js +0 -1
  1019. package/dist/translations/ms/charts.js +0 -1
  1020. package/dist/translations/ms/conversation.js +0 -1
  1021. package/dist/translations/ms/data.js +0 -1
  1022. package/dist/translations/ms/forms.js +0 -1
  1023. package/dist/translations/ms/layout.js +0 -1
  1024. package/dist/translations/ms/media.js +0 -1
  1025. package/dist/translations/ms/overlays.js +0 -1
  1026. package/dist/translations/ms/retrieval.js +0 -1
  1027. package/dist/translations/ms/shared.js +0 -1
  1028. package/dist/translations/ms/utility.js +0 -1
  1029. package/dist/translations/ms/viewers.js +0 -5
  1030. package/dist/translations/ms.js +0 -1
  1031. package/dist/translations/my/agent-tools.js +0 -1
  1032. package/dist/translations/my/charts.js +0 -1
  1033. package/dist/translations/my/conversation.js +0 -1
  1034. package/dist/translations/my/data.js +0 -1
  1035. package/dist/translations/my/forms.js +0 -1
  1036. package/dist/translations/my/layout.js +0 -1
  1037. package/dist/translations/my/media.js +0 -1
  1038. package/dist/translations/my/overlays.js +0 -1
  1039. package/dist/translations/my/retrieval.js +0 -1
  1040. package/dist/translations/my/shared.js +0 -1
  1041. package/dist/translations/my/utility.js +0 -1
  1042. package/dist/translations/my/viewers.js +0 -5
  1043. package/dist/translations/my.js +0 -1
  1044. package/dist/translations/nb/agent-tools.js +0 -1
  1045. package/dist/translations/nb/charts.js +0 -1
  1046. package/dist/translations/nb/conversation.js +0 -1
  1047. package/dist/translations/nb/data.js +0 -1
  1048. package/dist/translations/nb/forms.js +0 -1
  1049. package/dist/translations/nb/layout.js +0 -1
  1050. package/dist/translations/nb/media.js +0 -1
  1051. package/dist/translations/nb/overlays.js +0 -1
  1052. package/dist/translations/nb/retrieval.js +0 -1
  1053. package/dist/translations/nb/shared.js +0 -1
  1054. package/dist/translations/nb/utility.js +0 -1
  1055. package/dist/translations/nb/viewers.js +0 -5
  1056. package/dist/translations/nb.js +0 -1
  1057. package/dist/translations/ne/agent-tools.js +0 -1
  1058. package/dist/translations/ne/charts.js +0 -1
  1059. package/dist/translations/ne/conversation.js +0 -1
  1060. package/dist/translations/ne/data.js +0 -1
  1061. package/dist/translations/ne/forms.js +0 -1
  1062. package/dist/translations/ne/layout.js +0 -1
  1063. package/dist/translations/ne/media.js +0 -1
  1064. package/dist/translations/ne/overlays.js +0 -1
  1065. package/dist/translations/ne/retrieval.js +0 -1
  1066. package/dist/translations/ne/shared.js +0 -1
  1067. package/dist/translations/ne/utility.js +0 -1
  1068. package/dist/translations/ne/viewers.js +0 -5
  1069. package/dist/translations/ne.js +0 -1
  1070. package/dist/translations/nl/agent-tools.js +0 -1
  1071. package/dist/translations/nl/charts.js +0 -1
  1072. package/dist/translations/nl/conversation.js +0 -1
  1073. package/dist/translations/nl/data.js +0 -1
  1074. package/dist/translations/nl/forms.js +0 -1
  1075. package/dist/translations/nl/layout.js +0 -1
  1076. package/dist/translations/nl/media.js +0 -1
  1077. package/dist/translations/nl/overlays.js +0 -1
  1078. package/dist/translations/nl/retrieval.js +0 -1
  1079. package/dist/translations/nl/shared.js +0 -1
  1080. package/dist/translations/nl/utility.js +0 -1
  1081. package/dist/translations/nl/viewers.js +0 -5
  1082. package/dist/translations/nl.js +0 -1
  1083. package/dist/translations/nn/agent-tools.js +0 -1
  1084. package/dist/translations/nn/charts.js +0 -1
  1085. package/dist/translations/nn/conversation.js +0 -1
  1086. package/dist/translations/nn/data.js +0 -1
  1087. package/dist/translations/nn/forms.js +0 -1
  1088. package/dist/translations/nn/layout.js +0 -1
  1089. package/dist/translations/nn/media.js +0 -1
  1090. package/dist/translations/nn/overlays.js +0 -1
  1091. package/dist/translations/nn/retrieval.js +0 -1
  1092. package/dist/translations/nn/shared.js +0 -1
  1093. package/dist/translations/nn/utility.js +0 -1
  1094. package/dist/translations/nn/viewers.js +0 -5
  1095. package/dist/translations/nn.js +0 -1
  1096. package/dist/translations/om/agent-tools.js +0 -1
  1097. package/dist/translations/om/charts.js +0 -1
  1098. package/dist/translations/om/conversation.js +0 -1
  1099. package/dist/translations/om/data.js +0 -1
  1100. package/dist/translations/om/forms.js +0 -1
  1101. package/dist/translations/om/layout.js +0 -1
  1102. package/dist/translations/om/media.js +0 -1
  1103. package/dist/translations/om/overlays.js +0 -1
  1104. package/dist/translations/om/retrieval.js +0 -1
  1105. package/dist/translations/om/shared.js +0 -1
  1106. package/dist/translations/om/utility.js +0 -1
  1107. package/dist/translations/om/viewers.js +0 -5
  1108. package/dist/translations/om.js +0 -1
  1109. package/dist/translations/or/agent-tools.js +0 -1
  1110. package/dist/translations/or/charts.js +0 -1
  1111. package/dist/translations/or/conversation.js +0 -1
  1112. package/dist/translations/or/data.js +0 -1
  1113. package/dist/translations/or/forms.js +0 -1
  1114. package/dist/translations/or/layout.js +0 -1
  1115. package/dist/translations/or/media.js +0 -1
  1116. package/dist/translations/or/overlays.js +0 -1
  1117. package/dist/translations/or/retrieval.js +0 -1
  1118. package/dist/translations/or/shared.js +0 -1
  1119. package/dist/translations/or/utility.js +0 -1
  1120. package/dist/translations/or/viewers.js +0 -5
  1121. package/dist/translations/or.js +0 -1
  1122. package/dist/translations/pa/agent-tools.js +0 -1
  1123. package/dist/translations/pa/charts.js +0 -1
  1124. package/dist/translations/pa/conversation.js +0 -1
  1125. package/dist/translations/pa/data.js +0 -1
  1126. package/dist/translations/pa/forms.js +0 -1
  1127. package/dist/translations/pa/layout.js +0 -1
  1128. package/dist/translations/pa/media.js +0 -1
  1129. package/dist/translations/pa/overlays.js +0 -1
  1130. package/dist/translations/pa/retrieval.js +0 -1
  1131. package/dist/translations/pa/shared.js +0 -1
  1132. package/dist/translations/pa/utility.js +0 -1
  1133. package/dist/translations/pa/viewers.js +0 -5
  1134. package/dist/translations/pa.js +0 -1
  1135. package/dist/translations/pcm/agent-tools.js +0 -1
  1136. package/dist/translations/pcm/charts.js +0 -1
  1137. package/dist/translations/pcm/conversation.js +0 -1
  1138. package/dist/translations/pcm/data.js +0 -1
  1139. package/dist/translations/pcm/forms.js +0 -1
  1140. package/dist/translations/pcm/layout.js +0 -1
  1141. package/dist/translations/pcm/media.js +0 -1
  1142. package/dist/translations/pcm/overlays.js +0 -1
  1143. package/dist/translations/pcm/retrieval.js +0 -1
  1144. package/dist/translations/pcm/shared.js +0 -1
  1145. package/dist/translations/pcm/utility.js +0 -1
  1146. package/dist/translations/pcm/viewers.js +0 -5
  1147. package/dist/translations/pcm.js +0 -1
  1148. package/dist/translations/pl/agent-tools.js +0 -1
  1149. package/dist/translations/pl/charts.js +0 -1
  1150. package/dist/translations/pl/conversation.js +0 -1
  1151. package/dist/translations/pl/data.js +0 -1
  1152. package/dist/translations/pl/forms.js +0 -1
  1153. package/dist/translations/pl/layout.js +0 -1
  1154. package/dist/translations/pl/media.js +0 -1
  1155. package/dist/translations/pl/overlays.js +0 -1
  1156. package/dist/translations/pl/retrieval.js +0 -1
  1157. package/dist/translations/pl/shared.js +0 -1
  1158. package/dist/translations/pl/utility.js +0 -1
  1159. package/dist/translations/pl/viewers.js +0 -5
  1160. package/dist/translations/pl.js +0 -1
  1161. package/dist/translations/pnb/agent-tools.js +0 -1
  1162. package/dist/translations/pnb/charts.js +0 -1
  1163. package/dist/translations/pnb/conversation.js +0 -1
  1164. package/dist/translations/pnb/data.js +0 -1
  1165. package/dist/translations/pnb/forms.js +0 -1
  1166. package/dist/translations/pnb/layout.js +0 -1
  1167. package/dist/translations/pnb/media.js +0 -1
  1168. package/dist/translations/pnb/overlays.js +0 -1
  1169. package/dist/translations/pnb/retrieval.js +0 -1
  1170. package/dist/translations/pnb/shared.js +0 -1
  1171. package/dist/translations/pnb/utility.js +0 -1
  1172. package/dist/translations/pnb/viewers.js +0 -5
  1173. package/dist/translations/pnb.js +0 -1
  1174. package/dist/translations/ps/agent-tools.js +0 -1
  1175. package/dist/translations/ps/charts.js +0 -1
  1176. package/dist/translations/ps/conversation.js +0 -1
  1177. package/dist/translations/ps/data.js +0 -1
  1178. package/dist/translations/ps/forms.js +0 -1
  1179. package/dist/translations/ps/layout.js +0 -1
  1180. package/dist/translations/ps/media.js +0 -1
  1181. package/dist/translations/ps/overlays.js +0 -1
  1182. package/dist/translations/ps/retrieval.js +0 -1
  1183. package/dist/translations/ps/shared.js +0 -1
  1184. package/dist/translations/ps/utility.js +0 -1
  1185. package/dist/translations/ps/viewers.js +0 -5
  1186. package/dist/translations/ps.js +0 -1
  1187. package/dist/translations/pt-BR/agent-tools.js +0 -1
  1188. package/dist/translations/pt-BR/charts.js +0 -1
  1189. package/dist/translations/pt-BR/conversation.js +0 -1
  1190. package/dist/translations/pt-BR/data.js +0 -1
  1191. package/dist/translations/pt-BR/forms.js +0 -1
  1192. package/dist/translations/pt-BR/layout.js +0 -1
  1193. package/dist/translations/pt-BR/media.js +0 -1
  1194. package/dist/translations/pt-BR/overlays.js +0 -1
  1195. package/dist/translations/pt-BR/retrieval.js +0 -1
  1196. package/dist/translations/pt-BR/shared.js +0 -1
  1197. package/dist/translations/pt-BR/utility.js +0 -1
  1198. package/dist/translations/pt-BR/viewers.js +0 -5
  1199. package/dist/translations/pt-BR.js +0 -1
  1200. package/dist/translations/pt-PT/agent-tools.js +0 -1
  1201. package/dist/translations/pt-PT/charts.js +0 -1
  1202. package/dist/translations/pt-PT/conversation.js +0 -1
  1203. package/dist/translations/pt-PT/data.js +0 -1
  1204. package/dist/translations/pt-PT/forms.js +0 -1
  1205. package/dist/translations/pt-PT/layout.js +0 -1
  1206. package/dist/translations/pt-PT/media.js +0 -1
  1207. package/dist/translations/pt-PT/overlays.js +0 -1
  1208. package/dist/translations/pt-PT/retrieval.js +0 -1
  1209. package/dist/translations/pt-PT/shared.js +0 -1
  1210. package/dist/translations/pt-PT/utility.js +0 -1
  1211. package/dist/translations/pt-PT/viewers.js +0 -5
  1212. package/dist/translations/pt-PT.js +0 -1
  1213. package/dist/translations/ro/agent-tools.js +0 -1
  1214. package/dist/translations/ro/charts.js +0 -1
  1215. package/dist/translations/ro/conversation.js +0 -1
  1216. package/dist/translations/ro/data.js +0 -1
  1217. package/dist/translations/ro/forms.js +0 -1
  1218. package/dist/translations/ro/layout.js +0 -1
  1219. package/dist/translations/ro/media.js +0 -1
  1220. package/dist/translations/ro/overlays.js +0 -1
  1221. package/dist/translations/ro/retrieval.js +0 -1
  1222. package/dist/translations/ro/shared.js +0 -1
  1223. package/dist/translations/ro/utility.js +0 -1
  1224. package/dist/translations/ro/viewers.js +0 -5
  1225. package/dist/translations/ro.js +0 -1
  1226. package/dist/translations/ru/agent-tools.js +0 -1
  1227. package/dist/translations/ru/charts.js +0 -1
  1228. package/dist/translations/ru/conversation.js +0 -1
  1229. package/dist/translations/ru/data.js +0 -1
  1230. package/dist/translations/ru/forms.js +0 -1
  1231. package/dist/translations/ru/layout.js +0 -1
  1232. package/dist/translations/ru/media.js +0 -1
  1233. package/dist/translations/ru/overlays.js +0 -1
  1234. package/dist/translations/ru/retrieval.js +0 -1
  1235. package/dist/translations/ru/shared.js +0 -1
  1236. package/dist/translations/ru/utility.js +0 -1
  1237. package/dist/translations/ru/viewers.js +0 -5
  1238. package/dist/translations/ru.js +0 -1
  1239. package/dist/translations/sd/agent-tools.js +0 -1
  1240. package/dist/translations/sd/charts.js +0 -1
  1241. package/dist/translations/sd/conversation.js +0 -1
  1242. package/dist/translations/sd/data.js +0 -1
  1243. package/dist/translations/sd/forms.js +0 -1
  1244. package/dist/translations/sd/layout.js +0 -1
  1245. package/dist/translations/sd/media.js +0 -1
  1246. package/dist/translations/sd/overlays.js +0 -1
  1247. package/dist/translations/sd/retrieval.js +0 -1
  1248. package/dist/translations/sd/shared.js +0 -1
  1249. package/dist/translations/sd/utility.js +0 -1
  1250. package/dist/translations/sd/viewers.js +0 -5
  1251. package/dist/translations/sd.js +0 -1
  1252. package/dist/translations/sl/agent-tools.js +0 -1
  1253. package/dist/translations/sl/charts.js +0 -1
  1254. package/dist/translations/sl/conversation.js +0 -1
  1255. package/dist/translations/sl/data.js +0 -1
  1256. package/dist/translations/sl/forms.js +0 -1
  1257. package/dist/translations/sl/layout.js +0 -1
  1258. package/dist/translations/sl/media.js +0 -1
  1259. package/dist/translations/sl/overlays.js +0 -1
  1260. package/dist/translations/sl/retrieval.js +0 -1
  1261. package/dist/translations/sl/shared.js +0 -1
  1262. package/dist/translations/sl/utility.js +0 -1
  1263. package/dist/translations/sl/viewers.js +0 -5
  1264. package/dist/translations/sl.js +0 -1
  1265. package/dist/translations/su/agent-tools.js +0 -1
  1266. package/dist/translations/su/charts.js +0 -1
  1267. package/dist/translations/su/conversation.js +0 -1
  1268. package/dist/translations/su/data.js +0 -1
  1269. package/dist/translations/su/forms.js +0 -1
  1270. package/dist/translations/su/layout.js +0 -1
  1271. package/dist/translations/su/media.js +0 -1
  1272. package/dist/translations/su/overlays.js +0 -1
  1273. package/dist/translations/su/retrieval.js +0 -1
  1274. package/dist/translations/su/shared.js +0 -1
  1275. package/dist/translations/su/utility.js +0 -1
  1276. package/dist/translations/su/viewers.js +0 -5
  1277. package/dist/translations/su.js +0 -1
  1278. package/dist/translations/sv/agent-tools.js +0 -1
  1279. package/dist/translations/sv/charts.js +0 -1
  1280. package/dist/translations/sv/conversation.js +0 -1
  1281. package/dist/translations/sv/data.js +0 -1
  1282. package/dist/translations/sv/forms.js +0 -1
  1283. package/dist/translations/sv/layout.js +0 -1
  1284. package/dist/translations/sv/media.js +0 -1
  1285. package/dist/translations/sv/overlays.js +0 -1
  1286. package/dist/translations/sv/retrieval.js +0 -1
  1287. package/dist/translations/sv/shared.js +0 -1
  1288. package/dist/translations/sv/utility.js +0 -1
  1289. package/dist/translations/sv/viewers.js +0 -5
  1290. package/dist/translations/sv.js +0 -1
  1291. package/dist/translations/sw/agent-tools.js +0 -1
  1292. package/dist/translations/sw/charts.js +0 -1
  1293. package/dist/translations/sw/conversation.js +0 -1
  1294. package/dist/translations/sw/data.js +0 -1
  1295. package/dist/translations/sw/forms.js +0 -1
  1296. package/dist/translations/sw/layout.js +0 -1
  1297. package/dist/translations/sw/media.js +0 -1
  1298. package/dist/translations/sw/overlays.js +0 -1
  1299. package/dist/translations/sw/retrieval.js +0 -1
  1300. package/dist/translations/sw/shared.js +0 -1
  1301. package/dist/translations/sw/utility.js +0 -1
  1302. package/dist/translations/sw/viewers.js +0 -5
  1303. package/dist/translations/sw.js +0 -1
  1304. package/dist/translations/ta/agent-tools.js +0 -1
  1305. package/dist/translations/ta/charts.js +0 -1
  1306. package/dist/translations/ta/conversation.js +0 -1
  1307. package/dist/translations/ta/data.js +0 -1
  1308. package/dist/translations/ta/forms.js +0 -1
  1309. package/dist/translations/ta/layout.js +0 -1
  1310. package/dist/translations/ta/media.js +0 -1
  1311. package/dist/translations/ta/overlays.js +0 -1
  1312. package/dist/translations/ta/retrieval.js +0 -1
  1313. package/dist/translations/ta/shared.js +0 -1
  1314. package/dist/translations/ta/utility.js +0 -1
  1315. package/dist/translations/ta/viewers.js +0 -5
  1316. package/dist/translations/ta.js +0 -1
  1317. package/dist/translations/te/agent-tools.js +0 -1
  1318. package/dist/translations/te/charts.js +0 -1
  1319. package/dist/translations/te/conversation.js +0 -1
  1320. package/dist/translations/te/data.js +0 -1
  1321. package/dist/translations/te/forms.js +0 -1
  1322. package/dist/translations/te/layout.js +0 -1
  1323. package/dist/translations/te/media.js +0 -1
  1324. package/dist/translations/te/overlays.js +0 -1
  1325. package/dist/translations/te/retrieval.js +0 -1
  1326. package/dist/translations/te/shared.js +0 -1
  1327. package/dist/translations/te/utility.js +0 -1
  1328. package/dist/translations/te/viewers.js +0 -5
  1329. package/dist/translations/te.js +0 -1
  1330. package/dist/translations/th/agent-tools.js +0 -1
  1331. package/dist/translations/th/charts.js +0 -1
  1332. package/dist/translations/th/conversation.js +0 -1
  1333. package/dist/translations/th/data.js +0 -1
  1334. package/dist/translations/th/forms.js +0 -1
  1335. package/dist/translations/th/layout.js +0 -1
  1336. package/dist/translations/th/media.js +0 -1
  1337. package/dist/translations/th/overlays.js +0 -1
  1338. package/dist/translations/th/retrieval.js +0 -1
  1339. package/dist/translations/th/shared.js +0 -1
  1340. package/dist/translations/th/utility.js +0 -1
  1341. package/dist/translations/th/viewers.js +0 -5
  1342. package/dist/translations/th.js +0 -1
  1343. package/dist/translations/tl/agent-tools.js +0 -1
  1344. package/dist/translations/tl/charts.js +0 -1
  1345. package/dist/translations/tl/conversation.js +0 -1
  1346. package/dist/translations/tl/data.js +0 -1
  1347. package/dist/translations/tl/forms.js +0 -1
  1348. package/dist/translations/tl/layout.js +0 -1
  1349. package/dist/translations/tl/media.js +0 -1
  1350. package/dist/translations/tl/overlays.js +0 -1
  1351. package/dist/translations/tl/retrieval.js +0 -1
  1352. package/dist/translations/tl/shared.js +0 -1
  1353. package/dist/translations/tl/utility.js +0 -1
  1354. package/dist/translations/tl/viewers.js +0 -5
  1355. package/dist/translations/tl.js +0 -1
  1356. package/dist/translations/tr/agent-tools.js +0 -1
  1357. package/dist/translations/tr/charts.js +0 -1
  1358. package/dist/translations/tr/conversation.js +0 -1
  1359. package/dist/translations/tr/data.js +0 -1
  1360. package/dist/translations/tr/forms.js +0 -1
  1361. package/dist/translations/tr/layout.js +0 -1
  1362. package/dist/translations/tr/media.js +0 -1
  1363. package/dist/translations/tr/overlays.js +0 -1
  1364. package/dist/translations/tr/retrieval.js +0 -1
  1365. package/dist/translations/tr/shared.js +0 -1
  1366. package/dist/translations/tr/utility.js +0 -1
  1367. package/dist/translations/tr/viewers.js +0 -5
  1368. package/dist/translations/tr.js +0 -1
  1369. package/dist/translations/uk/agent-tools.js +0 -1
  1370. package/dist/translations/uk/charts.js +0 -1
  1371. package/dist/translations/uk/conversation.js +0 -1
  1372. package/dist/translations/uk/data.js +0 -1
  1373. package/dist/translations/uk/forms.js +0 -1
  1374. package/dist/translations/uk/layout.js +0 -1
  1375. package/dist/translations/uk/media.js +0 -1
  1376. package/dist/translations/uk/overlays.js +0 -1
  1377. package/dist/translations/uk/retrieval.js +0 -1
  1378. package/dist/translations/uk/shared.js +0 -1
  1379. package/dist/translations/uk/utility.js +0 -1
  1380. package/dist/translations/uk/viewers.js +0 -5
  1381. package/dist/translations/uk.js +0 -1
  1382. package/dist/translations/ur/agent-tools.js +0 -1
  1383. package/dist/translations/ur/charts.js +0 -1
  1384. package/dist/translations/ur/conversation.js +0 -1
  1385. package/dist/translations/ur/data.js +0 -1
  1386. package/dist/translations/ur/forms.js +0 -1
  1387. package/dist/translations/ur/layout.js +0 -1
  1388. package/dist/translations/ur/media.js +0 -1
  1389. package/dist/translations/ur/overlays.js +0 -1
  1390. package/dist/translations/ur/retrieval.js +0 -1
  1391. package/dist/translations/ur/shared.js +0 -1
  1392. package/dist/translations/ur/utility.js +0 -1
  1393. package/dist/translations/ur/viewers.js +0 -5
  1394. package/dist/translations/ur.js +0 -1
  1395. package/dist/translations/uz/agent-tools.js +0 -1
  1396. package/dist/translations/uz/charts.js +0 -1
  1397. package/dist/translations/uz/conversation.js +0 -1
  1398. package/dist/translations/uz/data.js +0 -1
  1399. package/dist/translations/uz/forms.js +0 -1
  1400. package/dist/translations/uz/layout.js +0 -1
  1401. package/dist/translations/uz/media.js +0 -1
  1402. package/dist/translations/uz/overlays.js +0 -1
  1403. package/dist/translations/uz/retrieval.js +0 -1
  1404. package/dist/translations/uz/shared.js +0 -1
  1405. package/dist/translations/uz/utility.js +0 -1
  1406. package/dist/translations/uz/viewers.js +0 -5
  1407. package/dist/translations/uz.js +0 -1
  1408. package/dist/translations/vi/agent-tools.js +0 -1
  1409. package/dist/translations/vi/charts.js +0 -1
  1410. package/dist/translations/vi/conversation.js +0 -1
  1411. package/dist/translations/vi/data.js +0 -1
  1412. package/dist/translations/vi/forms.js +0 -1
  1413. package/dist/translations/vi/layout.js +0 -1
  1414. package/dist/translations/vi/media.js +0 -1
  1415. package/dist/translations/vi/overlays.js +0 -1
  1416. package/dist/translations/vi/retrieval.js +0 -1
  1417. package/dist/translations/vi/shared.js +0 -1
  1418. package/dist/translations/vi/utility.js +0 -1
  1419. package/dist/translations/vi/viewers.js +0 -5
  1420. package/dist/translations/vi.js +0 -1
  1421. package/dist/translations/yo/agent-tools.js +0 -1
  1422. package/dist/translations/yo/charts.js +0 -1
  1423. package/dist/translations/yo/conversation.js +0 -1
  1424. package/dist/translations/yo/data.js +0 -1
  1425. package/dist/translations/yo/forms.js +0 -1
  1426. package/dist/translations/yo/layout.js +0 -1
  1427. package/dist/translations/yo/media.js +0 -1
  1428. package/dist/translations/yo/overlays.js +0 -1
  1429. package/dist/translations/yo/retrieval.js +0 -1
  1430. package/dist/translations/yo/shared.js +0 -1
  1431. package/dist/translations/yo/utility.js +0 -1
  1432. package/dist/translations/yo/viewers.js +0 -5
  1433. package/dist/translations/yo.js +0 -1
  1434. package/dist/translations/zh-CN/agent-tools.js +0 -1
  1435. package/dist/translations/zh-CN/charts.js +0 -1
  1436. package/dist/translations/zh-CN/conversation.js +0 -1
  1437. package/dist/translations/zh-CN/data.js +0 -1
  1438. package/dist/translations/zh-CN/forms.js +0 -1
  1439. package/dist/translations/zh-CN/layout.js +0 -1
  1440. package/dist/translations/zh-CN/media.js +0 -1
  1441. package/dist/translations/zh-CN/overlays.js +0 -1
  1442. package/dist/translations/zh-CN/retrieval.js +0 -1
  1443. package/dist/translations/zh-CN/shared.js +0 -1
  1444. package/dist/translations/zh-CN/utility.js +0 -1
  1445. package/dist/translations/zh-CN/viewers.js +0 -5
  1446. package/dist/translations/zh-CN.js +0 -1
  1447. package/dist/translations/zh-TW/agent-tools.js +0 -1
  1448. package/dist/translations/zh-TW/charts.js +0 -1
  1449. package/dist/translations/zh-TW/conversation.js +0 -1
  1450. package/dist/translations/zh-TW/data.js +0 -1
  1451. package/dist/translations/zh-TW/forms.js +0 -1
  1452. package/dist/translations/zh-TW/layout.js +0 -1
  1453. package/dist/translations/zh-TW/media.js +0 -1
  1454. package/dist/translations/zh-TW/overlays.js +0 -1
  1455. package/dist/translations/zh-TW/retrieval.js +0 -1
  1456. package/dist/translations/zh-TW/shared.js +0 -1
  1457. package/dist/translations/zh-TW/utility.js +0 -1
  1458. package/dist/translations/zh-TW/viewers.js +0 -5
  1459. package/dist/translations/zh-TW.js +0 -1
  1460. package/dist/translations/zu/agent-tools.js +0 -1
  1461. package/dist/translations/zu/charts.js +0 -1
  1462. package/dist/translations/zu/conversation.js +0 -1
  1463. package/dist/translations/zu/data.js +0 -1
  1464. package/dist/translations/zu/forms.js +0 -1
  1465. package/dist/translations/zu/layout.js +0 -1
  1466. package/dist/translations/zu/media.js +0 -1
  1467. package/dist/translations/zu/overlays.js +0 -1
  1468. package/dist/translations/zu/retrieval.js +0 -1
  1469. package/dist/translations/zu/shared.js +0 -1
  1470. package/dist/translations/zu/utility.js +0 -1
  1471. package/dist/translations/zu/viewers.js +0 -5
  1472. package/dist/translations/zu.js +0 -1
  1473. package/vscode-css-data.json +0 -1
  1474. package/vscode-html-data.json +0 -1
  1475. package/web-types.json +0 -1
@@ -1,4 +1,4 @@
1
- import{__decorate}from"tslib";import{eventCollectionSupport}from"../../../internal/collection-snapshot.js";import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{formatMediaTime}from"../../../internal/media-time.js";import{LyraElement}from"../../../internal/lyra-element.js";import{hostAriaLabel}from"../../../internal/a11y.js";import{activeElementIn}from"../../../internal/active-element.js";import{finiteRange}from"../../../internal/numbers.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{tag}from"../../../internal/prefix.js";import{safeMediaSrc}from"../../../internal/safe-url.js";import{styles}from"./video-playlist.styles.js";import{LYRA_DEFAULT_videoPlaylistLabel,LYRA_DEFAULT_videoPlaylistUntitled}from"../../../internal/default-strings.generated.js";function safeControls(value){return value==="none"||value==="standard"?value:"full"}function safeRepeat(value){return value==="one"||value==="all"?value:"none"}function sameVideos(left,right){return left.length===right.length&&left.every((video,index)=>video===right[index])}function sourceSnapshot(src,type,media){return{src,type,media}}function trackSnapshot(src,kind,srclang,label,isDefault){return{src,kind,srclang,label,default:isDefault}}class LyraVideoPlaylist extends LyraElement{constructor(){super(...arguments),this.controls="full",this.iconLibrary="system",this.withoutAutoAdvance=!1,this.repeat="none",this.items=[],this.playlistVideos=[],this.liveChildrenReady=!1,this.activeIndex=-1,this.navigationIndex=-1,this.listeners=new Map,this.lastKnownPlaying=new WeakMap,this.nativeVideos=new WeakMap,this.needsReload=new WeakSet,this.ownedVideoState=new WeakMap,this.preferences={},this.activationGeneration=0,this.reconcileGeneration=0,this.onSlotChange=()=>this.reconcileChildren(),this.onItemFocus=event=>{relayNativeEvent(this,event)},this.onItemBlur=event=>{relayNativeEvent(this,event)}}static{this.defaultStrings={...super.defaultStrings,videoPlaylistLabel:LYRA_DEFAULT_videoPlaylistLabel,videoPlaylistUntitled:LYRA_DEFAULT_videoPlaylistUntitled}}static{this.collectionSupport=eventCollectionSupport}static{this.immutableEventDetails=Object.freeze(["lr-video-change"])}static{this.styles=[LyraElement.styles,styles]}connectedCallback(){super.connectedCallback(),this.observeChildren(),this.hasUpdated?this.scheduleAfterUpdate(()=>this.reconcileChildren(),"video-playlist-reconcile"):this.seedFirstRenderState(()=>{this.directVideos().length>0&&this.reconcileChildren()})}disconnectedCallback(){this.activationGeneration+=1,this.reconcileGeneration+=1,this.pendingPlay=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0;for(const video of this.playlistVideos)this.unbindVideo(video),video.hidden=!0,this.pauseAndUnload(video);super.disconnectedCallback()}willUpdate(changed){super.willUpdate(changed),changed.has("controls")&&(this.controls=safeControls(this.controls)),changed.has("repeat")&&(this.repeat=safeRepeat(this.repeat)),(changed.has("controls")||changed.has("iconLibrary"))&&this.scheduleAfterUpdate(()=>this.reconcileChildren(),"video-playlist-reconcile")}observeChildren(){this.mutationObserver?.disconnect(),this.mutationObserver=void 0;const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.mutationObserver=new MutationObserverCtor(()=>{this.scheduleAfterUpdate(()=>{this.reconcileChildren(),this.requestUpdate()},"video-playlist-reconcile")}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["default","inert","kind","label","media","poster","src","srclang","title","type"]}))}directVideos(){const videoTag=tag("video");return[...this.children].filter(child=>child.localName===videoTag)}isEnabled(video){return!video.inert}nearestEnabledIndex(videos,preferred){if(!videos.length)return-1;const start=Math.min(Math.max(preferred,0),videos.length-1);for(let index=start;index<videos.length;index+=1)if(this.isEnabled(videos[index]))return index;for(let index=start-1;index>=0;index-=1)if(this.isEnabled(videos[index]))return index;return-1}reconcileChildren(){if(!this.isConnected)return;const previousVideos=this.playlistVideos,previousActive=this.activeVideo,previousIndex=this.activeIndex,previousNavigation=previousVideos[this.navigationIndex],navigationHadFocus=activeElementIn(this.shadowRoot)?.getAttribute("part")==="playlist-item",videos=this.directVideos();(videos.length>0||this.liveChildrenReady)&&(this.liveChildrenReady=!0);let active=previousActive&&videos.includes(previousActive)&&this.isEnabled(previousActive)?previousActive:void 0,nextIndex=active?videos.indexOf(active):this.nearestEnabledIndex(videos,previousIndex);!active&&nextIndex>=0&&(active=videos[nextIndex]),active||(nextIndex=-1);const activeChanged=active!==previousActive,outgoingWasRemoved=!!(previousActive&&!videos.includes(previousActive)),resumePlayback=activeChanged&&previousActive?outgoingWasRemoved?this.lastKnownPlaying.get(previousActive)??previousActive.getState().playing:previousActive.getState().playing:!1,outgoingPreferences=activeChanged&&previousActive?outgoingWasRemoved?this.capturePreferences(previousActive,this.nativeVideos.get(previousActive)):this.capturePreferences(previousActive):void 0;for(const video of previousVideos)videos.includes(video)||this.releaseVideo(video);for(const video of videos)this.claimVideo(video),this.bindVideo(video);activeChanged&&previousActive?(this.preferences=outgoingPreferences??{},outgoingWasRemoved||this.pauseAndUnload(previousActive),this.activationGeneration+=1):activeChanged&&(this.activationGeneration+=1),this.activeVideo=active,this.activeIndex=nextIndex,sameVideos(previousVideos,videos)||(this.playlistVideos=videos);for(const video of videos){video.controls!==this.controls&&(video.controls=this.controls),video.iconLibrary!==this.iconLibrary&&(video.iconLibrary=this.iconLibrary);const isActive=video===active;video.hidden=!isActive,isActive||this.pauseAndUnload(video)}active?(activeChanged||this.needsReload.has(active))&&this.activateVideo(active,resumePlayback,this.activationGeneration):this.pendingPlay=void 0;const keptNavigation=previousNavigation&&videos.includes(previousNavigation)&&this.isEnabled(previousNavigation)?videos.indexOf(previousNavigation):-1;this.navigationIndex=keptNavigation>=0?keptNavigation:nextIndex,navigationHadFocus&&keptNavigation<0&&this.navigationIndex>=0&&this.focusItem(this.navigationIndex),activeChanged&&previousActive&&this.emitChange(previousIndex,nextIndex,active??null),this.scheduleChildrenReady(videos)}scheduleChildrenReady(videos){const reconcileGeneration=++this.reconcileGeneration;Promise.all(videos.map(video=>video.updateComplete)).then(()=>{if(!this.isConnected||reconcileGeneration!==this.reconcileGeneration)return;for(const video of this.playlistVideos)this.rememberNativeVideo(video);for(const video of this.playlistVideos)video!==this.activeVideo&&this.pauseAndUnload(video);const active=this.activeVideo;if(!active||!this.needsReload.has(active))return;const shouldPlay=this.pendingPlay?.video===active&&this.pendingPlay.generation===this.activationGeneration;this.activateVideo(active,shouldPlay,this.activationGeneration)})}bindVideo(video){if(this.listeners.has(video))return;const listeners={ended:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!1),this.handleCompletion(video)},error:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!1)},loadedmetadata:()=>{this.rememberNativeVideo(video),this.handleLoadedMetadata(video)},pause:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!1)},play:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!0),video!==this.activeVideo&&this.pauseAndUnload(video)}};this.lastKnownPlaying.set(video,video.getState().playing),this.rememberNativeVideo(video),this.listeners.set(video,listeners),video.addEventListener("ended",listeners.ended),video.addEventListener("error",listeners.error),video.addEventListener("loadedmetadata",listeners.loadedmetadata),video.addEventListener("pause",listeners.pause),video.addEventListener("play",listeners.play)}unbindVideo(video){const listeners=this.listeners.get(video);listeners&&(video.removeEventListener("ended",listeners.ended),video.removeEventListener("error",listeners.error),video.removeEventListener("loadedmetadata",listeners.loadedmetadata),video.removeEventListener("pause",listeners.pause),video.removeEventListener("play",listeners.play),this.listeners.delete(video))}claimVideo(video){this.ownedVideoState.has(video)||this.ownedVideoState.set(video,{controls:video.controls,iconLibrary:video.iconLibrary,hidden:!!video.hidden})}releaseVideo(video){const authored=this.ownedVideoState.get(video);this.unbindVideo(video),this.pauseAndUnload(video),authored&&(video.controls=authored.controls,video.iconLibrary=authored.iconLibrary,video.hidden=authored.hidden,this.ownedVideoState.delete(video),video.isConnected&&video.load())}rememberNativeVideo(video){const native=video.getVideoElement();native&&this.nativeVideos.set(video,native)}pauseAndUnload(video){video.pause(),video.hidden=!0,this.needsReload.add(video),video.unloadMedia()}activateVideo(video,shouldPlay,generation){if(video.hidden=!1,!video.getVideoElement()){this.needsReload.add(video),shouldPlay&&(this.pendingPlay={video,generation});return}if(this.rememberNativeVideo(video),video.load(),this.needsReload.delete(video),this.applyPreferences(video,this.preferences),!shouldPlay){this.pendingPlay?.video===video&&(this.pendingPlay=void 0);return}this.pendingPlay=void 0,video.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo})}capturePreferences(video,native=video.getVideoElement()){return video.captureMediaPreferences(native)}applyPreferences(video,preferences){video.applyMediaPreferences(preferences)}handleLoadedMetadata(video){video===this.activeVideo&&(this.applyPreferences(video,this.preferences),this.requestUpdate())}handleCompletion(video){if(video!==this.activeVideo||this.withoutAutoAdvance)return;if(this.repeat==="one"){video.seek(0);const generation=this.activationGeneration;video.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo});return}const nextIndex=this.nearestEnabledIndex(this.playlistVideos,this.activeIndex+1);if(nextIndex>this.activeIndex){this.switchTo(nextIndex,!0);return}if(this.repeat==="all"){const first=this.nearestEnabledIndex(this.playlistVideos,0);if(first>=0&&first!==this.activeIndex)this.switchTo(first,!0);else if(first===this.activeIndex){video.seek(0);const generation=this.activationGeneration;video.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo})}}}snapshotVideo(video){const sources=[],directSrc=video.src.trim();directSrc&&sources.push(sourceSnapshot(directSrc,"",""));const tracks=[];for(const child of video.children)if(child.localName==="source"){const src=child.getAttribute("src")?.trim()??"";src&&sources.push(sourceSnapshot(src,child.getAttribute("type")??"",child.getAttribute("media")??""))}else if(child.localName==="track"){const src=child.getAttribute("src")?.trim()??"";src&&tracks.push(trackSnapshot(src,child.getAttribute("kind")??"",child.getAttribute("srclang")??"",child.getAttribute("label")??"",child.hasAttribute("default")))}return{title:video.title,poster:video.poster,sources,tracks}}emitChange(previousIndex,currentIndex,video){this.emit("lr-video-change",{previousIndex,currentIndex,video:video?this.snapshotVideo(video):null})}switchTo(index,forcePlay=!1){const incoming=this.playlistVideos[index];if(!incoming||!this.isEnabled(incoming))return;const previousIndex=this.activeIndex,outgoing=this.activeVideo;if(incoming===outgoing){if(this.navigationIndex=index,this.requestUpdate(),forcePlay){const generation=this.activationGeneration;incoming.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo})}this.emitChange(previousIndex,index,incoming);return}const wasPlaying=forcePlay||!!outgoing?.getState().playing;outgoing&&(this.preferences=this.capturePreferences(outgoing),this.pauseAndUnload(outgoing)),this.activationGeneration+=1,this.activeVideo=incoming,this.activeIndex=index,this.navigationIndex=index;for(const video of this.playlistVideos){const isActive=video===incoming;video.hidden=!isActive,!isActive&&video!==outgoing&&this.pauseAndUnload(video)}this.activateVideo(incoming,wasPlaying,this.activationGeneration),this.requestUpdate(),this.emitChange(previousIndex,index,incoming)}goTo(index){!Number.isFinite(index)||!Number.isInteger(index)||index<0||index>=this.playlistVideos.length||this.switchTo(index)}next(){const index=this.nearestEnabledIndex(this.playlistVideos,this.activeIndex+1);index>this.activeIndex&&this.switchTo(index)}previous(){for(let index=this.activeIndex-1;index>=0;index-=1)if(this.isEnabled(this.playlistVideos[index])){this.switchTo(index);return}}onItemClick(event){const button=event.currentTarget,index=Number(button.dataset.index);Number.isInteger(index)&&(this.navigationIndex=index,this.goTo(index))}enabledIndices(){const result=[];for(let index=0;index<this.playlistVideos.length;index+=1)this.isEnabled(this.playlistVideos[index])&&result.push(index);return result}moveNavigation(from,direction){const enabled=this.enabledIndices(),position=enabled.indexOf(from);if(position<0)return;const next=enabled[position+direction];next!==void 0&&this.focusItem(next)}get navigationItem(){const rows=[...this.renderRoot.querySelectorAll('[part~="playlist-item"]')];return rows.find(row=>!row.disabled&&row.getAttribute("aria-current")==="true")??rows.find(row=>!row.disabled)??null}focus(options){this.navigationItem?.focus(options)}blur(){this.navigationItem?.blur()}click(){this.navigationItem?.click()}focusItem(index){this.isEnabled(this.playlistVideos[index])&&(this.navigationIndex=index,this.requestUpdate(),this.updateComplete.then(()=>{this.navigationIndex===index&&this.shadowRoot?.querySelector(`[data-index="${index}"]`)?.focus()}))}onItemKeyDown(event){const button=event.currentTarget,index=Number(button.dataset.index);if(!Number.isInteger(index)||button.disabled)return;const forward=this.effectiveDirection==="rtl"?"ArrowLeft":"ArrowRight",backward=this.effectiveDirection==="rtl"?"ArrowRight":"ArrowLeft";if(event.key==="Enter"||event.key===" ")event.preventDefault(),this.navigationIndex=index,this.goTo(index);else if(event.key==="ArrowDown"||event.key===forward)event.preventDefault(),this.moveNavigation(index,1);else if(event.key==="ArrowUp"||event.key===backward)event.preventDefault(),this.moveNavigation(index,-1);else if(event.key==="Home"){event.preventDefault();const first=this.enabledIndices()[0];first!==void 0&&this.focusItem(first)}else if(event.key==="End"){event.preventDefault();const enabled=this.enabledIndices(),last=enabled[enabled.length-1];last!==void 0&&this.focusItem(last)}}itemTitle(value,index){const title=typeof value=="string"?value.trim():"";if(title)return title;const position=getNumberFormat(this.effectiveLocale).format(index+1);return this.localize("videoPlaylistUntitled",void 0,{position})}renderItem(item,index,current,disabled){const title=this.itemTitle(item.title,index),poster=safeMediaSrc(typeof item.poster=="string"?item.poster:""),duration=finiteRange(typeof item.duration=="number"?item.duration:0,0,0),durationId=`playlist-duration-${index}`;return html`
1
+ import{__decorate}from"tslib";import{eventCollectionSupport}from"../../../internal/collection-snapshot.js";import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{formatMediaTime}from"../../../internal/media-time.js";import{LyraElement}from"../../../internal/lyra-element.js";import{hostAriaLabel}from"../../../internal/a11y.js";import{shadowFocusTarget}from"../../../internal/active-element.js";import{finiteRange}from"../../../internal/numbers.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{tag}from"../../../internal/prefix.js";import{safeMediaSrc}from"../../../internal/safe-url.js";import{styles}from"./video-playlist.styles.js";import{LYRA_DEFAULT_videoPlaylistLabel,LYRA_DEFAULT_videoPlaylistUntitled}from"../../../internal/default-strings.generated.js";function safeControls(value){return value==="none"||value==="standard"?value:"full"}function safeRepeat(value){return value==="one"||value==="all"?value:"none"}function sameVideos(left,right){return left.length===right.length&&left.every((video,index)=>video===right[index])}function sourceSnapshot(src,type,media){return{src,type,media}}function trackSnapshot(src,kind,srclang,label,isDefault){return{src,kind,srclang,label,default:isDefault}}class LyraVideoPlaylist extends LyraElement{constructor(){super(...arguments),this.controls="full",this.iconLibrary="system",this.withoutAutoAdvance=!1,this.repeat="none",this.items=[],this.playlistVideos=[],this.liveChildrenReady=!1,this.activeIndex=-1,this.navigationIndex=-1,this.listeners=new Map,this.lastKnownPlaying=new WeakMap,this.nativeVideos=new WeakMap,this.needsReload=new WeakSet,this.ownedVideoState=new WeakMap,this.preferences={},this.activationGeneration=0,this.reconcileGeneration=0,this.onSlotChange=()=>this.reconcileChildren(),this.onItemFocus=event=>{relayNativeEvent(this,event)},this.onItemBlur=event=>{relayNativeEvent(this,event)}}static{this.defaultStrings={...super.defaultStrings,videoPlaylistLabel:LYRA_DEFAULT_videoPlaylistLabel,videoPlaylistUntitled:LYRA_DEFAULT_videoPlaylistUntitled}}static{this.collectionSupport=eventCollectionSupport}static{this.immutableEventDetails=Object.freeze(["lr-video-change"])}static{this.styles=[LyraElement.styles,styles]}connectedCallback(){super.connectedCallback(),this.observeChildren(),this.hasUpdated?this.scheduleAfterUpdate(()=>this.reconcileChildren(),"video-playlist-reconcile"):this.seedFirstRenderState(()=>{this.directVideos().length>0&&this.reconcileChildren()})}disconnectedCallback(){this.activationGeneration+=1,this.reconcileGeneration+=1,this.pendingPlay=void 0,this.mutationObserver?.disconnect(),this.mutationObserver=void 0;for(const video of this.playlistVideos)this.unbindVideo(video),video.hidden=!0,this.pauseAndUnload(video);super.disconnectedCallback()}willUpdate(changed){super.willUpdate(changed),changed.has("controls")&&(this.controls=safeControls(this.controls)),changed.has("repeat")&&(this.repeat=safeRepeat(this.repeat)),(changed.has("controls")||changed.has("iconLibrary"))&&this.scheduleAfterUpdate(()=>this.reconcileChildren(),"video-playlist-reconcile")}observeChildren(){this.mutationObserver?.disconnect(),this.mutationObserver=void 0;const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.mutationObserver=new MutationObserverCtor(()=>{this.scheduleAfterUpdate(()=>{this.reconcileChildren(),this.requestUpdate()},"video-playlist-reconcile")}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["default","inert","kind","label","media","poster","src","srclang","title","type"]}))}directVideos(){const videoTag=tag("video");return[...this.children].filter(child=>child.localName===videoTag)}isEnabled(video){return!video.inert}nearestEnabledIndex(videos,preferred){if(!videos.length)return-1;const start=Math.min(Math.max(preferred,0),videos.length-1);for(let index=start;index<videos.length;index+=1)if(this.isEnabled(videos[index]))return index;for(let index=start-1;index>=0;index-=1)if(this.isEnabled(videos[index]))return index;return-1}reconcileChildren(){if(!this.isConnected)return;const previousVideos=this.playlistVideos,previousActive=this.activeVideo,previousIndex=this.activeIndex,previousNavigation=previousVideos[this.navigationIndex],navigationHadFocus=shadowFocusTarget(this)?.getAttribute("part")==="playlist-item",videos=this.directVideos();(videos.length>0||this.liveChildrenReady)&&(this.liveChildrenReady=!0);let active=previousActive&&videos.includes(previousActive)&&this.isEnabled(previousActive)?previousActive:void 0,nextIndex=active?videos.indexOf(active):this.nearestEnabledIndex(videos,previousIndex);!active&&nextIndex>=0&&(active=videos[nextIndex]),active||(nextIndex=-1);const activeChanged=active!==previousActive,outgoingWasRemoved=!!(previousActive&&!videos.includes(previousActive)),resumePlayback=activeChanged&&previousActive?outgoingWasRemoved?this.lastKnownPlaying.get(previousActive)??previousActive.getState().playing:previousActive.getState().playing:!1,outgoingPreferences=activeChanged&&previousActive?outgoingWasRemoved?this.capturePreferences(previousActive,this.nativeVideos.get(previousActive)):this.capturePreferences(previousActive):void 0;for(const video of previousVideos)videos.includes(video)||this.releaseVideo(video);for(const video of videos)this.claimVideo(video),this.bindVideo(video);activeChanged&&previousActive?(this.preferences=outgoingPreferences??{},outgoingWasRemoved||this.pauseAndUnload(previousActive),this.activationGeneration+=1):activeChanged&&(this.activationGeneration+=1),this.activeVideo=active,this.activeIndex=nextIndex,sameVideos(previousVideos,videos)||(this.playlistVideos=videos);for(const video of videos){video.controls!==this.controls&&(video.controls=this.controls),video.iconLibrary!==this.iconLibrary&&(video.iconLibrary=this.iconLibrary);const isActive=video===active;video.hidden=!isActive,isActive||this.pauseAndUnload(video)}active?(activeChanged||this.needsReload.has(active))&&this.activateVideo(active,resumePlayback,this.activationGeneration):this.pendingPlay=void 0;const keptNavigation=previousNavigation&&videos.includes(previousNavigation)&&this.isEnabled(previousNavigation)?videos.indexOf(previousNavigation):-1;this.navigationIndex=keptNavigation>=0?keptNavigation:nextIndex,navigationHadFocus&&keptNavigation<0&&this.navigationIndex>=0&&this.focusItem(this.navigationIndex),activeChanged&&previousActive&&this.emitChange(previousIndex,nextIndex,active??null),this.scheduleChildrenReady(videos)}scheduleChildrenReady(videos){const reconcileGeneration=++this.reconcileGeneration;Promise.all(videos.map(video=>video.updateComplete)).then(()=>{if(!this.isConnected||reconcileGeneration!==this.reconcileGeneration)return;for(const video of this.playlistVideos)this.rememberNativeVideo(video);for(const video of this.playlistVideos)video!==this.activeVideo&&this.pauseAndUnload(video);const active=this.activeVideo;if(!active||!this.needsReload.has(active))return;const shouldPlay=this.pendingPlay?.video===active&&this.pendingPlay.generation===this.activationGeneration;this.activateVideo(active,shouldPlay,this.activationGeneration)})}bindVideo(video){if(this.listeners.has(video))return;const listeners={ended:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!1),this.handleCompletion(video)},error:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!1)},loadedmetadata:()=>{this.rememberNativeVideo(video),this.handleLoadedMetadata(video)},pause:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!1)},play:()=>{this.rememberNativeVideo(video),this.lastKnownPlaying.set(video,!0),video!==this.activeVideo&&this.pauseAndUnload(video)}};this.lastKnownPlaying.set(video,video.getState().playing),this.rememberNativeVideo(video),this.listeners.set(video,listeners),video.addEventListener("ended",listeners.ended),video.addEventListener("error",listeners.error),video.addEventListener("loadedmetadata",listeners.loadedmetadata),video.addEventListener("pause",listeners.pause),video.addEventListener("play",listeners.play)}unbindVideo(video){const listeners=this.listeners.get(video);listeners&&(video.removeEventListener("ended",listeners.ended),video.removeEventListener("error",listeners.error),video.removeEventListener("loadedmetadata",listeners.loadedmetadata),video.removeEventListener("pause",listeners.pause),video.removeEventListener("play",listeners.play),this.listeners.delete(video))}claimVideo(video){this.ownedVideoState.has(video)||this.ownedVideoState.set(video,{controls:video.controls,iconLibrary:video.iconLibrary,hidden:!!video.hidden})}releaseVideo(video){const authored=this.ownedVideoState.get(video);this.unbindVideo(video),this.pauseAndUnload(video),authored&&(video.controls=authored.controls,video.iconLibrary=authored.iconLibrary,video.hidden=authored.hidden,this.ownedVideoState.delete(video),video.isConnected&&video.load())}rememberNativeVideo(video){const native=video.getVideoElement();native&&this.nativeVideos.set(video,native)}pauseAndUnload(video){video.pause(),video.hidden=!0,this.needsReload.add(video),video.unloadMedia()}activateVideo(video,shouldPlay,generation){if(video.hidden=!1,!video.getVideoElement()){this.needsReload.add(video),shouldPlay&&(this.pendingPlay={video,generation});return}if(this.rememberNativeVideo(video),video.load(),this.needsReload.delete(video),this.applyPreferences(video,this.preferences),!shouldPlay){this.pendingPlay?.video===video&&(this.pendingPlay=void 0);return}this.pendingPlay=void 0,video.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo})}capturePreferences(video,native=video.getVideoElement()){return video.captureMediaPreferences(native)}applyPreferences(video,preferences){video.applyMediaPreferences(preferences)}handleLoadedMetadata(video){video===this.activeVideo&&(this.applyPreferences(video,this.preferences),this.requestUpdate())}handleCompletion(video){if(video!==this.activeVideo||this.withoutAutoAdvance)return;if(this.repeat==="one"){video.seek(0);const generation=this.activationGeneration;video.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo});return}const nextIndex=this.nearestEnabledIndex(this.playlistVideos,this.activeIndex+1);if(nextIndex>this.activeIndex){this.switchTo(nextIndex,!0);return}if(this.repeat==="all"){const first=this.nearestEnabledIndex(this.playlistVideos,0);if(first>=0&&first!==this.activeIndex)this.switchTo(first,!0);else if(first===this.activeIndex){video.seek(0);const generation=this.activationGeneration;video.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo})}}}snapshotVideo(video){const sources=[],directSrc=video.src.trim();directSrc&&sources.push(sourceSnapshot(directSrc,"",""));const tracks=[];for(const child of video.children)if(child.localName==="source"){const src=child.getAttribute("src")?.trim()??"";src&&sources.push(sourceSnapshot(src,child.getAttribute("type")??"",child.getAttribute("media")??""))}else if(child.localName==="track"){const src=child.getAttribute("src")?.trim()??"";src&&tracks.push(trackSnapshot(src,child.getAttribute("kind")??"",child.getAttribute("srclang")??"",child.getAttribute("label")??"",child.hasAttribute("default")))}return{title:video.title,poster:video.poster,sources,tracks}}emitChange(previousIndex,currentIndex,video){this.emit("lr-video-change",{previousIndex,currentIndex,video:video?this.snapshotVideo(video):null})}switchTo(index,forcePlay=!1){const incoming=this.playlistVideos[index];if(!incoming||!this.isEnabled(incoming))return;const previousIndex=this.activeIndex,outgoing=this.activeVideo;if(incoming===outgoing){if(this.navigationIndex=index,this.requestUpdate(),forcePlay){const generation=this.activationGeneration;incoming.play().catch(()=>{generation!==this.activationGeneration||this.activeVideo})}this.emitChange(previousIndex,index,incoming);return}const wasPlaying=forcePlay||!!outgoing?.getState().playing;outgoing&&(this.preferences=this.capturePreferences(outgoing),this.pauseAndUnload(outgoing)),this.activationGeneration+=1,this.activeVideo=incoming,this.activeIndex=index,this.navigationIndex=index;for(const video of this.playlistVideos){const isActive=video===incoming;video.hidden=!isActive,!isActive&&video!==outgoing&&this.pauseAndUnload(video)}this.activateVideo(incoming,wasPlaying,this.activationGeneration),this.requestUpdate(),this.emitChange(previousIndex,index,incoming)}goTo(index){!Number.isFinite(index)||!Number.isInteger(index)||index<0||index>=this.playlistVideos.length||this.switchTo(index)}next(){const index=this.nearestEnabledIndex(this.playlistVideos,this.activeIndex+1);index>this.activeIndex&&this.switchTo(index)}previous(){for(let index=this.activeIndex-1;index>=0;index-=1)if(this.isEnabled(this.playlistVideos[index])){this.switchTo(index);return}}onItemClick(event){const button=event.currentTarget,index=Number(button.dataset.index);Number.isInteger(index)&&(this.navigationIndex=index,this.goTo(index))}enabledIndices(){const result=[];for(let index=0;index<this.playlistVideos.length;index+=1)this.isEnabled(this.playlistVideos[index])&&result.push(index);return result}moveNavigation(from,direction){const enabled=this.enabledIndices(),position=enabled.indexOf(from);if(position<0)return;const next=enabled[position+direction];next!==void 0&&this.focusItem(next)}get navigationItem(){const rows=[...this.renderRoot.querySelectorAll('[part~="playlist-item"]')];return rows.find(row=>!row.disabled&&row.getAttribute("aria-current")==="true")??rows.find(row=>!row.disabled)??null}focus(options){this.navigationItem?.focus(options)}blur(){this.navigationItem?.blur()}click(){this.navigationItem?.click()}focusItem(index){this.isEnabled(this.playlistVideos[index])&&(this.navigationIndex=index,this.requestUpdate(),this.updateComplete.then(()=>{this.navigationIndex===index&&this.shadowRoot?.querySelector(`[data-index="${index}"]`)?.focus()}))}onItemKeyDown(event){const button=event.currentTarget,index=Number(button.dataset.index);if(!Number.isInteger(index)||button.disabled)return;const forward=this.effectiveDirection==="rtl"?"ArrowLeft":"ArrowRight",backward=this.effectiveDirection==="rtl"?"ArrowRight":"ArrowLeft";if(event.key==="Enter"||event.key===" ")event.preventDefault(),this.navigationIndex=index,this.goTo(index);else if(event.key==="ArrowDown"||event.key===forward)event.preventDefault(),this.moveNavigation(index,1);else if(event.key==="ArrowUp"||event.key===backward)event.preventDefault(),this.moveNavigation(index,-1);else if(event.key==="Home"){event.preventDefault();const first=this.enabledIndices()[0];first!==void 0&&this.focusItem(first)}else if(event.key==="End"){event.preventDefault();const enabled=this.enabledIndices(),last=enabled[enabled.length-1];last!==void 0&&this.focusItem(last)}}itemTitle(value,index){const title=typeof value=="string"?value.trim():"";if(title)return title;const position=getNumberFormat(this.effectiveLocale).format(index+1);return this.localize("videoPlaylistUntitled",void 0,{position})}renderItem(item,index,current,disabled){const title=this.itemTitle(item.title,index),poster=safeMediaSrc(typeof item.poster=="string"?item.poster:""),duration=finiteRange(typeof item.duration=="number"?item.duration:0,0,0),durationId=`playlist-duration-${index}`;return html`
2
2
  <li>
3
3
  <button
4
4
  type="button"
@@ -78,11 +78,11 @@ accessibleLabel:string|null;
78
78
  * than `@query`) so the generated manifest marks it readonly, not merely by convention. */
79
79
  get iframe():HTMLIFrameElement|undefined;private cachedZoomLevelsSource;private cachedZoomLevels;
80
80
  /** Focus the internal iframe when interaction is enabled and a live frame is connected. */
81
- focus(options?:FocusOptions):void;
81
+ focus(options?:FocusOptions):void;private releaseFrameFocus;
82
82
  /** Blur the internal iframe. Does not blur a focused zoom control. */
83
83
  blur():void;
84
84
  /** Activate the internal iframe only while interaction is enabled. */
85
- click():void;private hasEmittedFocus;private frameIsActive;private frameOwnsFocus;private setFrameFocused;private dispatchHostFocusEvent;private emitHostFocus;private emitHostBlur;private onFrameFocus;private onFrameBlur;private focusReconciliationGeneration;private scheduleFrameFocusReconciliation;private focusBoundaryDocument?;private onFocusBoundaryKeyDown;private resetFocusBoundaryDocument;private bindFocusBoundaryDocument;private navigationGeneration;private needsReconnectFrame;private syncedThemeClasses;private syncedThemeProperties;private themeSyncState?;private themeWatcher?;connectedCallback():void;disconnectedCallback():void;attributeChangedCallback(name:string,oldValue:string|null,value:string|null):void;protected willUpdate(changed:PropertyValues<this>):void;protected updated(changed:PropertyValues<this>):void;
85
+ click():void;private hasEmittedFocus;private frameIsActive;private frameOwnsFocus;private setFrameFocused;private dispatchHostFocusEvent;private emitHostFocus;private emitHostBlur;private onFrameFocus;private onFrameBlur;private focusReconciliationGeneration;private scheduleFrameFocusReconciliation;private focusBoundaryDocument?;private onFocusBoundaryKeyDown;private leaveFocusBoundaryHub?;private resetFocusBoundaryDocument;private bindFocusBoundaryDocument;private navigationGeneration;private needsReconnectFrame;private syncedThemeClasses;private syncedThemeProperties;private themeSyncState?;private themeWatcher?;connectedCallback():void;disconnectedCallback():void;attributeChangedCallback(name:string,oldValue:string|null,value:string|null):void;protected willUpdate(changed:PropertyValues<this>):void;protected updated(changed:PropertyValues<this>):void;
86
86
  /** Returns the current iframe window while connected. Cross-origin windows are still opaque. */
87
87
  get contentWindow():Window|null;
88
88
  /** Returns the current same-origin iframe document, or `null` when detached/cross-origin. */
@@ -1,4 +1,4 @@
1
- import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{keyed}from"lit/directives/keyed.js";import{activeElementIn}from"../../../internal/active-element.js";import{hostAriaLabel}from"../../../internal/a11y.js";import{LyraElement}from"../../../internal/lyra-element.js";import{HostDescriptionController}from"../../../internal/aria-controls.js";import{finiteRange}from"../../../internal/numbers.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{safeDownloadHref}from"../../../internal/safe-url.js";import{ThemeWatcher}from"../../../internal/theme-watcher.js";import{styles}from"./zoomable-frame.styles.js";import{LYRA_DEFAULT_zoomControls,LYRA_DEFAULT_zoomIn,LYRA_DEFAULT_zoomOut,LYRA_DEFAULT_zoomableFrameLabel}from"../../../internal/default-strings.generated.js";const DEFAULT_ZOOM_LEVELS="25% 50% 75% 100% 125% 150% 175% 200%",DEFAULT_IFRAME_SANDBOX="allow-same-origin",DEFAULT_ZOOM_LEVEL_VALUES=[.25,.5,.75,1,1.25,1.5,1.75,2],MIN_ZOOM=.01,MAX_ZOOM=1e3,MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS=16384,MAX_ZOOM_LEVEL_TOKENS=256,SANDBOX_TOKENS=new Set(["allow-downloads","allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-popups-to-escape-sandbox","allow-presentation","allow-same-origin","allow-scripts","allow-storage-access-by-user-activation","allow-top-navigation","allow-top-navigation-by-user-activation","allow-top-navigation-to-custom-protocols"]),REFERRER_POLICIES=new Set(["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"]),THEME_ATTRIBUTES=["data-lr-theme","data-theme","data-color-scheme"];function isLyraThemeClass(value){return value==="lr-light"||value==="lr-dark"||value.startsWith("lr-theme-")||value.startsWith("lr-brand-")||value.startsWith("lr-palette-")}function safeZoomableFrameSrc(value){return typeof value=="string"&&value.trim().toLowerCase()==="about:blank"?value.trim():safeDownloadHref(value)}function safeZoomableFrameSandbox(value){if(typeof value!="string")return"";const tokens=[...new Set(value.toLowerCase().split(/\s+/).filter(token=>SANDBOX_TOKENS.has(token)))];return tokens.includes("allow-scripts")&&tokens.includes("allow-same-origin")?tokens.filter(token=>token!=="allow-same-origin").join(" "):tokens.join(" ")}function safeLoading(value){return value==="lazy"?"lazy":"eager"}function safeReferrerPolicy(value){return value===""||value==null?null:typeof value=="string"&&REFERRER_POLICIES.has(value)?value:"no-referrer"}function parseZoomLevels(value){if(typeof value!="string")return DEFAULT_ZOOM_LEVEL_VALUES;const source=value.slice(0,MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS),finalTokenContinues=value.length>MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS&&/\S/u.test(source.at(-1)??"")&&/\S/u.test(value[MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS]??""),tokenPattern=/\S+/g,unique=new Set;let tokenCount=0,match;for(;tokenCount<MAX_ZOOM_LEVEL_TOKENS&&(match=tokenPattern.exec(source))!==null&&!(finalTokenContinues&&tokenPattern.lastIndex===source.length);){tokenCount+=1;const token=match[0],percent=token.endsWith("%"),parsed=Number(percent?token.slice(0,-1):token),level=percent?parsed/100:parsed;Number.isFinite(level)&&level>=MIN_ZOOM&&level<=MAX_ZOOM&&unique.add(level)}return unique.size===0?DEFAULT_ZOOM_LEVEL_VALUES:Object.freeze([...unique].sort((left,right)=>left-right))}class LyraZoomableFrame extends LyraElement{constructor(){super(...arguments),this.hostDescription=new HostDescriptionController(this,()=>this.renderRoot.querySelector('[part="iframe"]')),this.src="",this.srcdoc="",this.allowfullscreen=!1,this.loading="eager",this.referrerpolicy="",this.sandbox=DEFAULT_IFRAME_SANDBOX,this.zoom=1,this.zoomLevels=DEFAULT_ZOOM_LEVELS,this.withoutControls=!1,this.withoutInteraction=!1,this.withThemeSync=!1,this.accessibleLabel=null,this.cachedZoomLevelsSource=Symbol("uncached zoom levels"),this.cachedZoomLevels=DEFAULT_ZOOM_LEVEL_VALUES,this.hasEmittedFocus=!1,this.onFrameFocus=event=>{event.stopPropagation(),this.frameOwnsFocus(event.currentTarget)&&this.emitHostFocus(event)},this.onFrameBlur=event=>{event.stopPropagation(),!this.frameOwnsFocus(event.currentTarget)&&this.emitHostBlur(event)},this.focusReconciliationGeneration=0,this.scheduleFrameFocusReconciliation=()=>{const view=this.ownerDocument.defaultView;if(!view)return;const generation=++this.focusReconciliationGeneration;view.setTimeout(()=>{generation!==this.focusReconciliationGeneration||!this.isConnected||(this.frameOwnsFocus()?this.emitHostFocus():this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)))},0)},this.onFocusBoundaryKeyDown=event=>{event.key==="Tab"&&this.scheduleFrameFocusReconciliation()},this.navigationGeneration=0,this.needsReconnectFrame=!1,this.syncedThemeClasses=new Set,this.syncedThemeProperties=new Set,this.onControlsKeyDown=event=>{event.altKey||event.ctrlKey||event.metaKey||(event.key==="+"||event.key==="="?(event.preventDefault(),this.zoomIn()):(event.key==="-"||event.key==="_")&&(event.preventDefault(),this.zoomOut()))}}static{this.defaultStrings={...super.defaultStrings,zoomControls:LYRA_DEFAULT_zoomControls,zoomIn:LYRA_DEFAULT_zoomIn,zoomOut:LYRA_DEFAULT_zoomOut,zoomableFrameLabel:LYRA_DEFAULT_zoomableFrameLabel}}static{this.styles=[LyraElement.styles,styles]}adoptedCallback(){super.adoptedCallback(),this.hostDescription.adopted()}get iframe(){return this.renderRoot?.querySelector("iframe")??void 0}focus(options){const frame=this.iframe;if(!frame||!this.isConnected||this.withoutInteraction||frame.inert)return;const previous=activeElementIn(this.ownerDocument),wasFocused=this.frameOwnsFocus(frame);frame.focus(options),!wasFocused&&this.frameOwnsFocus(frame)&&this.emitHostFocus(void 0,previous)}blur(){const frame=this.iframe;!frame||!this.frameOwnsFocus(frame)||(frame.blur(),this.frameOwnsFocus(frame)||this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)))}click(){this.isConnected&&!this.withoutInteraction&&!this.iframe?.inert&&this.iframe?.click()}frameIsActive(frame=this.iframe){return!!(frame&&this.isConnected&&activeElementIn(this.shadowRoot)===frame)}frameOwnsFocus(frame=this.iframe){return!!(frame&&!frame.inert&&!this.withoutInteraction&&this.frameIsActive(frame))}setFrameFocused(focused){this.toggleAttribute("data-frame-focused",focused)}dispatchHostFocusEvent(type,source,relatedTarget=null){const view=this.ownerDocument.defaultView;if(!view)return;const related=source?.relatedTarget??relatedTarget,relatedNode=related,internalRelated=related===this||relatedNode?.nodeType!==void 0&&this.shadowRoot?.contains(relatedNode),nativeSource=new view.FocusEvent(type,{relatedTarget:internalRelated?null:related,view,detail:source?.detail??0});relayNativeEvent(this,nativeSource)}emitHostFocus(source,relatedTarget=null){this.hasEmittedFocus||(this.hasEmittedFocus=!0,this.setFrameFocused(!0),this.dispatchHostFocusEvent("focus",source,relatedTarget))}emitHostBlur(source,relatedTarget=null){this.hasEmittedFocus&&(this.hasEmittedFocus=!1,this.setFrameFocused(!1),this.dispatchHostFocusEvent("blur",source,relatedTarget))}resetFocusBoundaryDocument(){this.focusBoundaryDocument?.removeEventListener("keydown",this.onFocusBoundaryKeyDown,!0),this.focusBoundaryDocument?.removeEventListener("pointerdown",this.scheduleFrameFocusReconciliation,!0),this.focusBoundaryDocument=void 0}bindFocusBoundaryDocument(){let target=null;try{target=this.contentDocument}catch{}!target||target===this.focusBoundaryDocument||(this.resetFocusBoundaryDocument(),this.focusBoundaryDocument=target,target.addEventListener("keydown",this.onFocusBoundaryKeyDown,!0),target.addEventListener("pointerdown",this.scheduleFrameFocusReconciliation,!0))}connectedCallback(){super.connectedCallback(),this.ownerDocument.addEventListener("focusin",this.scheduleFrameFocusReconciliation,!0),this.ownerDocument.addEventListener("focusout",this.scheduleFrameFocusReconciliation,!0),this.ownerDocument.addEventListener("keydown",this.onFocusBoundaryKeyDown,!0),this.ownerDocument.defaultView?.addEventListener("focus",this.scheduleFrameFocusReconciliation),this.ownerDocument.defaultView?.addEventListener("blur",this.scheduleFrameFocusReconciliation),this.needsReconnectFrame&&(this.needsReconnectFrame=!1,this.requestUpdate())}disconnectedCallback(){this.focusReconciliationGeneration++,this.ownerDocument.removeEventListener("focusin",this.scheduleFrameFocusReconciliation,!0),this.ownerDocument.removeEventListener("focusout",this.scheduleFrameFocusReconciliation,!0),this.ownerDocument.removeEventListener("keydown",this.onFocusBoundaryKeyDown,!0),this.ownerDocument.defaultView?.removeEventListener("focus",this.scheduleFrameFocusReconciliation),this.ownerDocument.defaultView?.removeEventListener("blur",this.scheduleFrameFocusReconciliation),this.navigationGeneration++,this.needsReconnectFrame=!0,this.hasEmittedFocus=!1,this.setFrameFocused(!1),this.resetFocusBoundaryDocument(),this.resetThemeSyncState(),super.disconnectedCallback()}attributeChangedCallback(name,oldValue,value){super.attributeChangedCallback(name,oldValue,value),name==="srcdoc"&&oldValue===null!=(value===null)&&(this.navigationGeneration++,this.requestUpdate())}willUpdate(changed){if(super.willUpdate(changed),changed.has("src")||changed.has("srcdoc")||changed.has("allowfullscreen")||changed.has("loading")||changed.has("referrerpolicy")||changed.has("sandbox")){const frame=this.iframe,wasFocused=this.frameIsActive(frame);frame?.blur(),wasFocused&&!this.frameIsActive(frame)&&this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)),this.setFrameFocused(!1),this.resetFocusBoundaryDocument(),this.navigationGeneration++}if(changed.has("withoutInteraction")&&this.withoutInteraction){const frame=this.iframe,wasFocused=this.frameIsActive(frame);frame?.blur(),wasFocused&&this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)),this.setFrameFocused(!1)}}updated(changed){super.updated(changed),changed.has("withThemeSync")&&(this.withThemeSync?(this.themeWatcher??=new ThemeWatcher(this,()=>this.syncTheme()),this.syncTheme()):this.restoreTheme())}get contentWindow(){return this.isConnected?this.iframe?.contentWindow??null:null}get contentDocument(){if(!this.isConnected)return null;try{return this.iframe?.contentDocument??null}catch{return null}}get safeZoom(){return finiteRange(this.zoom,1,MIN_ZOOM,MAX_ZOOM)}get availableZoomLevels(){const source=this.zoomLevels;return source===this.cachedZoomLevelsSource?this.cachedZoomLevels:(this.cachedZoomLevelsSource=source,this.cachedZoomLevels=parseZoomLevels(source),this.cachedZoomLevels)}get hasInlineDocument(){return this.hasAttribute("srcdoc")||typeof this.srcdoc=="string"&&this.srcdoc!==""}get hasNavigation(){return this.hasInlineDocument||safeZoomableFrameSrc(this.src)!==null}navigationSignature(){const inline=this.hasInlineDocument;return JSON.stringify([inline,inline?this.srcdoc:safeZoomableFrameSrc(this.src),this.allowfullscreen,safeLoading(this.loading),safeReferrerPolicy(this.referrerpolicy),safeZoomableFrameSandbox(this.sandbox)])}zoomIn(){const current=this.safeZoom,next=this.availableZoomLevels.find(level=>level>current);next!==void 0&&this.zoomTo(next)}zoomOut(){const current=this.safeZoom,levels=this.availableZoomLevels;for(let index=levels.length-1;index>=0;index--){const previous=levels[index];if(previous!==void 0&&previous<current){this.zoomTo(previous);return}}}zoomTo(zoom){this.zoom=zoom,this.emit("lr-zoom-change",{zoom})}isZoomInDisabled(){return!this.availableZoomLevels.some(level=>level>this.safeZoom)}isZoomOutDisabled(){return!this.availableZoomLevels.some(level=>level<this.safeZoom)}dispatchFrameEvent(type){const EventConstructor=this.ownerDocument.defaultView?.Event??Event;type==="load"?this.dispatchEvent(new EventConstructor("load",{bubbles:!1,composed:!1})):this.dispatchEvent(new EventConstructor("error",{bubbles:!1,composed:!1}))}onFrameEvent(type,source,generation,navigationSignature){source.stopPropagation(),!(!this.isConnected||!this.hasNavigation||generation!==this.navigationGeneration||navigationSignature!==this.navigationSignature()||source.currentTarget!==this.iframe)&&(type==="load"&&(this.bindFocusBoundaryDocument(),this.syncTheme()),this.dispatchFrameEvent(type))}syncTheme(){if(!this.withThemeSync||!this.isConnected)return;const target=this.contentDocument?.documentElement,source=this.ownerDocument.documentElement;if(!(!target||!source))try{const state=this.themeStateFor(target),nextClasses=new Set([...source.classList].filter(isLyraThemeClass));for(const className of this.syncedThemeClasses)nextClasses.has(className)||this.setSyncedThemeClass(state,className,!1);for(const className of nextClasses)this.setSyncedThemeClass(state,className,!0);this.syncedThemeClasses=nextClasses;for(const attribute of THEME_ATTRIBUTES){const value=source.getAttribute(attribute);this.setSyncedThemeAttribute(state,attribute,value)}const computed=this.ownerDocument.defaultView?.getComputedStyle(this);if(!computed)return;const nextProperties=new Set;for(let index=0;index<computed.length;index++){const property2=computed.item(index);property2.startsWith("--lr-theme-")&&(this.setSyncedThemeProperty(state,property2,computed.getPropertyValue(property2)),nextProperties.add(property2))}for(const property2 of this.syncedThemeProperties)nextProperties.has(property2)||this.setSyncedThemeProperty(state,property2,null);this.syncedThemeProperties=nextProperties,this.setSyncedThemeProperty(state,"color-scheme",computed.colorScheme)}catch{}}themeStateFor(target){if(this.themeSyncState?.target===target)return this.themeSyncState;this.resetThemeSyncState();const state={target,classes:new Map,attributes:new Map,properties:new Map};return this.themeSyncState=state,state}setSyncedThemeClass(state,className,present){let mutation=state.classes.get(className);mutation||(mutation={original:state.target.classList.contains(className),applied:state.target.classList.contains(className)},state.classes.set(className,mutation)),state.target.classList.toggle(className,present),mutation.applied=state.target.classList.contains(className)}setSyncedThemeAttribute(state,attribute,value){let mutation=state.attributes.get(attribute);if(!mutation){const original=state.target.getAttribute(attribute);mutation={original,applied:original},state.attributes.set(attribute,mutation)}value===null?state.target.removeAttribute(attribute):state.target.setAttribute(attribute,value),mutation.applied=state.target.getAttribute(attribute)}setSyncedThemeProperty(state,property2,value){let mutation=state.properties.get(property2);mutation||(mutation={original:state.target.style.getPropertyValue(property2),originalPriority:state.target.style.getPropertyPriority(property2),applied:state.target.style.getPropertyValue(property2),appliedPriority:state.target.style.getPropertyPriority(property2)},state.properties.set(property2,mutation)),value===null?state.target.style.removeProperty(property2):state.target.style.setProperty(property2,value),mutation.applied=state.target.style.getPropertyValue(property2),mutation.appliedPriority=state.target.style.getPropertyPriority(property2)}restoreTheme(){const state=this.themeSyncState;if(state)try{if(this.contentDocument?.documentElement!==state.target)return;for(const[className,mutation]of state.classes)state.target.classList.contains(className)===mutation.applied&&state.target.classList.toggle(className,mutation.original);for(const[attribute,mutation]of state.attributes)state.target.getAttribute(attribute)===mutation.applied&&(mutation.original===null?state.target.removeAttribute(attribute):state.target.setAttribute(attribute,mutation.original));for(const[property2,mutation]of state.properties)state.target.style.getPropertyValue(property2)!==mutation.applied||state.target.style.getPropertyPriority(property2)!==mutation.appliedPriority||(mutation.original?state.target.style.setProperty(property2,mutation.original,mutation.originalPriority):state.target.style.removeProperty(property2))}catch{}finally{this.resetThemeSyncState()}}resetThemeSyncState(){this.themeSyncState=void 0,this.syncedThemeClasses.clear(),this.syncedThemeProperties.clear()}renderControls(){return this.withoutControls?nothing:html`<div
1
+ import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{keyed}from"lit/directives/keyed.js";import{activeElementIn,shadowFocusTarget}from"../../../internal/active-element.js";import{hostAriaLabel}from"../../../internal/a11y.js";import{LyraElement}from"../../../internal/lyra-element.js";import{HostDescriptionController}from"../../../internal/aria-controls.js";import{finiteRange}from"../../../internal/numbers.js";import{relayNativeEvent}from"../../../internal/native-event-relay.js";import{safeDownloadHref}from"../../../internal/safe-url.js";import{ThemeWatcher}from"../../../internal/theme-watcher.js";import{styles}from"./zoomable-frame.styles.js";import{LYRA_DEFAULT_zoomControls,LYRA_DEFAULT_zoomIn,LYRA_DEFAULT_zoomOut,LYRA_DEFAULT_zoomableFrameLabel}from"../../../internal/default-strings.generated.js";const focusBoundaryHubs=new WeakMap;function joinFocusBoundaryHub(doc,member){let hub=focusBoundaryHubs.get(doc);if(!hub){const members=new Set,view=doc.defaultView,onEvent=event=>{for(const m of[...members])m.onOwnerFocusBoundary(event)};doc.addEventListener("focusin",onEvent,!0),doc.addEventListener("focusout",onEvent,!0),doc.addEventListener("keydown",onEvent,!0),view?.addEventListener("focus",onEvent),view?.addEventListener("blur",onEvent),hub={members,dispose:()=>{doc.removeEventListener("focusin",onEvent,!0),doc.removeEventListener("focusout",onEvent,!0),doc.removeEventListener("keydown",onEvent,!0),view?.removeEventListener("focus",onEvent),view?.removeEventListener("blur",onEvent)}},focusBoundaryHubs.set(doc,hub)}hub.members.add(member);const joined=hub;return()=>{joined.members.delete(member),!joined.members.size&&focusBoundaryHubs.get(doc)===joined&&(joined.dispose(),focusBoundaryHubs.delete(doc))}}const DEFAULT_ZOOM_LEVELS="25% 50% 75% 100% 125% 150% 175% 200%",DEFAULT_IFRAME_SANDBOX="allow-same-origin",DEFAULT_ZOOM_LEVEL_VALUES=[.25,.5,.75,1,1.25,1.5,1.75,2],MIN_ZOOM=.01,MAX_ZOOM=1e3,MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS=16384,MAX_ZOOM_LEVEL_TOKENS=256,SANDBOX_TOKENS=new Set(["allow-downloads","allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-popups-to-escape-sandbox","allow-presentation","allow-same-origin","allow-scripts","allow-storage-access-by-user-activation","allow-top-navigation","allow-top-navigation-by-user-activation","allow-top-navigation-to-custom-protocols"]),REFERRER_POLICIES=new Set(["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"]),THEME_ATTRIBUTES=["data-lr-theme","data-theme","data-color-scheme"];function isLyraThemeClass(value){return value==="lr-light"||value==="lr-dark"||value.startsWith("lr-theme-")||value.startsWith("lr-brand-")||value.startsWith("lr-palette-")}function safeZoomableFrameSrc(value){return typeof value=="string"&&value.trim().toLowerCase()==="about:blank"?value.trim():safeDownloadHref(value)}function safeZoomableFrameSandbox(value){if(typeof value!="string")return"";const tokens=[...new Set(value.toLowerCase().split(/\s+/).filter(token=>SANDBOX_TOKENS.has(token)))];return tokens.includes("allow-scripts")&&tokens.includes("allow-same-origin")?tokens.filter(token=>token!=="allow-same-origin").join(" "):tokens.join(" ")}function safeLoading(value){return value==="lazy"?"lazy":"eager"}function safeReferrerPolicy(value){return value===""||value==null?null:typeof value=="string"&&REFERRER_POLICIES.has(value)?value:"no-referrer"}function parseZoomLevels(value){if(typeof value!="string")return DEFAULT_ZOOM_LEVEL_VALUES;const source=value.slice(0,MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS),finalTokenContinues=value.length>MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS&&/\S/u.test(source.at(-1)??"")&&/\S/u.test(value[MAX_ZOOM_LEVEL_SOURCE_CODE_UNITS]??""),tokenPattern=/\S+/g,unique=new Set;let tokenCount=0,match;for(;tokenCount<MAX_ZOOM_LEVEL_TOKENS&&(match=tokenPattern.exec(source))!==null&&!(finalTokenContinues&&tokenPattern.lastIndex===source.length);){tokenCount+=1;const token=match[0],percent=token.endsWith("%"),parsed=Number(percent?token.slice(0,-1):token),level=percent?parsed/100:parsed;Number.isFinite(level)&&level>=MIN_ZOOM&&level<=MAX_ZOOM&&unique.add(level)}return unique.size===0?DEFAULT_ZOOM_LEVEL_VALUES:Object.freeze([...unique].sort((left,right)=>left-right))}class LyraZoomableFrame extends LyraElement{constructor(){super(...arguments),this.hostDescription=new HostDescriptionController(this,()=>this.renderRoot.querySelector('[part="iframe"]')),this.src="",this.srcdoc="",this.allowfullscreen=!1,this.loading="eager",this.referrerpolicy="",this.sandbox=DEFAULT_IFRAME_SANDBOX,this.zoom=1,this.zoomLevels=DEFAULT_ZOOM_LEVELS,this.withoutControls=!1,this.withoutInteraction=!1,this.withThemeSync=!1,this.accessibleLabel=null,this.cachedZoomLevelsSource=Symbol("uncached zoom levels"),this.cachedZoomLevels=DEFAULT_ZOOM_LEVEL_VALUES,this.hasEmittedFocus=!1,this.onFrameFocus=event=>{event.stopPropagation(),this.frameOwnsFocus(event.currentTarget)&&this.emitHostFocus(event)},this.onFrameBlur=event=>{event.stopPropagation(),!this.frameOwnsFocus(event.currentTarget)&&this.emitHostBlur(event)},this.focusReconciliationGeneration=0,this.scheduleFrameFocusReconciliation=()=>{const view=this.ownerDocument.defaultView;if(!view)return;const generation=++this.focusReconciliationGeneration;view.setTimeout(()=>{generation!==this.focusReconciliationGeneration||!this.isConnected||(this.frameOwnsFocus()?this.emitHostFocus():this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)))},0)},this.onFocusBoundaryKeyDown=event=>{event.key==="Tab"&&this.scheduleFrameFocusReconciliation()},this.navigationGeneration=0,this.needsReconnectFrame=!1,this.syncedThemeClasses=new Set,this.syncedThemeProperties=new Set,this.onControlsKeyDown=event=>{event.altKey||event.ctrlKey||event.metaKey||(event.key==="+"||event.key==="="?(event.preventDefault(),this.zoomIn()):(event.key==="-"||event.key==="_")&&(event.preventDefault(),this.zoomOut()))}}static{this.defaultStrings={...super.defaultStrings,zoomControls:LYRA_DEFAULT_zoomControls,zoomIn:LYRA_DEFAULT_zoomIn,zoomOut:LYRA_DEFAULT_zoomOut,zoomableFrameLabel:LYRA_DEFAULT_zoomableFrameLabel}}static{this.styles=[LyraElement.styles,styles]}adoptedCallback(){super.adoptedCallback(),this.hostDescription.adopted()}get iframe(){return this.renderRoot?.querySelector("iframe")??void 0}focus(options){const frame=this.iframe;if(!frame||!this.isConnected||this.withoutInteraction||frame.inert)return;const previous=activeElementIn(this.ownerDocument),wasFocused=this.frameOwnsFocus(frame);frame.focus(options),!wasFocused&&this.frameOwnsFocus(frame)&&this.emitHostFocus(void 0,previous)}releaseFrameFocus(frame){if(frame&&(frame.blur(),!!this.frameIsActive(frame))){try{frame.contentWindow?.blur()}catch{}frame.blur()}}blur(){const frame=this.iframe;!frame||!this.frameOwnsFocus(frame)||(this.releaseFrameFocus(frame),this.frameOwnsFocus(frame)||this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)))}click(){this.isConnected&&!this.withoutInteraction&&!this.iframe?.inert&&this.iframe?.click()}frameIsActive(frame=this.iframe){return!!(frame&&this.isConnected&&shadowFocusTarget(this)===frame)}frameOwnsFocus(frame=this.iframe){return!!(frame&&!frame.inert&&!this.withoutInteraction&&this.frameIsActive(frame))}setFrameFocused(focused){this.toggleAttribute("data-frame-focused",focused)}dispatchHostFocusEvent(type,source,relatedTarget=null){const view=this.ownerDocument.defaultView;if(!view)return;const related=source?.relatedTarget??relatedTarget,relatedNode=related,internalRelated=related===this||relatedNode?.nodeType!==void 0&&this.shadowRoot?.contains(relatedNode),nativeSource=new view.FocusEvent(type,{relatedTarget:internalRelated?null:related,view,detail:source?.detail??0});relayNativeEvent(this,nativeSource)}emitHostFocus(source,relatedTarget=null){this.hasEmittedFocus||(this.hasEmittedFocus=!0,this.setFrameFocused(!0),this.dispatchHostFocusEvent("focus",source,relatedTarget))}emitHostBlur(source,relatedTarget=null){this.hasEmittedFocus&&(this.hasEmittedFocus=!1,this.setFrameFocused(!1),this.dispatchHostFocusEvent("blur",source,relatedTarget))}onOwnerFocusBoundary(event){event.type==="keydown"?this.onFocusBoundaryKeyDown(event):(this.hasEmittedFocus||this.frameOwnsFocus())&&this.scheduleFrameFocusReconciliation()}resetFocusBoundaryDocument(){this.focusBoundaryDocument?.removeEventListener("keydown",this.onFocusBoundaryKeyDown,!0),this.focusBoundaryDocument?.removeEventListener("pointerdown",this.scheduleFrameFocusReconciliation,!0),this.focusBoundaryDocument=void 0}bindFocusBoundaryDocument(){let target=null;try{target=this.contentDocument}catch{}!target||target===this.focusBoundaryDocument||(this.resetFocusBoundaryDocument(),this.focusBoundaryDocument=target,target.addEventListener("keydown",this.onFocusBoundaryKeyDown,!0),target.addEventListener("pointerdown",this.scheduleFrameFocusReconciliation,!0))}connectedCallback(){super.connectedCallback(),this.leaveFocusBoundaryHub?.(),this.leaveFocusBoundaryHub=joinFocusBoundaryHub(this.ownerDocument,this),this.needsReconnectFrame&&(this.needsReconnectFrame=!1,this.requestUpdate())}disconnectedCallback(){this.focusReconciliationGeneration++,this.leaveFocusBoundaryHub?.(),this.leaveFocusBoundaryHub=void 0,this.navigationGeneration++,this.needsReconnectFrame=!0,this.hasEmittedFocus=!1,this.setFrameFocused(!1),this.resetFocusBoundaryDocument(),this.resetThemeSyncState(),super.disconnectedCallback()}attributeChangedCallback(name,oldValue,value){super.attributeChangedCallback(name,oldValue,value),name==="srcdoc"&&oldValue===null!=(value===null)&&(this.navigationGeneration++,this.requestUpdate())}willUpdate(changed){if(super.willUpdate(changed),changed.has("src")||changed.has("srcdoc")||changed.has("allowfullscreen")||changed.has("loading")||changed.has("referrerpolicy")||changed.has("sandbox")){const frame=this.iframe,wasFocused=this.frameIsActive(frame);this.releaseFrameFocus(frame),wasFocused&&!this.frameIsActive(frame)&&this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)),this.setFrameFocused(!1),this.resetFocusBoundaryDocument(),this.navigationGeneration++}if(changed.has("withoutInteraction")&&this.withoutInteraction){const frame=this.iframe,wasFocused=this.frameIsActive(frame);this.releaseFrameFocus(frame),wasFocused&&this.emitHostBlur(void 0,activeElementIn(this.ownerDocument)),this.setFrameFocused(!1)}}updated(changed){super.updated(changed),changed.has("withThemeSync")&&(this.withThemeSync?(this.themeWatcher??=new ThemeWatcher(this,()=>this.syncTheme()),this.syncTheme()):(this.themeWatcher&&(this.themeWatcher.hostDisconnected(),this.removeController(this.themeWatcher),this.themeWatcher=void 0),this.restoreTheme()))}get contentWindow(){return this.isConnected?this.iframe?.contentWindow??null:null}get contentDocument(){if(!this.isConnected)return null;try{return this.iframe?.contentDocument??null}catch{return null}}get safeZoom(){return finiteRange(this.zoom,1,MIN_ZOOM,MAX_ZOOM)}get availableZoomLevels(){const source=this.zoomLevels;return source===this.cachedZoomLevelsSource?this.cachedZoomLevels:(this.cachedZoomLevelsSource=source,this.cachedZoomLevels=parseZoomLevels(source),this.cachedZoomLevels)}get hasInlineDocument(){return this.hasAttribute("srcdoc")||typeof this.srcdoc=="string"&&this.srcdoc!==""}get hasNavigation(){return this.hasInlineDocument||safeZoomableFrameSrc(this.src)!==null}navigationSignature(){const inline=this.hasInlineDocument;return JSON.stringify([inline,inline?this.srcdoc:safeZoomableFrameSrc(this.src),this.allowfullscreen,safeLoading(this.loading),safeReferrerPolicy(this.referrerpolicy),safeZoomableFrameSandbox(this.sandbox)])}zoomIn(){const current=this.safeZoom,next=this.availableZoomLevels.find(level=>level>current);next!==void 0&&this.zoomTo(next)}zoomOut(){const current=this.safeZoom,levels=this.availableZoomLevels;for(let index=levels.length-1;index>=0;index--){const previous=levels[index];if(previous!==void 0&&previous<current){this.zoomTo(previous);return}}}zoomTo(zoom){this.zoom=zoom,this.emit("lr-zoom-change",{zoom})}isZoomInDisabled(){return!this.availableZoomLevels.some(level=>level>this.safeZoom)}isZoomOutDisabled(){return!this.availableZoomLevels.some(level=>level<this.safeZoom)}dispatchFrameEvent(type){const EventConstructor=this.ownerDocument.defaultView?.Event??Event;type==="load"?this.dispatchEvent(new EventConstructor("load",{bubbles:!1,composed:!1})):this.dispatchEvent(new EventConstructor("error",{bubbles:!1,composed:!1}))}onFrameEvent(type,source,generation,navigationSignature){source.stopPropagation(),!(!this.isConnected||!this.hasNavigation||generation!==this.navigationGeneration||navigationSignature!==this.navigationSignature()||source.currentTarget!==this.iframe)&&(type==="load"&&(this.bindFocusBoundaryDocument(),this.syncTheme()),this.dispatchFrameEvent(type))}syncTheme(){if(!this.withThemeSync||!this.isConnected)return;const target=this.contentDocument?.documentElement,source=this.ownerDocument.documentElement;if(!(!target||!source))try{const state=this.themeStateFor(target),nextClasses=new Set([...source.classList].filter(isLyraThemeClass));for(const className of this.syncedThemeClasses)nextClasses.has(className)||this.setSyncedThemeClass(state,className,!1);for(const className of nextClasses)this.setSyncedThemeClass(state,className,!0);this.syncedThemeClasses=nextClasses;for(const attribute of THEME_ATTRIBUTES){const value=source.getAttribute(attribute);this.setSyncedThemeAttribute(state,attribute,value)}const computed=this.ownerDocument.defaultView?.getComputedStyle(this);if(!computed)return;const nextProperties=new Set;for(let index=0;index<computed.length;index++){const property2=computed.item(index);property2.startsWith("--lr-theme-")&&(this.setSyncedThemeProperty(state,property2,computed.getPropertyValue(property2)),nextProperties.add(property2))}for(const property2 of this.syncedThemeProperties)nextProperties.has(property2)||this.setSyncedThemeProperty(state,property2,null);this.syncedThemeProperties=nextProperties,this.setSyncedThemeProperty(state,"color-scheme",computed.colorScheme)}catch{}}themeStateFor(target){if(this.themeSyncState?.target===target)return this.themeSyncState;this.resetThemeSyncState();const state={target,classes:new Map,attributes:new Map,properties:new Map};return this.themeSyncState=state,state}setSyncedThemeClass(state,className,present){let mutation=state.classes.get(className);mutation||(mutation={original:state.target.classList.contains(className),applied:state.target.classList.contains(className)},state.classes.set(className,mutation)),state.target.classList.toggle(className,present),mutation.applied=state.target.classList.contains(className)}setSyncedThemeAttribute(state,attribute,value){let mutation=state.attributes.get(attribute);if(!mutation){const original=state.target.getAttribute(attribute);mutation={original,applied:original},state.attributes.set(attribute,mutation)}value===null?state.target.removeAttribute(attribute):state.target.setAttribute(attribute,value),mutation.applied=state.target.getAttribute(attribute)}setSyncedThemeProperty(state,property2,value){let mutation=state.properties.get(property2);mutation||(mutation={original:state.target.style.getPropertyValue(property2),originalPriority:state.target.style.getPropertyPriority(property2),applied:state.target.style.getPropertyValue(property2),appliedPriority:state.target.style.getPropertyPriority(property2)},state.properties.set(property2,mutation)),value===null?state.target.style.removeProperty(property2):state.target.style.setProperty(property2,value),mutation.applied=state.target.style.getPropertyValue(property2),mutation.appliedPriority=state.target.style.getPropertyPriority(property2)}restoreTheme(){const state=this.themeSyncState;if(state)try{if(this.contentDocument?.documentElement!==state.target)return;for(const[className,mutation]of state.classes)state.target.classList.contains(className)===mutation.applied&&state.target.classList.toggle(className,mutation.original);for(const[attribute,mutation]of state.attributes)state.target.getAttribute(attribute)===mutation.applied&&(mutation.original===null?state.target.removeAttribute(attribute):state.target.setAttribute(attribute,mutation.original));for(const[property2,mutation]of state.properties)state.target.style.getPropertyValue(property2)!==mutation.applied||state.target.style.getPropertyPriority(property2)!==mutation.appliedPriority||(mutation.original?state.target.style.setProperty(property2,mutation.original,mutation.originalPriority):state.target.style.removeProperty(property2))}catch{}finally{this.resetThemeSyncState()}}resetThemeSyncState(){this.themeSyncState=void 0,this.syncedThemeClasses.clear(),this.syncedThemeProperties.clear()}renderControls(){return this.withoutControls?nothing:html`<div
2
2
  part="controls"
3
3
  role="group"
4
4
  aria-label=${this.localize("zoomControls")}
@@ -1,8 +1,8 @@
1
- import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraSize,type LyraVariant}from'../../../internal/variants.js';
1
+ import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraSize}from'../../../internal/variants.js';import{type SemanticVariant}from'../../../internal/semantic-variant.js';
2
2
  /** Shoelace's physical countdown direction. */
3
3
  export type AlertCountdown='rtl'|'ltr'|undefined;
4
- /** Shoelace's alert tones; `primary` resolves through Lyra's shared brand row. */
5
- export type AlertVariant=Exclude<LyraVariant,'brand'> |'primary';export interface LyraAlertEventMap{'lr-show':CustomEvent<null>;'lr-after-show':CustomEvent<null>;'lr-hide':CustomEvent<null>;'lr-after-hide':CustomEvent<null>;}
4
+ /** Alert tones; `primary` and `brand` resolve through Lyra's shared brand row. */
5
+ export type AlertVariant=SemanticVariant;export interface LyraAlertEventMap{'lr-show':CustomEvent<null>;'lr-after-show':CustomEvent<null>;'lr-hide':CustomEvent<null>;'lr-after-hide':CustomEvent<null>;}
6
6
  /**
7
7
  * `<lr-alert>` — a closed-by-default inline alert that can also move into the shared toast stack.
8
8
  * It mirrors the public `<sl-alert>` contract under the `lr-` prefix. `lr-show`/`lr-hide` are
@@ -1,4 +1,4 @@
1
- import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{closeIcon}from"../../../internal/icons.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{renderInertPresentation}from"../../../internal/inert-presentation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{tag}from"../../../internal/prefix.js";import{prefersReducedMotion}from"../../../internal/motion.js";import{finiteDuration}from"../../../internal/numbers.js";import{composedContains,deepActiveElement}from"../../../internal/overlay-manager.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{literalSetConverter,optionalLiteralSetConverter}from"../../../internal/converters.js";import{normalizeReflectedOptionalSize,optionalSizeConverter}from"../../../internal/variants.js";import{contextualSizes}from"../../../internal/contextual-vocabulary.styles.js";import{variants}from"../../../internal/variants.styles.js";import{getToastRegion}from"../toast/toast-region.js";import{TOAST_REGION_ENQUEUE,TOAST_REGION_EVICT,TOAST_REGION_REJECT,TOAST_REGION_SET_ACTIVE,toastRegionControllerFor}from"../toast/toast-region-protocol.js";import{styles}from"./alert.styles.js";import{LYRA_DEFAULT_close}from"../../../internal/default-strings.generated.js";const ALERT_VARIANT=literalSetConverter(["neutral","primary","success","warning","danger"],"primary"),ALERT_COUNTDOWN=optionalLiteralSetConverter(["rtl","ltr"]);class LyraAlert extends LyraElement{static{this.defaultStrings={...super.defaultStrings,close:LYRA_DEFAULT_close}}static{this.styles=[LyraElement.styles,variants,contextualSizes,styles]}get open(){return this._open}set open(next){this.requestOpenState(!!next)}requestOpenState(normalized){if(normalized===this._open)return!0;if(this.openRequest)return this.openRequest.target===normalized;const repair=normalized?null:captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));let request;if(this.hasUpdated){let resolve,reject;const completion=new Promise((resolveCompletion,rejectCompletion)=>{resolve=resolveCompletion,reject=rejectCompletion});if(request={target:normalized,completion,resolve,reject,settled:!1,cancelled:!1},this.openRequest=request,this.transitionPromise=completion,this.emit(normalized?"lr-show":"lr-hide",null,{cancelable:!0}).defaultPrevented)return this.toggleAttribute("open",this._open),this.openRequest===request&&(this.openRequest=void 0),this.cancelTransition(request),!1}this.transitionRequest&&this.cancelTransition(this.transitionRequest);const previous=this._open;return repair&&applyComposedFocusRepair(repair),this._open=normalized,this.requestUpdate("open",previous),request&&(this.openRequest===request&&(this.openRequest=void 0),this.transitionRequest=request,this.runTransition(request)),!0}get size(){return this._size}set size(next){const normalized=normalizeReflectedOptionalSize(this,next),old=this._size;old!==normalized&&(this._size=normalized,this.requestUpdate("size",old))}get countdown(){return this._countdown}set countdown(next){const normalized=ALERT_COUNTDOWN.normalizeReflected(this,"countdown",next),old=this._countdown;old!==normalized&&(this._countdown=normalized,this.requestUpdate("countdown",old))}get variant(){return this._variant}set variant(next){const normalized=ALERT_VARIANT.normalizeReflected(this,"variant",next),old=this._variant;old!==normalized&&(this._variant=normalized,this.requestUpdate("variant",old))}constructor(){super(),this.role="alert",this._open=!1,this.closable=!1,this.duration=1/0,this._variant="primary",this.slotPresence=new SlotPresenceController(this),this.transitionToken=0,this.transitionPromise=Promise.resolve(),this.hovering=!1,this.focused=!1,this.toastConnectionGeneration=0,this.toastLifecycleGeneration=0,this.toastRegionActive=!1,this.toastActivationStarted=!1,this.onPointerEnter=()=>{this.hovering=!0,this.clearAutoHide()},this.onPointerLeave=()=>{this.hovering=!1,this.focused||this.restartAutoHide()},this.onFocusIn=event=>{const previous=event.relatedTarget;previous?.nodeType===1&&!composedContains(this,previous)&&previous.isConnected&&(this.focusReturnTarget=previous);const activeElement=deepActiveElement(this.ownerDocument);this.pendingFocusRepair=activeElement&&typeof activeElement.focus=="function"?captureComposedFocusRepair(this,activeElement)??void 0:void 0,this.focused=!0,this.clearAutoHide()},this.onFocusOut=event=>{const next=event.relatedTarget;if(!(next!==null&&next.nodeType===1&&composedContains(this,next))){if(next===null){const parent=this.parentElement,clearIfStillOwned=()=>{this.isConnected&&this.parentElement===parent&&(this.pendingFocusRepair=void 0)},view=this.ownerDocument.defaultView;view?view.queueMicrotask(clearIfStillOwned):queueMicrotask(clearIfStillOwned)}else{const external=next;external.isConnected&&(this.focusReturnTarget=external),this.pendingFocusRepair=void 0}this.focused=!1,this.hovering||this.restartAutoHide()}},this.close=()=>{this.hide()},this.addEventListener("pointerenter",this.onPointerEnter),this.addEventListener("pointerleave",this.onPointerLeave),this.addEventListener("focusin",event=>this.onFocusIn(event)),this.addEventListener("focusout",event=>this.onFocusOut(event))}connectedCallback(){if(super.connectedCallback(),this.toastConnectionGeneration+=1,this.hasAttribute("role")||this.setAttribute("role","alert"),this.toastPromise){const currentController=toastRegionControllerFor(this);currentController&&currentController!==this.toastRegionOwner&&currentController[TOAST_REGION_ENQUEUE](this);const completion=this.toastPromise,generation=this.toastLifecycleGeneration,owner=this.toastRegionOwner;if(owner&&this.parentElement!==owner){const settleLostOwnership=()=>{this.toastPromise===completion&&this.toastLifecycleGeneration===generation&&this.parentElement!==owner&&this.finishToast()},view=this.ownerDocument.defaultView;view?view.queueMicrotask(settleLostOwnership):queueMicrotask(settleLostOwnership)}if(!this.toastRegionActive)return;this.beginToastActivation()}if(this.transitionRequest){this.runTransition(this.transitionRequest);return}if(!this.hasUpdated||!this.open)return;this.removeAttribute("data-alert-showing"),this.removeAttribute("data-alert-hiding");const ownerDocument=this.ownerDocument;ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.ownerDocument===ownerDocument&&this.open&&this.restartAutoHide()})}disconnectedCallback(){const activeElement=deepActiveElement(this.ownerDocument);!this.pendingFocusRepair&&activeElement&&typeof activeElement.focus=="function"&&(this.pendingFocusRepair=captureComposedFocusRepair(this,activeElement)??void 0);const toastConnectionGeneration=++this.toastConnectionGeneration,transitionBelongedToToast=!!this.toastPromise;this.transitionToken++,this.clearAutoHide(),this.removeAttribute("data-alert-showing"),this.removeAttribute("data-alert-hiding"),this.hovering=!1,this.focused=!1;const settleLastingToastDisconnect=()=>{toastConnectionGeneration===this.toastConnectionGeneration&&!this.isConnected&&this.toastPromise&&this.finishToast(),toastConnectionGeneration===this.toastConnectionGeneration&&!this.isConnected&&this.transitionRequest&&(transitionBelongedToToast?this.cancelTransition(this.transitionRequest):this.settleTransitionCompletion(this.transitionRequest))},view=this.ownerDocument.defaultView;view?view.queueMicrotask(settleLastingToastDisconnect):queueMicrotask(settleLastingToastDisconnect),super.disconnectedCallback()}firstUpdated(changed){super.firstUpdated(changed),this.open&&this.restartAutoHide()}updated(changed){super.updated(changed),this.open&&!changed.has("open")&&(changed.has("duration")||changed.has("countdown"))&&this.restartAutoHide()}async show(){this.hasUpdated||await this.updateComplete,this.open||this.requestOpenState(!0),await this.transitionPromise}async hide(){this.hasUpdated||await this.updateComplete,this.open&&this.requestOpenState(!1),await this.transitionPromise}toast(){if(this.toastPromise)return this.toastPromise;let resolveCompletion;const completion=new Promise(resolve=>{resolveCompletion=resolve});this.toastPromise=completion,this.toastResolve=resolveCompletion,this.toastLifecycleGeneration+=1,this.toastActivationStarted=!1;const onAfterHide=()=>{this.toastRegionOwner&&this.parentElement===this.toastRegionOwner&&this.remove(),this.finishToast()};this.toastAfterHide=onAfterHide,this.addEventListener("lr-after-hide",onAfterHide,{once:!0});const enqueue=()=>{if(this.toastPromise!==completion)return;const region=getToastRegion(void 0,this.ownerDocument),controller=region;typeof controller[TOAST_REGION_ENQUEUE]=="function"?controller[TOAST_REGION_ENQUEUE](this):(region.childElementCount===0&&region.remove(),this.remove(),this.finishToast())};return this.ownerDocument.defaultView?.customElements.get(tag("toast"))?enqueue():import("../toast/toast.js").then(enqueue,enqueue),completion}[TOAST_REGION_SET_ACTIVE](owner,active){if(this.parentElement!==owner)return;let resolvedFocusTarget;const focusTarget=()=>(resolvedFocusTarget!==void 0||(resolvedFocusTarget=this.focusReturnTarget?.isConnected&&!composedContains(this,this.focusReturnTarget)?this.focusReturnTarget:nearestExternalFocusTarget(this)),resolvedFocusTarget),focusRepair=active?this.pendingFocusRepair:this.pendingFocusRepair??captureComposedFocusRepair(this,focusTarget),returnFocusTarget=!active&&focusRepair?focusTarget():null;this.toastRegionOwner=owner,this.toastRegionActive=active,this.toggleAttribute("data-toast-queued",!active);const base=this.base;base&&(base.hidden=!active,base.inert=!active),this.requestUpdate(),active?(focusRepair&&applyComposedFocusRepair(focusRepair),this.pendingFocusRepair=void 0,this.transitionRequest&&this.runTransition(this.transitionRequest),this.beginToastActivation()):(this.transitionToken+=1,focusRepair&&applyComposedFocusRepair(focusRepair,returnFocusTarget),this.pendingFocusRepair=void 0,this.clearAutoHide())}[TOAST_REGION_EVICT](owner,_reason){this.toastRegionOwner===owner&&(this.toastRegionOwner=void 0,this.toastRegionActive=!1,this.removeAttribute("data-toast-queued"),this.parentElement===owner&&this.remove(),this.finishToast())}beginToastActivation(){const completion=this.toastPromise,owner=this.toastRegionOwner;if(!completion||!owner||!this.toastRegionActive||this.toastActivationStarted)return;this.toastActivationStarted=!0;const generation=this.toastLifecycleGeneration;this.updateComplete.then(()=>{if(this.toastPromise!==completion||this.toastLifecycleGeneration!==generation||this.toastRegionOwner!==owner||!this.toastRegionActive||!this.isConnected||this.parentElement!==owner)return;if(this.open){this.restartAutoHide();return}if(!this.requestOpenState(!0))if(this.toastPromise===completion&&this.toastLifecycleGeneration===generation&&this.toastRegionOwner===owner&&this.parentElement===owner){const controller=owner;typeof controller[TOAST_REGION_REJECT]=="function"?controller[TOAST_REGION_REJECT](this):(this.parentElement===owner&&this.remove(),this.finishToast())}else this.toastPromise===completion&&this.finishToast()})}finishToast(){this.toastAfterHide&&this.removeEventListener("lr-after-hide",this.toastAfterHide);const resolve=this.toastResolve;if(this.toastAfterHide=void 0,this.toastResolve=void 0,this.toastPromise=void 0,this.toastRegionOwner=void 0,this.toastRegionActive=!1,this.toastActivationStarted=!1,this.toastLifecycleGeneration+=1,this.removeAttribute("data-toast-queued"),this.requestUpdate(),this.isConnected){const base=this.base;base&&(base.hidden=!1,base.inert=!1),this.pendingFocusRepair&&(applyComposedFocusRepair(this.pendingFocusRepair),this.pendingFocusRepair=void 0)}resolve?.()}settleTransitionCompletion(request){request.settled||(request.settled=!0,request.resolve())}cancelTransition(request){request.cancelled=!0,this.transitionRequest===request&&(this.transitionRequest=void 0),this.openRequest===request&&(this.openRequest=void 0),this.settleTransitionCompletion(request)}finishTransition(request){request.cancelled||(this.transitionRequest===request&&(this.transitionRequest=void 0),this.openRequest===request&&(this.openRequest=void 0),this.settleTransitionCompletion(request))}async runTransition(request){if(request.cancelled||this.transitionRequest!==request||this.toastPromise&&!this.toastRegionActive)return;const opening=request.target,token=++this.transitionToken;if(this.clearAutoHide(),opening)this.removeAttribute("data-alert-hiding"),this.setAttribute("data-alert-showing","");else{const base2=this.base;base2&&base2.offsetWidth,this.removeAttribute("data-alert-showing"),this.setAttribute("data-alert-hiding","")}if(await this.updateComplete,!this.isConnected||token!==this.transitionToken||this.transitionRequest!==request)return;const base=this.base;if(opening){if(base&&base.offsetWidth,await this.nextFrame(),!this.isConnected||token!==this.transitionToken||this.transitionRequest!==request)return;this.removeAttribute("data-alert-showing")}await this.waitForMotion(base),!(!this.isConnected||token!==this.transitionToken||this.transitionRequest!==request)&&(opening?(this.emit("lr-after-show"),this.restartAutoHide()):(this.removeAttribute("data-alert-hiding"),this.emit("lr-after-hide")),this.finishTransition(request))}get base(){return this.shadowRoot?.querySelector('[part="base"]')??null}nextFrame(){const view=this.ownerDocument.defaultView;return!view||prefersReducedMotion(this)?Promise.resolve():new Promise(resolve=>view.requestAnimationFrame(()=>resolve()))}async waitForMotion(base){const view=this.ownerDocument.defaultView;if(!base||!view||prefersReducedMotion(this))return;view.getComputedStyle(base).opacity;const animations=base.getAnimations({subtree:!0});await Promise.all(animations.map(animation=>animation.finished.catch(()=>{})))}get safeDuration(){return this.duration===1/0?1/0:finiteDuration(this.duration,0,0)}clearAutoHide(){this.timer!==void 0&&this.timerOwner?.clearTimeout(this.timer),this.timer=void 0,this.timerOwner=void 0,this.countdownAnimation?.cancel(),this.countdownAnimation=void 0}restartAutoHide(){if(this.clearAutoHide(),this.toastPromise&&!this.toastRegionActive||!this.open||this.hovering||this.focused)return;const duration=this.safeDuration;if(duration===1/0)return;if(duration<=0){const ownerDocument=this.ownerDocument;ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.ownerDocument===ownerDocument&&this.open&&!this.hovering&&!this.focused&&this.hide()});return}const view=this.ownerDocument.defaultView;view&&(this.timerOwner=view,this.timer=view.setTimeout(()=>{this.timer=void 0,this.timerOwner=void 0,this.hide()},duration),this.startCountdown(duration))}startCountdown(duration){if(prefersReducedMotion(this)||this.countdown!=="ltr"&&this.countdown!=="rtl")return;const indicator=this.shadowRoot?.querySelector(".countdown");indicator&&(this.countdownAnimation=indicator.animate([{transform:"scaleX(1)"},{transform:"scaleX(0)"}],{duration,easing:"linear",fill:"forwards"}))}render(){const hasCountdown=this.countdown==="ltr"||this.countdown==="rtl",countdownOrigin=this.countdown==="rtl"?"right center":"left center";return html`
1
+ import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{closeIcon}from"../../../internal/icons.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{renderInertPresentation}from"../../../internal/inert-presentation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{tag}from"../../../internal/prefix.js";import{prefersReducedMotion}from"../../../internal/motion.js";import{finiteDuration}from"../../../internal/numbers.js";import{composedContains,deepActiveElement}from"../../../internal/overlay-manager.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{optionalLiteralSetConverter}from"../../../internal/converters.js";import{normalizeReflectedOptionalSize,optionalSizeConverter}from"../../../internal/variants.js";import{contextualSizes}from"../../../internal/contextual-vocabulary.styles.js";import{semanticVariantConverter}from"../../../internal/semantic-variant.js";import{variants}from"../../../internal/variants.styles.js";import{getToastRegion}from"../toast/toast-region.js";import{TOAST_REGION_ENQUEUE,TOAST_REGION_EVICT,TOAST_REGION_REJECT,TOAST_REGION_SET_ACTIVE,toastRegionControllerFor}from"../toast/toast-region-protocol.js";import{styles}from"./alert.styles.js";import{LYRA_DEFAULT_close}from"../../../internal/default-strings.generated.js";const ALERT_VARIANT=semanticVariantConverter("primary"),ALERT_COUNTDOWN=optionalLiteralSetConverter(["rtl","ltr"]);class LyraAlert extends LyraElement{static{this.defaultStrings={...super.defaultStrings,close:LYRA_DEFAULT_close}}static{this.styles=[LyraElement.styles,variants,contextualSizes,styles]}get open(){return this._open}set open(next){this.requestOpenState(!!next)}requestOpenState(normalized){if(normalized===this._open)return!0;if(this.openRequest)return this.openRequest.target===normalized;const repair=normalized?null:captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));let request;if(this.hasUpdated){let resolve,reject;const completion=new Promise((resolveCompletion,rejectCompletion)=>{resolve=resolveCompletion,reject=rejectCompletion});if(request={target:normalized,completion,resolve,reject,settled:!1,cancelled:!1},this.openRequest=request,this.transitionPromise=completion,this.emit(normalized?"lr-show":"lr-hide",null,{cancelable:!0}).defaultPrevented)return this.toggleAttribute("open",this._open),this.openRequest===request&&(this.openRequest=void 0),this.cancelTransition(request),!1}this.transitionRequest&&this.cancelTransition(this.transitionRequest);const previous=this._open;return repair&&applyComposedFocusRepair(repair),this._open=normalized,this.requestUpdate("open",previous),request&&(this.openRequest===request&&(this.openRequest=void 0),this.transitionRequest=request,this.runTransition(request)),!0}get size(){return this._size}set size(next){const normalized=normalizeReflectedOptionalSize(this,next),old=this._size;old!==normalized&&(this._size=normalized,this.requestUpdate("size",old))}get countdown(){return this._countdown}set countdown(next){const normalized=ALERT_COUNTDOWN.normalizeReflected(this,"countdown",next),old=this._countdown;old!==normalized&&(this._countdown=normalized,this.requestUpdate("countdown",old))}get variant(){return this._variant}set variant(next){const normalized=ALERT_VARIANT.normalizeReflected(this,"variant",next),old=this._variant;old!==normalized&&(this._variant=normalized,this.requestUpdate("variant",old))}constructor(){super(),this.role="alert",this._open=!1,this.closable=!1,this.duration=1/0,this._variant="primary",this.slotPresence=new SlotPresenceController(this),this.transitionToken=0,this.transitionPromise=Promise.resolve(),this.hovering=!1,this.focused=!1,this.toastConnectionGeneration=0,this.toastLifecycleGeneration=0,this.toastRegionActive=!1,this.toastActivationStarted=!1,this.onPointerEnter=()=>{this.hovering=!0,this.clearAutoHide()},this.onPointerLeave=()=>{this.hovering=!1,this.focused||this.restartAutoHide()},this.onFocusIn=event=>{const previous=event.relatedTarget;previous?.nodeType===1&&!composedContains(this,previous)&&previous.isConnected&&(this.focusReturnTarget=previous);const activeElement=deepActiveElement(this.ownerDocument);this.pendingFocusRepair=activeElement&&typeof activeElement.focus=="function"?captureComposedFocusRepair(this,activeElement)??void 0:void 0,this.focused=!0,this.clearAutoHide()},this.onFocusOut=event=>{const next=event.relatedTarget;if(!(next!==null&&next.nodeType===1&&composedContains(this,next))){if(next===null){const parent=this.parentElement,clearIfStillOwned=()=>{this.isConnected&&this.parentElement===parent&&(this.pendingFocusRepair=void 0)},view=this.ownerDocument.defaultView;view?view.queueMicrotask(clearIfStillOwned):queueMicrotask(clearIfStillOwned)}else{const external=next;external.isConnected&&(this.focusReturnTarget=external),this.pendingFocusRepair=void 0}this.focused=!1,this.hovering||this.restartAutoHide()}},this.close=()=>{this.hide()},this.addEventListener("pointerenter",this.onPointerEnter),this.addEventListener("pointerleave",this.onPointerLeave),this.addEventListener("focusin",event=>this.onFocusIn(event)),this.addEventListener("focusout",event=>this.onFocusOut(event))}connectedCallback(){if(super.connectedCallback(),this.toastConnectionGeneration+=1,this.hasAttribute("role")||this.setAttribute("role","alert"),this.toastPromise){const currentController=toastRegionControllerFor(this);currentController&&currentController!==this.toastRegionOwner&&currentController[TOAST_REGION_ENQUEUE](this);const completion=this.toastPromise,generation=this.toastLifecycleGeneration,owner=this.toastRegionOwner;if(owner&&this.parentElement!==owner){const settleLostOwnership=()=>{this.toastPromise===completion&&this.toastLifecycleGeneration===generation&&this.parentElement!==owner&&this.finishToast()},view=this.ownerDocument.defaultView;view?view.queueMicrotask(settleLostOwnership):queueMicrotask(settleLostOwnership)}if(!this.toastRegionActive)return;this.beginToastActivation()}if(this.transitionRequest){this.runTransition(this.transitionRequest);return}if(!this.hasUpdated||!this.open)return;this.removeAttribute("data-alert-showing"),this.removeAttribute("data-alert-hiding");const ownerDocument=this.ownerDocument;ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.ownerDocument===ownerDocument&&this.open&&this.restartAutoHide()})}disconnectedCallback(){const activeElement=deepActiveElement(this.ownerDocument);!this.pendingFocusRepair&&activeElement&&typeof activeElement.focus=="function"&&(this.pendingFocusRepair=captureComposedFocusRepair(this,activeElement)??void 0);const toastConnectionGeneration=++this.toastConnectionGeneration,transitionBelongedToToast=!!this.toastPromise;this.transitionToken++,this.clearAutoHide(),this.removeAttribute("data-alert-showing"),this.removeAttribute("data-alert-hiding"),this.hovering=!1,this.focused=!1;const settleLastingToastDisconnect=()=>{toastConnectionGeneration===this.toastConnectionGeneration&&!this.isConnected&&this.toastPromise&&this.finishToast(),toastConnectionGeneration===this.toastConnectionGeneration&&!this.isConnected&&this.transitionRequest&&(transitionBelongedToToast?this.cancelTransition(this.transitionRequest):this.settleTransitionCompletion(this.transitionRequest))},view=this.ownerDocument.defaultView;view?view.queueMicrotask(settleLastingToastDisconnect):queueMicrotask(settleLastingToastDisconnect),super.disconnectedCallback()}firstUpdated(changed){super.firstUpdated(changed),this.open&&this.restartAutoHide()}updated(changed){super.updated(changed),this.open&&!changed.has("open")&&(changed.has("duration")||changed.has("countdown"))&&this.restartAutoHide()}async show(){this.hasUpdated||await this.updateComplete,this.open||this.requestOpenState(!0),await this.transitionPromise}async hide(){this.hasUpdated||await this.updateComplete,this.open&&this.requestOpenState(!1),await this.transitionPromise}toast(){if(this.toastPromise)return this.toastPromise;let resolveCompletion;const completion=new Promise(resolve=>{resolveCompletion=resolve});this.toastPromise=completion,this.toastResolve=resolveCompletion,this.toastLifecycleGeneration+=1,this.toastActivationStarted=!1;const onAfterHide=()=>{this.toastRegionOwner&&this.parentElement===this.toastRegionOwner&&this.remove(),this.finishToast()};this.toastAfterHide=onAfterHide,this.addEventListener("lr-after-hide",onAfterHide,{once:!0});const enqueue=()=>{if(this.toastPromise!==completion)return;const region=getToastRegion(void 0,this.ownerDocument),controller=region;typeof controller[TOAST_REGION_ENQUEUE]=="function"?controller[TOAST_REGION_ENQUEUE](this):(region.childElementCount===0&&region.remove(),this.remove(),this.finishToast())};return this.ownerDocument.defaultView?.customElements.get(tag("toast"))?enqueue():import("../toast/toast.js").then(enqueue,enqueue),completion}[TOAST_REGION_SET_ACTIVE](owner,active){if(this.parentElement!==owner)return;let resolvedFocusTarget;const focusTarget=()=>(resolvedFocusTarget!==void 0||(resolvedFocusTarget=this.focusReturnTarget?.isConnected&&!composedContains(this,this.focusReturnTarget)?this.focusReturnTarget:nearestExternalFocusTarget(this)),resolvedFocusTarget),focusRepair=active?this.pendingFocusRepair:this.pendingFocusRepair??captureComposedFocusRepair(this,focusTarget),returnFocusTarget=!active&&focusRepair?focusTarget():null;this.toastRegionOwner=owner,this.toastRegionActive=active,this.toggleAttribute("data-toast-queued",!active);const base=this.base;base&&(base.hidden=!active,base.inert=!active),this.requestUpdate(),active?(focusRepair&&applyComposedFocusRepair(focusRepair),this.pendingFocusRepair=void 0,this.transitionRequest&&this.runTransition(this.transitionRequest),this.beginToastActivation()):(this.transitionToken+=1,focusRepair&&applyComposedFocusRepair(focusRepair,returnFocusTarget),this.pendingFocusRepair=void 0,this.clearAutoHide())}[TOAST_REGION_EVICT](owner,_reason){this.toastRegionOwner===owner&&(this.toastRegionOwner=void 0,this.toastRegionActive=!1,this.removeAttribute("data-toast-queued"),this.parentElement===owner&&this.remove(),this.finishToast())}beginToastActivation(){const completion=this.toastPromise,owner=this.toastRegionOwner;if(!completion||!owner||!this.toastRegionActive||this.toastActivationStarted)return;this.toastActivationStarted=!0;const generation=this.toastLifecycleGeneration;this.updateComplete.then(()=>{if(this.toastPromise!==completion||this.toastLifecycleGeneration!==generation||this.toastRegionOwner!==owner||!this.toastRegionActive||!this.isConnected||this.parentElement!==owner)return;if(this.open){this.restartAutoHide();return}if(!this.requestOpenState(!0))if(this.toastPromise===completion&&this.toastLifecycleGeneration===generation&&this.toastRegionOwner===owner&&this.parentElement===owner){const controller=owner;typeof controller[TOAST_REGION_REJECT]=="function"?controller[TOAST_REGION_REJECT](this):(this.parentElement===owner&&this.remove(),this.finishToast())}else this.toastPromise===completion&&this.finishToast()})}finishToast(){this.toastAfterHide&&this.removeEventListener("lr-after-hide",this.toastAfterHide);const resolve=this.toastResolve;if(this.toastAfterHide=void 0,this.toastResolve=void 0,this.toastPromise=void 0,this.toastRegionOwner=void 0,this.toastRegionActive=!1,this.toastActivationStarted=!1,this.toastLifecycleGeneration+=1,this.removeAttribute("data-toast-queued"),this.requestUpdate(),this.isConnected){const base=this.base;base&&(base.hidden=!1,base.inert=!1),this.pendingFocusRepair&&(applyComposedFocusRepair(this.pendingFocusRepair),this.pendingFocusRepair=void 0)}resolve?.()}settleTransitionCompletion(request){request.settled||(request.settled=!0,request.resolve())}cancelTransition(request){request.cancelled=!0,this.transitionRequest===request&&(this.transitionRequest=void 0),this.openRequest===request&&(this.openRequest=void 0),this.settleTransitionCompletion(request)}finishTransition(request){request.cancelled||(this.transitionRequest===request&&(this.transitionRequest=void 0),this.openRequest===request&&(this.openRequest=void 0),this.settleTransitionCompletion(request))}async runTransition(request){if(request.cancelled||this.transitionRequest!==request||this.toastPromise&&!this.toastRegionActive)return;const opening=request.target,token=++this.transitionToken;if(this.clearAutoHide(),opening)this.removeAttribute("data-alert-hiding"),this.setAttribute("data-alert-showing","");else{const base2=this.base;base2&&base2.offsetWidth,this.removeAttribute("data-alert-showing"),this.setAttribute("data-alert-hiding","")}if(await this.updateComplete,!this.isConnected||token!==this.transitionToken||this.transitionRequest!==request)return;const base=this.base;if(opening){if(base&&base.offsetWidth,await this.nextFrame(),!this.isConnected||token!==this.transitionToken||this.transitionRequest!==request)return;this.removeAttribute("data-alert-showing")}await this.waitForMotion(base),!(!this.isConnected||token!==this.transitionToken||this.transitionRequest!==request)&&(opening?(this.emit("lr-after-show"),this.restartAutoHide()):(this.removeAttribute("data-alert-hiding"),this.emit("lr-after-hide")),this.finishTransition(request))}get base(){return this.shadowRoot?.querySelector('[part="base"]')??null}nextFrame(){const view=this.ownerDocument.defaultView;return!view||prefersReducedMotion(this)?Promise.resolve():new Promise(resolve=>view.requestAnimationFrame(()=>resolve()))}async waitForMotion(base){const view=this.ownerDocument.defaultView;if(!base||!view||prefersReducedMotion(this))return;view.getComputedStyle(base).opacity;const animations=base.getAnimations({subtree:!0});await Promise.all(animations.map(animation=>animation.finished.catch(()=>{})))}get safeDuration(){return this.duration===1/0?1/0:finiteDuration(this.duration,0,0)}clearAutoHide(){this.timer!==void 0&&this.timerOwner?.clearTimeout(this.timer),this.timer=void 0,this.timerOwner=void 0,this.countdownAnimation?.cancel(),this.countdownAnimation=void 0}restartAutoHide(){if(this.clearAutoHide(),this.toastPromise&&!this.toastRegionActive||!this.open||this.hovering||this.focused)return;const duration=this.safeDuration;if(duration===1/0)return;if(duration<=0){const ownerDocument=this.ownerDocument;ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.ownerDocument===ownerDocument&&this.open&&!this.hovering&&!this.focused&&this.hide()});return}const view=this.ownerDocument.defaultView;view&&(this.timerOwner=view,this.timer=view.setTimeout(()=>{this.timer=void 0,this.timerOwner=void 0,this.hide()},duration),this.startCountdown(duration))}startCountdown(duration){if(prefersReducedMotion(this)||this.countdown!=="ltr"&&this.countdown!=="rtl")return;const indicator=this.shadowRoot?.querySelector(".countdown");indicator&&(this.countdownAnimation=indicator.animate([{transform:"scaleX(1)"},{transform:"scaleX(0)"}],{duration,easing:"linear",fill:"forwards"}))}render(){const hasCountdown=this.countdown==="ltr"||this.countdown==="rtl",countdownOrigin=this.countdown==="rtl"?"right center":"left center";return html`
2
2
  <div
3
3
  part="base"
4
4
  ?hidden=${!!(this.toastPromise&&!this.toastRegionActive)}
@@ -1,6 +1,6 @@
1
- import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement,type LyraEventMap}from'../../../internal/lyra-element.js';import{type LyraAppearance,type LyraSize,type LyraSizeStep,type LyraVariant}from'../../../internal/variants.js';
1
+ import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement,type LyraEventMap}from'../../../internal/lyra-element.js';import{type LyraAppearance,type LyraSize,type LyraSizeStep,type LyraVariant}from'../../../internal/variants.js';import{type SemanticVariant}from'../../../internal/semantic-variant.js';
2
2
  /** The library's semantic-tone vocabulary plus Shoelace's spelling for the brand tone. */
3
- export type BadgeVariant=LyraVariant|'primary';
3
+ export type BadgeVariant=SemanticVariant;
4
4
  /** The library's one size ladder, including both upstream long-form spellings. */
5
5
  export type BadgeSize=LyraSize;
6
6
  /** Visual treatment of a labelled surface: how much of the variant palette is spent on fill,
@@ -1,4 +1,4 @@
1
- import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{normalizeSize}from"../../../internal/variants.js";import{variants}from"../../../internal/variants.styles.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{styles}from"./badge.styles.js";class LyraBadge extends LyraElement{constructor(){super(...arguments),this.variant="neutral",this.size="m",this.appearance="filled-outlined",this.pill=!1,this.attention="none",this.pulse=!1,this.slotPresence=new SlotPresenceController(this)}static{this.styles=[LyraElement.styles,variants,styles]}get effectiveVariant(){const value=this.variant;return value==="primary"?"brand":["neutral","brand","success","warning","danger"].includes(value)?value:"neutral"}get effectiveSize(){const value=this.size;return["2xs","xs","s","m","l","xl","small","medium","large"].includes(value)?normalizeSize(value):"m"}willUpdate(changed){super.willUpdate(changed),this.setAttribute("data-effective-variant",this.effectiveVariant),this.setAttribute("data-effective-size",this.effectiveSize)}renderTrailing(){return nothing}render(){return html`<span part="base badge">
1
+ import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{normalizeSize}from"../../../internal/variants.js";import{effectiveSemanticVariant}from"../../../internal/semantic-variant.js";import{variants}from"../../../internal/variants.styles.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{styles}from"./badge.styles.js";class LyraBadge extends LyraElement{constructor(){super(...arguments),this.variant="neutral",this.size="m",this.appearance="filled-outlined",this.pill=!1,this.attention="none",this.pulse=!1,this.slotPresence=new SlotPresenceController(this)}static{this.styles=[LyraElement.styles,variants,styles]}get effectiveVariant(){return effectiveSemanticVariant(this.variant)}get effectiveSize(){const value=this.size;return["2xs","xs","s","m","l","xl","small","medium","large"].includes(value)?normalizeSize(value):"m"}willUpdate(changed){super.willUpdate(changed),this.setAttribute("data-effective-variant",this.effectiveVariant),this.setAttribute("data-effective-size",this.effectiveSize)}renderTrailing(){return nothing}render(){return html`<span part="base badge">
2
2
  <span part="start" ?hidden=${!this.slotPresence.has("start")}>
3
3
  <slot name="start"></slot>
4
4
  </span>
@@ -37,7 +37,9 @@ export type TagVariant=BadgeVariant|'text';
37
37
  export declare class LyraTag extends LyraBadge<LyraTagEventMap,TagVariant>{static styles:import("lit").CSSResultGroup[];static properties:{withRemove:{attribute:string;type:BooleanConstructor;noAccessor:boolean;};removable:{attribute:string;type:BooleanConstructor;noAccessor:boolean;};};protected get effectiveVariant():LyraVariant;
38
38
  /** Opaque consumer bookkeeping value, echoed verbatim in `lr-remove`'s detail (`undefined` when
39
39
  * never set) -- never read, validated or rendered by the tag itself. */
40
- value?:string;private removeEnabled;private changingRemoveAliasAttribute;
40
+ value?:string;
41
+ /** Disables the remove button and suppresses `lr-remove`; a plain tag has no action to gate. */
42
+ disabled:boolean;private removeEnabled;private changingRemoveAliasAttribute;
41
43
  /** Renders the remove affordance. Either mirrored attribute enables the shared state; assigning
42
44
  * false through either property clears both attributes so the write reads back truthfully. */
43
45
  get withRemove():boolean;set withRemove(next:boolean);
@@ -1,8 +1,9 @@
1
- import{__decorate}from"tslib";import{AccessibleTextController}from"../../../internal/accessible-text-controller.js";import{html,nothing}from"lit";import{property,query,state}from"lit/decorators.js";import{composedAccessibilityText,isAccessibilitySubtreeExcluded}from"../../../internal/accessibility-visibility.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{closeIcon}from"../../../internal/icons.js";import{variants}from"../../../internal/variants.styles.js";import{LyraBadge}from"./badge.class.js";import{styles as badgeStyles}from"./badge.styles.js";import{styles as tagStyles}from"./tag.styles.js";import{LYRA_DEFAULT_remove,LYRA_DEFAULT_removeWithContext}from"../../../internal/default-strings.generated.js";function sourceParent(node){if(node.parentElement)return node.parentElement;const root=node.getRootNode();return"host"in root?root.host:null}function isClosedSourceDetailsBranch(details,branch){return details.localName!=="details"||details.hasAttribute("open")||branch===null?!1:Array.from(details.children).find(child=>child.localName==="summary")!==branch}function isSourceLabelAvailable(node){const target=node.nodeType===1?node:sourceParent(node);if(!target?.isConnected)return!1;let branch=target,current=sourceParent(target);if(isAccessibilitySubtreeExcluded(target))return!1;for(;current;){if(isAccessibilitySubtreeExcluded(current)||isClosedSourceDetailsBranch(current,branch))return!1;branch=current,current=sourceParent(current)}return!0}class LyraTag extends LyraBadge{constructor(){super(...arguments),this.removeEnabled=!1,this.changingRemoveAliasAttribute=!1,this.labelTextObserver=new AccessibleTextController(this,[""],()=>{this.syncHostActionRole(),this.updateBrowserDerivedState(()=>this.recomputeLabelText())},["slot","role"],!1),this.managedActionGroupRole=!1,this.labelText="",this.onLabelSlotChange=event=>{const target=event.target;target?.nodeType!==1||target.localName!=="slot"||(this.labelTextObserver.bind(),this.withRemove&&this.updateBrowserDerivedState(()=>this.recomputeLabelText()))},this.onRemoveClick=()=>{if(!this.withRemove)return;const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));this.emit("lr-remove",{value:this.value}),repair&&(!this.isConnected||!this.withRemove)&&applyComposedFocusRepair(repair)}}static{this.defaultStrings={...super.defaultStrings,remove:LYRA_DEFAULT_remove,removeWithContext:LYRA_DEFAULT_removeWithContext}}static{this.styles=[LyraElement.styles,variants,badgeStyles,tagStyles]}static{this.properties={withRemove:{attribute:"with-remove",type:Boolean,noAccessor:!0},removable:{attribute:"removable",type:Boolean,noAccessor:!0}}}get effectiveVariant(){return this.variant==="text"?"neutral":super.effectiveVariant}get withRemove(){return this.removeEnabled}set withRemove(next){this.setRemoveEnabled(!!next,"with-remove")}get removable(){return this.removeEnabled}set removable(next){this.setRemoveEnabled(!!next,"removable")}attributeChangedCallback(name,oldValue,value){const isRemoveAlias=name==="with-remove"||name==="removable";isRemoveAlias&&(this.changingRemoveAliasAttribute=!0);try{super.attributeChangedCallback(name,oldValue,value)}finally{isRemoveAlias&&(this.changingRemoveAliasAttribute=!1)}}setRemoveEnabled(next,preferredAttribute){const old=this.removeEnabled;this.changingRemoveAliasAttribute?this.removeEnabled=this.hasAttribute("with-remove")||this.hasAttribute("removable"):next?(this.setAttribute(preferredAttribute,""),this.removeEnabled=!0):(this.removeAttribute("with-remove"),this.removeAttribute("removable"),this.removeEnabled=!1),old!==this.removeEnabled&&(this.requestUpdate("withRemove",old),this.requestUpdate("removable",old))}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this.onLabelSlotChange),this.syncLabelObserver(),this.hasUpdated?(this.withRemove&&this.recomputeLabelText(!0),this.ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.withRemove&&this.recomputeLabelText()})):this.seedFirstRenderState(()=>this.recomputeLabelText(!0))}disconnectedCallback(){this.removeEventListener("slotchange",this.onLabelSlotChange),this.releaseHostActionRole(),super.disconnectedCallback()}adoptedCallback(){super.adoptedCallback(),this.labelTextObserver.adopted()}syncLabelObserver(){this.labelTextObserver.setEnabled(this.withRemove)}recomputeLabelText(preferLightDom=!1){const slot=this.renderRoot?.querySelector("slot:not([name])"),lightDomNodes=this.childNodes,nodes=slot?slot.assignedNodes({flatten:!0}):Array.from(lightDomNodes??[]).filter(node=>{if(node.nodeType!==1)return!0;const slotName=node.getAttribute("slot");return slotName!=="start"&&slotName!=="end"});this.labelText=nodes.map(node=>composedAccessibilityText(node,{ancestorBoundary:this,isSubtreeExcluded:element=>element.getRootNode()===this.renderRoot&&element.getAttribute("part")?.split(/\s+/).includes("content")?!1:isAccessibilitySubtreeExcluded(element),requireRendered:preferLightDom?!1:node.nodeType!==1||node.localName!=="slot",shouldPruneNode:candidate=>!this.contains(candidate)&&!isSourceLabelAvailable(candidate),ignoreInheritedVisibility:!0})).join(" ").replace(/\s+/g," ").trim()}get accessibleRemoveLabel(){const text=this.labelText;return text?this.localize("removeWithContext",void 0,{label:text}):this.localize("remove")}focus(options){this.withRemove&&this.removeButtonEl?.focus(options)}blur(){this.removeButtonEl?.blur()}click(){if(!this.withRemove){super.click();return}this.removeButtonEl?.click()}willUpdate(changed){if(super.willUpdate(changed),changed.has("withRemove")){if(!this.withRemove){const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));repair&&applyComposedFocusRepair(repair)}this.syncLabelObserver(),this.withRemove&&this.hasUpdated&&this.recomputeLabelText()}}updated(changed){super.updated(changed),this.syncHostActionRole()}syncHostActionRole(){const needsGroup=this.withRemove&&this.hasAttribute("aria-label");needsGroup&&!this.hasAttribute("role")?(this.setAttribute("role","group"),this.managedActionGroupRole=!0):needsGroup||this.releaseHostActionRole()}releaseHostActionRole(){this.managedActionGroupRole&&this.getAttribute("role")==="group"&&this.removeAttribute("role"),this.managedActionGroupRole=!1}renderTrailing(){return this.withRemove?html`<button
1
+ import{__decorate}from"tslib";import{AccessibleTextController}from"../../../internal/accessible-text-controller.js";import{html,nothing}from"lit";import{property,query,state}from"lit/decorators.js";import{composedAccessibilityText,isAccessibilitySubtreeExcluded}from"../../../internal/accessibility-visibility.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{closeIcon}from"../../../internal/icons.js";import{variants}from"../../../internal/variants.styles.js";import{LyraBadge}from"./badge.class.js";import{styles as badgeStyles}from"./badge.styles.js";import{styles as tagStyles}from"./tag.styles.js";import{LYRA_DEFAULT_remove,LYRA_DEFAULT_removeWithContext}from"../../../internal/default-strings.generated.js";function sourceParent(node){if(node.parentElement)return node.parentElement;const root=node.getRootNode();return"host"in root?root.host:null}function isClosedSourceDetailsBranch(details,branch){return details.localName!=="details"||details.hasAttribute("open")||branch===null?!1:Array.from(details.children).find(child=>child.localName==="summary")!==branch}function isSourceLabelAvailable(node){const target=node.nodeType===1?node:sourceParent(node);if(!target?.isConnected)return!1;let branch=target,current=sourceParent(target);if(isAccessibilitySubtreeExcluded(target))return!1;for(;current;){if(isAccessibilitySubtreeExcluded(current)||isClosedSourceDetailsBranch(current,branch))return!1;branch=current,current=sourceParent(current)}return!0}class LyraTag extends LyraBadge{constructor(){super(...arguments),this.disabled=!1,this.removeEnabled=!1,this.changingRemoveAliasAttribute=!1,this.labelTextObserver=new AccessibleTextController(this,[""],()=>{this.syncHostActionRole(),this.updateBrowserDerivedState(()=>this.recomputeLabelText())},["slot","role"],!1),this.managedActionGroupRole=!1,this.labelText="",this.onLabelSlotChange=event=>{const target=event.target;target?.nodeType!==1||target.localName!=="slot"||(this.labelTextObserver.bind(),this.withRemove&&this.updateBrowserDerivedState(()=>this.recomputeLabelText()))},this.onRemoveClick=()=>{if(!this.withRemove||this.disabled)return;const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));this.emit("lr-remove",{value:this.value}),repair&&(!this.isConnected||!this.withRemove)&&applyComposedFocusRepair(repair)}}static{this.defaultStrings={...super.defaultStrings,remove:LYRA_DEFAULT_remove,removeWithContext:LYRA_DEFAULT_removeWithContext}}static{this.styles=[LyraElement.styles,variants,badgeStyles,tagStyles]}static{this.properties={withRemove:{attribute:"with-remove",type:Boolean,noAccessor:!0},removable:{attribute:"removable",type:Boolean,noAccessor:!0}}}get effectiveVariant(){return this.variant==="text"?"neutral":super.effectiveVariant}get withRemove(){return this.removeEnabled}set withRemove(next){this.setRemoveEnabled(!!next,"with-remove")}get removable(){return this.removeEnabled}set removable(next){this.setRemoveEnabled(!!next,"removable")}attributeChangedCallback(name,oldValue,value){const isRemoveAlias=name==="with-remove"||name==="removable";isRemoveAlias&&(this.changingRemoveAliasAttribute=!0);try{super.attributeChangedCallback(name,oldValue,value)}finally{isRemoveAlias&&(this.changingRemoveAliasAttribute=!1)}}setRemoveEnabled(next,preferredAttribute){const old=this.removeEnabled;this.changingRemoveAliasAttribute?this.removeEnabled=this.hasAttribute("with-remove")||this.hasAttribute("removable"):next?(this.setAttribute(preferredAttribute,""),this.removeEnabled=!0):(this.removeAttribute("with-remove"),this.removeAttribute("removable"),this.removeEnabled=!1),old!==this.removeEnabled&&(this.requestUpdate("withRemove",old),this.requestUpdate("removable",old))}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this.onLabelSlotChange),this.syncLabelObserver(),this.hasUpdated?(this.withRemove&&this.recomputeLabelText(!0),this.ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.withRemove&&this.recomputeLabelText()})):this.seedFirstRenderState(()=>this.recomputeLabelText(!0))}disconnectedCallback(){this.removeEventListener("slotchange",this.onLabelSlotChange),this.releaseHostActionRole(),super.disconnectedCallback()}adoptedCallback(){super.adoptedCallback(),this.labelTextObserver.adopted()}syncLabelObserver(){this.labelTextObserver.setEnabled(this.withRemove)}recomputeLabelText(preferLightDom=!1){const slot=this.renderRoot?.querySelector("slot:not([name])"),lightDomNodes=this.childNodes,nodes=slot?slot.assignedNodes({flatten:!0}):Array.from(lightDomNodes??[]).filter(node=>{if(node.nodeType!==1)return!0;const slotName=node.getAttribute("slot");return slotName!=="start"&&slotName!=="end"});this.labelText=nodes.map(node=>composedAccessibilityText(node,{ancestorBoundary:this,isSubtreeExcluded:element=>element.getRootNode()===this.renderRoot&&element.getAttribute("part")?.split(/\s+/).includes("content")?!1:isAccessibilitySubtreeExcluded(element),requireRendered:preferLightDom?!1:node.nodeType!==1||node.localName!=="slot",shouldPruneNode:candidate=>!this.contains(candidate)&&!isSourceLabelAvailable(candidate),ignoreInheritedVisibility:!0})).join(" ").replace(/\s+/g," ").trim()}get accessibleRemoveLabel(){const text=this.labelText;return text?this.localize("removeWithContext",void 0,{label:text}):this.localize("remove")}focus(options){this.withRemove&&this.removeButtonEl?.focus(options)}blur(){this.removeButtonEl?.blur()}click(){if(!this.withRemove){super.click();return}this.removeButtonEl?.click()}willUpdate(changed){if(super.willUpdate(changed),changed.has("withRemove")){if(!this.withRemove){const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));repair&&applyComposedFocusRepair(repair)}this.syncLabelObserver(),this.withRemove&&this.hasUpdated&&this.recomputeLabelText()}}updated(changed){super.updated(changed),this.syncHostActionRole()}syncHostActionRole(){const needsGroup=this.withRemove&&this.hasAttribute("aria-label");needsGroup&&!this.hasAttribute("role")?(this.setAttribute("role","group"),this.managedActionGroupRole=!0):needsGroup||this.releaseHostActionRole()}releaseHostActionRole(){this.managedActionGroupRole&&this.getAttribute("role")==="group"&&this.removeAttribute("role"),this.managedActionGroupRole=!1}renderTrailing(){return this.withRemove?html`<button
2
2
  part="remove-button remove-button__base"
3
3
  type="button"
4
+ ?disabled=${this.disabled}
4
5
  aria-label=${this.accessibleRemoveLabel}
5
6
  @click=${this.onRemoveClick}
6
7
  >
7
8
  ${closeIcon()}
8
- </button>`:nothing}}__decorate([property()],LyraTag.prototype,"value",void 0),__decorate([state()],LyraTag.prototype,"labelText",void 0),__decorate([query('[part~="remove-button"]')],LyraTag.prototype,"removeButtonEl",void 0);export{LyraTag};
9
+ </button>`:nothing}}__decorate([property()],LyraTag.prototype,"value",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraTag.prototype,"disabled",void 0),__decorate([state()],LyraTag.prototype,"labelText",void 0),__decorate([query('[part~="remove-button"]')],LyraTag.prototype,"removeButtonEl",void 0);export{LyraTag};
@@ -1 +1 @@
1
- import{iconHitTarget,focusRing}from"../../../internal/interactive-control.styles.js";import{css}from"lit";const styles=css` :host { --_lr-tag-remove-radius: var(--lr-badge-radius, var(--_lr-badge-radius)); --_lr-tag-remove-hover-background: color-mix(in srgb, currentColor 16%, transparent); } :host([with-remove]) [part~='base'] { min-block-size: max(var(--lr-badge-min-height, var(--_lr-badge-min-height)), var(--lr-icon-button-size)); } :host([variant='text']) { --_lr-badge-fill: transparent; --_lr-badge-stroke: transparent; --_lr-badge-text: var(--lr-badge-ink, var(--_lr-badge-ink)); } [part~='remove-button'] { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; ${iconHitTarget} margin: 0; padding: 0; border: none; border-radius: var(--lr-tag-remove-radius, var(--_lr-tag-remove-radius)); background: transparent; color: inherit; font: inherit; font-size: var(--lr-size-0-75em); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--lr-transition-fast); } [part~='remove-button']:hover { background: var(--lr-tag-remove-hover-bg, var(--_lr-tag-remove-hover-background)); } [part~='remove-button']:active { background: color-mix(in srgb, currentColor var(--lr-color-mix-active), var(--lr-tag-remove-hover-bg, var(--_lr-tag-remove-hover-background))); } [part~='remove-button']:focus-visible { ${focusRing} } [part~='remove-button'] svg { display: block; } @media (prefers-reduced-motion: reduce) { [part~='remove-button'] { transition: none !important; } } `;export{styles};
1
+ import{iconHitTarget,focusRing}from"../../../internal/interactive-control.styles.js";import{css}from"lit";const styles=css` :host { --_lr-tag-remove-radius: var(--lr-badge-radius, var(--_lr-badge-radius)); --_lr-tag-remove-hover-background: color-mix(in srgb, currentColor 16%, transparent); } :host([with-remove]) [part~='base'] { min-block-size: max(var(--lr-badge-min-height, var(--_lr-badge-min-height)), var(--lr-icon-button-size)); } :host([variant='text']) { --_lr-badge-fill: transparent; --_lr-badge-stroke: transparent; --_lr-badge-text: var(--lr-badge-ink, var(--_lr-badge-ink)); } [part~='remove-button'] { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; ${iconHitTarget} margin: 0; padding: 0; border: none; border-radius: var(--lr-tag-remove-radius, var(--_lr-tag-remove-radius)); background: transparent; color: inherit; font: inherit; font-size: var(--lr-size-0-75em); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--lr-transition-fast); } [part~='remove-button']:not(:disabled):hover { background: var(--lr-tag-remove-hover-bg, var(--_lr-tag-remove-hover-background)); } [part~='remove-button']:not(:disabled):active { background: color-mix(in srgb, currentColor var(--lr-color-mix-active), var(--lr-tag-remove-hover-bg, var(--_lr-tag-remove-hover-background))); } [part~='remove-button']:focus-visible { ${focusRing} } [part~='remove-button']:disabled { cursor: not-allowed; opacity: var(--lr-opacity-disabled); } [part~='remove-button'] svg { display: block; } @media (prefers-reduced-motion: reduce) { [part~='remove-button'] { transition: none !important; } } `;export{styles};
@@ -1,6 +1,6 @@
1
- import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraHeadingLevel}from'../../../internal/heading-level.js';import type{LyraAppearance,LyraSize,LyraVariant}from'../../../internal/variants.js';
1
+ import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraHeadingLevel}from'../../../internal/heading-level.js';import type{LyraAppearance,LyraSize}from'../../../internal/variants.js';import{type SemanticVariant}from'../../../internal/semantic-variant.js';
2
2
  /** The library's one semantic-tone vocabulary. */
3
- export type CalloutVariant=LyraVariant;
3
+ export type CalloutVariant=SemanticVariant;
4
4
  /** The library's shared fill/border treatment vocabulary. */
5
5
  export type CalloutAppearance=LyraAppearance;
6
6
  /** The library's one size ladder, in either spelling. */
@@ -1,4 +1,4 @@
1
- import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{composedParentElement}from"../../../internal/active-element.js";import{closeIcon}from"../../../internal/icons.js";import{isAccessibilityVisible}from"../../../internal/accessibility-visibility.js";import{AnnouncementUpgradeObserver}from"../../../internal/announcement-text.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{resolveHeadingLevel}from"../../../internal/heading-level.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{contextualSizes,contextualVariants}from"../../../internal/contextual-vocabulary.styles.js";import{styles}from"./callout.styles.js";import{literalSetConverter,presenceTrueDefaultBooleanConverter as trueDefaultBooleanConverter}from"../../../internal/converters.js";import{LYRA_DEFAULT_calloutAnnouncementWithContext,LYRA_DEFAULT_close}from"../../../internal/default-strings.generated.js";const CALLOUT_VARIANT=literalSetConverter(["brand","neutral","success","warning","danger"],"brand"),CALLOUT_VARIANTS=new Set(["brand","neutral","success","warning","danger"]),CALLOUT_SIZE=literalSetConverter(["2xs","xs","s","m","l","xl","small","medium","large"],"m"),CALLOUT_HEADING_LEVEL=literalSetConverter(["1","2","3","4","5","6","none"],"3"),CALLOUT_APPEARANCES=new Set(["accent","filled","outlined","filled-outlined","plain"]),normalizeCalloutAppearance=value=>typeof value=="string"&&CALLOUT_APPEARANCES.has(value)?value:void 0,calloutAppearanceConverter={fromAttribute:normalizeCalloutAppearance,toAttribute:value=>normalizeCalloutAppearance(value)??null};class LyraCallout extends LyraElement{constructor(){super(...arguments),this._variant="brand",this._size="m",this.heading="",this._headingLevel="3",this.closable=!1,this.inline=!1,this.announce=!1,this.open=!0,this.hostAriaLabel=null,this.slotPresence=new SlotPresenceController(this),this.liveActive=!1,this.initialContentAnnounced=!1,this.connectionGeneration=0,this.lastAnnouncementText="",this.announcementShadowRoots=new Set,this.announcementUpgrades=new AnnouncementUpgradeObserver(()=>{this.announceCurrentContent(),this.observeAnnouncementContent()}),this.onForwardedSlotChange=event=>{const slot=event.target;this.announcementForwardingSlots().includes(slot)&&(this.announceCurrentContent(),this.observeAnnouncementContent())},this.close=()=>{const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));this.emit("lr-close-request",{reason:"close-button"},{cancelable:!0}).defaultPrevented||(repair&&applyComposedFocusRepair(repair),this.open=!1,this.emit("lr-close",{reason:"close-button"}))}}static{this.defaultStrings={...super.defaultStrings,calloutAnnouncementWithContext:LYRA_DEFAULT_calloutAnnouncementWithContext,close:LYRA_DEFAULT_close}}static{this.styles=[LyraElement.styles,contextualVariants,contextualSizes,styles]}get variant(){return this._variant}set variant(next){const normalized=CALLOUT_VARIANT.normalizeReflected(this,"variant",next),old=this._variant;old!==normalized&&(this._variant=normalized,this.requestUpdate("variant",old))}get appearance(){return this._appearance}set appearance(next){const normalized=normalizeCalloutAppearance(next);this.hasAttribute("appearance")&&this.getAttribute("appearance")!==normalized&&(normalized===void 0?this.removeAttribute("appearance"):this.setAttribute("appearance",normalized));const old=this._appearance;old!==normalized&&(this._appearance=normalized,this.requestUpdate("appearance",old))}get size(){return this._size}set size(next){const normalized=CALLOUT_SIZE.normalizeReflected(this,"size",next),old=this._size;old!==normalized&&(this._size=normalized,this.requestUpdate("size",old))}get headingLevel(){return this._headingLevel}set headingLevel(next){const normalized=CALLOUT_HEADING_LEVEL.normalizeReflected(this,"heading-level",next),old=this._headingLevel;old!==normalized&&(this._headingLevel=normalized,this.requestUpdate("headingLevel",old))}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this.onForwardedSlotChange),this.politeSink??=acquireAnnouncementSink("polite",{document:this.ownerDocument,source:this}),this.assertiveSink??=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this});const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.contentObserver=new MutationObserverCtor(records=>{records.some(record=>!this.contains(record.target)||this.isAnnouncementMutation(record))&&(this.announceCurrentContent(),this.observeAnnouncementContent())}),this.observeAnnouncementContent());const generation=++this.connectionGeneration;this.updateComplete.then(()=>{const view=this.ownerDocument?.defaultView;return typeof view?.requestAnimationFrame=="function"?new Promise(resolve=>view.requestAnimationFrame(()=>resolve())):Promise.resolve()}).then(()=>this.updateComplete).then(()=>{this.isConnected&&generation===this.connectionGeneration&&(this.lastAnnouncementText=this.announcementText(),this.observeAnnouncementContent(),this.liveActive=!0,this.announce&&!this.initialContentAnnounced&&(this.initialContentAnnounced=!0,this.announceCurrentContent(!0)))})}disconnectedCallback(){this.connectionGeneration+=1,this.liveActive=!1,this.lastAnnouncementText="",this.contentObserver?.disconnect(),this.contentObserver=void 0,this.announcementShadowRoots.clear(),this.announcementUpgrades.disconnect(),this.removeEventListener("slotchange",this.onForwardedSlotChange),this.politeSink?.release(),this.politeSink=void 0,this.assertiveSink?.release(),this.assertiveSink=void 0,super.disconnectedCallback()}updated(changed){super.updated(changed),!(!this.liveActive||!this.open)&&(changed.has("open")||changed.has("heading")||changed.has("hostAriaLabel"))&&(this.announceCurrentContent(changed.has("open")),this.observeAnnouncementContent())}willUpdate(changed){if(super.willUpdate(changed),changed.has("open")&&!this.open){const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));repair&&applyComposedFocusRepair(repair)}}isAnnouncementMutation(record){if(record.target===this)return record.type==="childList"||record.type==="attributes"&&["aria-hidden","aria-label","class","hidden","inert","style"].includes(record.attributeName??"");let top=record.target;for(;top.parentNode&&top.parentNode!==this;)top=top.parentNode;return top.parentNode!==this?!1:record.type==="attributes"&&record.attributeName==="slot"&&record.target===top?!0:this.isAnnouncementSlotNode(top)}isAnnouncementSlotNode(node){if(node.nodeType!==1)return!0;const slotName=node.getAttribute("slot");return slotName===null||slotName===""||slotName==="heading"}announcementObservationOptions(){return{attributes:!0,attributeFilter:["alt","aria-hidden","aria-label","class","hidden","inert","open","slot","style"],characterData:!0,childList:!0,subtree:!0}}announcementForwardingSlots(){return Array.from(this.querySelectorAll("slot")).filter(slot=>{let top=slot;for(;top.parentNode&&top.parentNode!==this;)top=top.parentNode;return top.parentNode===this&&this.isAnnouncementSlotNode(top)})}observeAnnouncementContent(){const observer=this.contentObserver;if(!observer)return;observer.disconnect();const options=this.announcementObservationOptions();observer.observe(this,options);for(const slot of this.announcementForwardingSlots())if(slot.assignedNodes().length!==0)for(const assigned of slot.assignedNodes({flatten:!0}))observer.observe(assigned,options);for(const root of this.announcementShadowRoots)observer.observe(root,options)}normalizedText(value){return(value??"").replace(/\s+/g," ").trim()}resolvedAccessibleLabel(){const hostLabel=this.hostAriaLabel;return this.normalizedText(hostLabel)}announcementText(){const roots=new Set;if(this.announcementShadowRoots=roots,!isAccessibilityVisible(this))return"";const hostLabel=this.hostAriaLabel,context=this.normalizedText(hostLabel),heading=[this.heading,...Array.from(this.childNodes).filter(node=>node.nodeType===1&&node.getAttribute("slot")==="heading").map(node=>this.announcementUpgrades.collect(node,roots))],message=Array.from(this.childNodes).filter(node=>{if(node.nodeType!==1)return!0;const slotName=node.getAttribute("slot");return slotName===null||slotName===""}).map(node=>this.announcementUpgrades.collect(node,roots)),content=this.normalizedText([...heading,...message].join(" "));return!context||context===content?content:content?this.localize("calloutAnnouncementWithContext",void 0,{context,content}):context}announceCurrentContent(force=!1){if(!this.liveActive||!this.isConnected||!this.open)return;const text=this.announcementText();!force&&text===this.lastAnnouncementText||(this.lastAnnouncementText=text,(this.effectiveContextualVariant==="danger"?this.assertiveSink:this.politeSink)?.announce(text))}get effectiveContextualVariant(){if(this.hasAttribute("variant"))return this.variant;let ancestor=composedParentElement(this);for(;ancestor;){const candidate=ancestor.getAttribute("variant");if(candidate&&CALLOUT_VARIANTS.has(candidate))return candidate;ancestor=composedParentElement(ancestor)}return"brand"}render(){if(!this.open)return html``;const label=this.resolvedAccessibleLabel()||void 0,headingLevel=resolveHeadingLevel(this.headingLevel);return html`<div
1
+ import{__decorate}from"tslib";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{composedParentElement}from"../../../internal/active-element.js";import{closeIcon}from"../../../internal/icons.js";import{isAccessibilityVisible}from"../../../internal/accessibility-visibility.js";import{AnnouncementUpgradeObserver}from"../../../internal/announcement-text.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{resolveHeadingLevel}from"../../../internal/heading-level.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{contextualSizes,contextualVariants}from"../../../internal/contextual-vocabulary.styles.js";import{effectiveSemanticVariant,semanticVariantConverter}from"../../../internal/semantic-variant.js";import{styles}from"./callout.styles.js";import{literalSetConverter,presenceTrueDefaultBooleanConverter as trueDefaultBooleanConverter}from"../../../internal/converters.js";import{LYRA_DEFAULT_calloutAnnouncementWithContext,LYRA_DEFAULT_close}from"../../../internal/default-strings.generated.js";const CALLOUT_VARIANT=semanticVariantConverter("brand"),CALLOUT_SIZE=literalSetConverter(["2xs","xs","s","m","l","xl","small","medium","large"],"m"),CALLOUT_HEADING_LEVEL=literalSetConverter(["1","2","3","4","5","6","none"],"3"),CALLOUT_APPEARANCES=new Set(["accent","filled","outlined","filled-outlined","plain"]),normalizeCalloutAppearance=value=>typeof value=="string"&&CALLOUT_APPEARANCES.has(value)?value:void 0,calloutAppearanceConverter={fromAttribute:normalizeCalloutAppearance,toAttribute:value=>normalizeCalloutAppearance(value)??null};class LyraCallout extends LyraElement{constructor(){super(...arguments),this._variant="brand",this._size="m",this.heading="",this._headingLevel="3",this.closable=!1,this.inline=!1,this.announce=!1,this.open=!0,this.hostAriaLabel=null,this.slotPresence=new SlotPresenceController(this),this.liveActive=!1,this.initialContentAnnounced=!1,this.connectionGeneration=0,this.lastAnnouncementText="",this.announcementShadowRoots=new Set,this.announcementUpgrades=new AnnouncementUpgradeObserver(()=>{this.announceCurrentContent(),this.observeAnnouncementContent()}),this.onForwardedSlotChange=event=>{const slot=event.target;this.announcementForwardingSlots().includes(slot)&&(this.announceCurrentContent(),this.observeAnnouncementContent())},this.close=()=>{const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));this.emit("lr-close-request",{reason:"close-button"},{cancelable:!0}).defaultPrevented||(repair&&applyComposedFocusRepair(repair),this.open=!1,this.emit("lr-close",{reason:"close-button"}))}}static{this.defaultStrings={...super.defaultStrings,calloutAnnouncementWithContext:LYRA_DEFAULT_calloutAnnouncementWithContext,close:LYRA_DEFAULT_close}}static{this.styles=[LyraElement.styles,contextualVariants,contextualSizes,styles]}get variant(){return this._variant}set variant(next){const normalized=CALLOUT_VARIANT.normalizeReflected(this,"variant",next==="primary"?"brand":next),old=this._variant;old!==normalized&&(this._variant=normalized,this.requestUpdate("variant",old))}get appearance(){return this._appearance}set appearance(next){const normalized=normalizeCalloutAppearance(next);this.hasAttribute("appearance")&&this.getAttribute("appearance")!==normalized&&(normalized===void 0?this.removeAttribute("appearance"):this.setAttribute("appearance",normalized));const old=this._appearance;old!==normalized&&(this._appearance=normalized,this.requestUpdate("appearance",old))}get size(){return this._size}set size(next){const normalized=CALLOUT_SIZE.normalizeReflected(this,"size",next),old=this._size;old!==normalized&&(this._size=normalized,this.requestUpdate("size",old))}get headingLevel(){return this._headingLevel}set headingLevel(next){const normalized=CALLOUT_HEADING_LEVEL.normalizeReflected(this,"heading-level",next),old=this._headingLevel;old!==normalized&&(this._headingLevel=normalized,this.requestUpdate("headingLevel",old))}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this.onForwardedSlotChange),this.politeSink??=acquireAnnouncementSink("polite",{document:this.ownerDocument,source:this}),this.assertiveSink??=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this});const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.contentObserver=new MutationObserverCtor(records=>{records.some(record=>!this.contains(record.target)||this.isAnnouncementMutation(record))&&(this.announceCurrentContent(),this.observeAnnouncementContent())}),this.observeAnnouncementContent());const generation=++this.connectionGeneration;this.updateComplete.then(()=>{const view=this.ownerDocument?.defaultView;return typeof view?.requestAnimationFrame=="function"?new Promise(resolve=>view.requestAnimationFrame(()=>resolve())):Promise.resolve()}).then(()=>this.updateComplete).then(()=>{this.isConnected&&generation===this.connectionGeneration&&(this.lastAnnouncementText=this.announcementText(),this.observeAnnouncementContent(),this.liveActive=!0,this.announce&&!this.initialContentAnnounced&&(this.initialContentAnnounced=!0,this.announceCurrentContent(!0)))})}disconnectedCallback(){this.connectionGeneration+=1,this.liveActive=!1,this.lastAnnouncementText="",this.contentObserver?.disconnect(),this.contentObserver=void 0,this.announcementShadowRoots.clear(),this.announcementUpgrades.disconnect(),this.removeEventListener("slotchange",this.onForwardedSlotChange),this.politeSink?.release(),this.politeSink=void 0,this.assertiveSink?.release(),this.assertiveSink=void 0,super.disconnectedCallback()}updated(changed){super.updated(changed),!(!this.liveActive||!this.open)&&(changed.has("open")||changed.has("heading")||changed.has("hostAriaLabel"))&&(this.announceCurrentContent(changed.has("open")),this.observeAnnouncementContent())}willUpdate(changed){if(super.willUpdate(changed),changed.has("open")&&!this.open){const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));repair&&applyComposedFocusRepair(repair)}}isAnnouncementMutation(record){if(record.target===this)return record.type==="childList"||record.type==="attributes"&&["aria-hidden","aria-label","class","hidden","inert","style"].includes(record.attributeName??"");let top=record.target;for(;top.parentNode&&top.parentNode!==this;)top=top.parentNode;return top.parentNode!==this?!1:record.type==="attributes"&&record.attributeName==="slot"&&record.target===top?!0:this.isAnnouncementSlotNode(top)}isAnnouncementSlotNode(node){if(node.nodeType!==1)return!0;const slotName=node.getAttribute("slot");return slotName===null||slotName===""||slotName==="heading"}announcementObservationOptions(){return{attributes:!0,attributeFilter:["alt","aria-hidden","aria-label","class","hidden","inert","open","slot","style"],characterData:!0,childList:!0,subtree:!0}}announcementForwardingSlots(){return Array.from(this.querySelectorAll("slot")).filter(slot=>{let top=slot;for(;top.parentNode&&top.parentNode!==this;)top=top.parentNode;return top.parentNode===this&&this.isAnnouncementSlotNode(top)})}observeAnnouncementContent(){const observer=this.contentObserver;if(!observer)return;observer.disconnect();const options=this.announcementObservationOptions();observer.observe(this,options);for(const slot of this.announcementForwardingSlots())if(slot.assignedNodes().length!==0)for(const assigned of slot.assignedNodes({flatten:!0}))observer.observe(assigned,options);for(const root of this.announcementShadowRoots)observer.observe(root,options)}normalizedText(value){return(value??"").replace(/\s+/g," ").trim()}resolvedAccessibleLabel(){const hostLabel=this.hostAriaLabel;return this.normalizedText(hostLabel)}announcementText(){const roots=new Set;if(this.announcementShadowRoots=roots,!isAccessibilityVisible(this))return"";const hostLabel=this.hostAriaLabel,context=this.normalizedText(hostLabel),heading=[this.heading,...Array.from(this.childNodes).filter(node=>node.nodeType===1&&node.getAttribute("slot")==="heading").map(node=>this.announcementUpgrades.collect(node,roots))],message=Array.from(this.childNodes).filter(node=>{if(node.nodeType!==1)return!0;const slotName=node.getAttribute("slot");return slotName===null||slotName===""}).map(node=>this.announcementUpgrades.collect(node,roots)),content=this.normalizedText([...heading,...message].join(" "));return!context||context===content?content:content?this.localize("calloutAnnouncementWithContext",void 0,{context,content}):context}announceCurrentContent(force=!1){if(!this.liveActive||!this.isConnected||!this.open)return;const text=this.announcementText();!force&&text===this.lastAnnouncementText||(this.lastAnnouncementText=text,(this.effectiveContextualVariant==="danger"?this.assertiveSink:this.politeSink)?.announce(text))}get effectiveContextualVariant(){if(this.hasAttribute("variant"))return effectiveSemanticVariant(this.variant);let ancestor=composedParentElement(this);for(;ancestor;){const candidate=ancestor.getAttribute("variant");if(candidate&&CALLOUT_VARIANT.normalize(candidate)===candidate)return effectiveSemanticVariant(candidate);ancestor=composedParentElement(ancestor)}return"brand"}render(){if(!this.open)return html``;const label=this.resolvedAccessibleLabel()||void 0,headingLevel=resolveHeadingLevel(this.headingLevel);return html`<div
2
2
  part="base"
3
3
  role=${label?"group":nothing}
4
4
  aria-label=${label||nothing}
@@ -1,6 +1,6 @@
1
- import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraSizeAlias,LyraSizeStep,LyraVariant}from'../../../internal/variants.js';
1
+ import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraSizeAlias,LyraSizeStep}from'../../../internal/variants.js';import{type SemanticVariant}from'../../../internal/semantic-variant.js';
2
2
  /** The library's one semantic-tone vocabulary. */
3
- export type ChipVariant=LyraVariant|'primary';
3
+ export type ChipVariant=SemanticVariant;
4
4
  /** The shared six-step ladder plus one step below it (a chip is the library's smallest labelled
5
5
  * surface and needs a tier that fits inside a table cell, which no other component does), plus
6
6
  * the `small`/`medium`/`large` aliases `<lr-badge>`/`<lr-callout>` already accept for the six
@@ -120,6 +120,8 @@ export type ChipSize=LyraSizeStep|'3xs'|LyraSizeAlias;export interface ChipRemov
120
120
  export declare class LyraChip extends LyraElement<LyraChipEventMap>{static styles:import("lit").CSSResultGroup[];private _size;get size():ChipSize;set size(next:ChipSize);private _variant;get variant():ChipVariant;set variant(next:ChipVariant);
121
121
  /** Shows the remove (×) button. */
122
122
  removable:boolean;
123
+ /** `<lr-tag>`'s spelling of `removable`; both name one state, and the last write wins. */
124
+ get withRemove():boolean;set withRemove(next:boolean);
123
125
  /** Disables the active toggle/remove control and suppresses its request event. */
124
126
  disabled:boolean;
125
127
  /** Draws fully-rounded ends instead of the default rounded rectangle, matching
@@ -1,4 +1,4 @@
1
- import{__decorate}from"tslib";import{AccessibleTextController}from"../../../internal/accessible-text-controller.js";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{composedAccessibilityText,isAccessibilitySubtreeExcluded}from"../../../internal/accessibility-visibility.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{renderInertPresentation}from"../../../internal/inert-presentation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{closeIcon}from"../../../internal/icons.js";import{literalSetConverter}from"../../../internal/converters.js";import{variants}from"../../../internal/variants.styles.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{styles}from"./chip.styles.js";import{LYRA_DEFAULT_remove,LYRA_DEFAULT_removeWithContext,LYRA_DEFAULT_select}from"../../../internal/default-strings.generated.js";const CHIP_SIZE=literalSetConverter(["3xs","2xs","xs","s","m","l","xl","small","medium","large"],"m"),CHIP_VARIANT=literalSetConverter(["neutral","brand","primary","success","warning","danger"],"neutral");function sourceParent(node){if(node.parentElement)return node.parentElement;const root=node.getRootNode();return"host"in root?root.host:null}function isClosedSourceDetailsBranch(details,branch){return details.localName!=="details"||details.hasAttribute("open")||branch===null?!1:Array.from(details.children).find(child=>child.localName==="summary")!==branch}function isSourceLabelAvailable(node){const target=node.nodeType===1?node:sourceParent(node);if(!target?.isConnected)return!1;let branch=target,current=sourceParent(target);if(isAccessibilitySubtreeExcluded(target))return!1;for(;current;){if(isAccessibilitySubtreeExcluded(current)||isClosedSourceDetailsBranch(current,branch))return!1;branch=current,current=sourceParent(current)}return!0}class LyraChip extends LyraElement{constructor(){super(...arguments),this._size="m",this._variant="neutral",this.removable=!1,this.disabled=!1,this.pill=!1,this.selected=!1,this.toggleable=!1,this.wrap=!1,this.slotPresence=new SlotPresenceController(this),this.cachedLabelText="",this.labelTextObserver=new AccessibleTextController(this,[""],()=>{this.syncHostActionRole(),this.updateBrowserDerivedState(()=>this.recomputeLabelText())},["slot","role"],!1),this.managedActionGroupRole=!1,this.onLabelSlotChange=event=>{const target=event.target;target?.nodeType!==1||target.localName!=="slot"||this.tracksActionLabel&&(this.labelTextObserver.bind(),this.updateBrowserDerivedState(()=>this.recomputeLabelText()))},this.onRemoveClick=()=>{if(this.disabled)return;const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));this.emit("lr-remove",{value:this.value}),repair&&(!this.isConnected||!this.removable)&&applyComposedFocusRepair(repair)},this.onToggleClick=()=>{if(this.disabled)return;const selected=!this.selected;this.emit("lr-chip-toggle-request",{value:this.value,selected},{cancelable:!0}).defaultPrevented||(this.selected=selected,this.emit("lr-chip-change",{value:this.value,selected}))}}static{this.defaultStrings={...super.defaultStrings,remove:LYRA_DEFAULT_remove,removeWithContext:LYRA_DEFAULT_removeWithContext,select:LYRA_DEFAULT_select}}static{this.styles=[LyraElement.styles,variants,styles]}get size(){return this._size}set size(next){const normalized=CHIP_SIZE.normalizeReflected(this,"size",next),old=this._size;old!==normalized&&(this._size=normalized,this.requestUpdate("size",old))}get variant(){return this._variant}set variant(next){const normalized=CHIP_VARIANT.normalizeReflected(this,"variant",next),old=this._variant;old!==normalized&&(this._variant=normalized,this.requestUpdate("variant",old))}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this.onLabelSlotChange),this.syncLabelObservation();const sampleBrowserState=()=>{this.tracksActionLabel&&this.recomputeLabelText(!0,!0)};this.hasUpdated?(sampleBrowserState(),this.ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.tracksActionLabel&&this.recomputeLabelText()})):this.seedFirstRenderState(sampleBrowserState)}get tracksActionLabel(){return this.toggleable||this.removable}syncLabelObservation(){this.labelTextObserver.setEnabled(this.tracksActionLabel)}disconnectedCallback(){this.removeEventListener("slotchange",this.onLabelSlotChange),this.releaseHostActionRole(),this.pendingControlFocusRepair=void 0,super.disconnectedCallback()}adoptedCallback(){super.adoptedCallback(),this.labelTextObserver.adopted()}computeLabelText(preferLightDom=!1){const slot=this.renderRoot?.querySelector("slot:not([name])"),lightDomNodes=this.childNodes,assigned=slot?.assignedNodes({flatten:!0})??[],direct=Array.from(lightDomNodes??[]).filter(node=>node.nodeType!==1||(node.getAttribute("slot")??"")==="");return(!preferLightDom&&assigned.length>0?assigned:direct).map(node=>composedAccessibilityText(node,{ancestorBoundary:this,isSubtreeExcluded:element=>element.getRootNode()===this.renderRoot&&element.getAttribute("part")?.split(/\s+/).includes("label")?!1:isAccessibilitySubtreeExcluded(element),requireRendered:preferLightDom?!1:node.nodeType!==1||node.localName!=="slot",shouldPruneNode:candidate=>!this.contains(candidate)&&!isSourceLabelAvailable(candidate),ignoreInheritedVisibility:!0})).join(" ").replace(/\s+/g," ").trim()}recomputeLabelText(request=!0,preferLightDom=!1){const next=this.computeLabelText(preferLightDom);next!==this.cachedLabelText&&(this.cachedLabelText=next,request&&this.requestUpdate())}get accessibleToggleLabel(){return this.cachedLabelText||this.localize("select")}get accessibleRemoveLabel(){const text=this.cachedLabelText;return text?this.localize("removeWithContext",void 0,{label:text}):this.localize("remove")}get primaryControl(){return this.renderRoot.querySelector(this.removable?'[part="remove-button"]':'[part="toggle-button"]')}focus(options){this.primaryControl?.focus(options)}blur(){this.primaryControl?.blur()}click(){const control=this.primaryControl;control?control.click():super.click()}willUpdate(changed){if(super.willUpdate(changed),(changed.has("removable")||changed.has("toggleable"))&&(this.syncLabelObservation(),this.hasUpdated&&(this.tracksActionLabel?this.recomputeLabelText(!1):this.cachedLabelText="")),this.pendingControlFocusRepair)return;const oldRemovable=changed.get("removable")??this.removable,oldToggleable=changed.get("toggleable")??this.toggleable,oldDisabled=changed.get("disabled")??this.disabled,oldMode=oldRemovable?"remove":oldToggleable?"toggle":"passive",newMode=this.removable?"remove":this.toggleable?"toggle":"passive";oldMode===newMode&&!(oldDisabled===!1&&this.disabled)||(this.pendingControlFocusRepair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this)??this.renderRoot.querySelector('[part="remove-button"], [part="toggle-button"]'))??void 0)}updated(changed){super.updated(changed),this.syncHostActionRole();const repair=this.pendingControlFocusRepair;if(this.pendingControlFocusRepair=void 0,!repair)return;const replacement=this.disabled?null:this.primaryControl;applyComposedFocusRepair(repair,replacement??repair.candidate)}syncHostActionRole(){const needsGroup=this.tracksActionLabel&&this.hasAttribute("aria-label");needsGroup&&!this.hasAttribute("role")?(this.setAttribute("role","group"),this.managedActionGroupRole=!0):needsGroup||this.releaseHostActionRole()}releaseHostActionRole(){this.managedActionGroupRole&&this.getAttribute("role")==="group"&&this.removeAttribute("role"),this.managedActionGroupRole=!1}render(){const toggleMode=this.toggleable&&!this.removable,pressed=this.selected&&!this.removable;return html`
1
+ import{__decorate}from"tslib";import{AccessibleTextController}from"../../../internal/accessible-text-controller.js";import{html,nothing}from"lit";import{property}from"lit/decorators.js";import{composedAccessibilityText,isAccessibilitySubtreeExcluded}from"../../../internal/accessibility-visibility.js";import{applyComposedFocusRepair,captureComposedFocusRepair,nearestExternalFocusTarget}from"../../../internal/focus-navigation.js";import{renderInertPresentation}from"../../../internal/inert-presentation.js";import{LyraElement}from"../../../internal/lyra-element.js";import{closeIcon}from"../../../internal/icons.js";import{literalSetConverter}from"../../../internal/converters.js";import{semanticVariantConverter}from"../../../internal/semantic-variant.js";import{variants}from"../../../internal/variants.styles.js";import{SlotPresenceController}from"../../../internal/slot-presence-controller.js";import{styles}from"./chip.styles.js";import{LYRA_DEFAULT_remove,LYRA_DEFAULT_removeWithContext,LYRA_DEFAULT_select}from"../../../internal/default-strings.generated.js";const CHIP_SIZE=literalSetConverter(["3xs","2xs","xs","s","m","l","xl","small","medium","large"],"m"),CHIP_VARIANT=semanticVariantConverter("neutral");function sourceParent(node){if(node.parentElement)return node.parentElement;const root=node.getRootNode();return"host"in root?root.host:null}function isClosedSourceDetailsBranch(details,branch){return details.localName!=="details"||details.hasAttribute("open")||branch===null?!1:Array.from(details.children).find(child=>child.localName==="summary")!==branch}function isSourceLabelAvailable(node){const target=node.nodeType===1?node:sourceParent(node);if(!target?.isConnected)return!1;let branch=target,current=sourceParent(target);if(isAccessibilitySubtreeExcluded(target))return!1;for(;current;){if(isAccessibilitySubtreeExcluded(current)||isClosedSourceDetailsBranch(current,branch))return!1;branch=current,current=sourceParent(current)}return!0}class LyraChip extends LyraElement{constructor(){super(...arguments),this._size="m",this._variant="neutral",this.removable=!1,this.disabled=!1,this.pill=!1,this.selected=!1,this.toggleable=!1,this.wrap=!1,this.slotPresence=new SlotPresenceController(this),this.cachedLabelText="",this.labelTextObserver=new AccessibleTextController(this,[""],()=>{this.syncHostActionRole(),this.updateBrowserDerivedState(()=>this.recomputeLabelText())},["slot","role"],!1),this.managedActionGroupRole=!1,this.onLabelSlotChange=event=>{const target=event.target;target?.nodeType!==1||target.localName!=="slot"||this.tracksActionLabel&&(this.labelTextObserver.bind(),this.updateBrowserDerivedState(()=>this.recomputeLabelText()))},this.onRemoveClick=()=>{if(this.disabled)return;const repair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this));this.emit("lr-remove",{value:this.value}),repair&&(!this.isConnected||!this.removable)&&applyComposedFocusRepair(repair)},this.onToggleClick=()=>{if(this.disabled)return;const selected=!this.selected;this.emit("lr-chip-toggle-request",{value:this.value,selected},{cancelable:!0}).defaultPrevented||(this.selected=selected,this.emit("lr-chip-change",{value:this.value,selected}))}}static{this.defaultStrings={...super.defaultStrings,remove:LYRA_DEFAULT_remove,removeWithContext:LYRA_DEFAULT_removeWithContext,select:LYRA_DEFAULT_select}}static{this.styles=[LyraElement.styles,variants,styles]}get size(){return this._size}set size(next){const normalized=CHIP_SIZE.normalizeReflected(this,"size",next),old=this._size;old!==normalized&&(this._size=normalized,this.requestUpdate("size",old))}get variant(){return this._variant}set variant(next){const normalized=CHIP_VARIANT.normalizeReflected(this,"variant",next),old=this._variant;old!==normalized&&(this._variant=normalized,this.requestUpdate("variant",old))}get withRemove(){return this.removable}set withRemove(next){this.removable=!!next}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this.onLabelSlotChange),this.syncLabelObservation();const sampleBrowserState=()=>{this.tracksActionLabel&&this.recomputeLabelText(!0,!0)};this.hasUpdated?(sampleBrowserState(),this.ownerDocument.defaultView?.queueMicrotask(()=>{this.isConnected&&this.tracksActionLabel&&this.recomputeLabelText()})):this.seedFirstRenderState(sampleBrowserState)}get tracksActionLabel(){return this.toggleable||this.removable}syncLabelObservation(){this.labelTextObserver.setEnabled(this.tracksActionLabel)}disconnectedCallback(){this.removeEventListener("slotchange",this.onLabelSlotChange),this.releaseHostActionRole(),this.pendingControlFocusRepair=void 0,super.disconnectedCallback()}adoptedCallback(){super.adoptedCallback(),this.labelTextObserver.adopted()}computeLabelText(preferLightDom=!1){const slot=this.renderRoot?.querySelector("slot:not([name])"),lightDomNodes=this.childNodes,assigned=slot?.assignedNodes({flatten:!0})??[],direct=Array.from(lightDomNodes??[]).filter(node=>node.nodeType!==1||(node.getAttribute("slot")??"")==="");return(!preferLightDom&&assigned.length>0?assigned:direct).map(node=>composedAccessibilityText(node,{ancestorBoundary:this,isSubtreeExcluded:element=>element.getRootNode()===this.renderRoot&&element.getAttribute("part")?.split(/\s+/).includes("label")?!1:isAccessibilitySubtreeExcluded(element),requireRendered:preferLightDom?!1:node.nodeType!==1||node.localName!=="slot",shouldPruneNode:candidate=>!this.contains(candidate)&&!isSourceLabelAvailable(candidate),ignoreInheritedVisibility:!0})).join(" ").replace(/\s+/g," ").trim()}recomputeLabelText(request=!0,preferLightDom=!1){const next=this.computeLabelText(preferLightDom);next!==this.cachedLabelText&&(this.cachedLabelText=next,request&&this.requestUpdate())}get accessibleToggleLabel(){return this.cachedLabelText||this.localize("select")}get accessibleRemoveLabel(){const text=this.cachedLabelText;return text?this.localize("removeWithContext",void 0,{label:text}):this.localize("remove")}get primaryControl(){return this.renderRoot.querySelector(this.removable?'[part="remove-button"]':'[part="toggle-button"]')}focus(options){this.primaryControl?.focus(options)}blur(){this.primaryControl?.blur()}click(){const control=this.primaryControl;control?control.click():super.click()}willUpdate(changed){if(super.willUpdate(changed),changed.has("removable")&&!this.removable&&this.removeAttribute("with-remove"),(changed.has("removable")||changed.has("toggleable"))&&(this.syncLabelObservation(),this.hasUpdated&&(this.tracksActionLabel?this.recomputeLabelText(!1):this.cachedLabelText="")),this.pendingControlFocusRepair)return;const oldRemovable=changed.get("removable")??this.removable,oldToggleable=changed.get("toggleable")??this.toggleable,oldDisabled=changed.get("disabled")??this.disabled,oldMode=oldRemovable?"remove":oldToggleable?"toggle":"passive",newMode=this.removable?"remove":this.toggleable?"toggle":"passive";oldMode===newMode&&!(oldDisabled===!1&&this.disabled)||(this.pendingControlFocusRepair=captureComposedFocusRepair(this,()=>nearestExternalFocusTarget(this)??this.renderRoot.querySelector('[part="remove-button"], [part="toggle-button"]'))??void 0)}updated(changed){super.updated(changed),this.syncHostActionRole();const repair=this.pendingControlFocusRepair;if(this.pendingControlFocusRepair=void 0,!repair)return;const replacement=this.disabled?null:this.primaryControl;applyComposedFocusRepair(repair,replacement??repair.candidate)}syncHostActionRole(){const needsGroup=this.tracksActionLabel&&this.hasAttribute("aria-label");needsGroup&&!this.hasAttribute("role")?(this.setAttribute("role","group"),this.managedActionGroupRole=!0):needsGroup||this.releaseHostActionRole()}releaseHostActionRole(){this.managedActionGroupRole&&this.getAttribute("role")==="group"&&this.removeAttribute("role"),this.managedActionGroupRole=!1}render(){const toggleMode=this.toggleable&&!this.removable,pressed=this.selected&&!this.removable;return html`
2
2
  <span part="base">
3
3
  ${renderInertPresentation(html`<slot name="start"></slot>`,{part:"start",hidden:!this.slotPresence.has("start")})}
4
4
  ${renderInertPresentation(html`<slot @slotchange=${this.onLabelSlotChange}></slot>`,{part:"label",presentation:toggleMode})}
@@ -21,4 +21,4 @@ import{__decorate}from"tslib";import{AccessibleTextController}from"../../../inte
21
21
  ${closeIcon()}
22
22
  </button>`:nothing}
23
23
  </span>
24
- `}}__decorate([property({reflect:!0,converter:CHIP_SIZE})],LyraChip.prototype,"size",null),__decorate([property({reflect:!0,converter:CHIP_VARIANT})],LyraChip.prototype,"variant",null),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"removable",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"disabled",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"pill",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"selected",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"toggleable",void 0),__decorate([property()],LyraChip.prototype,"value",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"wrap",void 0);export{LyraChip};
24
+ `}}__decorate([property({reflect:!0,converter:CHIP_SIZE})],LyraChip.prototype,"size",null),__decorate([property({reflect:!0,converter:CHIP_VARIANT})],LyraChip.prototype,"variant",null),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"removable",void 0),__decorate([property({type:Boolean,attribute:"with-remove"})],LyraChip.prototype,"withRemove",null),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"disabled",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"pill",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"selected",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"toggleable",void 0),__decorate([property()],LyraChip.prototype,"value",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraChip.prototype,"wrap",void 0);export{LyraChip};
@@ -242,7 +242,7 @@ size:LyraSize;private hostAriaLabel;
242
242
  * backdrop dismissal on, so a mechanical `wa-dialog` → `lr-dialog` rename silently flipped the
243
243
  * behaviour of every migrated dialog. A rename that changes what the markup does with nothing
244
244
  * to warn on is worse than no rename at all, so the polarity now matches upstream exactly. */
245
- lightDismiss:boolean;private hasFooterSlot;private hasLabelSlot;private hasHeaderActionsSlot;private headingText?;private overlay?;private focusReturnOpener;private hideSettled?;private readonly deferredFocusReturn;private readonly nativeModal;private pendingScrollLockRelease?;private headingObserver?;private headingObserverDocument?;private headingObserverOpen?;private headingObserverGeneration;private bodyOverflowObserver?;private bodyOverflowObservedBody?;private transitionToken;private openRequestTarget?;private openRequestDuringPreflight?;private transitionAnimations;private initialFocusDecision?;private readonly headingId;private externalModalDepth;
245
+ lightDismiss:boolean;private hasFooterSlot;private hasLabelSlot;private hasHeaderActionsSlot;private headingText?;private overlay?;private focusReturnOpener;private hideSettled?;private readonly nativeModal;private pendingScrollLockRelease?;private headingObserver?;private headingObserverDocument?;private headingObserverOpen?;private headingObserverGeneration;private bodyOverflowObserver?;private bodyOverflowObservedBody?;private transitionToken;private openRequestTarget?;private openRequestDuringPreflight?;private transitionAnimations;private initialFocusDecision?;private readonly headingId;private externalModalDepth;
246
246
  /** Shoelace-compatible modal controller. External activation suspends this dialog's focus/Escape
247
247
  * ownership without changing its logical `open` state; deactivation restores it. */
248
248
  modal:LyraDialogModalController;