@aceshooting/lyra-ui 9.1.0 → 10.0.1

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 (622) hide show
  1. package/CHANGELOG.md +843 -0
  2. package/README.md +7 -0
  3. package/custom-elements.json +1 -1
  4. package/dist/cli/migrate-wa.mjs +52 -0
  5. package/dist/cli/migration-contract.json +1 -1
  6. package/dist/components/agent-tools/activity-feed/activity-feed.class.js +2 -2
  7. package/dist/components/agent-tools/activity-feed/activity-feed.styles.js +0 -16
  8. package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.class.js +1 -1
  9. package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.styles.js +9 -7
  10. package/dist/components/agent-tools/agent-run/agent-run.class.js +2 -2
  11. package/dist/components/agent-tools/agent-run/agent-run.styles.js +0 -13
  12. package/dist/components/agent-tools/agent-trace/agent-trace.class.js +1 -1
  13. package/dist/components/agent-tools/agent-trace/agent-trace.styles.js +7 -4
  14. package/dist/components/agent-tools/approval-queue/approval-queue.styles.js +7 -5
  15. package/dist/components/agent-tools/artifact-panel/artifact-panel.styles.js +0 -3
  16. package/dist/components/agent-tools/browser-frame/browser-frame.class.js +1 -1
  17. package/dist/components/agent-tools/browser-frame/browser-frame.styles.js +3 -5
  18. package/dist/components/agent-tools/commit-card/commit-card.class.js +1 -1
  19. package/dist/components/agent-tools/commit-card/commit-card.styles.js +0 -10
  20. package/dist/components/agent-tools/compare-panel/compare-panel.styles.js +11 -6
  21. package/dist/components/agent-tools/confirm-bar/confirm-bar.class.js +2 -2
  22. package/dist/components/agent-tools/confirm-bar/confirm-bar.styles.js +0 -46
  23. package/dist/components/agent-tools/context-inspector/context-inspector.class.js +1 -1
  24. package/dist/components/agent-tools/eval-dataset/eval-dataset.styles.js +0 -7
  25. package/dist/components/agent-tools/eval-result/eval-result.class.js +1 -1
  26. package/dist/components/agent-tools/evaluation-run/evaluation-run.class.js +2 -2
  27. package/dist/components/agent-tools/policy-summary/policy-summary.class.js +1 -1
  28. package/dist/components/agent-tools/prompt-studio/prompt-studio.styles.js +0 -15
  29. package/dist/components/agent-tools/result-card/result-card.styles.js +0 -7
  30. package/dist/components/agent-tools/result-card/result-field.styles.js +0 -5
  31. package/dist/components/agent-tools/schema-viewer/schema-viewer.styles.js +2 -5
  32. package/dist/components/agent-tools/span-waterfall/span-waterfall.class.js +1 -1
  33. package/dist/components/agent-tools/span-waterfall/span-waterfall.styles.js +0 -15
  34. package/dist/components/agent-tools/stack-trace/stack-trace.styles.js +0 -20
  35. package/dist/components/agent-tools/subagent-panel/subagent-panel.class.js +2 -2
  36. package/dist/components/agent-tools/subagent-panel/subagent-panel.styles.js +1 -4
  37. package/dist/components/agent-tools/task-list/task-list.class.js +2 -2
  38. package/dist/components/agent-tools/task-list/task-list.styles.js +0 -15
  39. package/dist/components/agent-tools/terminal/terminal.class.d.ts +11 -6
  40. package/dist/components/agent-tools/terminal/terminal.class.js +4 -4
  41. package/dist/components/agent-tools/terminal/terminal.styles.js +0 -46
  42. package/dist/components/agent-tools/test-results/test-results.class.js +2 -2
  43. package/dist/components/agent-tools/test-results/test-results.styles.js +0 -5
  44. package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +1 -1
  45. package/dist/components/agent-tools/thinking-panel/thinking-panel.styles.js +0 -41
  46. package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.styles.js +0 -41
  47. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +2 -2
  48. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.styles.js +0 -30
  49. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +6 -6
  50. package/dist/components/agent-tools/tool-param-form/tool-param-form.styles.js +0 -5
  51. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.class.js +2 -2
  52. package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.styles.js +0 -20
  53. package/dist/components/agent-tools/tool-result-view/tool-result-view.styles.js +0 -4
  54. package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.styles.js +0 -21
  55. package/dist/components/agent-tools/trace-tree/trace-tree.class.js +2 -2
  56. package/dist/components/agent-tools/trace-tree/trace-tree.styles.js +7 -31
  57. package/dist/components/charts/chart/bar-chart.class.js +1 -1
  58. package/dist/components/charts/chart/box-plot.styles.js +0 -20
  59. package/dist/components/charts/chart/bubble-chart.class.js +1 -1
  60. package/dist/components/charts/chart/chart-colors.d.ts +1 -1
  61. package/dist/components/charts/chart/chart-colors.js +1 -1
  62. package/dist/components/charts/chart/chart-core-loader.d.ts +1 -0
  63. package/dist/components/charts/chart/chart-core-loader.js +1 -1
  64. package/dist/components/charts/chart/chart-feature-loader.d.ts +35 -0
  65. package/dist/components/charts/chart/chart-feature-loader.js +1 -1
  66. package/dist/components/charts/chart/chart.class.d.ts +93 -0
  67. package/dist/components/charts/chart/chart.class.js +3 -3
  68. package/dist/components/charts/chart/chart.styles.js +0 -27
  69. package/dist/components/charts/chart/doughnut-chart.class.js +1 -1
  70. package/dist/components/charts/chart/histogram.class.js +1 -1
  71. package/dist/components/charts/chart/line-chart.class.js +1 -1
  72. package/dist/components/charts/chart/lite-chart.class.d.ts +20 -1
  73. package/dist/components/charts/chart/lite-chart.class.js +4 -4
  74. package/dist/components/charts/chart/lite-chart.styles.js +0 -27
  75. package/dist/components/charts/chart/pie-chart.class.js +1 -1
  76. package/dist/components/charts/chart/polar-area-chart.class.js +1 -1
  77. package/dist/components/charts/chart/radar-chart.class.js +1 -1
  78. package/dist/components/charts/chart/scatter-chart.class.js +1 -1
  79. package/dist/components/conversation/agent-workspace/agent-workspace.class.d.ts +20 -0
  80. package/dist/components/conversation/agent-workspace/agent-workspace.class.js +3 -1
  81. package/dist/components/conversation/agent-workspace/agent-workspace.styles.js +3 -0
  82. package/dist/components/conversation/audio-visualizer/audio-visualizer.styles.js +0 -7
  83. package/dist/components/conversation/branch-picker/branch-picker.styles.js +0 -3
  84. package/dist/components/conversation/chat-composer/chat-composer.styles.js +0 -51
  85. package/dist/components/conversation/chat-message/chat-message.class.js +2 -2
  86. package/dist/components/conversation/chat-message/chat-message.styles.js +13 -35
  87. package/dist/components/conversation/chat-viewport/chat-viewport.class.js +1 -1
  88. package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +0 -33
  89. package/dist/components/conversation/checkpoint/checkpoint.class.js +1 -1
  90. package/dist/components/conversation/checkpoint/checkpoint.styles.js +0 -3
  91. package/dist/components/conversation/code-block/code-block-shared.d.ts +5 -2
  92. package/dist/components/conversation/code-block/code-block.class.js +1 -1
  93. package/dist/components/conversation/code-block/code-block.styles.js +4 -95
  94. package/dist/components/conversation/code-block/code-loader.d.ts +11 -0
  95. package/dist/components/conversation/code-block/code-loader.js +1 -1
  96. package/dist/components/conversation/code-block/shiki-types.d.ts +12 -0
  97. package/dist/components/conversation/code-block/shiki-types.js +1 -1
  98. package/dist/components/conversation/conversation-item/conversation-item.styles.js +8 -54
  99. package/dist/components/conversation/generation-metrics/generation-metrics.class.js +2 -2
  100. package/dist/components/conversation/generation-metrics/generation-metrics.styles.js +0 -17
  101. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  102. package/dist/components/conversation/markdown/markdown.styles.js +0 -41
  103. package/dist/components/conversation/message-actions/message-actions.styles.js +0 -3
  104. package/dist/components/conversation/message-feedback/message-feedback.styles.js +0 -35
  105. package/dist/components/conversation/message-parts/message-parts.class.d.ts +1 -1
  106. package/dist/components/conversation/message-parts/message-parts.styles.js +0 -5
  107. package/dist/components/conversation/model-select/model-select.class.js +3 -3
  108. package/dist/components/conversation/model-select/model-select.styles.js +12 -47
  109. package/dist/components/conversation/model-settings-panel/model-settings-panel.styles.js +0 -6
  110. package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +3 -0
  111. package/dist/components/conversation/prompt-input/prompt-input.styles.js +0 -10
  112. package/dist/components/conversation/push-to-talk/push-to-talk.styles.js +0 -8
  113. package/dist/components/conversation/realtime-session/realtime-session.styles.js +1 -1
  114. package/dist/components/conversation/selection-toolbar/selection-toolbar.styles.js +1 -11
  115. package/dist/components/conversation/stream-status/stream-status.styles.js +0 -16
  116. package/dist/components/conversation/streaming-text/streaming-text.styles.js +0 -15
  117. package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +0 -5
  118. package/dist/components/conversation/thread-list/thread-list.styles.js +5 -19
  119. package/dist/components/conversation/transcript-feed/transcript-feed.class.d.ts +16 -4
  120. package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
  121. package/dist/components/conversation/transcript-feed/transcript-feed.styles.js +0 -1
  122. package/dist/components/conversation/typing-indicator/typing-indicator.styles.js +0 -23
  123. package/dist/components/conversation/usage-badge/usage-badge.class.js +1 -1
  124. package/dist/components/conversation/usage-badge/usage-badge.styles.js +0 -3
  125. package/dist/components/conversation/voice-picker/voice-picker.class.js +3 -3
  126. package/dist/components/conversation/voice-picker/voice-picker.styles.js +9 -29
  127. package/dist/components/conversation/widget-renderer/resolve.d.ts +2 -0
  128. package/dist/components/conversation/widget-renderer/resolve.js +1 -1
  129. package/dist/components/data/calendar/calendar.class.d.ts +15 -2
  130. package/dist/components/data/calendar/calendar.class.js +2 -2
  131. package/dist/components/data/calendar/calendar.styles.js +2 -28
  132. package/dist/components/data/condition-builder/condition-builder.class.d.ts +10 -6
  133. package/dist/components/data/condition-builder/condition-builder.class.js +2 -2
  134. package/dist/components/data/condition-builder/condition-builder.styles.js +0 -6
  135. package/dist/components/data/context-meter/context-meter.styles.js +0 -24
  136. package/dist/components/data/data-grid/data-grid.class.js +3 -3
  137. package/dist/components/data/data-grid/data-grid.styles.js +0 -22
  138. package/dist/components/data/document-library/document-library.class.js +2 -2
  139. package/dist/components/data/document-library/document-library.styles.js +0 -4
  140. package/dist/components/data/env-list/env-list.class.js +1 -1
  141. package/dist/components/data/env-list/env-list.styles.js +7 -4
  142. package/dist/components/data/file-tree/file-tree.class.d.ts +12 -0
  143. package/dist/components/data/file-tree/file-tree.class.js +1 -1
  144. package/dist/components/data/flow-canvas/flow-canvas.styles.js +12 -19
  145. package/dist/components/data/flow-controls/flow-controls.class.js +2 -2
  146. package/dist/components/data/flow-controls/flow-controls.styles.js +3 -36
  147. package/dist/components/data/flow-minimap/flow-minimap.class.js +1 -1
  148. package/dist/components/data/flow-minimap/flow-minimap.styles.js +0 -9
  149. package/dist/components/data/flow-node/flow-node.styles.js +0 -23
  150. package/dist/components/data/flow-run-status/flow-run-status.class.js +1 -1
  151. package/dist/components/data/flow-run-status/flow-run-status.styles.js +0 -7
  152. package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +0 -7
  153. package/dist/components/data/graph-query-builder/graph-query-builder.class.js +1 -1
  154. package/dist/components/data/graph-query-builder/graph-query-builder.styles.js +0 -10
  155. package/dist/components/data/heatmap/heatmap-scale.d.ts +20 -0
  156. package/dist/components/data/heatmap/heatmap-scale.js +1 -1
  157. package/dist/components/data/heatmap/heatmap.class.d.ts +85 -2
  158. package/dist/components/data/heatmap/heatmap.class.js +2 -2
  159. package/dist/components/data/heatmap/heatmap.styles.js +0 -54
  160. package/dist/components/data/pagination/pagination.class.js +1 -1
  161. package/dist/components/data/pagination/pagination.styles.js +23 -46
  162. package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +34 -1
  163. package/dist/components/data/sequence-strip/sequence-strip.class.js +5 -2
  164. package/dist/components/data/sequence-strip/sequence-strip.styles.js +14 -20
  165. package/dist/components/data/sparkline/sparkline.class.js +1 -1
  166. package/dist/components/data/stat/stat.styles.js +0 -67
  167. package/dist/components/data/table/table.class.d.ts +42 -3
  168. package/dist/components/data/table/table.class.js +4 -4
  169. package/dist/components/data/table/table.styles.js +20 -91
  170. package/dist/components/data/timeline/timeline-item.styles.js +0 -30
  171. package/dist/components/data/timeline/timeline.class.d.ts +89 -1
  172. package/dist/components/data/timeline/timeline.class.js +2 -2
  173. package/dist/components/data/timeline/timeline.styles.js +111 -31
  174. package/dist/components/data/tree/tree-item.styles.js +1 -28
  175. package/dist/components/data/tree/tree.class.js +2 -2
  176. package/dist/components/data/tree/tree.styles.js +0 -6
  177. package/dist/components/data/word-cloud/word-cloud.styles.js +0 -5
  178. package/dist/components/forms/button/button.class.js +1 -1
  179. package/dist/components/forms/button/button.styles.js +1 -106
  180. package/dist/components/forms/checkbox/checkbox.class.d.ts +3 -0
  181. package/dist/components/forms/checkbox/checkbox.class.js +1 -1
  182. package/dist/components/forms/checkbox/checkbox.styles.js +0 -39
  183. package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +21 -2
  184. package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
  185. package/dist/components/forms/checkbox-group/checkbox-group.styles.js +0 -18
  186. package/dist/components/forms/code-editor/code-editor.styles.js +0 -30
  187. package/dist/components/forms/color-picker/color-picker.class.js +2 -2
  188. package/dist/components/forms/color-picker/color-picker.styles.js +0 -69
  189. package/dist/components/forms/combobox/combobox.class.js +2 -2
  190. package/dist/components/forms/combobox/combobox.styles.js +22 -111
  191. package/dist/components/forms/combobox/option.styles.js +7 -1
  192. package/dist/components/forms/date-picker/date-input.class.js +1 -1
  193. package/dist/components/forms/date-picker/date-input.styles.js +12 -67
  194. package/dist/components/forms/date-picker/date-picker.class.d.ts +1 -0
  195. package/dist/components/forms/date-picker/date-picker.class.js +22 -20
  196. package/dist/components/forms/date-picker/date-picker.styles.js +36 -29
  197. package/dist/components/forms/emoji-picker/emoji-data-loader.d.ts +6 -3
  198. package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
  199. package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +8 -1
  200. package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
  201. package/dist/components/forms/emoji-picker/emoji-picker.styles.js +3 -41
  202. package/dist/components/forms/icon-button/icon-button.class.js +1 -1
  203. package/dist/components/forms/icon-button/icon-button.styles.js +0 -16
  204. package/dist/components/forms/input/input.styles.js +0 -54
  205. package/dist/components/forms/input/number-input.styles.d.ts +4 -5
  206. package/dist/components/forms/input/number-input.styles.js +0 -11
  207. package/dist/components/forms/input/time-input-shared.d.ts +11 -0
  208. package/dist/components/forms/input/time-input-shared.js +1 -1
  209. package/dist/components/forms/input/time-input.class.d.ts +11 -2
  210. package/dist/components/forms/input/time-input.class.js +1 -1
  211. package/dist/components/forms/input/time-input.styles.js +0 -6
  212. package/dist/components/forms/locale-picker/locale-picker.class.js +2 -2
  213. package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -26
  214. package/dist/components/forms/otp-input/otp-input.class.js +3 -3
  215. package/dist/components/forms/otp-input/otp-input.styles.js +0 -16
  216. package/dist/components/forms/phone-input/phone-input.class.d.ts +9 -1
  217. package/dist/components/forms/phone-input/phone-input.class.js +2 -2
  218. package/dist/components/forms/phone-input/phone-input.styles.js +0 -37
  219. package/dist/components/forms/radio/radio-button.styles.js +1 -30
  220. package/dist/components/forms/radio/radio-group.styles.js +0 -4
  221. package/dist/components/forms/radio/radio.styles.js +0 -44
  222. package/dist/components/forms/rubric-form/rubric-form.styles.js +0 -5
  223. package/dist/components/forms/select/select.class.js +1 -1
  224. package/dist/components/forms/select/select.styles.js +14 -114
  225. package/dist/components/forms/slider/slider.styles.js +0 -55
  226. package/dist/components/forms/swatch-picker/swatch-picker.class.d.ts +0 -11
  227. package/dist/components/forms/swatch-picker/swatch-picker.class.js +2 -2
  228. package/dist/components/forms/swatch-picker/swatch-picker.styles.js +0 -77
  229. package/dist/components/forms/switch/switch.class.d.ts +3 -0
  230. package/dist/components/forms/switch/switch.class.js +1 -1
  231. package/dist/components/forms/switch/switch.styles.js +3 -38
  232. package/dist/components/forms/textarea/textarea.styles.js +0 -28
  233. package/dist/components/forms/time-range/time-range.styles.js +12 -84
  234. package/dist/components/forms/token-input/token-input.class.d.ts +23 -9
  235. package/dist/components/forms/token-input/token-input.class.js +1 -1
  236. package/dist/components/forms/token-input/token-input.styles.js +1 -54
  237. package/dist/components/layout/app-rail/app-rail-item.class.js +2 -2
  238. package/dist/components/layout/app-rail/app-rail-item.styles.js +0 -13
  239. package/dist/components/layout/app-rail/app-rail.class.d.ts +5 -0
  240. package/dist/components/layout/app-rail/app-rail.class.js +1 -1
  241. package/dist/components/layout/app-rail/app-rail.styles.js +0 -46
  242. package/dist/components/layout/button-group/button-group.styles.js +0 -6
  243. package/dist/components/layout/card/card.class.d.ts +12 -0
  244. package/dist/components/layout/card/card.styles.js +5 -13
  245. package/dist/components/layout/carousel/carousel.styles.js +0 -1
  246. package/dist/components/layout/command-palette/command-palette.class.d.ts +8 -0
  247. package/dist/components/layout/command-palette/command-palette.class.js +3 -1
  248. package/dist/components/layout/command-palette/command-palette.styles.js +1 -13
  249. package/dist/components/layout/control-group/control-group.styles.js +0 -7
  250. package/dist/components/layout/dashboard-grid/dashboard-grid.class.js +1 -1
  251. package/dist/components/layout/dashboard-grid/dashboard-grid.styles.js +6 -25
  252. package/dist/components/layout/details/accordion.class.d.ts +13 -0
  253. package/dist/components/layout/details/accordion.class.js +1 -1
  254. package/dist/components/layout/details/details.class.js +1 -1
  255. package/dist/components/layout/details/details.styles.js +0 -12
  256. package/dist/components/layout/dock-panel/dock-panel.styles.js +0 -45
  257. package/dist/components/layout/drilldown-panel/drilldown-panel.class.d.ts +2 -0
  258. package/dist/components/layout/drilldown-panel/drilldown-panel.class.js +2 -2
  259. package/dist/components/layout/drilldown-panel/drilldown-panel.styles.js +0 -4
  260. package/dist/components/layout/filter-bar/filter-bar.class.js +1 -1
  261. package/dist/components/layout/filter-bar/filter-bar.styles.js +0 -9
  262. package/dist/components/layout/menu/menu-item.class.d.ts +5 -0
  263. package/dist/components/layout/menu/menu-item.class.js +1 -1
  264. package/dist/components/layout/menu/menu-item.styles.js +0 -49
  265. package/dist/components/layout/menu/menu-label.styles.js +0 -2
  266. package/dist/components/layout/menu/menu.styles.js +0 -18
  267. package/dist/components/layout/multi-split/multi-split.class.js +1 -1
  268. package/dist/components/layout/multi-split/multi-split.styles.js +8 -51
  269. package/dist/components/layout/page/page.class.d.ts +4 -0
  270. package/dist/components/layout/page/page.class.js +1 -1
  271. package/dist/components/layout/reorder-list/reorder-item.styles.js +0 -4
  272. package/dist/components/layout/responsive-panel/responsive-panel.styles.js +0 -27
  273. package/dist/components/layout/scroller/scroller.styles.js +0 -20
  274. package/dist/components/layout/segmented/segmented.class.d.ts +7 -1
  275. package/dist/components/layout/segmented/segmented.class.js +1 -1
  276. package/dist/components/layout/segmented/segmented.styles.js +69 -37
  277. package/dist/components/layout/split-panel/split-panel.styles.js +1 -7
  278. package/dist/components/layout/stepper/stepper.class.d.ts +8 -1
  279. package/dist/components/layout/stepper/stepper.class.js +1 -1
  280. package/dist/components/layout/stepper/stepper.styles.js +140 -41
  281. package/dist/components/layout/tab-group/tab-group.class.d.ts +4 -1
  282. package/dist/components/layout/tab-group/tab-group.styles.js +9 -75
  283. package/dist/components/layout/tab-group/tab.styles.js +0 -2
  284. package/dist/components/layout/virtual-list/virtual-list.class.d.ts +4 -4
  285. package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
  286. package/dist/components/layout/virtual-list/virtual-list.styles.js +0 -68
  287. package/dist/components/layout/widget/widget.class.d.ts +5 -1
  288. package/dist/components/layout/widget/widget.class.js +1 -1
  289. package/dist/components/layout/widget/widget.styles.js +97 -40
  290. package/dist/components/media/animated-image/animated-image.class.d.ts +3 -0
  291. package/dist/components/media/animated-image/animated-image.class.js +1 -1
  292. package/dist/components/media/animated-image/animated-image.styles.js +0 -28
  293. package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +1 -1
  294. package/dist/components/media/attachment-chip/attachment-chip.class.js +2 -2
  295. package/dist/components/media/attachment-chip/attachment-chip.styles.js +0 -31
  296. package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +1 -1
  297. package/dist/components/media/attachment-trigger/attachment-trigger.class.js +4 -4
  298. package/dist/components/media/attachment-trigger/attachment-trigger.styles.js +0 -40
  299. package/dist/components/media/av-player/av-player.class.d.ts +5 -6
  300. package/dist/components/media/av-player/av-player.class.js +1 -1
  301. package/dist/components/media/av-player/av-player.styles.js +0 -45
  302. package/dist/components/media/avatar/avatar.styles.js +3 -16
  303. package/dist/components/media/file-icon/file-icon.class.d.ts +1 -2
  304. package/dist/components/media/file-icon/file-icon.class.js +1 -1
  305. package/dist/components/media/file-input/file-input.class.d.ts +12 -0
  306. package/dist/components/media/file-input/file-input.class.js +1 -1
  307. package/dist/components/media/file-input/file-input.styles.js +3 -24
  308. package/dist/components/media/flag/flag.class.d.ts +20 -0
  309. package/dist/components/media/flag/flag.class.js +4 -2
  310. package/dist/components/media/flag/flag.styles.js +7 -1
  311. package/dist/components/media/flag/language-map.d.ts +10 -0
  312. package/dist/components/media/flag/language-map.js +1 -1
  313. package/dist/components/media/image-comparer/image-comparer.styles.js +4 -33
  314. package/dist/components/media/image-viewer/image-viewer.class.js +0 -2
  315. package/dist/components/media/image-viewer/image-viewer.styles.js +7 -27
  316. package/dist/components/media/lightbox/lightbox.class.js +0 -2
  317. package/dist/components/media/lightbox/lightbox.styles.js +2 -21
  318. package/dist/components/media/map/map-loader.d.ts +19 -1
  319. package/dist/components/media/map/map-loader.js +1 -1
  320. package/dist/components/media/map/map.class.d.ts +141 -1
  321. package/dist/components/media/map/map.class.js +15 -3
  322. package/dist/components/media/map/map.styles.js +20 -17
  323. package/dist/components/media/media-card/media-card.class.d.ts +14 -3
  324. package/dist/components/media/media-card/media-card.class.js +1 -1
  325. package/dist/components/media/media-card/media-card.styles.js +2 -28
  326. package/dist/components/media/pan-zoom/pan-zoom.styles.js +0 -3
  327. package/dist/components/media/qr-code/qr-code.class.d.ts +3 -2
  328. package/dist/components/media/qr-code/qr-code.class.js +2 -2
  329. package/dist/components/media/qr-code/qr-code.styles.js +0 -3
  330. package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +2 -0
  331. package/dist/components/media/sequence-playback/sequence-playback.class.js +2 -1
  332. package/dist/components/media/sequence-playback/sequence-playback.styles.js +0 -19
  333. package/dist/components/media/video/video.class.d.ts +23 -2
  334. package/dist/components/media/video/video.class.js +3 -3
  335. package/dist/components/media/video/video.styles.js +4 -2
  336. package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts +3 -2
  337. package/dist/components/media/zoomable-frame/zoomable-frame.class.js +2 -2
  338. package/dist/components/media/zoomable-frame/zoomable-frame.styles.js +0 -5
  339. package/dist/components/overlays/alert/alert.styles.js +4 -2
  340. package/dist/components/overlays/badge/badge.styles.js +4 -48
  341. package/dist/components/overlays/badge/tag.styles.js +0 -14
  342. package/dist/components/overlays/callout/callout.styles.js +2 -13
  343. package/dist/components/overlays/chip/chip-group.styles.js +0 -18
  344. package/dist/components/overlays/chip/chip.styles.js +6 -69
  345. package/dist/components/overlays/dialog/confirm.d.ts +1 -4
  346. package/dist/components/overlays/dialog/confirm.js +1 -1
  347. package/dist/components/overlays/dialog/dialog.class.d.ts +12 -9
  348. package/dist/components/overlays/dialog/dialog.class.js +1 -1
  349. package/dist/components/overlays/dialog/dialog.styles.js +0 -43
  350. package/dist/components/overlays/drawer/drawer.class.d.ts +2 -2
  351. package/dist/components/overlays/drawer/drawer.styles.js +0 -9
  352. package/dist/components/overlays/empty/empty.styles.js +0 -12
  353. package/dist/components/overlays/kbd/kbd.class.js +1 -1
  354. package/dist/components/overlays/kbd/kbd.styles.js +0 -8
  355. package/dist/components/overlays/overlay/dropdown.class.d.ts +1 -6
  356. package/dist/components/overlays/overlay/dropdown.class.js +2 -2
  357. package/dist/components/overlays/overlay/overlay.styles.js +0 -28
  358. package/dist/components/overlays/overlay/popover.class.d.ts +9 -1
  359. package/dist/components/overlays/overlay/popover.class.js +2 -2
  360. package/dist/components/overlays/overlay/tooltip.class.d.ts +10 -0
  361. package/dist/components/overlays/overlay/tooltip.class.js +2 -2
  362. package/dist/components/overlays/popup/popup.class.d.ts +1 -0
  363. package/dist/components/overlays/popup/popup.class.js +2 -2
  364. package/dist/components/overlays/popup/popup.styles.js +0 -15
  365. package/dist/components/overlays/progress/progress-ring.class.d.ts +9 -1
  366. package/dist/components/overlays/progress/progress-ring.class.js +3 -3
  367. package/dist/components/overlays/progress/progress.styles.js +0 -21
  368. package/dist/components/overlays/rating/rating.styles.js +0 -25
  369. package/dist/components/overlays/skeleton/skeleton.styles.js +0 -4
  370. package/dist/components/overlays/spinner/spinner.styles.js +2 -5
  371. package/dist/components/overlays/toast/toast-item.styles.js +3 -45
  372. package/dist/components/retrieval/chunk-inspector/chunk-inspector.styles.js +0 -35
  373. package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +2 -2
  374. package/dist/components/retrieval/citation-badge/citation-badge.class.js +3 -3
  375. package/dist/components/retrieval/citation-badge/citation-badge.styles.js +0 -20
  376. package/dist/components/retrieval/claim-evidence/claim-evidence.class.js +1 -1
  377. package/dist/components/retrieval/claim-evidence/claim-evidence.styles.js +0 -8
  378. package/dist/components/retrieval/community-card/community-card.class.d.ts +1 -0
  379. package/dist/components/retrieval/community-card/community-card.styles.js +0 -6
  380. package/dist/components/retrieval/embedding-explorer/embedding-explorer.styles.js +8 -12
  381. package/dist/components/retrieval/entity-card/entity-card.class.d.ts +4 -3
  382. package/dist/components/retrieval/entity-card/entity-card.class.js +1 -1
  383. package/dist/components/retrieval/entity-card/entity-card.styles.js +0 -12
  384. package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +10 -4
  385. package/dist/components/retrieval/entity-chip/entity-chip.class.js +3 -3
  386. package/dist/components/retrieval/entity-chip/entity-chip.styles.js +6 -9
  387. package/dist/components/retrieval/entity-dossier/entity-dossier.class.d.ts +19 -5
  388. package/dist/components/retrieval/entity-dossier/entity-dossier.class.js +1 -1
  389. package/dist/components/retrieval/graph/graph.class.d.ts +5 -0
  390. package/dist/components/retrieval/graph/graph.class.js +1 -1
  391. package/dist/components/retrieval/graph/graph.styles.js +0 -30
  392. package/dist/components/retrieval/graph-legend/graph-legend.styles.js +0 -3
  393. package/dist/components/retrieval/grounding-summary/grounding-summary.class.js +2 -2
  394. package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +0 -25
  395. package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.class.d.ts +2 -0
  396. package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.styles.js +0 -7
  397. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +20 -6
  398. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +2 -2
  399. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.styles.js +6 -11
  400. package/dist/components/retrieval/memory-panel/memory-panel.class.js +1 -1
  401. package/dist/components/retrieval/mind-map/mind-map.class.d.ts +5 -3
  402. package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
  403. package/dist/components/retrieval/mind-map/mind-map.styles.js +0 -2
  404. package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +3 -2
  405. package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +1 -1
  406. package/dist/components/retrieval/neighbor-list/neighbor-list.styles.js +0 -30
  407. package/dist/components/retrieval/node-palette/node-palette.styles.js +0 -11
  408. package/dist/components/retrieval/path-strip/path-strip.styles.js +0 -10
  409. package/dist/components/retrieval/provenance-panel/provenance-panel.class.d.ts +12 -3
  410. package/dist/components/retrieval/provenance-panel/provenance-panel.class.js +1 -1
  411. package/dist/components/retrieval/provenance-panel/provenance-panel.styles.js +0 -2
  412. package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.d.ts +3 -2
  413. package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.js +2 -2
  414. package/dist/components/retrieval/retrieval-results/retrieval-results.styles.js +0 -28
  415. package/dist/components/retrieval/retrieval-search/retrieval-search.styles.js +0 -4
  416. package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.js +1 -1
  417. package/dist/components/retrieval/retrieval-trace/retrieval-trace.styles.js +0 -2
  418. package/dist/components/retrieval/source-card/source-card.styles.js +0 -13
  419. package/dist/components/retrieval/source-list/source-list.styles.js +0 -7
  420. package/dist/components/retrieval/source-picker/source-picker.class.js +1 -1
  421. package/dist/components/retrieval/source-picker/source-picker.styles.js +0 -7
  422. package/dist/components/utility/copy-button/copy-button.styles.js +0 -10
  423. package/dist/components/utility/diff-view/diff-view.styles.js +0 -14
  424. package/dist/components/utility/export-button/export-button.styles.js +0 -22
  425. package/dist/components/utility/icon/icon.styles.js +0 -6
  426. package/dist/components/utility/json-viewer/json-viewer.styles.js +2 -48
  427. package/dist/components/utility/known-date/known-date.class.d.ts +7 -3
  428. package/dist/components/utility/known-date/known-date.styles.js +10 -51
  429. package/dist/components/utility/live-region/live-region.styles.js +0 -4
  430. package/dist/components/utility/mention-popover/mention-popover.styles.js +0 -25
  431. package/dist/components/utility/poll-status/poll-status.styles.js +0 -4
  432. package/dist/components/utility/random-content/random-content.class.d.ts +22 -0
  433. package/dist/components/utility/random-content/random-content.class.js +3 -2
  434. package/dist/components/utility/random-content/random-content.styles.js +6 -13
  435. package/dist/components/utility/tour/tour.class.d.ts +4 -2
  436. package/dist/components/utility/tour/tour.class.js +3 -3
  437. package/dist/components/utility/tour/tour.styles.js +0 -13
  438. package/dist/components/utility/visually-hidden/visually-hidden.styles.js +0 -5
  439. package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
  440. package/dist/components/viewers/archive-viewer/archive-viewer.styles.d.ts +2 -2
  441. package/dist/components/viewers/archive-viewer/archive-viewer.styles.js +0 -10
  442. package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
  443. package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
  444. package/dist/components/viewers/csv-viewer/csv-viewer.styles.js +0 -19
  445. package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
  446. package/dist/components/viewers/dataset-viewer/dataset-viewer.styles.js +0 -15
  447. package/dist/components/viewers/document-compare/document-compare.class.js +1 -1
  448. package/dist/components/viewers/document-compare/document-compare.styles.js +0 -3
  449. package/dist/components/viewers/document-preview/document-preview.styles.js +0 -25
  450. package/dist/components/viewers/document-viewer/document-viewer.class.d.ts +2 -1
  451. package/dist/components/viewers/document-viewer/document-viewer.class.js +1 -1
  452. package/dist/components/viewers/document-viewer/document-viewer.styles.js +0 -5
  453. package/dist/components/viewers/docx-viewer/docx-viewer.styles.js +0 -17
  454. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
  455. package/dist/components/viewers/ebook-viewer/ebook-viewer.styles.js +0 -4
  456. package/dist/components/viewers/email-viewer/email-viewer.styles.js +0 -7
  457. package/dist/components/viewers/geojson-view/geojson-view.styles.js +0 -5
  458. package/dist/components/viewers/highlight-layer/highlight-layer.styles.js +0 -3
  459. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +1 -1
  460. package/dist/components/viewers/notebook-viewer/notebook-viewer.styles.js +0 -38
  461. package/dist/components/viewers/page-rail/page-rail.class.js +1 -1
  462. package/dist/components/viewers/page-rail/page-rail.styles.js +0 -13
  463. package/dist/components/viewers/pdf-viewer/pdf-loader.d.ts +13 -2
  464. package/dist/components/viewers/pdf-viewer/pdf-loader.js +1 -1
  465. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +32 -2
  466. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +4 -4
  467. package/dist/components/viewers/pdf-viewer/pdf-viewer.styles.js +1 -27
  468. package/dist/components/viewers/pptx-viewer/pptx-viewer.styles.js +0 -3
  469. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
  470. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.styles.js +0 -14
  471. package/dist/components/viewers/svg-viewer/svg-viewer.styles.js +0 -7
  472. package/dist/components/viewers/xml-viewer/xml-viewer.styles.js +2 -24
  473. package/dist/custom-elements-jsx.d.ts +56 -37
  474. package/dist/events.d.ts +43 -33
  475. package/dist/internal/agent-status-variants.d.ts +18 -0
  476. package/dist/internal/agent-status-variants.js +1 -0
  477. package/dist/internal/announcer.d.ts +8 -3
  478. package/dist/internal/announcer.js +1 -1
  479. package/dist/internal/autoloader-manifest.js +1 -1
  480. package/dist/internal/canvas-color.d.ts +16 -0
  481. package/dist/internal/canvas-color.js +1 -1
  482. package/dist/internal/catalog-picker.d.ts +0 -1
  483. package/dist/internal/catalog-picker.js +1 -1
  484. package/dist/internal/default-strings.generated.d.ts +1 -0
  485. package/dist/internal/default-strings.generated.js +1 -1
  486. package/dist/internal/dev-mode-attribute-warning.d.ts +30 -0
  487. package/dist/internal/dev-mode-attribute-warning.js +1 -0
  488. package/dist/internal/localization-runtime.js +1 -1
  489. package/dist/internal/localization-types.d.ts +1 -1
  490. package/dist/internal/localization.js +1 -1
  491. package/dist/internal/lyra-element.d.ts +13 -0
  492. package/dist/internal/lyra-element.js +1 -1
  493. package/dist/internal/media-controller.js +1 -1
  494. package/dist/internal/package-metadata.d.ts +1 -1
  495. package/dist/internal/package-metadata.js +1 -1
  496. package/dist/internal/scroll-overflow.d.ts +35 -13
  497. package/dist/internal/scroll-overflow.js +1 -1
  498. package/dist/internal/sizes.styles.js +0 -2
  499. package/dist/internal/specialist-tokens.styles.js +6 -11
  500. package/dist/internal/text-highlights.d.ts +4 -1
  501. package/dist/internal/text-highlights.js +1 -1
  502. package/dist/internal/tokens/palette.styles.js +0 -15
  503. package/dist/internal/tokens.styles.js +19 -113
  504. package/dist/lyra.d.ts +8 -5
  505. package/dist/styles/reservations.css +82 -0
  506. package/dist/svelte.d.ts +56 -37
  507. package/dist/translations/ar.js +1 -1
  508. package/dist/translations/de.js +1 -1
  509. package/dist/translations/es.js +1 -1
  510. package/dist/translations/fa.js +1 -1
  511. package/dist/translations/fr.js +1 -1
  512. package/dist/translations/he.js +1 -1
  513. package/dist/translations/ja.js +1 -1
  514. package/dist/translations/pt-BR.js +1 -1
  515. package/dist/translations/ru.js +1 -1
  516. package/dist/translations/zh-CN.js +1 -1
  517. package/dist/vue.d.ts +56 -37
  518. package/llms/components/lr-accordion-item.md +12 -3
  519. package/llms/components/lr-accordion.md +11 -2
  520. package/llms/components/lr-agent-eval-dashboard.md +1 -1
  521. package/llms/components/lr-agent-trace.md +3 -1
  522. package/llms/components/lr-agent-workspace.md +20 -0
  523. package/llms/components/lr-artifact-panel.md +10 -4
  524. package/llms/components/lr-attachment-chip.md +7 -4
  525. package/llms/components/lr-attachment-trigger.md +9 -6
  526. package/llms/components/lr-av-player.md +3 -1
  527. package/llms/components/lr-avatar.md +6 -6
  528. package/llms/components/lr-bar-chart.md +4 -3
  529. package/llms/components/lr-box-plot.md +1 -1
  530. package/llms/components/lr-browser-frame.md +7 -3
  531. package/llms/components/lr-bubble-chart.md +4 -3
  532. package/llms/components/lr-calendar.md +9 -2
  533. package/llms/components/lr-card.md +24 -0
  534. package/llms/components/lr-chart.md +32 -8
  535. package/llms/components/lr-chat-viewport.md +7 -2
  536. package/llms/components/lr-checkbox-group.md +13 -5
  537. package/llms/components/lr-checkbox.md +5 -2
  538. package/llms/components/lr-checkpoint.md +6 -2
  539. package/llms/components/lr-combobox.md +5 -2
  540. package/llms/components/lr-command-palette.md +4 -1
  541. package/llms/components/lr-confirm-bar.md +7 -3
  542. package/llms/components/lr-context-meter.md +12 -11
  543. package/llms/components/lr-conversation-item.md +7 -4
  544. package/llms/components/lr-details.md +11 -2
  545. package/llms/components/lr-dialog.md +15 -10
  546. package/llms/components/lr-dock-panel.md +7 -10
  547. package/llms/components/lr-document-preview.md +6 -1
  548. package/llms/components/lr-document-viewer.md +3 -2
  549. package/llms/components/lr-doughnut-chart.md +4 -3
  550. package/llms/components/lr-drawer.md +3 -3
  551. package/llms/components/lr-entity-card.md +3 -3
  552. package/llms/components/lr-entity-chip.md +1 -1
  553. package/llms/components/lr-entity-dossier.md +4 -1
  554. package/llms/components/lr-file-input.md +2 -2
  555. package/llms/components/lr-flag.md +20 -5
  556. package/llms/components/lr-heatmap.md +29 -1
  557. package/llms/components/lr-histogram.md +3 -1
  558. package/llms/components/lr-icon.md +1 -1
  559. package/llms/components/lr-json-schema-viewer.md +2 -1
  560. package/llms/components/lr-knowledge-graph-explorer.md +8 -3
  561. package/llms/components/lr-known-date.md +4 -2
  562. package/llms/components/lr-line-chart.md +4 -3
  563. package/llms/components/lr-lite-chart.md +16 -6
  564. package/llms/components/lr-map.md +72 -8
  565. package/llms/components/lr-markdown-core.md +3 -2
  566. package/llms/components/lr-media-card.md +28 -12
  567. package/llms/components/lr-message-parts.md +2 -1
  568. package/llms/components/lr-model-select.md +9 -10
  569. package/llms/components/lr-model-settings-panel.md +9 -9
  570. package/llms/components/lr-neighbor-list.md +1 -1
  571. package/llms/components/lr-notebook-viewer.md +6 -3
  572. package/llms/components/lr-option.md +5 -2
  573. package/llms/components/lr-pdf-viewer.md +62 -2
  574. package/llms/components/lr-pie-chart.md +4 -3
  575. package/llms/components/lr-polar-area-chart.md +4 -3
  576. package/llms/components/lr-popover.md +5 -0
  577. package/llms/components/lr-progress-ring.md +8 -1
  578. package/llms/components/lr-prompt-studio.md +1 -1
  579. package/llms/components/lr-provenance-panel.md +4 -2
  580. package/llms/components/lr-qr-code.md +1 -1
  581. package/llms/components/lr-radar-chart.md +4 -3
  582. package/llms/components/lr-rag-eval-dashboard.md +2 -2
  583. package/llms/components/lr-random-content.md +13 -0
  584. package/llms/components/lr-reorder-item.md +6 -1
  585. package/llms/components/lr-reorder-list.md +6 -1
  586. package/llms/components/lr-responsive-panel.md +11 -7
  587. package/llms/components/lr-scatter-chart.md +4 -3
  588. package/llms/components/lr-sequence-strip.md +16 -2
  589. package/llms/components/lr-slider.md +12 -5
  590. package/llms/components/lr-sparkline.md +1 -1
  591. package/llms/components/lr-suggestion-chips.md +7 -2
  592. package/llms/components/lr-swatch-picker.md +5 -5
  593. package/llms/components/lr-switch.md +5 -2
  594. package/llms/components/lr-table.md +30 -4
  595. package/llms/components/lr-terminal.md +3 -1
  596. package/llms/components/lr-thread-list.md +8 -8
  597. package/llms/components/lr-time-input.md +6 -1
  598. package/llms/components/lr-timeline-item.md +24 -0
  599. package/llms/components/lr-timeline.md +25 -1
  600. package/llms/components/lr-token-input.md +7 -2
  601. package/llms/components/lr-tool-approval-dialog.md +7 -8
  602. package/llms/components/lr-tool-call-chip.md +5 -1
  603. package/llms/components/lr-tool-param-form.md +14 -12
  604. package/llms/components/lr-tool-result-dialog.md +11 -9
  605. package/llms/components/lr-tool-result-view.md +7 -6
  606. package/llms/components/lr-tool-select-dialog.md +18 -16
  607. package/llms/components/lr-trace-tree.md +3 -1
  608. package/llms/components/lr-usage-badge.md +4 -1
  609. package/llms/components/lr-video-playlist.md +1 -1
  610. package/llms/components/lr-virtual-list.md +22 -14
  611. package/llms/components/lr-voice-picker.md +8 -5
  612. package/llms/components/lr-widget-renderer.md +3 -3
  613. package/llms/components/lr-widget.md +1 -1
  614. package/llms/components/lr-word-cloud.md +6 -2
  615. package/llms/index.md +1 -1
  616. package/llms/peers.md +13 -3
  617. package/llms/shared.md +83 -2
  618. package/llms-full.txt +1159 -288
  619. package/package.json +19 -7
  620. package/vscode-css-data.json +37 -2
  621. package/vscode-html-data.json +402 -45
  622. package/web-types.json +300 -56
