@aceshooting/lyra-ui 19.0.0 → 20.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 (419) hide show
  1. package/CHANGELOG.md +163 -0
  2. package/custom-elements.json +1 -1
  3. package/dist/cli/migration-contract.json +1 -1
  4. package/dist/components/agent-tools/activity-feed/activity-feed.class.d.ts +14 -4
  5. package/dist/components/agent-tools/activity-feed/activity-feed.styles.js +1 -1
  6. package/dist/components/agent-tools/approval-queue/approval-queue.class.d.ts +1 -0
  7. package/dist/components/agent-tools/approval-queue/approval-queue.class.js +4 -3
  8. package/dist/components/agent-tools/approval-queue/approval-queue.styles.js +1 -1
  9. package/dist/components/agent-tools/artifact-panel/artifact-panel.class.d.ts +3 -1
  10. package/dist/components/agent-tools/context-inspector/context-inspector.class.d.ts +1 -0
  11. package/dist/components/agent-tools/context-inspector/context-inspector.class.js +4 -3
  12. package/dist/components/agent-tools/context-inspector/context-inspector.styles.js +1 -1
  13. package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
  14. package/dist/components/agent-tools/eval-result/eval-result.class.js +1 -1
  15. package/dist/components/agent-tools/evaluation-run/evaluation-run.class.d.ts +1 -0
  16. package/dist/components/agent-tools/evaluation-run/evaluation-run.class.js +4 -3
  17. package/dist/components/agent-tools/evaluation-run/evaluation-run.styles.js +1 -1
  18. package/dist/components/agent-tools/policy-summary/policy-summary.class.d.ts +1 -0
  19. package/dist/components/agent-tools/policy-summary/policy-summary.class.js +4 -3
  20. package/dist/components/agent-tools/policy-summary/policy-summary.styles.js +1 -1
  21. package/dist/components/agent-tools/prompt-studio/prompt-studio.class.js +1 -1
  22. package/dist/components/agent-tools/schema-viewer/schema-viewer.class.d.ts +10 -1
  23. package/dist/components/agent-tools/schema-viewer/schema-viewer.class.js +3 -3
  24. package/dist/components/agent-tools/subagent-panel/subagent-panel.class.js +1 -1
  25. package/dist/components/agent-tools/thinking-panel/thinking-panel.class.d.ts +6 -3
  26. package/dist/components/agent-tools/thinking-panel/thinking-panel.styles.js +1 -1
  27. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +14 -3
  28. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +2 -2
  29. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.d.ts +12 -2
  30. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +3 -1
  31. package/dist/components/charts/chart/box-plot.class.d.ts +15 -3
  32. package/dist/components/charts/chart/box-plot.class.js +3 -3
  33. package/dist/components/charts/chart/box-plot.styles.js +1 -1
  34. package/dist/components/charts/chart/chart.class.d.ts +24 -6
  35. package/dist/components/charts/chart/chart.class.js +3 -3
  36. package/dist/components/charts/chart/chart.styles.js +1 -1
  37. package/dist/components/charts/chart/lite-chart.class.js +1 -1
  38. package/dist/components/charts/chart/lite-chart.styles.js +1 -1
  39. package/dist/components/conversation/audio-visualizer/audio-visualizer.class.d.ts +4 -2
  40. package/dist/components/conversation/audio-visualizer/audio-visualizer.class.js +1 -1
  41. package/dist/components/conversation/branch-picker/branch-picker.class.d.ts +4 -2
  42. package/dist/components/conversation/branch-picker/branch-picker.class.js +1 -1
  43. package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +4 -3
  44. package/dist/components/conversation/chat-viewport/chat-viewport.class.js +1 -1
  45. package/dist/components/conversation/code-block/code-block-core.class.d.ts +6 -11
  46. package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
  47. package/dist/components/conversation/code-block/code-block-shared.d.ts +29 -1
  48. package/dist/components/conversation/code-block/code-block-shared.js +1 -1
  49. package/dist/components/conversation/code-block/code-block.class.d.ts +6 -11
  50. package/dist/components/conversation/code-block/code-block.class.js +1 -1
  51. package/dist/components/conversation/markdown/markdown-shared.js +2 -2
  52. package/dist/components/conversation/message-actions/message-actions.class.d.ts +4 -2
  53. package/dist/components/conversation/message-actions/message-actions.class.js +2 -2
  54. package/dist/components/conversation/message-parts/message-parts.class.d.ts +17 -2
  55. package/dist/components/conversation/model-select/model-select.class.js +1 -0
  56. package/dist/components/conversation/model-select/model-select.styles.js +1 -1
  57. package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +5 -1
  58. package/dist/components/conversation/prompt-input/prompt-input.class.js +2 -2
  59. package/dist/components/conversation/prompt-queue/prompt-queue.class.d.ts +6 -1
  60. package/dist/components/conversation/prompt-queue/prompt-queue.class.js +2 -2
  61. package/dist/components/conversation/realtime-session/realtime-session.class.d.ts +5 -1
  62. package/dist/components/conversation/realtime-session/realtime-session.class.js +1 -1
  63. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +5 -1
  64. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.js +1 -1
  65. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +13 -2
  66. package/dist/components/conversation/voice-picker/voice-picker.class.js +5 -3
  67. package/dist/components/conversation/voice-picker/voice-picker.styles.js +1 -1
  68. package/dist/components/data/calendar/calendar.class.d.ts +9 -0
  69. package/dist/components/data/calendar/calendar.class.js +2 -2
  70. package/dist/components/data/calendar/calendar.styles.js +1 -1
  71. package/dist/components/data/condition-builder/condition-builder.class.d.ts +5 -1
  72. package/dist/components/data/context-meter/context-meter.class.d.ts +4 -0
  73. package/dist/components/data/context-meter/context-meter.styles.js +1 -1
  74. package/dist/components/data/data-grid/data-grid.class.d.ts +8 -2
  75. package/dist/components/data/data-grid/data-grid.class.js +1 -2
  76. package/dist/components/data/flow-node/flow-node.class.d.ts +7 -4
  77. package/dist/components/data/flow-node/flow-node.styles.js +1 -1
  78. package/dist/components/data/funnel/funnel.class.d.ts +5 -0
  79. package/dist/components/data/funnel/funnel.class.js +4 -3
  80. package/dist/components/data/funnel/funnel.styles.js +1 -1
  81. package/dist/components/data/gauge/gauge.class.d.ts +12 -1
  82. package/dist/components/data/gauge/gauge.styles.js +1 -1
  83. package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +50 -13
  84. package/dist/components/data/graph-query-builder/graph-query-builder.class.js +2 -2
  85. package/dist/components/data/graph-query-builder/graph-query-builder.styles.js +1 -1
  86. package/dist/components/data/heatmap/heatmap.class.d.ts +27 -9
  87. package/dist/components/data/heatmap/heatmap.class.js +5 -3
  88. package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +2 -0
  89. package/dist/components/data/sequence-strip/sequence-strip.styles.js +1 -1
  90. package/dist/components/data/table/table.class.d.ts +10 -1
  91. package/dist/components/data/table/table.class.js +3 -2
  92. package/dist/components/data/tree/tree.class.d.ts +20 -1
  93. package/dist/components/data/tree/tree.class.js +1 -1
  94. package/dist/components/data/word-cloud/word-cloud.class.d.ts +4 -1
  95. package/dist/components/data/word-cloud/word-cloud.class.js +2 -2
  96. package/dist/components/forms/button/button.class.js +1 -1
  97. package/dist/components/forms/checkbox/checkbox.class.d.ts +11 -8
  98. package/dist/components/forms/checkbox/checkbox.class.js +1 -1
  99. package/dist/components/forms/checkbox/checkbox.styles.js +1 -1
  100. package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +2 -2
  101. package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
  102. package/dist/components/forms/code-editor/code-editor.class.d.ts +2 -0
  103. package/dist/components/forms/code-editor/code-editor.class.js +1 -1
  104. package/dist/components/forms/code-editor/code-editor.styles.js +1 -1
  105. package/dist/components/forms/color-picker/color-picker.class.d.ts +11 -1
  106. package/dist/components/forms/color-picker/color-picker.class.js +4 -3
  107. package/dist/components/forms/combobox/combobox.class.d.ts +69 -20
  108. package/dist/components/forms/combobox/combobox.class.js +8 -6
  109. package/dist/components/forms/combobox/combobox.styles.js +1 -1
  110. package/dist/components/forms/date-picker/date-input.class.d.ts +22 -2
  111. package/dist/components/forms/date-picker/date-input.class.js +4 -2
  112. package/dist/components/forms/date-picker/date-input.styles.js +1 -1
  113. package/dist/components/forms/emoji-picker/emoji-data-loader.d.ts +18 -4
  114. package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
  115. package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +18 -4
  116. package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
  117. package/dist/components/forms/emoji-picker/emoji-picker.styles.js +1 -1
  118. package/dist/components/forms/icon-button/icon-button.class.d.ts +1 -1
  119. package/dist/components/forms/input/time-input.class.d.ts +11 -1
  120. package/dist/components/forms/input/time-input.class.js +4 -3
  121. package/dist/components/forms/input/time-input.styles.js +1 -1
  122. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +17 -3
  123. package/dist/components/forms/locale-picker/locale-picker.class.js +3 -2
  124. package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
  125. package/dist/components/forms/otp-input/otp-input.class.d.ts +13 -5
  126. package/dist/components/forms/otp-input/otp-input.class.js +2 -2
  127. package/dist/components/forms/otp-input/otp-input.styles.js +1 -1
  128. package/dist/components/forms/phone-input/phone-input.class.d.ts +10 -3
  129. package/dist/components/forms/phone-input/phone-input.class.js +6 -2
  130. package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
  131. package/dist/components/forms/radio/radio-group.class.d.ts +1 -1
  132. package/dist/components/forms/radio/radio-group.class.js +2 -2
  133. package/dist/components/forms/rubric-form/rubric-form.class.d.ts +9 -1
  134. package/dist/components/forms/rubric-form/rubric-form.class.js +5 -3
  135. package/dist/components/forms/select/select.class.d.ts +6 -2
  136. package/dist/components/forms/select/select.class.js +4 -2
  137. package/dist/components/forms/select/select.styles.js +1 -1
  138. package/dist/components/forms/slider/slider.class.d.ts +5 -1
  139. package/dist/components/forms/slider/slider.class.js +3 -3
  140. package/dist/components/forms/switch/switch.class.d.ts +6 -5
  141. package/dist/components/forms/switch/switch.class.js +1 -1
  142. package/dist/components/forms/time-range/time-range.class.d.ts +2 -2
  143. package/dist/components/forms/token-input/token-input.class.d.ts +13 -3
  144. package/dist/components/forms/token-input/token-input.class.js +3 -1
  145. package/dist/components/layout/carousel/carousel.class.d.ts +4 -1
  146. package/dist/components/layout/carousel/carousel.class.js +1 -1
  147. package/dist/components/layout/command-palette/command-palette.class.d.ts +8 -2
  148. package/dist/components/layout/command-palette/command-palette.class.js +1 -1
  149. package/dist/components/layout/command-palette/command-palette.styles.js +1 -1
  150. package/dist/components/layout/details/accordion.class.js +1 -1
  151. package/dist/components/layout/dock-panel/dock-panel.class.d.ts +10 -7
  152. package/dist/components/layout/dock-panel/dock-panel.class.js +2 -2
  153. package/dist/components/layout/dock-panel/dock-panel.styles.js +1 -1
  154. package/dist/components/layout/menu/menu.class.d.ts +13 -3
  155. package/dist/components/layout/menu/menu.class.js +4 -3
  156. package/dist/components/layout/menu/menu.styles.js +1 -1
  157. package/dist/components/layout/page/page.class.d.ts +7 -1
  158. package/dist/components/layout/reorder-list/reorder-list.class.d.ts +1 -1
  159. package/dist/components/layout/reorder-list/reorder-list.class.js +1 -1
  160. package/dist/components/layout/segmented/segmented.class.d.ts +2 -0
  161. package/dist/components/layout/segmented/segmented.styles.js +1 -1
  162. package/dist/components/layout/virtual-list/virtual-list.styles.js +1 -1
  163. package/dist/components/layout/widget/widget.class.d.ts +15 -2
  164. package/dist/components/layout/widget/widget.class.js +1 -1
  165. package/dist/components/layout/widget/widget.styles.js +1 -1
  166. package/dist/components/media/avatar/avatar.class.d.ts +4 -0
  167. package/dist/components/media/avatar/avatar.styles.js +1 -1
  168. package/dist/components/media/avatar-group/avatar-group.class.d.ts +8 -1
  169. package/dist/components/media/avatar-group/avatar-group.styles.js +1 -1
  170. package/dist/components/media/drop-zone/drop-zone.class.d.ts +10 -4
  171. package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
  172. package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
  173. package/dist/components/media/flag/flag.class.js +1 -1
  174. package/dist/components/media/map/map.class.d.ts +19 -5
  175. package/dist/components/media/map/map.class.js +3 -3
  176. package/dist/components/media/video-playlist/video-playlist.class.d.ts +6 -3
  177. package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
  178. package/dist/components/overlays/callout/callout.class.d.ts +4 -1
  179. package/dist/components/overlays/dialog/dialog.class.d.ts +4 -1
  180. package/dist/components/overlays/overlay/overlay.styles.js +1 -1
  181. package/dist/components/overlays/overlay/popover.class.d.ts +9 -1
  182. package/dist/components/overlays/overlay/popover.class.js +3 -2
  183. package/dist/components/overlays/overlay/tooltip.class.d.ts +14 -4
  184. package/dist/components/overlays/overlay/tooltip.class.js +3 -2
  185. package/dist/components/overlays/popup/popup.class.d.ts +15 -1
  186. package/dist/components/overlays/popup/popup.class.js +3 -3
  187. package/dist/components/overlays/popup/popup.styles.js +1 -1
  188. package/dist/components/overlays/progress/progress-bar.class.d.ts +2 -0
  189. package/dist/components/overlays/progress/progress.styles.js +1 -1
  190. package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +4 -2
  191. package/dist/components/retrieval/citation-badge/citation-badge.class.js +1 -1
  192. package/dist/components/retrieval/claim-evidence/claim-evidence.class.d.ts +4 -0
  193. package/dist/components/retrieval/claim-evidence/claim-evidence.class.js +4 -3
  194. package/dist/components/retrieval/claim-evidence/claim-evidence.styles.js +1 -1
  195. package/dist/components/retrieval/community-card/community-card.class.d.ts +6 -1
  196. package/dist/components/retrieval/community-card/community-card.styles.js +1 -1
  197. package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.d.ts +9 -1
  198. package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.js +4 -3
  199. package/dist/components/retrieval/entity-card/entity-card.styles.js +1 -1
  200. package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +4 -2
  201. package/dist/components/retrieval/entity-chip/entity-chip.class.js +1 -1
  202. package/dist/components/retrieval/entity-dossier/entity-dossier.class.js +2 -2
  203. package/dist/components/retrieval/graph-legend/graph-legend.class.d.ts +18 -4
  204. package/dist/components/retrieval/graph-legend/graph-legend.class.js +2 -2
  205. package/dist/components/retrieval/grounding-summary/grounding-summary.class.d.ts +7 -0
  206. package/dist/components/retrieval/grounding-summary/grounding-summary.class.js +4 -3
  207. package/dist/components/retrieval/grounding-summary/grounding-summary.styles.js +1 -1
  208. package/dist/components/retrieval/memory-panel/memory-panel.class.d.ts +6 -0
  209. package/dist/components/retrieval/memory-panel/memory-panel.class.js +4 -3
  210. package/dist/components/retrieval/memory-panel/memory-panel.styles.js +1 -1
  211. package/dist/components/retrieval/mind-map/mind-map-layout.d.ts +17 -1
  212. package/dist/components/retrieval/mind-map/mind-map-layout.js +1 -1
  213. package/dist/components/retrieval/mind-map/mind-map.class.d.ts +8 -1
  214. package/dist/components/retrieval/mind-map/mind-map.class.js +3 -2
  215. package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.d.ts +5 -0
  216. package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.js +6 -5
  217. package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.styles.js +1 -1
  218. package/dist/components/retrieval/retrieval-compare/retrieval-compare.class.js +5 -5
  219. package/dist/components/retrieval/retrieval-compare/retrieval-compare.styles.js +1 -1
  220. package/dist/components/retrieval/source-list/source-list.class.d.ts +21 -2
  221. package/dist/components/retrieval/source-list/source-list.class.js +2 -2
  222. package/dist/components/retrieval/source-list/source-list.styles.js +1 -1
  223. package/dist/components/retrieval/source-picker/source-picker.class.d.ts +3 -1
  224. package/dist/components/retrieval/source-picker/source-picker.class.js +2 -2
  225. package/dist/components/utility/diff-view/diff-view.class.d.ts +105 -8
  226. package/dist/components/utility/diff-view/diff-view.class.js +21 -5
  227. package/dist/components/utility/diff-view/diff-view.styles.js +1 -1
  228. package/dist/components/utility/export-button/export-button.class.d.ts +26 -2
  229. package/dist/components/utility/export-button/export-button.class.js +4 -2
  230. package/dist/components/utility/export-button/export-button.styles.js +1 -1
  231. package/dist/components/utility/mention-popover/mention-popover.class.d.ts +19 -1
  232. package/dist/components/utility/mention-popover/mention-popover.class.js +3 -2
  233. package/dist/components/utility/mention-popover/mention-popover.styles.js +1 -1
  234. package/dist/components/utility/tour/tour.class.d.ts +1 -3
  235. package/dist/components/utility/tour/tour.class.js +1 -1
  236. package/dist/components/viewers/archive-viewer/archive-viewer.class.d.ts +20 -3
  237. package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
  238. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
  239. package/dist/components/viewers/geojson-view/geojson-view.styles.js +1 -1
  240. package/dist/components/viewers/geojson-view/geojson-viewer.class.d.ts +5 -0
  241. package/dist/components/viewers/geojson-view/geojson-viewer.class.js +6 -3
  242. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +7 -1
  243. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +1 -1
  244. package/dist/components/viewers/pptx-viewer/pptx-viewer.class.d.ts +7 -1
  245. package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
  246. package/dist/components/viewers/xml-viewer/xml-viewer.class.d.ts +5 -0
  247. package/dist/components/viewers/xml-viewer/xml-viewer.class.js +1 -1
  248. package/dist/custom-elements-jsx.d.ts +1 -1
  249. package/dist/events.d.ts +79 -30
  250. package/dist/internal/accessibility-visibility.js +1 -1
  251. package/dist/internal/aria-reflection.js +1 -1
  252. package/dist/internal/catalog-picker.d.ts +14 -3
  253. package/dist/internal/catalog-picker.js +1 -1
  254. package/dist/internal/default-strings.generated.d.ts +1 -1
  255. package/dist/internal/default-strings.generated.js +2 -2
  256. package/dist/internal/localization-types.d.ts +1 -1
  257. package/dist/internal/localization.js +2 -2
  258. package/dist/internal/lyra-element.d.ts +17 -0
  259. package/dist/internal/lyra-element.js +2 -2
  260. package/dist/internal/package-metadata.d.ts +1 -1
  261. package/dist/internal/package-metadata.js +1 -1
  262. package/dist/svelte.d.ts +1 -1
  263. package/dist/testing/lyra-tag-event-map.js +1 -1
  264. package/dist/translations/ar/agent-tools.js +1 -1
  265. package/dist/translations/ar/data.js +1 -1
  266. package/dist/translations/ar/retrieval.js +1 -1
  267. package/dist/translations/ar/shared.js +1 -1
  268. package/dist/translations/ar/viewers.js +1 -1
  269. package/dist/translations/de/agent-tools.js +1 -1
  270. package/dist/translations/de/data.js +1 -1
  271. package/dist/translations/de/retrieval.js +1 -1
  272. package/dist/translations/de/shared.js +1 -1
  273. package/dist/translations/de/viewers.js +1 -1
  274. package/dist/translations/es/agent-tools.js +1 -1
  275. package/dist/translations/es/data.js +1 -1
  276. package/dist/translations/es/retrieval.js +1 -1
  277. package/dist/translations/es/shared.js +1 -1
  278. package/dist/translations/es/viewers.js +1 -1
  279. package/dist/translations/fa/agent-tools.js +1 -1
  280. package/dist/translations/fa/data.js +1 -1
  281. package/dist/translations/fa/retrieval.js +1 -1
  282. package/dist/translations/fa/shared.js +1 -1
  283. package/dist/translations/fa/viewers.js +1 -1
  284. package/dist/translations/fr/agent-tools.js +1 -1
  285. package/dist/translations/fr/data.js +1 -1
  286. package/dist/translations/fr/retrieval.js +1 -1
  287. package/dist/translations/fr/shared.js +1 -1
  288. package/dist/translations/fr/viewers.js +1 -1
  289. package/dist/translations/he/agent-tools.js +1 -1
  290. package/dist/translations/he/data.js +1 -1
  291. package/dist/translations/he/retrieval.js +1 -1
  292. package/dist/translations/he/shared.js +1 -1
  293. package/dist/translations/he/viewers.js +1 -1
  294. package/dist/translations/it/agent-tools.js +1 -1
  295. package/dist/translations/it/data.js +1 -1
  296. package/dist/translations/it/retrieval.js +1 -1
  297. package/dist/translations/it/shared.js +1 -1
  298. package/dist/translations/it/viewers.js +1 -1
  299. package/dist/translations/ja/agent-tools.js +1 -1
  300. package/dist/translations/ja/data.js +1 -1
  301. package/dist/translations/ja/retrieval.js +1 -1
  302. package/dist/translations/ja/shared.js +1 -1
  303. package/dist/translations/ja/viewers.js +1 -1
  304. package/dist/translations/pt-BR/agent-tools.js +1 -1
  305. package/dist/translations/pt-BR/data.js +1 -1
  306. package/dist/translations/pt-BR/retrieval.js +1 -1
  307. package/dist/translations/pt-BR/shared.js +1 -1
  308. package/dist/translations/pt-BR/viewers.js +1 -1
  309. package/dist/translations/ro/agent-tools.js +1 -1
  310. package/dist/translations/ro/data.js +1 -1
  311. package/dist/translations/ro/retrieval.js +1 -1
  312. package/dist/translations/ro/shared.js +1 -1
  313. package/dist/translations/ro/viewers.js +1 -1
  314. package/dist/translations/ru/agent-tools.js +1 -1
  315. package/dist/translations/ru/data.js +1 -1
  316. package/dist/translations/ru/retrieval.js +1 -1
  317. package/dist/translations/ru/shared.js +1 -1
  318. package/dist/translations/ru/viewers.js +1 -1
  319. package/dist/translations/zh-CN/agent-tools.js +1 -1
  320. package/dist/translations/zh-CN/data.js +1 -1
  321. package/dist/translations/zh-CN/retrieval.js +1 -1
  322. package/dist/translations/zh-CN/shared.js +1 -1
  323. package/dist/translations/zh-CN/viewers.js +1 -1
  324. package/dist/vue.d.ts +1 -1
  325. package/llms/components/lr-activity-feed.md +20 -9
  326. package/llms/components/lr-approval-queue.md +3 -2
  327. package/llms/components/lr-archive-viewer.md +8 -1
  328. package/llms/components/lr-artifact-panel.md +3 -1
  329. package/llms/components/lr-audio-visualizer.md +3 -1
  330. package/llms/components/lr-avatar-group.md +13 -6
  331. package/llms/components/lr-avatar.md +6 -2
  332. package/llms/components/lr-bar-chart.md +6 -3
  333. package/llms/components/lr-box-plot.md +6 -2
  334. package/llms/components/lr-branch-picker.md +3 -1
  335. package/llms/components/lr-bubble-chart.md +6 -3
  336. package/llms/components/lr-calendar.md +10 -3
  337. package/llms/components/lr-carousel.md +4 -2
  338. package/llms/components/lr-chart.md +12 -4
  339. package/llms/components/lr-chat-viewport.md +3 -2
  340. package/llms/components/lr-checkbox.md +8 -5
  341. package/llms/components/lr-citation-badge.md +2 -0
  342. package/llms/components/lr-claim-evidence.md +6 -2
  343. package/llms/components/lr-code-editor.md +3 -1
  344. package/llms/components/lr-color-picker.md +20 -8
  345. package/llms/components/lr-combobox.md +26 -3
  346. package/llms/components/lr-command-palette.md +6 -3
  347. package/llms/components/lr-community-card.md +7 -4
  348. package/llms/components/lr-context-inspector.md +3 -2
  349. package/llms/components/lr-context-meter.md +13 -5
  350. package/llms/components/lr-data-grid.md +2 -0
  351. package/llms/components/lr-date-input.md +12 -3
  352. package/llms/components/lr-date-picker.md +11 -2
  353. package/llms/components/lr-diff-view.md +46 -5
  354. package/llms/components/lr-doughnut-chart.md +6 -3
  355. package/llms/components/lr-drop-zone.md +7 -3
  356. package/llms/components/lr-embedding-explorer.md +8 -2
  357. package/llms/components/lr-emoji-picker.md +5 -1
  358. package/llms/components/lr-entity-chip.md +2 -0
  359. package/llms/components/lr-eval-run.md +3 -2
  360. package/llms/components/lr-export-button.md +5 -2
  361. package/llms/components/lr-flow-node.md +7 -4
  362. package/llms/components/lr-funnel.md +7 -2
  363. package/llms/components/lr-gauge.md +7 -2
  364. package/llms/components/lr-geojson-view.md +10 -2
  365. package/llms/components/lr-geojson-viewer.md +10 -2
  366. package/llms/components/lr-graph-legend.md +6 -3
  367. package/llms/components/lr-graph-query-builder.md +21 -11
  368. package/llms/components/lr-grounding-summary.md +8 -2
  369. package/llms/components/lr-heatmap.md +5 -2
  370. package/llms/components/lr-histogram.md +4 -2
  371. package/llms/components/lr-json-schema-viewer.md +7 -5
  372. package/llms/components/lr-line-chart.md +6 -3
  373. package/llms/components/lr-locale-picker.md +4 -1
  374. package/llms/components/lr-map.md +5 -3
  375. package/llms/components/lr-memory-panel.md +6 -2
  376. package/llms/components/lr-mention-popover.md +7 -4
  377. package/llms/components/lr-message-actions.md +3 -1
  378. package/llms/components/lr-message-parts.md +8 -2
  379. package/llms/components/lr-mind-map.md +11 -2
  380. package/llms/components/lr-option.md +25 -2
  381. package/llms/components/lr-otp-input.md +3 -1
  382. package/llms/components/lr-phone-input.md +9 -5
  383. package/llms/components/lr-pie-chart.md +6 -3
  384. package/llms/components/lr-polar-area-chart.md +6 -3
  385. package/llms/components/lr-policy-summary.md +3 -2
  386. package/llms/components/lr-progress-bar.md +4 -1
  387. package/llms/components/lr-prompt-input.md +4 -1
  388. package/llms/components/lr-prompt-queue.md +5 -2
  389. package/llms/components/lr-radar-chart.md +6 -3
  390. package/llms/components/lr-rag-eval-dashboard.md +7 -2
  391. package/llms/components/lr-realtime-session.md +3 -1
  392. package/llms/components/lr-rubric-form.md +6 -1
  393. package/llms/components/lr-scatter-chart.md +6 -3
  394. package/llms/components/lr-segmented.md +3 -1
  395. package/llms/components/lr-select.md +7 -1
  396. package/llms/components/lr-selection-toolbar.md +4 -1
  397. package/llms/components/lr-sequence-strip.md +7 -3
  398. package/llms/components/lr-source-card.md +16 -1
  399. package/llms/components/lr-source-list.md +17 -2
  400. package/llms/components/lr-source-picker.md +3 -1
  401. package/llms/components/lr-subagent-panel.md +6 -3
  402. package/llms/components/lr-switch.md +4 -3
  403. package/llms/components/lr-table.md +6 -1
  404. package/llms/components/lr-thinking-panel.md +8 -5
  405. package/llms/components/lr-token-input.md +15 -1
  406. package/llms/components/lr-tool-call-chip.md +2 -0
  407. package/llms/components/lr-tool-param-form.md +15 -4
  408. package/llms/components/lr-tooltip.md +8 -4
  409. package/llms/components/lr-trace-tree.md +7 -4
  410. package/llms/components/lr-video-playlist.md +7 -5
  411. package/llms/components/lr-voice-picker.md +7 -4
  412. package/llms/components/lr-widget.md +15 -2
  413. package/llms/migration.md +4 -4
  414. package/llms-full.txt +552 -159
  415. package/package.json +10 -8
  416. package/registrations.json +1 -1
  417. package/vscode-css-data.json +1 -1
  418. package/vscode-html-data.json +1 -1
  419. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{srOnly}from"../../../internal/a11y.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{attachInternalsSafely}from"../../../internal/form-associated.js";import{setCustomState}from"../../../internal/custom-states.js";import{finiteCount,finiteRange}from"../../../internal/numbers.js";import{AggregateFileLimitTracker}from"../../../internal/aggregate-file-limits.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{fileIcon}from"../../../internal/icons.js";import{presenceTrueDefaultBooleanConverter as trueDefaultBooleanConverter}from"../../../internal/converters.js";import{DropSessionController}from"../../../internal/drop-session-controller.js";import{matchesAccept}from"../file-input/accept.js";import{styles}from"./drop-zone.styles.js";import{LYRA_DEFAULT_dropzoneRejectedType,LYRA_DEFAULT_dropzoneReleaseToAdd,LYRA_DEFAULT_fieldRequired,LYRA_DEFAULT_fileInputAcceptedMany,LYRA_DEFAULT_fileInputAcceptedOne,LYRA_DEFAULT_fileInputFolderRejected,LYRA_DEFAULT_fileInputRejectedCount,LYRA_DEFAULT_fileInputRejectedLimit,LYRA_DEFAULT_fileInputRejectedMany,LYRA_DEFAULT_fileInputRejectedMaxFiles,LYRA_DEFAULT_fileInputRejectedMaxTotalSize,LYRA_DEFAULT_fileInputRejectedOne,LYRA_DEFAULT_fileInputRejectedRead,LYRA_DEFAULT_fileInputRejectedSize,LYRA_DEFAULT_fileInputRejectedType}from"../../../internal/default-strings.generated.js";const DEFAULT_MAX_FILE_SIZE_BYTES=25*1024*1024,DEFAULT_MAX_FILES=100,DEFAULT_MAX_TOTAL_SIZE_BYTES=250*1024*1024;class LyraDropZone extends LyraElement{static{this.defaultStrings={...super.defaultStrings,dropzoneRejectedType:LYRA_DEFAULT_dropzoneRejectedType,dropzoneReleaseToAdd:LYRA_DEFAULT_dropzoneReleaseToAdd,fieldRequired:LYRA_DEFAULT_fieldRequired,fileInputAcceptedMany:LYRA_DEFAULT_fileInputAcceptedMany,fileInputAcceptedOne:LYRA_DEFAULT_fileInputAcceptedOne,fileInputFolderRejected:LYRA_DEFAULT_fileInputFolderRejected,fileInputRejectedCount:LYRA_DEFAULT_fileInputRejectedCount,fileInputRejectedLimit:LYRA_DEFAULT_fileInputRejectedLimit,fileInputRejectedMany:LYRA_DEFAULT_fileInputRejectedMany,fileInputRejectedMaxFiles:LYRA_DEFAULT_fileInputRejectedMaxFiles,fileInputRejectedMaxTotalSize:LYRA_DEFAULT_fileInputRejectedMaxTotalSize,fileInputRejectedOne:LYRA_DEFAULT_fileInputRejectedOne,fileInputRejectedRead:LYRA_DEFAULT_fileInputRejectedRead,fileInputRejectedSize:LYRA_DEFAULT_fileInputRejectedSize,fileInputRejectedType:LYRA_DEFAULT_fileInputRejectedType}}static{this.immutableEventDetails=Object.freeze(["lr-files"])}static{this.styles=[LyraElement.styles,styles,srOnly]}constructor(){super(),this.disabled=!1,this.multiple=!0,this.accept="",this.maxFileSize=0,this.maxFiles=0,this.maxTotalSize=0,this.heldFileCount=0,this.heldTotalSize=0,this.dragState="default",this.rejectedFiles=Object.freeze([]),this.resultStatus="",this.announcementsArmed=!1,this.onDragEnter=e=>this.dropSession.onDragEnter(e),this.onDragOver=e=>this.dropSession.onDragOver(e),this.onDragLeave=e=>this.dropSession.onDragLeave(e),this.onDrop=e=>{const drop=this.dropSession.beginDrop(e);if(!drop)return;const{token,files,folders,overLimit}=drop;if(overLimit&&this.multiple){this.emitFiles([],[this.folderFailure(folders[0]?.name??"","limit")]);return}if(folders.length&&this.multiple){this.dropSession.readFolders(folders,token).then(result=>{if(!this.dropSession.isCurrent(token)||result.status==="cancelled")return;if(result.status==="error"||result.status==="limit"){this.emitFiles([],[this.folderFailure(result.name,result.status==="limit"?"limit":"read")]);return}const allFiles=[...files,...result.files];allFiles.length&&this.emitFiles(allFiles)});return}const rejectedFolders=folders.map(folder=>this.folderFailure(folder.name,"directory"));(files.length||rejectedFolders.length)&&this.emitFiles(files,rejectedFolders)},this.internals=attachInternalsSafely(this),this.dropSession=new DropSessionController(this,{isDisabled:()=>this.disabled,previewRejects:items=>this.classify(items,!0).rejected.length>0,onStateChange:()=>{this.dragState=this.dropSession.state,setCustomState(this.internals,"dragging",this.dropSession.dragging)}})}get dragging(){return this.dragState!=="default"}willUpdate(changed){super.willUpdate(changed),changed.has("disabled")&&this.disabled&&this.dropSession.reset()}connectedCallback(){super.connectedCallback(),this.politeSink??=acquireAnnouncementSink("polite",{document:this.ownerDocument,source:this}),this.assertiveSink??=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this})}disconnectedCallback(){this.politeSink?.release(),this.politeSink=void 0,this.assertiveSink?.release(),this.assertiveSink=void 0,this.announcementsArmed=!1,super.disconnectedCallback()}updated(changed){super.updated(changed),this.announcementsArmed&&(changed.has("dragState")&&this.dragState!=="default"&&this.politeSink?.announce(this.overlayText()),changed.has("resultStatus")&&this.resultStatus&&this.politeSink?.announce(this.resultStatus),changed.has("rejectedFiles")&&this.rejectedFiles.length>0&&this.assertiveSink?.announce(this.rejectedFiles.map(rejected=>this.rejectionMessage(rejected)).join(" "))),this.announcementsArmed=!0}get effectiveMaxFileSize(){const maxFileSize=this.maxFileSize;return maxFileSize===0||maxFileSize===1/0?null:finiteRange(maxFileSize>0?maxFileSize:NaN,DEFAULT_MAX_FILE_SIZE_BYTES,1)}get effectiveMaxFiles(){const maxFiles=this.maxFiles;return maxFiles===0||maxFiles===1/0?null:finiteRange(maxFiles>0?maxFiles:NaN,DEFAULT_MAX_FILES,1)}get effectiveMaxTotalSize(){const maxTotalSize=this.maxTotalSize;return maxTotalSize===0||maxTotalSize===1/0?null:finiteRange(maxTotalSize>0?maxTotalSize:NaN,DEFAULT_MAX_TOTAL_SIZE_BYTES,1)}isAllowed(file,isPreview=!1){if(this.accept&&!matchesAccept(file,this.accept,isPreview))return"type";const maxFileSize=this.effectiveMaxFileSize;return maxFileSize!==null&&file.size>maxFileSize?"size":"ok"}classify(fileList,isPreview=!1){const limits={maxFiles:this.effectiveMaxFiles,maxTotalSize:this.effectiveMaxTotalSize},tracker=new AggregateFileLimitTracker(finiteCount(this.heldFileCount,0),finiteCount(this.heldTotalSize,0));if(!this.multiple&&fileList.length>1)return{files:[],rejected:fileList.map(file=>({file,reason:"count"})),...tracker.allowance(limits)};const files=[],rejected=[];for(const f of fileList){const reason=this.isAllowed(f,isPreview);if(reason!=="ok"){rejected.push({file:f,reason});continue}const limitReason=tracker.evaluate(f,limits);if(limitReason){rejected.push({file:f,reason:limitReason});continue}files.push(f)}return{files,rejected,...tracker.allowance(limits)}}rejectionMessage(rejected){const filename=rejected.file.name;switch(rejected.reason){case"type":return this.localize("fileInputRejectedType",void 0,{filename});case"size":return this.localize("fileInputRejectedSize",void 0,{filename});case"count":return this.localize("fileInputRejectedCount",void 0,{filename});case"directory":return this.localize("fileInputFolderRejected",void 0,{filename});case"read":return this.localize("fileInputRejectedRead",void 0,{filename});case"limit":return this.localize("fileInputRejectedLimit",void 0,{filename});case"maxFiles":return this.localize("fileInputRejectedMaxFiles",void 0,{filename});case"maxTotalSize":return this.localize("fileInputRejectedMaxTotalSize",void 0,{filename})}}emitFiles(fileList,additionalRejected=[]){const{files,rejected,remainingFiles,remainingTotalSize}=this.classify(fileList);rejected.push(...additionalRejected);const rejectedSnapshot=Object.freeze(rejected.map(item=>Object.freeze({...item}))),filesSnapshot=Object.freeze([...files]);this.rejectedFiles=rejectedSnapshot;const messages=[],numberFormat=getNumberFormat(this.effectiveLocale);files.length&&messages.push(this.localize(files.length===1?"fileInputAcceptedOne":"fileInputAcceptedMany",void 0,{count:numberFormat.format(files.length)})),rejected.length&&messages.push(this.localize(rejected.length===1?"fileInputRejectedOne":"fileInputRejectedMany",void 0,{count:numberFormat.format(rejected.length)})),this.resultStatus=messages.filter(message=>message.length>0).join(" "),this.emit("lr-files",Object.freeze({files:filesSnapshot,rejected:rejectedSnapshot,remainingFiles,remainingTotalSize}))}folderFailure(name,reason){const FileCtor=this.ownerDocument.defaultView?.File??globalThis.File;return Object.freeze({file:new FileCtor([],name),reason})}overlayText(){return this.dragState==="accept"?this.localize("dropzoneReleaseToAdd"):this.dragState==="reject"?this.localize("dropzoneRejectedType"):""}statusText(){return this.dragState==="default"?this.resultStatus:this.overlayText()}render(){return html`
1
+ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{srOnly}from"../../../internal/a11y.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{attachInternalsSafely}from"../../../internal/form-associated.js";import{setCustomState}from"../../../internal/custom-states.js";import{finiteCount,finiteRange}from"../../../internal/numbers.js";import{AggregateFileLimitTracker}from"../../../internal/aggregate-file-limits.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{fileIcon}from"../../../internal/icons.js";import{presenceTrueDefaultBooleanConverter as trueDefaultBooleanConverter}from"../../../internal/converters.js";import{DropSessionController}from"../../../internal/drop-session-controller.js";import{matchesAccept}from"../file-input/accept.js";import{styles}from"./drop-zone.styles.js";import{LYRA_DEFAULT_dropzoneRejectedType,LYRA_DEFAULT_dropzoneReleaseToAdd,LYRA_DEFAULT_fieldRequired,LYRA_DEFAULT_fileInputAcceptedMany,LYRA_DEFAULT_fileInputAcceptedOne,LYRA_DEFAULT_fileInputFolderRejected,LYRA_DEFAULT_fileInputRejectedCount,LYRA_DEFAULT_fileInputRejectedLimit,LYRA_DEFAULT_fileInputRejectedMany,LYRA_DEFAULT_fileInputRejectedMaxFiles,LYRA_DEFAULT_fileInputRejectedMaxTotalSize,LYRA_DEFAULT_fileInputRejectedOne,LYRA_DEFAULT_fileInputRejectedRead,LYRA_DEFAULT_fileInputRejectedSize,LYRA_DEFAULT_fileInputRejectedType}from"../../../internal/default-strings.generated.js";const DEFAULT_MAX_FILE_SIZE_BYTES=25*1024*1024,DEFAULT_MAX_FILES=100,DEFAULT_MAX_TOTAL_SIZE_BYTES=250*1024*1024;class LyraDropZone extends LyraElement{static{this.defaultStrings={...super.defaultStrings,dropzoneRejectedType:LYRA_DEFAULT_dropzoneRejectedType,dropzoneReleaseToAdd:LYRA_DEFAULT_dropzoneReleaseToAdd,fieldRequired:LYRA_DEFAULT_fieldRequired,fileInputAcceptedMany:LYRA_DEFAULT_fileInputAcceptedMany,fileInputAcceptedOne:LYRA_DEFAULT_fileInputAcceptedOne,fileInputFolderRejected:LYRA_DEFAULT_fileInputFolderRejected,fileInputRejectedCount:LYRA_DEFAULT_fileInputRejectedCount,fileInputRejectedLimit:LYRA_DEFAULT_fileInputRejectedLimit,fileInputRejectedMany:LYRA_DEFAULT_fileInputRejectedMany,fileInputRejectedMaxFiles:LYRA_DEFAULT_fileInputRejectedMaxFiles,fileInputRejectedMaxTotalSize:LYRA_DEFAULT_fileInputRejectedMaxTotalSize,fileInputRejectedOne:LYRA_DEFAULT_fileInputRejectedOne,fileInputRejectedRead:LYRA_DEFAULT_fileInputRejectedRead,fileInputRejectedSize:LYRA_DEFAULT_fileInputRejectedSize,fileInputRejectedType:LYRA_DEFAULT_fileInputRejectedType}}static{this.immutableEventDetails=Object.freeze(["lr-files"])}static{this.styles=[LyraElement.styles,styles,srOnly]}constructor(){super(),this.disabled=!1,this.multiple=!0,this.accept="",this.maxFileSize=0,this.maxFiles=0,this.maxTotalSize=0,this.heldFileCount=0,this.heldTotalSize=0,this.size="m",this.dragState="default",this.rejectedFiles=Object.freeze([]),this.resultStatus="",this.announcementsArmed=!1,this.onDragEnter=e=>this.dropSession.onDragEnter(e),this.onDragOver=e=>this.dropSession.onDragOver(e),this.onDragLeave=e=>this.dropSession.onDragLeave(e),this.onDrop=e=>{const drop=this.dropSession.beginDrop(e);if(!drop)return;const{token,files,folders,overLimit}=drop;if(overLimit&&this.multiple){this.emitFiles([],[this.folderFailure(folders[0]?.name??"","limit")]);return}if(folders.length&&this.multiple){this.dropSession.readFolders(folders,token).then(result=>{if(!this.dropSession.isCurrent(token)||result.status==="cancelled")return;if(result.status==="error"||result.status==="limit"){this.emitFiles([],[this.folderFailure(result.name,result.status==="limit"?"limit":"read")]);return}const allFiles=[...files,...result.files];allFiles.length&&this.emitFiles(allFiles)});return}const rejectedFolders=folders.map(folder=>this.folderFailure(folder.name,"directory"));(files.length||rejectedFolders.length)&&this.emitFiles(files,rejectedFolders)},this.internals=attachInternalsSafely(this),this.dropSession=new DropSessionController(this,{isDisabled:()=>this.disabled,previewRejects:items=>this.classify(items,!0).rejected.length>0,onStateChange:()=>{this.dragState=this.dropSession.state,setCustomState(this.internals,"dragging",this.dropSession.dragging)}})}get dragging(){return this.dragState!=="default"}willUpdate(changed){super.willUpdate(changed),changed.has("disabled")&&this.disabled&&this.dropSession.reset()}connectedCallback(){super.connectedCallback(),this.politeSink??=acquireAnnouncementSink("polite",{document:this.ownerDocument,source:this}),this.assertiveSink??=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this})}disconnectedCallback(){this.politeSink?.release(),this.politeSink=void 0,this.assertiveSink?.release(),this.assertiveSink=void 0,this.announcementsArmed=!1,super.disconnectedCallback()}updated(changed){super.updated(changed),this.announcementsArmed&&(changed.has("dragState")&&this.dragState!=="default"&&this.politeSink?.announce(this.overlayText()),changed.has("resultStatus")&&this.resultStatus&&this.politeSink?.announce(this.resultStatus),changed.has("rejectedFiles")&&this.rejectedFiles.length>0&&this.assertiveSink?.announce(this.rejectedFiles.map(rejected=>this.rejectionMessage(rejected)).join(" "))),this.announcementsArmed=!0}get effectiveMaxFileSize(){const maxFileSize=this.maxFileSize;return maxFileSize===0||maxFileSize===1/0?null:finiteRange(maxFileSize>0?maxFileSize:NaN,DEFAULT_MAX_FILE_SIZE_BYTES,1)}get effectiveMaxFiles(){const maxFiles=this.maxFiles;return maxFiles===0||maxFiles===1/0?null:finiteRange(maxFiles>0?maxFiles:NaN,DEFAULT_MAX_FILES,1)}get effectiveMaxTotalSize(){const maxTotalSize=this.maxTotalSize;return maxTotalSize===0||maxTotalSize===1/0?null:finiteRange(maxTotalSize>0?maxTotalSize:NaN,DEFAULT_MAX_TOTAL_SIZE_BYTES,1)}isAllowed(file,isPreview=!1){if(this.accept&&!matchesAccept(file,this.accept,isPreview))return"type";const maxFileSize=this.effectiveMaxFileSize;return maxFileSize!==null&&file.size>maxFileSize?"size":"ok"}classify(fileList,isPreview=!1){const limits={maxFiles:this.effectiveMaxFiles,maxTotalSize:this.effectiveMaxTotalSize},tracker=new AggregateFileLimitTracker(finiteCount(this.heldFileCount,0),finiteCount(this.heldTotalSize,0));if(!this.multiple&&fileList.length>1)return{files:[],rejected:fileList.map(file=>({file,reason:"count"})),...tracker.allowance(limits)};const files=[],rejected=[];for(const f of fileList){const reason=this.isAllowed(f,isPreview);if(reason!=="ok"){rejected.push({file:f,reason});continue}const limitReason=tracker.evaluate(f,limits);if(limitReason){rejected.push({file:f,reason:limitReason});continue}files.push(f)}return{files,rejected,...tracker.allowance(limits)}}rejectionMessage(rejected){const filename=rejected.file.name;switch(rejected.reason){case"type":return this.localize("fileInputRejectedType",void 0,{filename});case"size":return this.localize("fileInputRejectedSize",void 0,{filename});case"count":return this.localize("fileInputRejectedCount",void 0,{filename});case"directory":return this.localize("fileInputFolderRejected",void 0,{filename});case"read":return this.localize("fileInputRejectedRead",void 0,{filename});case"limit":return this.localize("fileInputRejectedLimit",void 0,{filename});case"maxFiles":return this.localize("fileInputRejectedMaxFiles",void 0,{filename});case"maxTotalSize":return this.localize("fileInputRejectedMaxTotalSize",void 0,{filename})}}emitFiles(fileList,additionalRejected=[]){const{files,rejected,remainingFiles,remainingTotalSize}=this.classify(fileList);rejected.push(...additionalRejected);const rejectedSnapshot=Object.freeze(rejected.map(item=>Object.freeze({...item}))),filesSnapshot=Object.freeze([...files]);this.rejectedFiles=rejectedSnapshot;const messages=[],numberFormat=getNumberFormat(this.effectiveLocale);files.length&&messages.push(this.localize(files.length===1?"fileInputAcceptedOne":"fileInputAcceptedMany",void 0,{count:numberFormat.format(files.length)})),rejected.length&&messages.push(this.localize(rejected.length===1?"fileInputRejectedOne":"fileInputRejectedMany",void 0,{count:numberFormat.format(rejected.length)})),this.resultStatus=messages.filter(message=>message.length>0).join(" "),this.emit("lr-files",Object.freeze({files:filesSnapshot,rejected:rejectedSnapshot,remainingFiles,remainingTotalSize}))}folderFailure(name,reason){const FileCtor=this.ownerDocument.defaultView?.File??globalThis.File;return Object.freeze({file:new FileCtor([],name),reason})}overlayText(){return this.dragState==="accept"?this.localize("dropzoneReleaseToAdd"):this.dragState==="reject"?this.localize("dropzoneRejectedType"):""}statusText(){return this.dragState==="default"?this.resultStatus:this.overlayText()}render(){return html`
2
2
  <div
3
3
  part="base"
4
4
  @dragenter=${this.onDragEnter}
@@ -20,4 +20,4 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
20
20
  </ul>
21
21
  </div>
22
22
  `:nothing}
23
- `}}__decorate([property({type:Boolean,reflect:!0})],LyraDropZone.prototype,"disabled",void 0),__decorate([property({type:Boolean,reflect:!0,converter:trueDefaultBooleanConverter})],LyraDropZone.prototype,"multiple",void 0),__decorate([property()],LyraDropZone.prototype,"accept",void 0),__decorate([property({type:Number,attribute:"max-file-size"})],LyraDropZone.prototype,"maxFileSize",void 0),__decorate([property({type:Number,attribute:"max-files"})],LyraDropZone.prototype,"maxFiles",void 0),__decorate([property({type:Number,attribute:"max-total-size"})],LyraDropZone.prototype,"maxTotalSize",void 0),__decorate([property({type:Number,attribute:"held-file-count"})],LyraDropZone.prototype,"heldFileCount",void 0),__decorate([property({type:Number,attribute:"held-total-size"})],LyraDropZone.prototype,"heldTotalSize",void 0),__decorate([state()],LyraDropZone.prototype,"dragState",void 0),__decorate([state()],LyraDropZone.prototype,"rejectedFiles",void 0),__decorate([state()],LyraDropZone.prototype,"resultStatus",void 0);export{LyraDropZone};
23
+ `}}__decorate([property({type:Boolean,reflect:!0})],LyraDropZone.prototype,"disabled",void 0),__decorate([property({type:Boolean,reflect:!0,converter:trueDefaultBooleanConverter})],LyraDropZone.prototype,"multiple",void 0),__decorate([property()],LyraDropZone.prototype,"accept",void 0),__decorate([property({type:Number,attribute:"max-file-size"})],LyraDropZone.prototype,"maxFileSize",void 0),__decorate([property({type:Number,attribute:"max-files"})],LyraDropZone.prototype,"maxFiles",void 0),__decorate([property({type:Number,attribute:"max-total-size"})],LyraDropZone.prototype,"maxTotalSize",void 0),__decorate([property({type:Number,attribute:"held-file-count"})],LyraDropZone.prototype,"heldFileCount",void 0),__decorate([property({type:Number,attribute:"held-total-size"})],LyraDropZone.prototype,"heldTotalSize",void 0),__decorate([property({reflect:!0})],LyraDropZone.prototype,"size",void 0),__decorate([state()],LyraDropZone.prototype,"dragState",void 0),__decorate([state()],LyraDropZone.prototype,"rejectedFiles",void 0),__decorate([state()],LyraDropZone.prototype,"resultStatus",void 0);export{LyraDropZone};
@@ -1 +1 @@
1
- import{css}from"lit";const styles=css`:host{min-inline-size:0;display:block;position:relative}[part=base]{display:contents}[part=overlay]{z-index:var(--lr-layer-content);justify-content:center;align-items:center;gap:var(--lr-drop-zone-overlay-gap,var(--lr-space-xs));box-sizing:border-box;padding:var(--lr-space-l);border:var(--lr-border-width-medium) dashed var(--lr-drop-zone-overlay-border-color,var(--lr-color-brand));border-radius:var(--lr-drop-zone-radius,var(--lr-radius));background:var(--lr-drop-zone-overlay-bg,color-mix(in srgb, var(--lr-color-brand) 8%, transparent));color:var(--lr-color-text-quiet);font-size:var(--lr-drop-zone-overlay-font-size,var(--lr-font-size-md-sm));text-align:center;pointer-events:none;transition:border-color var(--lr-transition-fast), background-color var(--lr-transition-fast);flex-direction:column;display:flex;position:absolute;inset:0}[part=overlay][hidden]{display:none}[part=overlay-icon]{font-size:var(--lr-drop-zone-overlay-icon-size,var(--lr-font-size-xl))}[part=overlay][data-drag-state=accept]{border-color:var(--lr-drop-zone-accept-border-color,var(--lr-color-success));background:var(--lr-drop-zone-accept-bg,color-mix(in srgb, var(--lr-color-success) 12%, transparent))}[part=overlay][data-drag-state=reject]{border-color:var(--lr-drop-zone-reject-border-color,var(--lr-color-danger));background:var(--lr-drop-zone-reject-bg,color-mix(in srgb, var(--lr-color-danger) 12%, transparent))}[part=rejection]{color:var(--lr-color-danger);font-size:var(--lr-font-size-sm);margin-block-start:var(--lr-space-xs)}[part=rejection] ul{margin:0;padding-inline-start:var(--lr-space-m)}`;export{styles};
1
+ import{css}from"lit";const styles=css`:host{--_lr-drop-zone-overlay-font-size:var(--lr-font-size-md-sm);--_lr-drop-zone-overlay-icon-size:var(--lr-font-size-xl);--_lr-drop-zone-overlay-padding:var(--lr-space-l);min-inline-size:0;display:block;position:relative}:host([size="2xs"]),:host([size=xs]){--_lr-drop-zone-overlay-font-size:var(--lr-font-size-xs);--_lr-drop-zone-overlay-icon-size:var(--lr-font-size-md-sm);--_lr-drop-zone-overlay-padding:var(--lr-space-s)}:host([size=s]),:host([size=small]){--_lr-drop-zone-overlay-font-size:var(--lr-font-size-sm);--_lr-drop-zone-overlay-icon-size:var(--lr-font-size-lg);--_lr-drop-zone-overlay-padding:var(--lr-space-m)}:host([size=l]),:host([size=large]){--_lr-drop-zone-overlay-font-size:var(--lr-font-size-lg);--_lr-drop-zone-overlay-icon-size:var(--lr-font-size-2xl);--_lr-drop-zone-overlay-padding:var(--lr-space-2xl)}:host([size=xl]){--_lr-drop-zone-overlay-font-size:var(--lr-font-size-xl);--_lr-drop-zone-overlay-icon-size:var(--lr-font-size-3xl);--_lr-drop-zone-overlay-padding:var(--lr-space-2xl)}[part=base]{display:contents}[part=overlay]{z-index:var(--lr-layer-content);justify-content:center;align-items:center;gap:var(--lr-drop-zone-overlay-gap,var(--lr-space-xs));box-sizing:border-box;padding:var(--lr-drop-zone-overlay-padding,var(--_lr-drop-zone-overlay-padding));border:var(--lr-border-width-medium) dashed var(--lr-drop-zone-overlay-border-color,var(--lr-color-brand));border-radius:var(--lr-drop-zone-radius,var(--lr-radius));background:var(--lr-drop-zone-overlay-bg,color-mix(in srgb, var(--lr-color-brand) 8%, transparent));color:var(--lr-color-text-quiet);font-size:var(--lr-drop-zone-overlay-font-size,var(--_lr-drop-zone-overlay-font-size));text-align:center;pointer-events:none;transition:border-color var(--lr-transition-fast), background-color var(--lr-transition-fast);flex-direction:column;display:flex;position:absolute;inset:0}[part=overlay][hidden]{display:none}[part=overlay-icon]{font-size:var(--lr-drop-zone-overlay-icon-size,var(--_lr-drop-zone-overlay-icon-size))}[part=overlay][data-drag-state=accept]{border-color:var(--lr-drop-zone-accept-border-color,var(--lr-color-success));background:var(--lr-drop-zone-accept-bg,color-mix(in srgb, var(--lr-color-success) 12%, transparent))}[part=overlay][data-drag-state=reject]{border-color:var(--lr-drop-zone-reject-border-color,var(--lr-color-danger));background:var(--lr-drop-zone-reject-bg,color-mix(in srgb, var(--lr-color-danger) 12%, transparent))}[part=rejection]{color:var(--lr-color-danger);font-size:var(--lr-font-size-sm);margin-block-start:var(--lr-space-xs)}[part=rejection] ul{margin:0;padding-inline-start:var(--lr-space-m)}`;export{styles};
@@ -1,4 +1,4 @@
1
- var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{keyed}from"lit/directives/keyed.js";import{LyraElement}from"../../../internal/lyra-element.js";import{getDisplayNames}from"../../../internal/intl-cache.js";import{hostAriaLabel,srOnly}from"../../../internal/a11y.js";import{safeMediaSrc}from"../../../internal/safe-url.js";import{styles}from"./flag.styles.js";import{ALPHA2_RE,alpha3ToAlpha2,languageToCountry}from"./language-map.js";import"../../overlays/skeleton/skeleton.class.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{LYRA_DEFAULT_collapse,LYRA_DEFAULT_details,LYRA_DEFAULT_flagLoadError,LYRA_DEFAULT_loading,LYRA_DEFAULT_map,LYRA_DEFAULT_navigation,LYRA_DEFAULT_open,LYRA_DEFAULT_popover,LYRA_DEFAULT_search,LYRA_DEFAULT_select}from"../../../internal/default-strings.generated.js";const FLAG_LOAD_ERROR_KEY="flagLoadError",FLAG_FIDELITIES=new Set(["compact","standard","detailed"]),FLAG_SHAPES=new Set(["rect","circle"]);function normalizeFlagFidelity(value){return FLAG_FIDELITIES.has(value)?value:"standard"}function normalizeFlagShape(value){return FLAG_SHAPES.has(value)?value:"rect"}function resolverFromModule(module){try{if(typeof module=="object"&&module!==null||typeof module=="function"){const named=module.flagUrl;if(typeof named=="function")return named;const fallback=module.default??module;if(typeof fallback=="function")return fallback;if(typeof fallback=="object"&&fallback!==null){const defaultNamed=fallback.flagUrl;if(typeof defaultNamed=="function")return defaultNamed}}}catch{}return null}function warnFlagPeerMissing(){console.warn("<lr-flag> needs the optional peer dependency '@aceshooting/lyra-flags' to render flag images — install it with `pnpm add @aceshooting/lyra-flags`.")}function warnFlagPeerIncapable(capability){console.warn(`<lr-flag> loaded '@aceshooting/lyra-flags' but it does not expose \`${capability}\`. The package is installed, so this is a version mismatch rather than a missing dependency: upgrade it to a release that provides that capability, and check the peer range in <lr-flag>'s own package metadata for the floor it expects.`)}async function loadFlagUrl(importFlags){let peerModule;try{peerModule=await importFlags()}catch{return warnFlagPeerMissing(),null}try{const resolver=resolverFromModule(peerModule);if(resolver)return resolver}catch{}return warnFlagPeerIncapable("flagUrl"),null}function resolverFactoryFromModule(module){try{if(typeof module=="object"&&module!==null||typeof module=="function"){const named=module.createFlagUrlResolver;if(typeof named=="function")return named;const fallback=module.default??module;if(typeof fallback=="object"&&fallback!==null){const defaultNamed=fallback.createFlagUrlResolver;if(typeof defaultNamed=="function")return defaultNamed}}}catch{}return null}async function loadBulkFlagUrl(importFlags){let peerModule;try{peerModule=await importFlags()}catch{return warnFlagPeerMissing(),null}const factory=resolverFactoryFromModule(peerModule);if(!factory)return warnFlagPeerIncapable("createFlagUrlResolver"),null;try{return factory()}catch{return warnFlagPeerIncapable("createFlagUrlResolver"),null}}function displayNameFor(code,locale){try{return getDisplayNames(locale,{type:"region"}).of(code.toUpperCase())??code.toUpperCase()}catch{return code.toUpperCase()}}let flagUrlResolver,flagResolverGeneration=0;const flagResolverSubscribers=new Set;let warnedMissingFlagResolver=!1;function warnMissingFlagResolver(code){warnedMissingFlagResolver||(warnedMissingFlagResolver=!0,console.warn(`<lr-flag> could not resolve the code "${code}" because no flag resolver is registered. Import the optional peer entry once at startup -- import '@aceshooting/lyra-ui/components/media/flag/flag-peer.js' -- and install '@aceshooting/lyra-flags', or pass an already-resolved URL through 'src' instead.`))}function setFlagUrlResolver(value){flagUrlResolver=value===null?Promise.resolve(null):Promise.resolve(value),warnedMissingFlagResolver=!1,flagResolverGeneration++;for(const subscriber of[...flagResolverSubscribers])subscriber(flagResolverGeneration)}function loadFlagUrlResolver(){return flagUrlResolver||(flagUrlResolver=Promise.resolve(null)),flagUrlResolver}class LyraFlag extends LyraElement{constructor(){super(...arguments),this._shape="rect",this._fidelity="standard",this.sourceState=Object.freeze({status:"idle",identity:"idle"}),this.resolverGeneration=flagResolverGeneration,this.sourceRestartPending=!0,this.activeSourceRequest=0,this.resolveToken=0,this.onResolverGeneration=generation=>{!this.isConnected||generation===this.resolverGeneration||(this.resolverGeneration=generation)}}static{this.defaultStrings={...super.defaultStrings,collapse:LYRA_DEFAULT_collapse,details:LYRA_DEFAULT_details,flagLoadError:LYRA_DEFAULT_flagLoadError,loading:LYRA_DEFAULT_loading,map:LYRA_DEFAULT_map,navigation:LYRA_DEFAULT_navigation,open:LYRA_DEFAULT_open,popover:LYRA_DEFAULT_popover,search:LYRA_DEFAULT_search,select:LYRA_DEFAULT_select}}static{this.styles=[LyraElement.styles,styles,srOnly]}get shape(){return this._shape}set shape(value){const old=this._shape;this._shape=normalizeFlagShape(value),this.requestUpdate("shape",old)}get fidelity(){return this._fidelity}set fidelity(value){const old=this._fidelity;this._fidelity=normalizeFlagFidelity(value),this.requestUpdate("fidelity",old)}get effectiveFidelity(){return normalizeFlagFidelity(this.fidelity)}get loading(){return this.sourceState.status==="loading"}get code(){if(this.country)return ALPHA2_RE.test(this.country)?this.country.toLowerCase():alpha3ToAlpha2(this.country);if(this.language)return languageToCountry(this.language)}get unresolved(){return this.src||!this.country&&!this.language?!1:this.code===void 0}connectedCallback(){super.connectedCallback(),this.sourceRestartPending=!0,flagResolverSubscribers.add(this.onResolverGeneration),this.syncErrorAnnouncementSink(),this.resolverGeneration!==flagResolverGeneration&&(this.resolverGeneration=flagResolverGeneration),this.requestUpdate()}disconnectedCallback(){this.resolveToken++,this.sourceRestartPending=!0,flagResolverSubscribers.delete(this.onResolverGeneration),this.releaseErrorAnnouncementSink(),super.disconnectedCallback()}adoptedCallback(){super.adoptedCallback(),this.resolveToken++,this.sourceRestartPending=!0,this.releaseErrorAnnouncementSink(),this.syncErrorAnnouncementSink(),this.requestUpdate()}syncErrorAnnouncementSink(){this.isConnected&&this.errorAnnouncementSink?.element.ownerDocument!==this.ownerDocument&&(this.releaseErrorAnnouncementSink(),this.errorAnnouncementSink=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this}))}releaseErrorAnnouncementSink(){this.errorAnnouncementSink?.release(),this.errorAnnouncementSink=void 0}announceLoadError(){this.errorAnnouncementSink?.announce(this.localize(FLAG_LOAD_ERROR_KEY))}setSourceState(state2,announceError=!1){this.sourceState=Object.freeze(state2),this.toggleAttribute("data-error",state2.status==="error"),this.toggleAttribute("data-unresolved",this.unresolved),this.setAttribute("aria-busy",String(state2.status==="loading")),announceError&&this.isConnected&&this.announceLoadError()}failSource(identity,announce=!0){this.setSourceState({status:"error",identity},announce)}onImageLoad(event,identity,url,request){const image=event.currentTarget;!this.isConnected||request!==this.activeSourceRequest||!image||image!==this.renderRoot.querySelector('[part="image"]')||this.sourceState.status!=="loading"||this.sourceState.identity!==identity||this.sourceState.url!==url||this.setSourceState({status:"loaded",identity,url})}onImageError(event,identity,request){const image=event.currentTarget;!this.isConnected||request!==this.activeSourceRequest||!image||image!==this.renderRoot.querySelector('[part="image"]')||this.sourceState.status!=="loading"||this.sourceState.identity!==identity||this.failSource(identity)}willUpdate(changed){super.willUpdate(changed);const sourceChanged=changed.has("country")||changed.has("language")||changed.has("src")||changed.has("fidelity")||changed.has("resolverGeneration");if(typeof Node<"u"&&!this.isConnected){sourceChanged&&(this.resolveToken++,this.sourceRestartPending=!0);return}if(this.hasUpdated&&!sourceChanged&&!this.sourceRestartPending)return;const connectionBaseline=this.sourceRestartPending;this.sourceRestartPending=!1;const token=++this.resolveToken,request=++this.activeSourceRequest,URLCtor=this.ownerDocument?.defaultView?.URL??globalThis.URL,directValue=typeof this.src=="string"?this.src.trim():"";if(directValue){const identity2=`direct:${directValue}`,url=safeMediaSrc(directValue,URLCtor);if(!url){this.failSource(identity2,!connectionBaseline);return}this.setSourceState({status:"loading",identity:identity2,url});return}const code=this.code;if(!code){this.setSourceState({status:"idle",identity:"idle"});return}const fidelity=this.effectiveFidelity,identity=`peer:${code}:${fidelity}:${this.resolverGeneration}`;this.setSourceState({status:"loading",identity}),loadFlagUrlResolver().then(async resolve=>{if(token!==this.resolveToken||request!==this.activeSourceRequest||!this.isConnected)return;if(typeof resolve!="function"){warnMissingFlagResolver(code),this.failSource(identity);return}const candidate=await resolve(code,fidelity==="standard"?void 0:{variant:fidelity});if(token!==this.resolveToken||request!==this.activeSourceRequest||!this.isConnected)return;if(candidate===void 0){this.setSourceState({status:"idle",identity});return}const url=safeMediaSrc(candidate,URLCtor);if(!url){this.failSource(identity);return}this.setSourceState({status:"loading",identity,url})}).catch(err=>{token!==this.resolveToken||request!==this.activeSourceRequest||!this.isConnected||(console.warn(`<lr-flag> failed to resolve a flag URL for "${code}":`,err),this.failSource(identity))})}updated(changed){super.updated(changed),this.setAttribute("aria-busy",String(this.sourceState.status==="loading")),this.toggleAttribute("data-unresolved",this.unresolved)}render(){const state2=this.sourceState,request=this.activeSourceRequest;if(this.unresolved){const fallbackUrl=this.fallback?safeMediaSrc(this.fallback,this.ownerDocument?.defaultView?.URL??globalThis.URL):null,fallbackAlt=hostAriaLabel(this)??this.label??"";return html`<slot name="fallback"
1
+ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{keyed}from"lit/directives/keyed.js";import{LyraElement}from"../../../internal/lyra-element.js";import{getDisplayNames}from"../../../internal/intl-cache.js";import{hostAriaLabel,srOnly}from"../../../internal/a11y.js";import{safeMediaSrc}from"../../../internal/safe-url.js";import{styles}from"./flag.styles.js";import{ALPHA2_RE,alpha3ToAlpha2,languageToCountry}from"./language-map.js";import"../../overlays/skeleton/skeleton.class.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{devWarn}from"../../../internal/dev-mode-attribute-warning.js";import{LYRA_DEFAULT_collapse,LYRA_DEFAULT_details,LYRA_DEFAULT_flagLoadError,LYRA_DEFAULT_loading,LYRA_DEFAULT_map,LYRA_DEFAULT_navigation,LYRA_DEFAULT_open,LYRA_DEFAULT_popover,LYRA_DEFAULT_search,LYRA_DEFAULT_select}from"../../../internal/default-strings.generated.js";const FLAG_LOAD_ERROR_KEY="flagLoadError",FLAG_FIDELITIES=new Set(["compact","standard","detailed"]),FLAG_SHAPES=new Set(["rect","circle"]);function normalizeFlagFidelity(value){return FLAG_FIDELITIES.has(value)?value:"standard"}function normalizeFlagShape(value){return FLAG_SHAPES.has(value)?value:"rect"}function resolverFromModule(module){try{if(typeof module=="object"&&module!==null||typeof module=="function"){const named=module.flagUrl;if(typeof named=="function")return named;const fallback=module.default??module;if(typeof fallback=="function")return fallback;if(typeof fallback=="object"&&fallback!==null){const defaultNamed=fallback.flagUrl;if(typeof defaultNamed=="function")return defaultNamed}}}catch{}return null}function warnFlagPeerMissing(){console.warn("<lr-flag> needs the optional peer dependency '@aceshooting/lyra-flags' to render flag images — install it with `pnpm add @aceshooting/lyra-flags`.")}function warnFlagPeerIncapable(capability){console.warn(`<lr-flag> loaded '@aceshooting/lyra-flags' but it does not expose \`${capability}\`. The package is installed, so this is a version mismatch rather than a missing dependency: upgrade it to a release that provides that capability, and check the peer range in <lr-flag>'s own package metadata for the floor it expects.`)}async function loadFlagUrl(importFlags){let peerModule;try{peerModule=await importFlags()}catch{return warnFlagPeerMissing(),null}try{const resolver=resolverFromModule(peerModule);if(resolver)return resolver}catch{}return warnFlagPeerIncapable("flagUrl"),null}function resolverFactoryFromModule(module){try{if(typeof module=="object"&&module!==null||typeof module=="function"){const named=module.createFlagUrlResolver;if(typeof named=="function")return named;const fallback=module.default??module;if(typeof fallback=="object"&&fallback!==null){const defaultNamed=fallback.createFlagUrlResolver;if(typeof defaultNamed=="function")return defaultNamed}}}catch{}return null}async function loadBulkFlagUrl(importFlags){let peerModule;try{peerModule=await importFlags()}catch{return warnFlagPeerMissing(),null}const factory=resolverFactoryFromModule(peerModule);if(!factory)return warnFlagPeerIncapable("createFlagUrlResolver"),null;try{return factory()}catch{return warnFlagPeerIncapable("createFlagUrlResolver"),null}}function displayNameFor(code,locale){try{return getDisplayNames(locale,{type:"region"}).of(code.toUpperCase())??code.toUpperCase()}catch{return code.toUpperCase()}}let flagUrlResolver,flagResolverGeneration=0;const flagResolverSubscribers=new Set;let warnedMissingFlagResolver=!1;function warnMissingFlagResolver(code){warnedMissingFlagResolver||(warnedMissingFlagResolver=!0,devWarn(`<lr-flag> could not resolve the code "${code}" because no flag resolver is registered. Import the optional peer entry once at startup -- import '@aceshooting/lyra-ui/components/media/flag/flag-peer.js' -- and install '@aceshooting/lyra-flags', or pass an already-resolved URL through 'src' instead.`))}function setFlagUrlResolver(value){flagUrlResolver=value===null?Promise.resolve(null):Promise.resolve(value),warnedMissingFlagResolver=!1,flagResolverGeneration++;for(const subscriber of[...flagResolverSubscribers])subscriber(flagResolverGeneration)}function loadFlagUrlResolver(){return flagUrlResolver||(flagUrlResolver=Promise.resolve(null)),flagUrlResolver}class LyraFlag extends LyraElement{constructor(){super(...arguments),this._shape="rect",this._fidelity="standard",this.sourceState=Object.freeze({status:"idle",identity:"idle"}),this.resolverGeneration=flagResolverGeneration,this.sourceRestartPending=!0,this.activeSourceRequest=0,this.resolveToken=0,this.onResolverGeneration=generation=>{!this.isConnected||generation===this.resolverGeneration||(this.resolverGeneration=generation)}}static{this.defaultStrings={...super.defaultStrings,collapse:LYRA_DEFAULT_collapse,details:LYRA_DEFAULT_details,flagLoadError:LYRA_DEFAULT_flagLoadError,loading:LYRA_DEFAULT_loading,map:LYRA_DEFAULT_map,navigation:LYRA_DEFAULT_navigation,open:LYRA_DEFAULT_open,popover:LYRA_DEFAULT_popover,search:LYRA_DEFAULT_search,select:LYRA_DEFAULT_select}}static{this.styles=[LyraElement.styles,styles,srOnly]}get shape(){return this._shape}set shape(value){const old=this._shape;this._shape=normalizeFlagShape(value),this.requestUpdate("shape",old)}get fidelity(){return this._fidelity}set fidelity(value){const old=this._fidelity;this._fidelity=normalizeFlagFidelity(value),this.requestUpdate("fidelity",old)}get effectiveFidelity(){return normalizeFlagFidelity(this.fidelity)}get loading(){return this.sourceState.status==="loading"}get code(){if(this.country)return ALPHA2_RE.test(this.country)?this.country.toLowerCase():alpha3ToAlpha2(this.country);if(this.language)return languageToCountry(this.language)}get unresolved(){return this.src||!this.country&&!this.language?!1:this.code===void 0}connectedCallback(){super.connectedCallback(),this.sourceRestartPending=!0,flagResolverSubscribers.add(this.onResolverGeneration),this.syncErrorAnnouncementSink(),this.resolverGeneration!==flagResolverGeneration&&(this.resolverGeneration=flagResolverGeneration),this.requestUpdate()}disconnectedCallback(){this.resolveToken++,this.sourceRestartPending=!0,flagResolverSubscribers.delete(this.onResolverGeneration),this.releaseErrorAnnouncementSink(),super.disconnectedCallback()}adoptedCallback(){super.adoptedCallback(),this.resolveToken++,this.sourceRestartPending=!0,this.releaseErrorAnnouncementSink(),this.syncErrorAnnouncementSink(),this.requestUpdate()}syncErrorAnnouncementSink(){this.isConnected&&this.errorAnnouncementSink?.element.ownerDocument!==this.ownerDocument&&(this.releaseErrorAnnouncementSink(),this.errorAnnouncementSink=acquireAnnouncementSink("assertive",{document:this.ownerDocument,source:this}))}releaseErrorAnnouncementSink(){this.errorAnnouncementSink?.release(),this.errorAnnouncementSink=void 0}announceLoadError(){this.errorAnnouncementSink?.announce(this.localize(FLAG_LOAD_ERROR_KEY))}setSourceState(state2,announceError=!1){this.sourceState=Object.freeze(state2),this.toggleAttribute("data-error",state2.status==="error"),this.toggleAttribute("data-unresolved",this.unresolved),this.setAttribute("aria-busy",String(state2.status==="loading")),announceError&&this.isConnected&&this.announceLoadError()}failSource(identity,announce=!0){this.setSourceState({status:"error",identity},announce)}onImageLoad(event,identity,url,request){const image=event.currentTarget;!this.isConnected||request!==this.activeSourceRequest||!image||image!==this.renderRoot.querySelector('[part="image"]')||this.sourceState.status!=="loading"||this.sourceState.identity!==identity||this.sourceState.url!==url||this.setSourceState({status:"loaded",identity,url})}onImageError(event,identity,request){const image=event.currentTarget;!this.isConnected||request!==this.activeSourceRequest||!image||image!==this.renderRoot.querySelector('[part="image"]')||this.sourceState.status!=="loading"||this.sourceState.identity!==identity||this.failSource(identity)}willUpdate(changed){super.willUpdate(changed);const sourceChanged=changed.has("country")||changed.has("language")||changed.has("src")||changed.has("fidelity")||changed.has("resolverGeneration");if(typeof Node<"u"&&!this.isConnected){sourceChanged&&(this.resolveToken++,this.sourceRestartPending=!0);return}if(this.hasUpdated&&!sourceChanged&&!this.sourceRestartPending)return;const connectionBaseline=this.sourceRestartPending;this.sourceRestartPending=!1;const token=++this.resolveToken,request=++this.activeSourceRequest,URLCtor=this.ownerDocument?.defaultView?.URL??globalThis.URL,directValue=typeof this.src=="string"?this.src.trim():"";if(directValue){const identity2=`direct:${directValue}`,url=safeMediaSrc(directValue,URLCtor);if(!url){this.failSource(identity2,!connectionBaseline);return}this.setSourceState({status:"loading",identity:identity2,url});return}const code=this.code;if(!code){this.setSourceState({status:"idle",identity:"idle"});return}const fidelity=this.effectiveFidelity,identity=`peer:${code}:${fidelity}:${this.resolverGeneration}`;this.setSourceState({status:"loading",identity}),loadFlagUrlResolver().then(async resolve=>{if(token!==this.resolveToken||request!==this.activeSourceRequest||!this.isConnected)return;if(typeof resolve!="function"){warnMissingFlagResolver(code),this.failSource(identity);return}const candidate=await resolve(code,fidelity==="standard"?void 0:{variant:fidelity});if(token!==this.resolveToken||request!==this.activeSourceRequest||!this.isConnected)return;if(candidate===void 0){this.setSourceState({status:"idle",identity});return}const url=safeMediaSrc(candidate,URLCtor);if(!url){this.failSource(identity);return}this.setSourceState({status:"loading",identity,url})}).catch(err=>{token!==this.resolveToken||request!==this.activeSourceRequest||!this.isConnected||(console.warn(`<lr-flag> failed to resolve a flag URL for "${code}":`,err),this.failSource(identity))})}updated(changed){super.updated(changed),this.setAttribute("aria-busy",String(this.sourceState.status==="loading")),this.toggleAttribute("data-unresolved",this.unresolved)}render(){const state2=this.sourceState,request=this.activeSourceRequest;if(this.unresolved){const fallbackUrl=this.fallback?safeMediaSrc(this.fallback,this.ownerDocument?.defaultView?.URL??globalThis.URL):null,fallbackAlt=hostAriaLabel(this)??this.label??"";return html`<slot name="fallback"
2
2
  >${fallbackUrl?html`<img part="fallback-image" src=${fallbackUrl} alt=${fallbackAlt} />`:nothing}</slot
3
3
  >`}if(state2.status==="error")return html`<span part="error">${this.localize(FLAG_LOAD_ERROR_KEY)}</span>`;const url=state2.status==="loading"||state2.status==="loaded"?state2.url:void 0;if(!url&&state2.status!=="loading")return html``;const code=this.code,alt=hostAriaLabel(this)??this.label??(code?displayNameFor(code,this.effectiveLocale):"");return html`
4
4
  ${state2.status==="loading"?html`
@@ -623,8 +623,12 @@ legendGradientLoLabel:string|null;
623
623
  /** Overrides the high endpoint's caption; defaults to the highest stop value, locale-formatted. */
624
624
  legendGradientHiLabel:string|null;
625
625
  /** Counts from the latest bounded legend normalization. `truncated` covers omitted rows or
626
- * shortened labels; the returned record is frozen and never aliases caller input. */
627
- get legendProjection():LyraMapLegendProjection;
626
+ * shortened labels; the returned record is frozen and never aliases caller input. Read-only --
627
+ * derived from the live `legend` normalization, never assignable. The setter is a documented
628
+ * no-op (matching `LyraChart.chartArea`'s pattern) so an accidental `.legendProjection=${x}`
629
+ * Lit template binding degrades silently instead of throwing from inside lit-html's
630
+ * property-commit. */
631
+ get legendProjection():LyraMapLegendProjection;set legendProjection(_value:LyraMapLegendProjection);
628
632
  /**
629
633
  * Turns every legend row that carries a `value` into a keyboard-operable visibility toggle;
630
634
  * rows without one stay inert. Default `false`, and an unset map renders exactly the read-only
@@ -737,9 +741,10 @@ dataLayers:readonly LyraMapGeoJsonDataLayer[];private _canonicalChoroplethSource
737
741
  private get canonicalChoropleth();private get canonicalDataLayers();private get canonicalMarkers();
738
742
  /** Accessible name for MapLibre's focusable canvas. A nonempty host `aria-label` remains the
739
743
  * overall component name and is not cloned onto the nested focus owner; the canvas uses this
740
- * purpose-specific label or the localized `map` message. An explicit empty host name is
744
+ * purpose-specific label or the localized `map` message. An explicit empty string (`label=""`
745
+ * or `.label = ''`) suppresses that localized default. An explicit empty host name is
741
746
  * preserved on the canvas for deliberately decorative embeddings. */
742
- label:string;
747
+ label?:string;
743
748
  /** True until the lazy-loaded `maplibre-gl` peer dependency has settled (success or failure). */
744
749
  private loading;
745
750
  /** Classified failure rendered as localized ordinary text and announced through the owner
@@ -862,7 +867,16 @@ private paintGeometryLayers;private lineColor;
862
867
  * The flat `label, output` pair form is deliberately the shape `point.colors` already emits two
863
868
  * lines above its own `match`, so this file speaks one expression idiom rather than two.
864
869
  */
865
- private mutedPointOpacity;private paintPoints;private pointIconColor;private removePointIcons;private applyPointIcons;private paintPointIcons;
870
+ private mutedPointOpacity;private paintPoints;
871
+ /**
872
+ * Unlike `resolvedLayerColor()`'s other ~16 call sites (all MapLibre `setPaintProperty` /
873
+ * style-spec sinks), this result reaches a raw 2D canvas context's `fillStyle`/`strokeStyle` in
874
+ * `rasterPointIcon()`. Canvas silently keeps its prior paint (opaque black on a fresh context)
875
+ * when handed an unparseable string, so the resolved candidate is routed through the shared
876
+ * `resolveCanvasColor()` DOM probe -- same as heatmap/audio-visualizer -- falling back to the
877
+ * layer's theme-appropriate tone instead of silently rendering a black icon.
878
+ */
879
+ private pointIconColor;private removePointIcons;private applyPointIcons;private paintPointIcons;
866
880
  /**
867
881
  * `['step', ['get', 'point_count'], …]` over the authored cluster color breaks, or the layer's
868
882
  * own flat color when none were supplied.