@aceshooting/lyra-ui 16.0.0 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/CHANGELOG.md +504 -0
  2. package/custom-elements.json +1 -1
  3. package/dist/cli/migration-contract.json +1 -1
  4. package/dist/components/agent-tools/browser-frame/browser-frame.class.d.ts +3 -3
  5. package/dist/components/agent-tools/browser-frame/browser-frame.class.js +2 -2
  6. package/dist/components/agent-tools/compare-panel/compare-panel.class.d.ts +2 -2
  7. package/dist/components/agent-tools/compare-panel/compare-panel.class.js +3 -3
  8. package/dist/components/agent-tools/confirm-bar/confirm-bar.class.d.ts +37 -13
  9. package/dist/components/agent-tools/confirm-bar/confirm-bar.class.js +2 -2
  10. package/dist/components/agent-tools/task-list/task-list.class.js +2 -2
  11. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +4 -0
  12. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +2 -2
  13. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.d.ts +3 -3
  14. package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +1 -1
  15. package/dist/components/charts/chart/chart.class.d.ts +117 -17
  16. package/dist/components/charts/chart/chart.class.js +3 -3
  17. package/dist/components/charts/chart/histogram-bin.d.ts +5 -1
  18. package/dist/components/charts/chart/histogram-bin.js +1 -1
  19. package/dist/components/charts/chart/lite-chart.class.d.ts +9 -0
  20. package/dist/components/conversation/code-block/code-block.styles.js +1 -1
  21. package/dist/components/conversation/message-actions/message-actions.styles.js +1 -1
  22. package/dist/components/conversation/model-select/model-select.class.d.ts +13 -4
  23. package/dist/components/conversation/model-select/model-select.class.js +2 -1
  24. package/dist/components/conversation/model-select/model-select.styles.js +1 -1
  25. package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +40 -2
  26. package/dist/components/conversation/streaming-text/streaming-text-base.class.js +2 -2
  27. package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +5 -3
  28. package/dist/components/conversation/streaming-text/streaming-text-core.class.js +10 -0
  29. package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +9 -3
  30. package/dist/components/conversation/streaming-text/streaming-text.class.js +10 -0
  31. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +30 -2
  32. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +4 -3
  33. package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
  34. package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
  35. package/dist/components/conversation/usage-badge/usage-badge-overlay-runtime.js +1 -1
  36. package/dist/components/conversation/usage-badge/usage-badge.class.d.ts +4 -0
  37. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +16 -4
  38. package/dist/components/conversation/voice-picker/voice-picker.class.js +2 -1
  39. package/dist/components/conversation/voice-picker/voice-picker.styles.js +1 -1
  40. package/dist/components/data/context-meter/context-meter.class.d.ts +23 -4
  41. package/dist/components/data/context-meter/context-meter.class.js +10 -7
  42. package/dist/components/data/context-meter/context-meter.styles.js +1 -1
  43. package/dist/components/data/data-grid/data-grid.class.d.ts +5 -2
  44. package/dist/components/data/data-grid/data-grid.class.js +1 -1
  45. package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +32 -5
  46. package/dist/components/data/flow-canvas/flow-canvas.class.js +3 -1
  47. package/dist/components/data/flow-canvas/flow-canvas.styles.js +1 -1
  48. package/dist/components/data/flow-canvas/flow-model.js +1 -1
  49. package/dist/components/data/flow-canvas/flow-types.d.ts +10 -1
  50. package/dist/components/data/gauge/gauge.class.d.ts +15 -2
  51. package/dist/components/data/gauge/gauge.class.js +20 -20
  52. package/dist/components/data/gauge/gauge.styles.js +1 -1
  53. package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +14 -5
  54. package/dist/components/data/graph-query-builder/graph-query-builder.class.js +2 -2
  55. package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +28 -2
  56. package/dist/components/data/sequence-strip/sequence-strip.class.js +3 -2
  57. package/dist/components/data/sequence-strip/sequence-strip.styles.js +1 -1
  58. package/dist/components/data/table/table.class.d.ts +155 -30
  59. package/dist/components/data/table/table.class.js +6 -4
  60. package/dist/components/data/table/table.styles.js +1 -1
  61. package/dist/components/data/timeline/timeline-item.class.d.ts +9 -1
  62. package/dist/components/data/timeline/timeline-item.class.js +2 -2
  63. package/dist/components/data/word-cloud/word-cloud.class.js +1 -1
  64. package/dist/components/data/word-cloud/word-cloud.styles.js +1 -1
  65. package/dist/components/forms/button/button.class.d.ts +30 -1
  66. package/dist/components/forms/button/button.class.js +2 -2
  67. package/dist/components/forms/checkbox/checkbox.class.d.ts +8 -6
  68. package/dist/components/forms/checkbox/checkbox.class.js +2 -2
  69. package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +7 -5
  70. package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
  71. package/dist/components/forms/color-picker/color-picker.class.d.ts +16 -2
  72. package/dist/components/forms/color-picker/color-picker.class.js +2 -2
  73. package/dist/components/forms/color-picker/color-picker.styles.js +1 -1
  74. package/dist/components/forms/combobox/combobox.class.d.ts +43 -8
  75. package/dist/components/forms/combobox/combobox.class.js +2 -2
  76. package/dist/components/forms/date-picker/date-input.class.d.ts +4 -0
  77. package/dist/components/forms/date-picker/date-input.class.js +1 -1
  78. package/dist/components/forms/icon-button/icon-button.class.d.ts +20 -3
  79. package/dist/components/forms/icon-button/icon-button.class.js +1 -1
  80. package/dist/components/forms/icon-button/icon-button.styles.js +1 -1
  81. package/dist/components/forms/input/input.class.d.ts +5 -2
  82. package/dist/components/forms/input/input.class.js +1 -1
  83. package/dist/components/forms/input/time-input.class.d.ts +4 -0
  84. package/dist/components/forms/input/time-input.class.js +1 -1
  85. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +11 -5
  86. package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
  87. package/dist/components/forms/otp-input/otp-input.class.d.ts +7 -2
  88. package/dist/components/forms/otp-input/otp-input.class.js +2 -2
  89. package/dist/components/forms/radio/radio-button.class.d.ts +2 -1
  90. package/dist/components/forms/radio/radio-group.class.d.ts +9 -4
  91. package/dist/components/forms/radio/radio-group.class.js +1 -1
  92. package/dist/components/forms/radio/radio.class.d.ts +13 -7
  93. package/dist/components/forms/radio/radio.class.js +1 -1
  94. package/dist/components/forms/rubric-form/rubric-form.class.d.ts +16 -6
  95. package/dist/components/forms/rubric-form/rubric-form.class.js +2 -2
  96. package/dist/components/forms/select/select.class.d.ts +19 -8
  97. package/dist/components/forms/select/select.class.js +2 -2
  98. package/dist/components/forms/slider/slider.class.d.ts +4 -2
  99. package/dist/components/forms/slider/slider.class.js +1 -1
  100. package/dist/components/forms/switch/switch.class.d.ts +8 -6
  101. package/dist/components/forms/switch/switch.class.js +1 -1
  102. package/dist/components/forms/textarea/textarea.class.d.ts +5 -3
  103. package/dist/components/forms/textarea/textarea.class.js +1 -1
  104. package/dist/components/forms/time-range/time-range.class.d.ts +12 -7
  105. package/dist/components/forms/time-range/time-range.class.js +1 -1
  106. package/dist/components/forms/time-range/time-range.styles.js +1 -1
  107. package/dist/components/forms/token-input/token-input.class.d.ts +6 -4
  108. package/dist/components/forms/token-input/token-input.class.js +1 -1
  109. package/dist/components/layout/app-rail/app-rail-item.class.d.ts +109 -4
  110. package/dist/components/layout/app-rail/app-rail-item.class.js +34 -29
  111. package/dist/components/layout/app-rail/app-rail-item.styles.js +1 -1
  112. package/dist/components/layout/app-rail/app-rail.class.d.ts +25 -3
  113. package/dist/components/layout/app-rail/app-rail.styles.js +1 -1
  114. package/dist/components/layout/app-rail-group/app-rail-group.class.d.ts +2 -2
  115. package/dist/components/layout/app-rail-group/app-rail-group.class.js +2 -2
  116. package/dist/components/layout/carousel/carousel.class.d.ts +1 -1
  117. package/dist/components/layout/carousel/carousel.class.js +1 -1
  118. package/dist/components/layout/details/accordion.class.d.ts +2 -2
  119. package/dist/components/layout/details/accordion.class.js +2 -2
  120. package/dist/components/layout/filter-bar/filter-bar-register.d.ts +1 -0
  121. package/dist/components/layout/filter-bar/filter-bar-register.js +1 -0
  122. package/dist/components/layout/filter-bar/filter-bar.class.d.ts +85 -10
  123. package/dist/components/layout/filter-bar/filter-bar.class.js +7 -4
  124. package/dist/components/layout/menu/menu-item.class.d.ts +3 -3
  125. package/dist/components/layout/menu/menu-item.class.js +3 -3
  126. package/dist/components/layout/menu/menu.class.d.ts +5 -1
  127. package/dist/components/layout/menu/menu.class.js +2 -2
  128. package/dist/components/layout/reorder-list/reorder-item.styles.js +1 -1
  129. package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
  130. package/dist/components/media/attachment-trigger/attachment-trigger.styles.js +1 -1
  131. package/dist/components/media/avatar-group/avatar-group.class.d.ts +12 -1
  132. package/dist/components/media/avatar-group/avatar-group.class.js +2 -2
  133. package/dist/components/media/drop-zone/drop-zone.class.d.ts +32 -11
  134. package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
  135. package/dist/components/media/file-input/file-input.class.d.ts +40 -19
  136. package/dist/components/media/file-input/file-input.class.js +2 -2
  137. package/dist/components/overlays/callout/callout.styles.js +1 -1
  138. package/dist/components/overlays/dialog/dialog.styles.js +1 -1
  139. package/dist/components/overlays/overlay/dropdown.class.d.ts +13 -3
  140. package/dist/components/overlays/overlay/dropdown.class.js +2 -2
  141. package/dist/components/overlays/overlay/popover.class.d.ts +12 -3
  142. package/dist/components/overlays/overlay/popover.class.js +2 -2
  143. package/dist/components/overlays/rating/rating.class.d.ts +9 -7
  144. package/dist/components/overlays/rating/rating.class.js +1 -1
  145. package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +5 -1
  146. package/dist/components/retrieval/citation-badge/citation-badge.class.js +1 -1
  147. package/dist/components/retrieval/embedding-explorer/embedding-explorer.styles.js +1 -1
  148. package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +5 -1
  149. package/dist/components/retrieval/entity-chip/entity-chip.class.js +1 -1
  150. package/dist/components/retrieval/graph-legend/graph-legend.styles.js +1 -1
  151. package/dist/components/retrieval/retrieval-value-format.js +1 -1
  152. package/dist/components/retrieval/source-list/source-list.styles.js +1 -1
  153. package/dist/components/utility/copy-button/copy-button.class.d.ts +23 -11
  154. package/dist/components/utility/copy-button/copy-button.class.js +2 -2
  155. package/dist/components/utility/copy-button/copy-button.styles.js +1 -1
  156. package/dist/components/utility/diff-view/diff-view.styles.js +1 -1
  157. package/dist/components/utility/export-button/export-button.class.d.ts +4 -0
  158. package/dist/components/utility/export-button/export-button.class.js +1 -1
  159. package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
  160. package/dist/components/utility/known-date/known-date.class.js +1 -1
  161. package/dist/components/utility/mention-popover/mention-popover.class.d.ts +38 -3
  162. package/dist/components/utility/mention-popover/mention-popover.class.js +2 -1
  163. package/dist/components/utility/mention-popover/mention-popover.styles.js +1 -1
  164. package/dist/components/utility/poll-status/poll-status.styles.js +1 -1
  165. package/dist/components/utility/tour/tour.class.d.ts +4 -0
  166. package/dist/components/utility/tour/tour.class.js +1 -1
  167. package/dist/components/utility/tour/tour.styles.js +1 -1
  168. package/dist/components/viewers/document-preview/document-preview.class.js +2 -2
  169. package/dist/components/viewers/docx-viewer/docx-viewer.class.js +2 -2
  170. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +2 -2
  171. package/dist/components/viewers/highlight-layer/highlight-layer.class.js +2 -2
  172. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +2 -2
  173. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
  174. package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +2 -2
  175. package/dist/components/viewers/xml-viewer/xml-viewer.class.js +2 -2
  176. package/dist/custom-elements-jsx.d.ts +2 -2
  177. package/dist/events.d.ts +13 -12
  178. package/dist/internal/aggregate-file-limits.d.ts +33 -0
  179. package/dist/internal/aggregate-file-limits.js +1 -0
  180. package/dist/internal/catalog-picker.d.ts +15 -2
  181. package/dist/internal/catalog-picker.js +1 -1
  182. package/dist/internal/debounce-controller.d.ts +14 -0
  183. package/dist/internal/debounce-controller.js +1 -1
  184. package/dist/internal/default-strings.generated.d.ts +1 -1
  185. package/dist/internal/default-strings.generated.js +2 -2
  186. package/dist/internal/focus-navigation.d.ts +45 -0
  187. package/dist/internal/focus-navigation.js +1 -1
  188. package/dist/internal/form-associated.js +1 -1
  189. package/dist/internal/initial-slot-collection.d.ts +30 -0
  190. package/dist/internal/initial-slot-collection.js +1 -0
  191. package/dist/internal/intl-cache.js +1 -1
  192. package/dist/internal/invalid-event-alias.d.ts +46 -0
  193. package/dist/internal/invalid-event-alias.js +1 -1
  194. package/dist/internal/localization-runtime.d.ts +24 -0
  195. package/dist/internal/localization-runtime.js +1 -1
  196. package/dist/internal/localization-types.d.ts +1 -1
  197. package/dist/internal/localization.js +1 -1
  198. package/dist/internal/package-metadata.d.ts +1 -1
  199. package/dist/internal/package-metadata.js +1 -1
  200. package/dist/internal/positioning-strategy.d.ts +3 -1
  201. package/dist/internal/state-part.d.ts +49 -0
  202. package/dist/internal/state-part.js +1 -0
  203. package/dist/internal/variants.styles.js +1 -1
  204. package/dist/lyra.d.ts +1 -1
  205. package/dist/svelte.d.ts +2 -2
  206. package/dist/testing/index.d.ts +1 -1
  207. package/dist/testing/index.js +1 -1
  208. package/dist/testing/lyra-tag-event-map.d.ts +2 -2
  209. package/dist/testing/lyra-tag-event-map.js +1 -1
  210. package/dist/testing/wait-for-mount.d.ts +46 -0
  211. package/dist/testing/wait-for-mount.js +1 -0
  212. package/dist/theme/theme-bootstrap.js +1 -1
  213. package/dist/theme/theme.d.ts +11 -2
  214. package/dist/theme/theme.js +1 -1
  215. package/dist/translations/ar/layout.js +1 -1
  216. package/dist/translations/de/layout.js +1 -1
  217. package/dist/translations/es/layout.js +1 -1
  218. package/dist/translations/fa/layout.js +1 -1
  219. package/dist/translations/fr/layout.js +1 -1
  220. package/dist/translations/he/layout.js +1 -1
  221. package/dist/translations/it/layout.js +1 -1
  222. package/dist/translations/ja/layout.js +1 -1
  223. package/dist/translations/pt-BR/layout.js +1 -1
  224. package/dist/translations/ru/layout.js +1 -1
  225. package/dist/translations/zh-CN/layout.js +1 -1
  226. package/dist/utilities/format.d.ts +17 -0
  227. package/dist/utilities/format.js +1 -1
  228. package/dist/vue.d.ts +2 -2
  229. package/llms/components/lr-app-rail-group.md +87 -10
  230. package/llms/components/lr-app-rail-item.md +88 -11
  231. package/llms/components/lr-app-rail.md +88 -11
  232. package/llms/components/lr-attachment-trigger.md +21 -0
  233. package/llms/components/lr-bar-chart.md +3 -2
  234. package/llms/components/lr-bubble-chart.md +3 -2
  235. package/llms/components/lr-callout.md +10 -0
  236. package/llms/components/lr-chart.md +43 -12
  237. package/llms/components/lr-citation-badge.md +7 -1
  238. package/llms/components/lr-code-block.md +21 -0
  239. package/llms/components/lr-color-picker.md +12 -7
  240. package/llms/components/lr-combobox.md +13 -1
  241. package/llms/components/lr-confirm-bar.md +36 -7
  242. package/llms/components/lr-context-meter.md +17 -4
  243. package/llms/components/lr-date-input.md +7 -1
  244. package/llms/components/lr-date-picker.md +6 -0
  245. package/llms/components/lr-dialog.md +21 -0
  246. package/llms/components/lr-doughnut-chart.md +3 -2
  247. package/llms/components/lr-drawer.md +10 -0
  248. package/llms/components/lr-drop-zone.md +16 -7
  249. package/llms/components/lr-dropdown-item.md +7 -0
  250. package/llms/components/lr-entity-chip.md +7 -1
  251. package/llms/components/lr-export-button.md +7 -1
  252. package/llms/components/lr-file-input.md +21 -10
  253. package/llms/components/lr-filter-bar.md +91 -15
  254. package/llms/components/lr-flow-canvas.md +16 -9
  255. package/llms/components/lr-gauge.md +22 -2
  256. package/llms/components/lr-histogram.md +7 -2
  257. package/llms/components/lr-icon-button.md +15 -7
  258. package/llms/components/lr-input.md +3 -1
  259. package/llms/components/lr-line-chart.md +3 -2
  260. package/llms/components/lr-lite-chart.md +13 -0
  261. package/llms/components/lr-locale-picker.md +7 -1
  262. package/llms/components/lr-mention-popover.md +16 -3
  263. package/llms/components/lr-menu-item.md +7 -0
  264. package/llms/components/lr-menu.md +8 -1
  265. package/llms/components/lr-message-actions.md +10 -0
  266. package/llms/components/lr-model-select.md +8 -3
  267. package/llms/components/lr-native-time-input.md +8 -1
  268. package/llms/components/lr-number-input.md +8 -1
  269. package/llms/components/lr-option.md +12 -0
  270. package/llms/components/lr-otp-input.md +6 -0
  271. package/llms/components/lr-pie-chart.md +3 -2
  272. package/llms/components/lr-polar-area-chart.md +3 -2
  273. package/llms/components/lr-prompt-input.md +2 -2
  274. package/llms/components/lr-radar-chart.md +3 -2
  275. package/llms/components/lr-reorder-item.md +12 -0
  276. package/llms/components/lr-reorder-list.md +12 -0
  277. package/llms/components/lr-scatter-chart.md +3 -2
  278. package/llms/components/lr-sequence-strip.md +10 -4
  279. package/llms/components/lr-streaming-text-core.md +21 -8
  280. package/llms/components/lr-streaming-text.md +34 -4
  281. package/llms/components/lr-suggestion-chips.md +8 -4
  282. package/llms/components/lr-table.md +47 -10
  283. package/llms/components/lr-textarea.md +1 -1
  284. package/llms/components/lr-time-input.md +7 -1
  285. package/llms/components/lr-tool-call-chip.md +7 -1
  286. package/llms/components/lr-tour.md +7 -1
  287. package/llms/components/lr-usage-badge.md +7 -1
  288. package/llms/components/lr-voice-picker.md +7 -3
  289. package/llms/shared.md +169 -16
  290. package/llms/tokens.md +17 -1
  291. package/llms-full.txt +941 -147
  292. package/package.json +16 -2
  293. package/registrations.json +1 -1
  294. package/vscode-css-data.json +1 -1
  295. package/vscode-html-data.json +1 -1
  296. package/web-types.json +1 -1