@@ -1,4 +1,6 @@
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}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,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_progress,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}async function loadFlagUrl(importFlags){try{const resolver=resolverFromModule(await importFlags());if(resolver)return resolver;throw new TypeError("The flag peer does not expose a callable flagUrl capability.")}catch{return console.warn("<lr-flag> needs the optional peer dependency '@aceshooting/lyra-flags' to render flag images \u2014 install it with `pnpm add @aceshooting/lyra-flags`."),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;function setFlagUrlResolver(value){flagUrlResolver=value===null?Promise.resolve(null):Promise.resolve(value),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,progress:LYRA_DEFAULT_progress,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():void 0;if(this.language)return languageToCountry(this.language)}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.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"){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"))}render(){const state2=this.sourceState,request=this.activeSourceRequest;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`
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_progress,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}async function loadFlagUrl(importFlags){try{const resolver=resolverFromModule(await importFlags());if(resolver)return resolver;throw new TypeError("The flag peer does not expose a callable flagUrl capability.")}catch{return console.warn("<lr-flag> needs the optional peer dependency '@aceshooting/lyra-flags' to render flag images \u2014 install it with `pnpm add @aceshooting/lyra-flags`."),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;function setFlagUrlResolver(value){flagUrlResolver=value===null?Promise.resolve(null):Promise.resolve(value),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,progress:LYRA_DEFAULT_progress,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"){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)return html`<slot name="fallback"
2
+ >${this.fallback?html`<img part="fallback-image" src=${this.fallback} alt=${this.label??""} />`:nothing}</slot
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`
2
4
  ${state2.status==="loading"?html`
3
5
  <span class="sr-only">${this.localize("loading")}</span>
4
6
  <lr-skeleton shape="rect" .announce=${!1}></lr-skeleton>
@@ -13,4 +15,4 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
13
15
  @load=${event=>this.onImageLoad(event,state2.identity,url,request)}
14
16
  @error=${event=>this.onImageError(event,state2.identity,request)}
15
17
  />`):null}
16
- `}}__decorate([property()],LyraFlag.prototype,"country",void 0),__decorate([property()],LyraFlag.prototype,"language",void 0),__decorate([property()],LyraFlag.prototype,"src",void 0),__decorate([property()],LyraFlag.prototype,"label",void 0),__decorate([property({reflect:!0})],LyraFlag.prototype,"shape",null),__decorate([property({reflect:!0})],LyraFlag.prototype,"fidelity",null),__decorate([state()],LyraFlag.prototype,"sourceState",void 0),__decorate([state()],LyraFlag.prototype,"resolverGeneration",void 0);export{LyraFlag,loadFlagUrl,setFlagUrlResolver};
18
+ `}}__decorate([property()],LyraFlag.prototype,"country",void 0),__decorate([property()],LyraFlag.prototype,"fallback",void 0),__decorate([property()],LyraFlag.prototype,"language",void 0),__decorate([property()],LyraFlag.prototype,"src",void 0),__decorate([property()],LyraFlag.prototype,"label",void 0),__decorate([property({reflect:!0})],LyraFlag.prototype,"shape",null),__decorate([property({reflect:!0})],LyraFlag.prototype,"fidelity",null),__decorate([state()],LyraFlag.prototype,"sourceState",void 0),__decorate([state()],LyraFlag.prototype,"resolverGeneration",void 0);export{LyraFlag,loadFlagUrl,setFlagUrlResolver};
@@ -1,6 +1,7 @@
1
1
  import{css}from"lit";const styles=css`
2
2
  :host {
3
3
  display: inline-block;
4
+ position: relative;
4
5
  aspect-ratio: var(--lr-flag-aspect-ratio, 4 / 3);
5
6
  block-size: var(--lr-size-1em);
6
7
  line-height: 0;
@@ -15,6 +16,11 @@ import{css}from"lit";const styles=css`
15
16
  box-shadow: 0 0 0 var(--lr-size-1px) var(--lr-color-border) inset;
16
17
  object-fit: var(--lr-flag-object-fit, cover);
17
18
  }
19
+ [part='image'][hidden] {
20
+ position: absolute;
21
+ inset: 0;
22
+ visibility: hidden;
23
+ }
18
24
  [part='error'] {
19
25
  display: inline-block;
20
26
  color: var(--lr-color-danger);
@@ -30,7 +36,7 @@ import{css}from"lit";const styles=css`
30
36
  line-height: var(--lr-line-height-normal);
31
37
  vertical-align: baseline;
32
38
  }
33
- :host([shape='circle']) {
39
+ :host([shape='circle']:not([data-error])) {
34
40
  block-size: var(--lr-size-1em);
35
41
  inline-size: var(--lr-size-1em);
36
42
  }
@@ -9,6 +9,16 @@
9
9
  * match this shape is treated the same as an unknown/missing flag.
10
10
  */
11
11
  export declare const ALPHA2_RE: RegExp;
12
+ /** ISO 3166-1 alpha-3 shape: exactly three ASCII letters, case-insensitive. Length alone
13
+ * disambiguates the two code spaces, so no explicit format hint is needed. */
14
+ export declare const ALPHA3_RE: RegExp;
15
+ /**
16
+ * The alpha-2 code for an ISO 3166-1 alpha-3 code, or `undefined` when it isn't one. Case
17
+ * insensitive. Deliberately excludes user-assigned and withdrawn codes: a historical or defunct
18
+ * state has no current flag to resolve, so it takes the component's unresolved path rather than
19
+ * silently mapping to a successor state's flag.
20
+ */
21
+ export declare function alpha3ToAlpha2(code: string): string | undefined;
12
22
  /**
13
23
  * Default mapping from a language subtag to a representative country flag
14
24
  * (ISO 3166-1 alpha-2). Languages don't map 1:1 to countries; these are the
@@ -1 +1 @@
1
- import{getDisplayNames}from"../../../internal/intl-cache.js";const ALPHA2_RE=/^[a-z]{2}$/i,LANGUAGE_TO_COUNTRY={en:"gb",fr:"fr",de:"de",es:"es",it:"it",pt:"pt",nl:"nl",ar:"sa",zh:"cn",ja:"jp",ko:"kr",ru:"ru",pl:"pl",tr:"tr",sv:"se",da:"dk",fi:"fi",no:"no",nb:"no",cs:"cz",sk:"sk",el:"gr",he:"il",hi:"in",th:"th",vi:"vn",id:"id",ms:"my",uk:"ua",ro:"ro",hu:"hu",bg:"bg",hr:"hr",sr:"rs",sl:"si",et:"ee",lv:"lv",lt:"lt",fa:"ir",ur:"pk",bn:"bd",ta:"in",ca:"es"};function mappedCountry(language){return Object.hasOwn(LANGUAGE_TO_COUNTRY,language)?LANGUAGE_TO_COUNTRY[language]:void 0}function languageToCountry(language){if(typeof language!="string")return;const normalized=language.trim().replaceAll("_","-");if(!normalized)return;try{const locale=new Intl.Locale(normalized);return locale.region&&ALPHA2_RE.test(locale.region)?locale.region.toLowerCase():mappedCountry(locale.language.toLowerCase())}catch{}const parts=normalized.toLowerCase().split("-").slice(0,16),base=parts[0];if(base.length!==1){for(const part of parts.slice(1)){if(!/^[a-z0-9]{1,8}$/.test(part)||part.length===1)break;if(ALPHA2_RE.test(part))return part}return mappedCountry(base)}}function localeNativeName(tag){try{return getDisplayNames(tag,{type:"language"}).of(tag)??tag}catch{return tag}}export{ALPHA2_RE,LANGUAGE_TO_COUNTRY,languageToCountry,localeNativeName};
1
+ import{getDisplayNames}from"../../../internal/intl-cache.js";const ALPHA2_RE=/^[a-z]{2}$/i,ALPHA3_RE=/^[a-z]{3}$/i,ALPHA3_TO_ALPHA2_PACKED="abwawafgafagoaoaiaaialaaxalbalandadareaeargararmamasmasataaqatftfatgagausauautatazeazbdibibelbebenbjbesbqbfabfbgdbdbgrbgbhrbhbhsbsbihbablmblblrbyblzbzbmubmbolbobrabrbrbbbbrnbnbtnbtbvtbvbwabwcafcfcancacckccchechchlclchncncivcicmrcmcodcdcogcgcokckcolcocomkmcpvcvcricrcubcucuwcwcxrcxcymkycypcyczeczdeudedjidjdmadmdnkdkdomdodzadzecuecegyegeriereshehespesesteeethetfinfifjifjflkfkfrafrfrofofsmfmgabgagbrgbgeogeggyggghaghgibgigingnglpgpgmbgmgnbgwgnqgqgrcgrgrdgdgrlglgtmgtgufgfgumguguygyhkghkhmdhmhndhnhrvhrhtihthunhuidnidimnimindiniotioirlieirnirirqiqislisisrilitaitjamjmjeyjejorjojpnjpkazkzkenkekgzkgkhmkhkirkiknaknkorkrkwtkwlaolalbnlblbrlrlbylylcalclielilkalklsolsltultluxlulvalvmacmomafmfmarmamcomcmdamdmdgmgmdvmvmexmxmhlmhmkdmkmlimlmltmtmmrmmmnememngmnmnpmpmozmzmrtmrmsrmsmtqmqmusmumwimwmysmymytytnamnanclncnernenfknfngangnicniniununldnlnornonplnpnrunrnzlnzomnompakpkpanpapcnpnperpephlphplwpwpngpgpolplpriprprkkpprtptprypypsepspyfpfqatqareurerourorusrurwarwsausasdnsdsensnsgpsgsgsgsshnshsjmsjslbsbsleslslvsvsmrsmsomsospmpmsrbrsssdssstpstsursrsvksksvnsisweseswzszsxmsxsycscsyrsytcatctcdtdtgotgthathtjktjtkltktkmtmtlstltontottotttuntnturtrtuvtvtwntwtzatzugaugukruaumiumuryuyusausuzbuzvatvavctvcvenvevgbvgvirvivnmvnvutvuwlfwfwsmwsyemyezafzazmbzmzwezw";let alpha3Lookup;function alpha3ToAlpha2(code){if(ALPHA3_RE.test(code)){if(!alpha3Lookup){alpha3Lookup=new Map;for(let index=0;index<ALPHA3_TO_ALPHA2_PACKED.length;index+=5)alpha3Lookup.set(ALPHA3_TO_ALPHA2_PACKED.slice(index,index+3),ALPHA3_TO_ALPHA2_PACKED.slice(index+3,index+5))}return alpha3Lookup.get(code.toLowerCase())}}const LANGUAGE_TO_COUNTRY={en:"gb",fr:"fr",de:"de",es:"es",it:"it",pt:"pt",nl:"nl",ar:"sa",zh:"cn",ja:"jp",ko:"kr",ru:"ru",pl:"pl",tr:"tr",sv:"se",da:"dk",fi:"fi",no:"no",nb:"no",cs:"cz",sk:"sk",el:"gr",he:"il",hi:"in",th:"th",vi:"vn",id:"id",ms:"my",uk:"ua",ro:"ro",hu:"hu",bg:"bg",hr:"hr",sr:"rs",sl:"si",et:"ee",lv:"lv",lt:"lt",fa:"ir",ur:"pk",bn:"bd",ta:"in",ca:"es"};function mappedCountry(language){return Object.hasOwn(LANGUAGE_TO_COUNTRY,language)?LANGUAGE_TO_COUNTRY[language]:void 0}function languageToCountry(language){if(typeof language!="string")return;const normalized=language.trim().replaceAll("_","-");if(!normalized)return;try{const locale=new Intl.Locale(normalized);return locale.region&&ALPHA2_RE.test(locale.region)?locale.region.toLowerCase():mappedCountry(locale.language.toLowerCase())}catch{}const parts=normalized.toLowerCase().split("-").slice(0,16),base=parts[0];if(base.length!==1){for(const part of parts.slice(1)){if(!/^[a-z0-9]{1,8}$/.test(part)||part.length===1)break;if(ALPHA2_RE.test(part))return part}return mappedCountry(base)}}function localeNativeName(tag){try{return getDisplayNames(tag,{type:"language"}).of(tag)??tag}catch{return tag}}export{ALPHA2_RE,ALPHA3_RE,LANGUAGE_TO_COUNTRY,alpha3ToAlpha2,languageToCountry,localeNativeName};
@@ -2,11 +2,6 @@ import{css}from"lit";const styles=css`
2
2
  :host {
3
3
  display: block;
4
4
  min-inline-size: 0;
5
- /* Namespaced sizing surface, fed by the bare Shoelace-compat names. An unprefixed custom
6
- property inherits, so a single --handle-size anywhere up the tree would otherwise silently
7
- retune this component along with every other one reading a generically-named property.
8
- Consumers override the --lr-image-comparer-* names on an ancestor or the host; the compat
9
- names remain the private defaults' fallback source. */
10
5
  --_lr-image-comparer-divider-width: var(
11
6
  --divider-width,
12
7
  var(--lr-size-1px)
@@ -39,13 +34,6 @@ import{css}from"lit";const styles=css`
39
34
  [part~="base"][data-orientation="vertical"] [part="before"] {
40
35
  clip-path: inset(0 0 calc(100% - var(--lr-comparer-position, 50%)) 0);
41
36
  }
42
- /* clip-path's inset() only accepts physical top/right/bottom/left offsets -- no logical
43
- equivalent exists -- while [part='divider'] below is positioned with the logical
44
- inset-inline-start, which the browser already mirrors under RTL on its own. Without this
45
- override the clipped 'before' region stays pinned to the physical-left portion regardless of
46
- direction, while the divider (and native range-input handle) move to the right under RTL,
47
- visibly desyncing the boundary from the line the user is dragging. Vertical orientation is a
48
- block-axis split, unaffected by inline direction, so it's excluded and keeps its own rule above. */
49
37
  :host(:dir(rtl)) [part="before"] {
50
38
  clip-path: inset(0 0 0 calc(100% - var(--lr-comparer-position, 50%)));
51
39
  }
@@ -61,6 +49,10 @@ import{css}from"lit";const styles=css`
61
49
  max-inline-size: 100%;
62
50
  overflow-wrap: anywhere;
63
51
  }
52
+ [part="before"] ::slotted([hidden]:not([hidden="until-found" i])),
53
+ [part="after"] ::slotted([hidden]:not([hidden="until-found" i])) {
54
+ display: none;
55
+ }
64
56
  [part="divider"] {
65
57
  position: absolute;
66
58
  z-index: var(--lr-layer-popover);
@@ -71,8 +63,6 @@ import{css}from"lit";const styles=css`
71
63
  var(--_lr-image-comparer-divider-width)
72
64
  );
73
65
  background: var(--lr-color-surface);
74
- /* Card step, not the overlay step: the shadow here only has to keep a hairline legible against
75
- arbitrary imagery on both sides -- a wider blur reads as a smudge along the seam. */
76
66
  box-shadow: var(--lr-shadow-s);
77
67
  pointer-events: none;
78
68
  }
@@ -88,10 +78,6 @@ import{css}from"lit";const styles=css`
88
78
  }
89
79
  [part="handle"] {
90
80
  position: absolute;
91
- /* --lr-layer-tooltip does not exist (no fallback -> z-index: auto, stacking the interaction
92
- wrapper BELOW [part='before']'s clipped pointer-events-enabled region and intercepting its
93
- own drag/click input). Matching [part='divider']'s own --lr-layer-popover is sufficient: the
94
- handle renders after the divider, so an equal z-index still wins the paint-order tie. */
95
81
  z-index: var(--lr-layer-popover);
96
82
  inset: 0;
97
83
  }
@@ -105,16 +91,6 @@ import{css}from"lit";const styles=css`
105
91
  cursor: ew-resize;
106
92
  }
107
93
  [part~="base"][data-orientation="vertical"] [part="input"] {
108
- /* A native <input type="range"> always maps pointer position along its own inline axis,
109
- which defaults to horizontal-tb -- so without this override, dragging up/down over the
110
- visibly vertical divider does nothing; only a horizontal drag (invisible, off to the
111
- side) would move the thumb. writing-mode: vertical-lr switches the input's inline axis to
112
- run top-to-bottom, matching [part='divider']'s own top-anchored inset-block-start above.
113
- direction is pinned to ltr (rather than left to inherit an ambient dir="rtl") because
114
- vertical-lr's inline progression reverses to bottom-to-top under direction: rtl, which
115
- would desync the native handle's value from the always-top-to-bottom divider position --
116
- the same block-axis-is-unaffected-by-inline-direction invariant the 'before' clip-path
117
- override above already relies on for vertical orientation. */
118
94
  writing-mode: vertical-lr;
119
95
  direction: ltr;
120
96
  cursor: ns-resize;
@@ -177,14 +153,9 @@ import{css}from"lit";const styles=css`
177
153
  outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
178
154
  outline-offset: var(--lr-focus-ring-offset);
179
155
  }