package/llms/shared.md CHANGED
@@ -177,8 +177,9 @@ The entry points, then:
177
177
  `@aceshooting/lyra-ui/translations/<locale>.js` (the eleven shipped message catalogs),
178
178
  `@aceshooting/lyra-ui/events` (the global typed-event map — types only, no runtime),
179
179
  `@aceshooting/lyra-ui/ai` (provider-neutral data types), `@aceshooting/lyra-ui/testing`
180
- (happy-dom shims, `createLyraEvent()` for building a validated test event, plus a small set of
181
- interaction drivers that go through a component's own real activation path),
180
+ (happy-dom shims, `createLyraEvent()` for building a validated test event, a small set of
181
+ interaction drivers that go through a component's own real activation path, and
182
+ `waitForLyraElement()`/`waitForToast()` for awaiting a lazily registered mount),
182
183
  `@aceshooting/lyra-ui/utilities/*` (the curated shared helpers, all documented below).
183
184
 
184
185
  ### Registration-free component helpers
@@ -1366,9 +1367,50 @@ per-response nonce — a static HTML entry, for example — where the documented
1366
1367
  nonce/hash guidance above does not apply. Serving it same-origin (copy it into your build output,
1367
1368
  or configure your bundler/static host to do so) needs no hash at all; hashing it for an even
1368
1369
  stricter policy uses the same CSP `script-src` hash mechanism browsers already apply to any
1369
- external script resource. It only ever carries the default storage key (`'lyra-theme'`) — an
1370
- application-owned key from `createLyraThemeBootstrap({ storageKey })` still has to be inlined,
1371
- since a static file cannot take a call-time argument.
1370
+ external script resource.
1371
+
1372
+ **Configuring the static asset from its own `<script>` tag.** `theme-bootstrap.js` must be loaded
1373
+ as a plain classic script — never `type="module"` and never `async` — because it reads its own
1374
+ configuration synchronously through `document.currentScript` while it runs, and that property is
1375
+ `null` for both of those loading modes (as well as for anything scheduled after the script has
1376
+ already finished executing). Two optional attributes on that same `<script>` tag override the
1377
+ defaults without regenerating the file:
1378
+
1379
+ ```html
1380
+ <head>
1381
+ <script
1382
+ src="/vendor/theme-bootstrap.js"
1383
+ data-lr-theme-storage-key="my-app-theme"
1384
+ data-lr-theme-attributes="data-lr-theme data-theme"
1385
+ ></script>
1386
+ <link rel="stylesheet" href="/theme.css" />
1387
+ </head>
1388
+ ```
1389
+
1390
+ - `data-lr-theme-storage-key` — the `localStorage` key to read, in place of the default
1391
+ `'lyra-theme'`. Equivalent to `createLyraThemeBootstrap({ storageKey })`'s argument, but
1392
+ resolved by the static file itself at parse time rather than baked in ahead of time. This is
1393
+ what lets an application with its own pre-existing storage key use the static asset instead of
1394
+ inlining a per-app copy.
1395
+ - `data-lr-theme-attributes` — a space-separated list of attribute names to set on
1396
+ `<html>` in place of the default `data-lr-theme data-theme` pair, replacing that list entirely
1397
+ rather than adding to it.
1398
+
1399
+ Both attributes are optional and independently validated; an absent, empty, oversized, or
1400
+ malformed value falls back to the built-in default rather than throwing, so a `<script>` tag with
1401
+ neither attribute — every existing deployment — behaves exactly as before. `data-lr-theme-storage-key`
1402
+ must be a non-empty string of at most 200 characters (its content is otherwise unrestricted — it is
1403
+ only ever used as an opaque `localStorage` key, never written to the DOM). `data-lr-theme-attributes`
1404
+ must parse to one to eight tokens, each unique and each matching `data-[a-z0-9]+(-[a-z0-9]+)*` —
1405
+ which rejects an event-handler name (`onload`), a native attribute (`style`, `class`, `id`), any
1406
+ token containing whitespace, a quote, `=`, or a control character, an empty list, and a duplicated
1407
+ token — because these attribute names reach `setAttribute()`/`removeAttribute()` on the document
1408
+ root. A `document.currentScript` of `null` (module/async misuse, or a script tag re-read after it
1409
+ finished running) is treated the same as no configuration at all.
1410
+
1411
+ An application-owned key from `createLyraThemeBootstrap({ storageKey })` can still be inlined as
1412
+ documented above; the static file's own script-tag attributes are the alternative for a strict-CSP
1413
+ deployment that cannot inline that call.
1372
1414
 
1373
1415
  **Migrating from 15.x.** `accent` used to be exactly an absolute CSS color or `null`; that shape
1374
1416
  still works unchanged (`setLyraTheme({ accent: '#7c3aed' })` keeps deriving only the brand ramp).
@@ -2110,6 +2152,83 @@ happy-dom/jsdom environment, not only a real browser.
2110
2152
  Scope: one driver per interaction named above. Not a general "drive any component" toolkit —
2111
2153
  render the real component and interact with it directly for anything else.
2112
2154
 
2155
+ ## Awaiting a lazily registered mount: `waitForLyraElement()` and `waitForToast()`
2156
+
2157
+ An imperative API can register its elements lazily -- `toast()` dynamically `import()`s
2158
+ `<lr-toast>`/`<lr-toast-item>` on first call (a deliberate bundle-size trade: importing the package
2159
+ root, or even `toast()` itself, never pulls the element classes into an eagerly loaded bundle). A
2160
+ fire-and-forget `toast(...)` call -- the normal application pattern, since a component should not
2161
+ block its own flow on a toast -- therefore leaves the document empty for at least one microtask
2162
+ after the call returns. `@aceshooting/lyra-ui/testing` exports `waitForLyraElement()` for this shape
2163
+ in general, plus `waitForToast()` as the named convenience for `toast()` specifically:
2164
+
2165
+ ```ts
2166
+ import { waitForToast } from '@aceshooting/lyra-ui/testing';
2167
+
2168
+ toast('Saved'); // fire-and-forget; toast.class.js/toast-item.class.js may still be importing
2169
+ const item = await waitForToast('Saved'); // resolves once a matching <lr-toast-item> mounts
2170
+ expect(item.textContent?.trim()).to.equal('Saved');
2171
+ ```
2172
+
2173
+ `waitForToast(match?, options?)` resolves once a `<lr-toast-item>` is connected and upgraded. A
2174
+ string `match` compares against the item's trimmed `textContent` (what `toast('Saved')` sets
2175
+ verbatim); pass a predicate — `(item: LyraToastItem) => boolean` — for anything else (a substring,
2176
+ an icon/action check, a specific variant); omitting `match` resolves the first toast item to mount.
2177
+
2178
+ The underlying `waitForLyraElement<T>(selector, options?)` is generic over any element reachable
2179
+ from `options.root` (`document` by default): it resolves once an element matching `selector` is
2180
+ both connected and upgraded — registered with a constructor the element is actually an instance of
2181
+ — filtered further by an optional `options.match: (element: T) => boolean`. An element already
2182
+ present in markup before its class registers (the SSR/hydration case) is not a match until it
2183
+ upgrades. Both resolve via `MutationObserver` (new elements arriving) and
2184
+ `customElements.whenDefined()` (an already-connected-but-undefined element finishing registration)
2185
+ rather than polling on a timer, and both reject with an Error describing the selector, the timeout,
2186
+ and how many non-matching candidates were found — after a bounded `options.timeoutMs` (2000ms
2187
+ default). Every underlying API is standard DOM/HTML with no `@web/test-runner`/CDP dependency, so
2188
+ both also run under a downstream suite's own happy-dom environment, not only a real browser.
2189
+
2190
+ Scope: awaiting a lazy mount reachable from a root you already have a handle to. Not a replacement
2191
+ for `updateComplete` (a mounted element may still have a pending render) or for the interaction
2192
+ drivers above (already-mounted components' own activation paths). `toast()` is currently the only
2193
+ imperative `lyra-ui` API that registers its elements through a dynamic `import()`; `confirm()`
2194
+ registers `<lr-dialog>` synchronously (a static import plus an idempotent `defineElement()` call) and
2195
+ mounts its transient dialog before returning, so it has no equivalent gap.
2196
+
2197
+ ## happy-dom's custom-property resolver and host-to-part token forwarding
2198
+
2199
+ In 16.0.0, seven built-in controls that each compose a real
2200
+ `<lr-icon-button>` for their icon-only action — `<lr-copy-button>`, `<lr-dialog>` (whose close
2201
+ button is inherited by `<lr-drawer>`), `<lr-reorder-item>`, `<lr-message-actions>`,
2202
+ `<lr-attachment-trigger>`, `<lr-code-block>` (shared by `<lr-code-block-core>`), and `<lr-callout>`
2203
+ — captured the composed control's public `--lr-icon-button-*` tokens on their own `:host` and
2204
+ forwarded that private token back onto the SAME public token name on the `[part]` rendering the
2205
+ composed control, so that an ancestor theme override still reached the composed child instead of
2206
+ being shadowed by the component's own default. That was legal under the CSS Custom Properties spec
2207
+ — `:host` and `[part]` resolve on different elements, so a real browser resolves the host
2208
+ declaration to a concrete value first and the part substitutes that, and per-element cycle detection
2209
+ never fired — but **happy-dom does not model that element boundary**. Its `CSSComputedStyle` merges
2210
+ ancestor and own-element custom properties into a single flat map with no notion of which element
2211
+ declared what, and (at least through 20.14.5, the newest release at time of writing)
2212
+ `CSSVariableFormatter.resolveVariables` substitutes into that map recursively with no visited set
2213
+ and no depth cap — so the capture-and-forward pair resolved into each other forever, throwing an
2214
+ unhandled `RangeError: Maximum call stack size exceeded` from `CSSVariableFormatter.resolveVariables`
2215
+ on every render of any of the seven components. Every test still reported as passing — there was no
2216
+ failing assertion to point at — but the runner counted the unhandled errors and exited non-zero
2217
+ anyway, which read as unrelated flakiness rather than a CSS issue.
2218
+
2219
+ **Current versions are unaffected.** `<lr-icon-button>` now carries a private
2220
+ `--_lr-icon-button-<token>-default` fallback tier for every paint token (background, color, border,
2221
+ and their hover/active variants — the same shape its corner radius already used via
2222
+ `--_lr-icon-button-radius-default`), and each composing component sets its own default directly on
2223
+ that private tier rather than re-declaring the public token name. `<lr-icon-button>`'s own
2224
+ stylesheet still checks the public token first, so an ancestor override reaches a composed control
2225
+ exactly as before, but no descendant declares a public `--lr-icon-button-*` token from a private
2226
+ token that was itself derived from that same public token — so no resolver, scoped or flattened,
2227
+ ever sees a cycle. A project still hitting the `RangeError` above should upgrade
2228
+ `@aceshooting/lyra-ui`; the workarounds that version range needed (patching or upgrading the DOM
2229
+ implementation to cycle-aware/depth-limited custom-property resolution, or running the affected
2230
+ suites against a real browser engine) are no longer necessary once it does.
2231
+
2113
2232
  ## Accessibility contract
2114
2233
 
2115
2234
  Semantic roles live on the shadow-DOM element that owns them, with explicit false states for
@@ -2161,18 +2280,36 @@ those four kinds must walk the declaration's own `superclass.name`/`superclass.m
2161
2280
  `modules[].declarations[]` itself, or read `web-types.json`/`vscode-html-data.json` instead, which
2162
2281
  are already fully resolved.
2163
2282
 
2164
- **Which tags a per-tag entry registers (`registrations.json`).** A stable per-tag entry
2165
- (`@aceshooting/lyra-ui/components/lr-<name>.js`) can, at import time, define more than one custom
2166
- element: importing `lr-table.js` also registers `<lr-empty>`, `<lr-pagination>`, `<lr-skeleton>` and
2167
- `<lr-spinner>`, because `lr-table`'s registration entry imports those composed children's own
2168
- registration entries before defining `<lr-table>` itself. `custom-elements.json` declares one
2169
- custom element per family source module, with no field for a stable per-tag entry specifier and
2170
- none for the extra tags importing it registers as a side effect. For that, read the generated
2171
- `@aceshooting/lyra-ui/registrations.json` instead: `{ schemaVersion: 1, entries: [{ tag, entry,
2172
- registrationModule, registers }] }`, where `registers` is every `lr-*` tag importing `entry`
2173
- defines, derived from the same transitive-import analysis
2283
+ **Which tags an entry registers, and which message keys it can reach (`registrations.json`).** A
2284
+ stable per-tag entry (`@aceshooting/lyra-ui/components/lr-<name>.js`) can, at import time, define
2285
+ more than one custom element: importing `lr-table.js` also registers `<lr-empty>`,
2286
+ `<lr-pagination>`, `<lr-skeleton>` and `<lr-spinner>`, because `lr-table`'s registration entry
2287
+ imports those composed children's own registration entries before defining `<lr-table>` itself.
2288
+ `custom-elements.json` declares one custom element per family source module, with no field for a
2289
+ stable per-tag entry specifier and none for the extra tags importing it registers as a side effect.
2290
+ For that, read the generated `@aceshooting/lyra-ui/registrations.json` instead (`schemaVersion: 1`):
2291
+ `{ entries: [{ tag, entry, registrationModule, distModule, registers, localeKeys }],
2292
+ integrations: [{ entry, registrationModule, distModule, registers, localeKeys }] }`. Every
2293
+ `entries` row describes the stable per-tag alias above and always carries `tag`. `integrations`
2294
+ lists the published integration-bridge specifiers, which install an integration — an optional-peer
2295
+ resolver, a lazy document-format registrar — without being any single component's own alias, so
2296
+ they carry no `tag`: `components/media/flag/flag-peer.js`,
2297
+ `components/viewers/archive-viewer/archive-viewer-register.js` and
2298
+ `components/viewers/ebook-viewer/ebook-viewer-register.js`, the three imports a per-tag alias cannot
2299
+ stand in for. They are a separate array rather than tag-less rows mixed into `entries`, so a reader
2300
+ that keys `entries` by `tag` keeps working; `integrations`, `distModule` and `localeKeys` are all
2301
+ additive, which is why the schema version is unchanged. `registrationModule` is the `src/` path used
2302
+ internally; `distModule` is that same module's own published deep specifier (e.g.
2303
+ `./components/data/table/table.js`) so a caller holding either a per-tag alias or a deep import can
2304
+ resolve the other without reading `src/` or walking `dist/` — for an integration bridge,
2305
+ `distModule` equals `entry`, since there is no separate alias. `registers` is every `lr-*` tag
2306
+ importing `entry` defines, direct or transitive, derived from the same transitive-import analysis
2174
2307
  `scripts/check-component-dependencies.mjs` already performs against the real registration graph