180
- /* [part='input'] is a fully-transparent full-bleed native <input type="range">. Keep hover
181
- feedback on the divider too, so the full drag surface responds even when the pointer isn't
182
- directly over the small visible handle. */
183
156
  [part~="base"]:has([part="input"]:hover) [part="divider"] {
184
157
  background: var(--lr-color-brand);
185
158
  }
186
- /* Pressed rides the same :has() indirection as the hover rule above: the transparent full-bleed
187
- input has nothing of its own to tint, so mid-drag the seam deepens past its hover accent. */
188
159
  [part~="base"]:has([part="input"]:active) [part="divider"] {
189
160
  background: color-mix(
190
161
  in oklab,
@@ -35,8 +35,6 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
35
35
  @lr-zoom-change=${this.onFrameZoomChange}
36
36
  @focus=${event=>event.stopPropagation()}
37
37
  @blur=${event=>event.stopPropagation()}
38
- @lr-focus=${event=>event.stopPropagation()}
39
- @lr-blur=${event=>event.stopPropagation()}
40
38
  >
41
39
  <div
42
40
  part="rotation-frame"
@@ -58,8 +58,6 @@ import{css}from"lit";const styles=css`
58
58
  [part="annotate-toggle"]:hover {
59
59
  background: var(--lr-color-brand-quiet);
60
60
  }
61
- /* Declared here rather than after the [aria-pressed='true'] rule below so the toggle's own "on"
62
- fill keeps winning the source-order tie, exactly as it already does against :hover. */
63
61
  [part="fit-control"]:active,
64
62
  [part="rotate-button"]:active,
65
63
  [part="annotate-toggle"]:active {
@@ -96,6 +94,13 @@ import{css}from"lit";const styles=css`
96
94
  var(--lr-color-brand)
97
95
  );
98
96
  }
97
+ [part="annotate-toggle"][aria-pressed="true"]:active {
98
+ background: color-mix(
99
+ in oklab,
100
+ var(--lr-image-viewer-annotate-active-bg, var(--lr-color-brand-quiet)),
101
+ var(--lr-color-mix-partner) var(--lr-color-mix-active)
102
+ );
103
+ }
99
104
  [part="rotation-frame"] {
100
105
  position: relative;
101
106
  display: inline-block;
@@ -106,7 +111,6 @@ import{css}from"lit";const styles=css`
106
111
  }
107
112
  [part="rotation-frame"][data-measured] [part="image-wrapper"] {
108
113
  position: absolute;
109
- /* policy-allow(physical-css): rotation geometry is a physical raster coordinate system. */
110
114
  left: 50%;
111
115
  top: 50%;
112
116
  }
@@ -117,8 +121,6 @@ import{css}from"lit";const styles=css`
117
121
  transition: transform var(--lr-transition-base);
118
122
  outline: none;
119
123
  }
120
- /* 'actual' size intentionally keeps the image at its natural pixel dimensions -- undo the
121
- 100% cap above (and the 'width'/'contain' image constraints below) for that mode. */
122
124
  :host([fit="actual"]) [part="image-wrapper"] {
123
125
  max-inline-size: none;
124
126
  }