2175
- (not a second hand-maintained list) and regenerated by `pnpm run registration-graph`.
2308
+ (not a second hand-maintained list). `localeKeys` is every `LyraMessageKey` the registered tags can
2309
+ reach — including a key reached only through an indirect lookup table (e.g. `lr-attachment-trigger`'s
2310
+ `{ triggerKey: 'attachmentTriggerFiles' }`-shaped map), because it reuses
2311
+ `generate-default-string-slices.mjs`'s own reachability walk rather than a literal-`localize()`-only
2312
+ scan. All of it is regenerated by `pnpm run registration-graph`.
2176
2313
 
2177
2314
  ## Independence and migration
2178
2315
 
@@ -2427,6 +2564,11 @@ inlineSize: number; blockSize: number }> }`.
2427
2564
  element: interpolating into a message template, populating a text-only property on another
2428
2565
  component (a stat tile's value, a chart tick label, a badge's cost text), building a search
2429
2566
  predicate, or composing an accessibility announcement.
2567
+ An omitted `locale` (or the explicit `'auto'` sentinel) on any of the four resolves to the page's
2568
+ active `setLyraLocale()` locale, exactly like a rendered `<lr-*>` component with no closer
2569
+ `locale`/`lang` override — not a hardcoded `'en'`. It falls back to `'en'` only once no active
2570
+ locale has ever been set, so an app that never calls `setLyraLocale()` sees no change. An
2571
+ explicit BCP-47 tag always stays authoritative over the active locale.
2430
2572
  `formatNumber()` and `formatBytes()` accept a `bigint` or a decimal/integer string, not just a
2431
2573
  `number`, for exact-precision input (large ids, monetary amounts, exact byte counts) — a plain
2432
2574
  `number` is a float64 and cannot exactly represent an integer beyond `Number.MAX_SAFE_INTEGER` or
@@ -4115,6 +4257,17 @@ These named interfaces and helper signatures are available to typed integrations
4115
4257
  `activateStep(/* public names: stepper, target */): unknown`
4116
4258
  See "Driving a component's real activation path: interaction drivers" above for the full contract.
4117
4259
 
4260
+ - **`testing-wait-for-mount-contracts`** — Shared utility contracts.
4261
+ `waitForLyraElement(/* public names: selector, options */): unknown`
4262
+ `WaitForLyraElementOptions {
4263
+ root: unknown;
4264
+ match: (element: unknown) => unknown;
4265
+ timeoutMs: unknown;
4266
+ }`
4267
+ `waitForToast(/* public names: match, options */): unknown`
4268
+ See "Awaiting a lazily registered mount: `waitForLyraElement()` and `waitForToast()`" above for the
4269
+ full contract.
4270
+
4118
4271
  - **`theme-gemstones-data-contracts`** — Shared utility contracts.
4119
4272
  `GemstoneAccent {
4120
4273
  key: unknown;
package/llms/tokens.md CHANGED
@@ -40,7 +40,23 @@ unchanged.
40
40
  > warning. Always set the `--lr-theme-*` input instead: that layer is read through `var()` at
41
41
  > every level, so it inherits across every boundary. Per-component `--lr-<component>-*`
42
42
  > properties are the other safe lever, because no component re-declares another component's
43
- > namespace.
43
+ > namespace — with six named exceptions declared by the shared base layer itself; see below.
44
+
45
+ **The `--lr-*` names that look per-component but are not.** `--lr-focus-ring-width`,
46
+ `--lr-focus-ring-color`, `--lr-focus-ring-offset` (the consumer-scope exception above),
47
+ `--lr-icon-button-size`, `--lr-otp-input-segment-size`, and `--lr-popover-viewport-clamp` are
48
+ the only tokens the shared base `:host` block in `internal/tokens.styles.ts` declares under a
49
+ component-looking name — each reads its own `--lr-theme-*` input there. Because that block is
50
+ mixed into every `lr-*` component, all six behave like the internal layer above, not like an
51
+ ordinary per-component property: a rule that sets one of them directly on an ancestor is reset
52
+ at the first intervening `lr-*` component and never reaches a nested target — even though
53
+ setting it directly on the target element itself still works, which is what makes the failure
54
+ look arbitrary rather than systematic. Reach through a subtree with `--lr-theme-focus-ring-*`,
55
+ `--lr-theme-icon-button-size`, `--lr-theme-otp-input-segment-size`, or
56
+ `--lr-theme-popover-viewport-clamp` instead. Every other `--lr-<component>-*` token — including
57
+ the rest of `lr-icon-button`'s own (`-radius`, `-background`, `-color`, `-border`, and their
58
+ `-hover`/`-active` variants) — is not re-declared anywhere in the shared layer and inherits
59
+ normally from an ancestor.
44
60
 
45
61
  ## Direct theme-backed tokens (270)
46
62