@@ -127,11 +129,6 @@ import{css}from"lit";const styles=css`
127
129
  transition: none;
128
130
  }
129
131
  }
130
- /* The embedded pan-zoom's own [part='content'] sizes to its slotted content's natural
131
- size by default (a max-content track), which leaves percentage sizing on the image below with
132
- no definite basis to resolve against. Giving it the viewport's own inline size here is what
133
- lets 'contain'/'width' scale the image to the available frame instead of its raw natural
134
- pixel dimensions -- 'actual' leaves the default max-content sizing alone. */
135
132
  :host([fit="contain"]) [part="frame"]::part(content),
136
133
  :host([fit="width"]) [part="frame"]::part(content) {
137
134
  inline-size: 100%;
@@ -155,13 +152,6 @@ import{css}from"lit";const styles=css`
155
152
  position: absolute;
156
153
  inset: 0;
157
154
  }
158
- /* Each tone sets --lr-image-viewer-highlight-fill rather than background directly, and the one
159
- background declaration here reads it. That indirection is what lets the hover/active rules mix
160
- from whichever fill a given highlight actually has: a background-mix written against the
161
- untoned default would flatten every toned box to brand the instant the pointer touched it, and
162
- a per-tone hover/active pair would be ten near-identical rules. The public
163
- --lr-image-viewer-highlight-*-bg knobs are untouched -- still what each fill falls back
164
- through. */
165
155
  [part="highlight"] {
166
156
  position: absolute;
167
157
  min-inline-size: var(--lr-icon-button-size);
@@ -238,10 +228,6 @@ import{css}from"lit";const styles=css`
238
228
  var(--lr-focus-ring-offset)
239
229
  );
240
230
  }
241
- /* Was filter: brightness(), which multiplies every channel -- so it lightened a dark highlight,
242
- did nothing at all to a white one, and (filter applying to the whole subtree) dragged
243
- [part='highlight-label']'s text along with the box. Mixing the fill alone toward
244
- --lr-color-mix-partner always moves, and only the fill moves. */
245
231
  [part="highlight"]:hover {
246
232
  background: color-mix(
247
233
  in oklab,
@@ -269,12 +255,6 @@ import{css}from"lit";const styles=css`
269
255
  [part="highlight-label"] {
270
256
  position: absolute;
271
257
  inset-block-start: calc(var(--lr-size-1-5em) * -1);
272
- /* policy-allow(physical-css): the parent [part='highlight'] box is deliberately positioned with
273
- physical left/top (see renderHighlights()'s comment -- region rects are physical
274
- percent-of-image coordinates over a raster that never mirrors). The parent itself never moves
275
- under RTL, so a logical inset here would flip this label to the box's opposite corner while
276
- the box stayed put. Matching the parent's physical coordinate system keeps the label anchored
277
- to the box's left edge in both directions. */
278
258
  left: 0;
279
259
  font-size: var(--lr-font-size-xs);
280
260
  color: var(--lr-color-text);
@@ -41,8 +41,6 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
41
41
  .accessibleLabel=${positionText||null}
42
42
  @focus=${event=>event.stopPropagation()}
43
43
  @blur=${event=>event.stopPropagation()}
44
- @lr-focus=${event=>event.stopPropagation()}
45
- @lr-blur=${event=>event.stopPropagation()}
46
44
  ></lr-pan-zoom>
47
45
  ${count>1?html`
48
46
  <button
@@ -1,11 +1,6 @@
1
1
  import{css}from"lit";const styles=css`
2
2
  :host {
3
3
  --_lr-lightbox-overlay-color: var(--lr-color-overlay-strong);
4
- /* Background for every floating/toolbar icon button (close-button, previous-button,
5
- next-button). These buttons float directly over arbitrary image content, not the app's
6
- normal surface, so they reuse the "solid, high-contrast neutral fill" token rather than
7
- --lr-color-surface for guaranteed contrast independent of both the page theme and
8
- whatever's in the photo. */
9
4
  --_lr-lightbox-control-bg: var(--lr-color-neutral);
10
5
  --_lr-lightbox-control-color: var(--lr-color-on-neutral);
11
6
  display: none;
@@ -102,19 +97,12 @@ import{css}from"lit";const styles=css`
102
97
  [part="close-button"] {
103
98
  margin-inline-start: var(--lr-space-xs);
104
99
  }
105
- /* :where() zeroes the wrapped selectors' specificity contribution, leaving only :hover itself
106
- -- mirrors lr-attachment-trigger's identical fix for the same [part='x']:hover:not(:disabled)
107
- over-specificity shape, so a consumer's ::part(close-button):hover /
108
- ::part(previous-button):hover / ::part(next-button):hover override wins without !important. */
109
100
  :where([part="close-button"]):hover,
110
101
  :where([part="previous-button"]):hover:where(:not(:disabled)),
111
102
  :where([part="next-button"]):hover:where(:not(:disabled)) {
112
103
  background: var(--lr-color-brand-quiet);
113
104
  color: var(--lr-color-brand);
114
105
  }
115
- /* Pressed carries the hover fill further toward --lr-color-mix-partner. These controls float over
116
- arbitrary photography, so the press has to be legible on its own rather than relying on the
117
- surrounding image to supply contrast. */
118
106
  :where([part="close-button"]):active,
119
107
  :where([part="previous-button"]):active:where(:not(:disabled)),
120
108
  :where([part="next-button"]):active:where(:not(:disabled)) {
@@ -147,8 +135,6 @@ import{css}from"lit";const styles=css`
147
135
  min-inline-size: 0;
148
136
  min-block-size: 0;
149
137
  }
150
- /* Plain ::part() styling one level in, unrelated to exportparts -- stretches the embedded
151
- frame to fill the stage, overriding pan-zoom's own min-block-size default. */
152
138
  lr-pan-zoom[part="frame"] {
153
139
  display: block;
154
140
  inline-size: 100%;
@@ -173,10 +159,6 @@ import{css}from"lit";const styles=css`
173
159
  [part="next-button"] {
174
160
  inset-inline-end: var(--lr-space-s);
175
161
  }
176
- /* Rotate the wrapping part element, not the icon itself -- rotate(180deg) matches
177
- pagination.styles.ts's existing previous-icon/next-icon recipe for a chevronIcon()-based
178
- prev/next pair (carousel's scaleX(-1) recipe is for its literal ‹/› glyphs, a different base
179
- case). */
180
162
  [part="previous-glyph"] {
181
163
  transform: rotate(180deg);
182
164
  }
@@ -193,6 +175,8 @@ import{css}from"lit";const styles=css`
193
175
  flex: 0 0 auto;
194
176
  margin: 0;
195
177
  max-inline-size: 100%;
178
+ max-block-size: var(--lr-size-8rem);
179
+ overflow-y: auto;
196
180
  align-self: center;
197
181
  padding: var(--lr-space-xs) var(--lr-space-s);
198
182
  border-radius: var(--lr-radius);
@@ -201,9 +185,6 @@ import{css}from"lit";const styles=css`
201
185
  text-align: center;
202
186
  overflow-wrap: anywhere;
203
187
  }
204
- /* Container-query lengths cannot reference custom properties. This is the documented 320px
205
- narrow-allocation baseline expressed in root-relative units so it still follows the page's
206
- type scale -- mirrors pagination.styles.ts's identical container query. */
207
188
  @container (max-inline-size: 20rem) {
208
189
  [part="counter"] {
209
190
  max-inline-size: 45%;
@@ -1,5 +1,18 @@
1
1
  export interface MapLibreGeoJsonSource {
2
2
  setData(data: unknown): void;
3
+ /** maplibre-gl 3+ incremental update. Optional because older peers lack it. */
4
+ updateData?(diff: MapLibreGeoJsonDiff): void;
5
+ }
6
+ /** The subset of maplibre-gl's GeoJSON diff this component emits: per-feature property updates. */
7
+ export interface MapLibreGeoJsonDiff {
8
+ readonly update: readonly {
9
+ readonly id: string | number;
10
+ readonly addOrUpdateProperties: readonly {
11
+ readonly key: string;
12
+ readonly value: unknown;
13
+ }[];
14
+ readonly removeProperties: readonly string[];
15
+ }[];
3
16
  }
4
17
  export interface MapLibrePopupCapability {
5
18
  setHTML(html: string): this;
@@ -17,7 +30,10 @@ export interface MapLibreMarkerCapability {
17
30
  getElement?(): HTMLElement;
18
31
  }
19
32
  export interface MapLibreMapCapability {
20
- getCanvas?(): HTMLCanvasElement;
33
+ /** Required, unlike setMaxBounds below: the loader validates getCanvas is callable and rejects a
34
+ * peer without it, so holding this type already implies the method is present. Call sites still
35
+ * guard with `?.()` against a peer that satisfies the shape check and then lies at runtime. */
36
+ getCanvas(): HTMLCanvasElement;
21
37
  getCenter(): {
22
38
  lng: number;
23
39
  lat: number;
@@ -26,6 +42,8 @@ export interface MapLibreMapCapability {
26
42
  setCenter(center: [number, number]): unknown;
27
43
  setZoom(zoom: number): unknown;
28
44
  resize(): unknown;
45
+ /** Optional: absent on peers predating it, and the caller feature-detects before use. */
46
+ setMaxBounds?(bounds: readonly [readonly [number, number], readonly [number, number]] | null): unknown;
29
47
  remove(): void;
30
48
  on(type: 'error', listener: (event: {
31
49
  error?: unknown;
@@ -1 +1 @@
1
- import{resolveOptionalPeerCapability,unwrapOptionalPeerDefault}from"../../../internal/optional-peer-capabilities.js";const MAP_METHODS=["getCenter","getZoom","setCenter","setZoom","resize","remove","on","once","setStyle","getSource","addSource","removeSource","getLayer","addLayer","removeLayer","setPaintProperty","queryRenderedFeatures"],MARKER_METHODS=["setLngLat","setPopup","getPopup","addTo","remove"],POPUP_METHODS=["setHTML","setText"];function isObjectLike(value){return(typeof value=="object"||typeof value=="function")&&value!==null}function isConstructor(value){if(typeof value!="function")return!1;try{return Reflect.construct(Object,[],value),!0}catch{return!1}}function missingConstructorCapability(module,name,methods){const Constructor=module[name];if(!isConstructor(Constructor))return name;const prototype=Constructor.prototype;if(!isObjectLike(prototype))return`${name}.prototype`;for(const method of methods)if(typeof prototype[method]!="function")return`${name}.prototype.${method}`}function missingMaplibreCapability(candidate){return isObjectLike(candidate)?missingConstructorCapability(candidate,"Map",MAP_METHODS)??missingConstructorCapability(candidate,"Marker",MARKER_METHODS)??missingConstructorCapability(candidate,"Popup",POPUP_METHODS):"module namespace"}function isMaplibreModule(candidate){return missingMaplibreCapability(candidate)===void 0}function resolveMaplibreModule(value){const module=resolveOptionalPeerCapability(value,isMaplibreModule);if(module)return module;const candidate=unwrapOptionalPeerDefault(value),missing=missingMaplibreCapability(candidate)??"module namespace";throw new Error(`Invalid optional peer \`maplibre-gl\`: missing or invalid \`${missing}\` capability.`)}let maplibre;async function loadMaplibreModule(importer=()=>import("maplibre-gl")){try{return resolveMaplibreModule(await importer())}catch(error){return console.warn("<lr-map> needs the optional peer dependency `maplibre-gl` \u2014 install it with `pnpm add maplibre-gl`.",error),null}}function loadMaplibre(){return maplibre||(maplibre=loadMaplibreModule()),maplibre}export{loadMaplibre,loadMaplibreModule};
1
+ import{resolveOptionalPeerCapability,unwrapOptionalPeerDefault}from"../../../internal/optional-peer-capabilities.js";const MAP_METHODS=["getCanvas","getCenter","getZoom","setCenter","setZoom","resize","remove","on","once","setStyle","getSource","addSource","removeSource","getLayer","addLayer","removeLayer","setPaintProperty","queryRenderedFeatures"],MARKER_METHODS=["setLngLat","setPopup","getPopup","addTo","remove"],POPUP_METHODS=["setHTML","setText"];function isObjectLike(value){return(typeof value=="object"||typeof value=="function")&&value!==null}function isConstructor(value){if(typeof value!="function")return!1;try{return Reflect.construct(Object,[],value),!0}catch{return!1}}function missingConstructorCapability(module,name,methods){const Constructor=module[name];if(!isConstructor(Constructor))return name;const prototype=Constructor.prototype;if(!isObjectLike(prototype))return`${name}.prototype`;for(const method of methods)if(typeof prototype[method]!="function")return`${name}.prototype.${method}`}function missingMaplibreCapability(candidate){return isObjectLike(candidate)?missingConstructorCapability(candidate,"Map",MAP_METHODS)??missingConstructorCapability(candidate,"Marker",MARKER_METHODS)??missingConstructorCapability(candidate,"Popup",POPUP_METHODS):"module namespace"}function isMaplibreModule(candidate){return missingMaplibreCapability(candidate)===void 0}function resolveMaplibreModule(value){const module=resolveOptionalPeerCapability(value,isMaplibreModule);if(module)return module;const candidate=unwrapOptionalPeerDefault(value),missing=missingMaplibreCapability(candidate)??"module namespace";throw new Error(`Invalid optional peer \`maplibre-gl\`: missing or invalid \`${missing}\` capability.`)}let maplibre;async function loadMaplibreModule(importer=()=>import("maplibre-gl")){try{return resolveMaplibreModule(await importer())}catch(error){return console.warn("<lr-map> needs the optional peer dependency `maplibre-gl` \u2014 install it with `pnpm add maplibre-gl`.",error),null}}function loadMaplibre(){return maplibre||(maplibre=loadMaplibreModule()),maplibre}export{loadMaplibre,loadMaplibreModule};