@aceshooting/lyra-ui 32.1.0 → 33.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/CHANGELOG.md +247 -1576
  2. package/README.md +15 -2
  3. package/custom-elements.slim.json +1 -0
  4. package/dist/accent-roles.css +1 -0
  5. package/dist/cli/migrate-wa.mjs +50 -48
  6. package/dist/cli/migration-contract.json.gz +0 -0
  7. package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +1 -1
  8. package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +10 -0
  9. package/dist/components/conversation/code-block/code-block-base.class.d.ts +3 -1
  10. package/dist/components/conversation/code-block/code-block-base.class.js +1 -1
  11. package/dist/components/conversation/code-block/code-block-core.class.d.ts +1 -1
  12. package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
  13. package/dist/components/conversation/code-block/code-block.class.d.ts +3 -2
  14. package/dist/components/conversation/code-block/code-block.class.js +1 -1
  15. package/dist/components/conversation/code-block/code-grammar-registry.d.ts +35 -0
  16. package/dist/components/conversation/code-block/code-grammar-registry.js +1 -0
  17. package/dist/components/conversation/model-select/model-select.class.d.ts +8 -7
  18. package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +1 -1
  19. package/dist/components/conversation/usage-badge/usage-badge.class.d.ts +1 -1
  20. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +8 -7
  21. package/dist/components/data/table/table-support.d.ts +2 -3
  22. package/dist/components/data/table/table.class.d.ts +2 -1
  23. package/dist/components/data/timeline/timeline.class.d.ts +17 -6
  24. package/dist/components/data/timeline/timeline.class.js +2 -2
  25. package/dist/components/data/timeline/timeline.styles.js +1 -1
  26. package/dist/components/forms/catalog-picker-base.d.ts +14 -1
  27. package/dist/components/forms/checkbox/checkbox.class.js +1 -1
  28. package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +4 -5
  29. package/dist/components/forms/checkbox-group/checkbox-group.styles.js +1 -1
  30. package/dist/components/forms/code-editor/code-editor.class.d.ts +14 -5
  31. package/dist/components/forms/code-editor/code-editor.styles.js +1 -1
  32. package/dist/components/forms/color-picker/color-picker.class.d.ts +18 -7
  33. package/dist/components/forms/color-picker/color-picker.styles.js +1 -1
  34. package/dist/components/forms/combobox/combobox-option-html.js +1 -0
  35. package/dist/components/forms/combobox/combobox.class.d.ts +30 -9
  36. package/dist/components/forms/combobox/combobox.class.js +110 -21
  37. package/dist/components/forms/combobox/combobox.styles.js +1 -1
  38. package/dist/components/forms/country-picker/country-picker.class.d.ts +4 -5
  39. package/dist/components/forms/currency-picker/currency-picker.class.d.ts +4 -5
  40. package/dist/components/forms/date-picker/date-input.class.d.ts +14 -5
  41. package/dist/components/forms/date-picker/date-input.class.js +1 -1
  42. package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +10 -0
  43. package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
  44. package/dist/components/forms/icon-button/icon-button.class.d.ts +2 -1
  45. package/dist/components/forms/input/input-shared.d.ts +14 -5
  46. package/dist/components/forms/input/time-input.class.d.ts +15 -6
  47. package/dist/components/forms/input/time-input.styles.js +1 -1
  48. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +8 -7
  49. package/dist/components/forms/otp-input/otp-input.class.d.ts +4 -5
  50. package/dist/components/forms/otp-input/otp-input.styles.js +1 -1
  51. package/dist/components/forms/phone-input/phone-input.class.d.ts +14 -5
  52. package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
  53. package/dist/components/forms/radio/radio-group.class.d.ts +4 -5
  54. package/dist/components/forms/radio/radio-group.styles.js +1 -1
  55. package/dist/components/forms/radio/radio.class.js +2 -2
  56. package/dist/components/forms/select/select.class.d.ts +5 -6
  57. package/dist/components/forms/signature-pad/signature-pad.class.d.ts +4 -5
  58. package/dist/components/forms/signature-pad/signature-pad.styles.js +1 -1
  59. package/dist/components/forms/slider/slider.class.d.ts +6 -5
  60. package/dist/components/forms/slider/slider.styles.js +1 -1
  61. package/dist/components/forms/textarea/textarea.class.d.ts +14 -5
  62. package/dist/components/forms/time-zone-picker/time-zone-picker.class.d.ts +4 -5
  63. package/dist/components/forms/token-input/token-input.class.d.ts +10 -10
  64. package/dist/components/forms/token-input/token-input.class.js +1 -1
  65. package/dist/components/forms/token-input/token-input.styles.js +1 -1
  66. package/dist/components/forms/unit-picker/unit-picker.class.d.ts +4 -5
  67. package/dist/components/layout/command-palette/command-palette.class.d.ts +1 -1
  68. package/dist/components/layout/menu/menu.class.d.ts +1 -1
  69. package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.d.ts +1 -1
  70. package/dist/components/layout/segmented/segmented.class.d.ts +2 -2
  71. package/dist/components/layout/stepper/step.class.d.ts +14 -1
  72. package/dist/components/layout/stepper/step.class.js +2 -2
  73. package/dist/components/lr-map-anchor.d.ts +1 -1
  74. package/dist/components/media/file-input/file-input.class.d.ts +2 -1
  75. package/dist/components/media/file-input/file-input.class.js +1 -1
  76. package/dist/components/media/file-input/file-input.styles.js +1 -1
  77. package/dist/components/media/lightbox/lightbox-item.class.d.ts +10 -0
  78. package/dist/components/media/lightbox/lightbox-item.class.js +1 -1
  79. package/dist/components/media/lightbox/lightbox-source.js +1 -1
  80. package/dist/components/media/lightbox/lightbox-types.d.ts +4 -1
  81. package/dist/components/media/lightbox/lightbox.class.d.ts +42 -19
  82. package/dist/components/media/lightbox/lightbox.class.js +4 -3
  83. package/dist/components/media/lightbox/lightbox.styles.js +1 -1
  84. package/dist/components/media/map/map-anchor-avoid.js +1 -1
  85. package/dist/components/media/map/map-anchor-options.d.ts +9 -0
  86. package/dist/components/media/map/map.class.d.ts +19 -5
  87. package/dist/components/media/map/map.class.js +3 -3
  88. package/dist/components/overlays/context-menu/context-menu.class.d.ts +1 -1
  89. package/dist/components/overlays/dialog/dialog.class.d.ts +19 -3
  90. package/dist/components/overlays/dialog/dialog.class.js +1 -1
  91. package/dist/components/overlays/dialog/dialog.styles.js +1 -1
  92. package/dist/components/overlays/drawer/drawer.class.d.ts +8 -2
  93. package/dist/components/overlays/drawer/drawer.class.js +1 -1
  94. package/dist/components/overlays/overlay/dropdown.class.d.ts +1 -1
  95. package/dist/components/overlays/overlay/overlay.styles.js +1 -1
  96. package/dist/components/overlays/overlay/popover.class.d.ts +1 -1
  97. package/dist/components/overlays/overlay/popover.class.js +1 -1
  98. package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -0
  99. package/dist/components/overlays/overlay/tooltip.class.js +2 -2
  100. package/dist/components/overlays/toast/toast-item.class.d.ts +2 -2
  101. package/dist/components/overlays/toast/toast-item.styles.js +1 -1
  102. package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +1 -1
  103. package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +1 -1
  104. package/dist/components/utility/copy-button/copy-button.class.d.ts +2 -1
  105. package/dist/components/utility/copy-button/copy-button.class.js +1 -1
  106. package/dist/components/utility/export-button/export-button.class.d.ts +1 -1
  107. package/dist/components/utility/icon/icon-library-bootstrap.d.ts +50 -0
  108. package/dist/components/utility/icon/icon-library-bootstrap.js +1 -0
  109. package/dist/components/utility/icon/icon-library-font-awesome.d.ts +68 -0
  110. package/dist/components/utility/icon/icon-library-font-awesome.js +1 -0
  111. package/dist/components/utility/known-date/known-date.class.d.ts +10 -0
  112. package/dist/components/utility/mention-popover/mention-popover.class.d.ts +1 -1
  113. package/dist/components/utility/number-ticker/number-ticker.class.d.ts +10 -2
  114. package/dist/components/utility/number-ticker/number-ticker.class.js +1 -1
  115. package/dist/components/utility/tour/tour.class.d.ts +1 -1
  116. package/dist/framework-types.d.ts +1 -1
  117. package/dist/internal/accessibility-visibility.js +1 -1
  118. package/dist/internal/autoloader-manifest.js +1 -1
  119. package/dist/internal/declarative-overlay-action.js +1 -0
  120. package/dist/internal/default-strings/forms.generated.js +1 -1
  121. package/dist/internal/document-token-css.generated.js +10 -0
  122. package/dist/internal/document-tokens.generated.js +2 -11
  123. package/dist/internal/document-tokens.js +2 -2
  124. package/dist/internal/dom-guards.js +1 -1
  125. package/dist/internal/external-label-association.js +1 -0
  126. package/dist/internal/focus-navigation.js +1 -1
  127. package/dist/internal/form-control/chrome.styles.js +1 -1
  128. package/dist/internal/form-control-labels.js +1 -1
  129. package/dist/internal/localization-runtime.js +1 -1
  130. package/dist/internal/localization-types.d.ts +1 -1
  131. package/dist/internal/localization.js +1 -1
  132. package/dist/internal/lyra-element.d.ts +12 -3
  133. package/dist/internal/lyra-element.js +2 -2
  134. package/dist/internal/package-metadata.js +1 -1
  135. package/dist/internal/theme-observation.js +1 -1
  136. package/dist/lyra.d.ts +1 -1
  137. package/dist/lyra.js +1 -1
  138. package/dist/ssr.d.ts +1 -1
  139. package/dist/styles/tokens-root.css +1 -1
  140. package/dist/styles/utilities.css +1 -1
  141. package/dist/theme-core.css +1 -1
  142. package/dist/theme.css +1 -1
  143. package/llms/components/lr-button.md +4 -0
  144. package/llms/components/lr-card.md +2 -0
  145. package/llms/components/lr-checkbox-group.md +2 -2
  146. package/llms/components/lr-citation-badge.md +1 -1
  147. package/llms/components/lr-code-block-core.md +3 -1
  148. package/llms/components/lr-code-block.md +14 -0
  149. package/llms/components/lr-code-editor.md +2 -2
  150. package/llms/components/lr-color-picker.md +4 -4
  151. package/llms/components/lr-combobox.md +21 -5
  152. package/llms/components/lr-context-menu.md +1 -1
  153. package/llms/components/lr-copy-button.md +4 -3
  154. package/llms/components/lr-country-picker.md +2 -2
  155. package/llms/components/lr-currency-picker.md +2 -2
  156. package/llms/components/lr-date-input.md +1 -1
  157. package/llms/components/lr-date-picker.md +1 -1
  158. package/llms/components/lr-dialog.md +30 -2
  159. package/llms/components/lr-drawer.md +7 -1
  160. package/llms/components/lr-entity-chip.md +1 -1
  161. package/llms/components/lr-export-button.md +1 -1
  162. package/llms/components/lr-file-input.md +1 -1
  163. package/llms/components/lr-icon.md +96 -0
  164. package/llms/components/lr-input.md +2 -2
  165. package/llms/components/lr-lightbox.md +43 -17
  166. package/llms/components/lr-locale-picker.md +2 -2
  167. package/llms/components/lr-map.md +16 -1
  168. package/llms/components/lr-mention-popover.md +1 -1
  169. package/llms/components/lr-menu.md +1 -1
  170. package/llms/components/lr-model-select.md +4 -4
  171. package/llms/components/lr-native-time-input.md +2 -2
  172. package/llms/components/lr-number-input.md +2 -2
  173. package/llms/components/lr-number-ticker.md +7 -2
  174. package/llms/components/lr-otp-input.md +2 -2
  175. package/llms/components/lr-phone-input.md +2 -2
  176. package/llms/components/lr-popover.md +1 -1
  177. package/llms/components/lr-radio-group.md +2 -2
  178. package/llms/components/lr-segmented.md +1 -1
  179. package/llms/components/lr-select.md +3 -3
  180. package/llms/components/lr-selection-toolbar.md +1 -1
  181. package/llms/components/lr-signature-pad.md +2 -2
  182. package/llms/components/lr-slider.md +1 -1
  183. package/llms/components/lr-step.md +7 -1
  184. package/llms/components/lr-textarea.md +2 -2
  185. package/llms/components/lr-time-input.md +3 -3
  186. package/llms/components/lr-time-zone-picker.md +2 -2
  187. package/llms/components/lr-timeline.md +12 -5
  188. package/llms/components/lr-toast.md +1 -1
  189. package/llms/components/lr-token-input.md +10 -9
  190. package/llms/components/lr-tool-call-chip.md +1 -1
  191. package/llms/components/lr-tooltip.md +5 -0
  192. package/llms/components/lr-unit-picker.md +2 -2
  193. package/llms/components/lr-usage-badge.md +1 -1
  194. package/llms/components/lr-voice-picker.md +4 -3
  195. package/llms/index.md +128 -128
  196. package/llms/migration.md +87 -8
  197. package/llms/peers.md +2 -2
  198. package/llms/shared/events-and-types.md +1 -1
  199. package/llms/shared/forms-and-accessibility.md +4 -1
  200. package/llms/shared/frameworks-and-ssr.md +47 -1
  201. package/llms/shared/imports-and-registration.md +8 -1
  202. package/llms/shared/localization-and-rtl.md +5 -0
  203. package/llms/shared/native-styles-and-utilities.md +85 -8
  204. package/llms/shared/styles-and-tokens.md +58 -4
  205. package/llms/shared/testing-and-utilities.md +9 -0
  206. package/llms/shared.md +217 -16
  207. package/locales.json +1 -1
  208. package/package.json +15 -6
  209. package/registrations.json +1 -1
  210. package/skills/compose-lyra-interfaces/SKILL.md +1 -1
  211. package/skills/lyra-ui/SKILL.md +1 -1
  212. package/skills/lyra-ui/commands/migrate.md +1 -1
package/llms/migration.md CHANGED
@@ -21,7 +21,15 @@ The supported upstream identities are `@awesome.me/webawesome` and `@awesome.me/
21
21
  for Web Awesome, plus `@shoelace-style/shoelace`. The tool scans HTML, standalone CSS,
22
22
  JavaScript, TypeScript, JSX, Vue, Svelte, MDX, and Markdown. It rewrites inventory-declared
23
23
  tags, members, defaults, and supported side-effect registration imports.
24
- Imports with bindings remain manual because exported names cannot be inferred safely. An
24
+ Tag selectors in standalone CSS, `<style>` blocks, `css` tagged templates and `::slotted()`, and
25
+ tags in selector strings passed to an element-scoped `querySelector()`, `querySelectorAll()`,
26
+ `closest()` or `matches()`, are renamed when the mapping is automatic. On a renamed Shoelace form
27
+ control, the validation attribute selectors (`[data-user-invalid]`, `[data-invalid]`,
28
+ `[data-user-valid]`, `[data-valid]`, `[data-required]`, `[data-optional]`) become the matching
29
+ `:state()` when the Lyra target documents it, and report `VALIDATION_STATE_REVIEW` when it does not.
30
+ Translation side-effect imports and recognized named utility imports are routed to Lyra
31
+ subpaths; see the utility migration notes in `llms/shared/native-styles-and-utilities.md`.
32
+ Other imports with bindings remain manual because exported names cannot be inferred safely. An
25
33
  aliased component value that uses a rewritten member blocks that mapping across the scanned
26
34
  target set, preventing a registration import from changing while an old member remains. A root
27
35
  Web Awesome or Shoelace registration import changes only when that package identity and tier
@@ -36,7 +44,12 @@ Migrated Web Awesome and Shoelace icon tags emit `BEHAVIOR_REVIEW_REQUIRED` beca
36
44
  dependency-free default library contains only `add`, `check`, `close`, `search`, `menu`,
37
45
  `chevron-left`, `chevron-right`, `chevron-down`, `calendar`, `command`, and `trash`.
38
46
  Replace other names explicitly or provide their vocabulary with
39
- `registerIconLibrary('default', { resolver })`.
47
+ `registerIconLibrary('default', { resolver })`. Web Awesome's Font Awesome names keep working
48
+ after `registerFontAwesomeIconLibrary({ name: 'default' })` from
49
+ `components/utility/icon/icon-library-font-awesome.js` (add `kitCode` for Pro families), and
50
+ Shoelace's Bootstrap Icons names after `registerBootstrapIconLibrary({ name: 'default' })` from
51
+ `components/utility/icon/icon-library-bootstrap.js` (add `basePath` to self-host). Each review
52
+ message names the preset for its upstream.
40
53
  Re-running the tool is idempotent; comments, prose, partial strings, and unrelated packages are
41
54
  left alone.
42
55
 
@@ -1885,6 +1898,71 @@ reported as `GLOBAL_REVIEW`, acknowledged as `lyra-migrate-reviewed: GLOBAL_REVI
1885
1898
  | locale-key | `xmlViewerExpandNode` | `xmlViewerToggleNode` | Reported only. lr-xml-viewer names its node toggle with one constant key while aria-expanded reports the state; a string override under the old key no longer applies. |
1886
1899
  | part | `<lr-thread-list> ::part(pin-glyph)` | Style the pin indicator through pin-icon. | Reported only. The pin indicator part is named pin-icon, like the without-pin-icon attribute that hides it. |
1887
1900
 
1901
+ ## Migrating from Lyra 32 to Lyra 33 (`--origin=lyra-v32`)
1902
+
1903
+ Lyra 32 minor releases and Lyra 33 rename some Lyra-only attributes, properties, events, CSS parts,
1904
+ custom properties and slots. Previous names still supported by the installed release are deprecated aliases.
1905
+ A removal floor is not an automatic removal date. Names and defaults in the pinned upstream's current, nondeprecated API remain mirrored.
1906
+ Run the CLI of the installed package after upgrading, within Lyra 32 or to Lyra 33. It
1907
+ applies only the entries the installed release ships, so running it again after a later upgrade
1908
+ picks up the rest:
1909
+
1910
+ ```bash
1911
+ npx lyra-ui-migrate --origin=lyra-v32 --diff src > lyra-v32.patch
1912
+ npx lyra-ui-migrate --origin=lyra-v32 --check --report=lyra-v32-migration.json src
1913
+ ```
1914
+
1915
+ `--diff` prints a patch and writes nothing. The profile rewrites a name only where the rewrite
1916
+ cannot change what the site reaches: attribute, property and slot bindings on the component in
1917
+ HTML, Lit, JSX, Vue, Svelte and Angular templates; `exportparts` and `::part()` or attribute
1918
+ selectors that name the component; and calls rooted at `querySelector('lr-…')`, `closest()` or
1919
+ `createElement()`. Events bubble and custom properties inherit, so a listener moves only when no
1920
+ other component already dispatches the new name, and an unowned listener or any custom-property
1921
+ use only when, in addition, every component with the old name renamed it the same way and the
1922
+ scanned code never dispatches the old name itself. Everything else is reported with a location;
1923
+ the old name keeps working meanwhile.
1924
+
1925
+ | Code | Reported when |
1926
+ |---|---|
1927
+ | `RENAME_REVIEW` | An old name at a site that does not prove its component, or where another component keeps the name. |
1928
+ | `RENAME_TARGET_SHARED_REVIEW` | The new name is already used by another component, so renaming would widen the site. |
1929
+ | `NAME_GAINED_OWNER_REVIEW` | A listener, `::part()` selector or declaration of a name that more components use after the upgrade. |
1930
+ | `POLARITY_REVIEW` | A boolean replaced by its inverse is bound, assigned or selected, or set statically where a framework assigns properties. |
1931
+ | `DETAIL_SHAPE_REVIEW` | A listener may receive an event whose detail changed; details cannot be aliased. |
1932
+ | `RETIRED_EVENT_REVIEW` | A listener or event-name string may use an alias already removed in the target release; review its replacement and listener reach. |
1933
+ | `PROPERTY_CHANGE_REVIEW` | A property keeps its name but changes its accepted values or behavior; review the assignment without rewriting an ambiguous runtime value. |
1934
+ | `DEPRECATED_MEMBER_REVIEW`, `DEPRECATED_CONTENT_REVIEW` | A deprecated member, tag or kind of slotted content without a mechanical replacement. |
1935
+ | `DEPRECATED_MODULE_REVIEW` | A deprecated module, stylesheet, named export, window event or root attribute. Its replacement needs a semantic review. |
1936
+ | `GLOBAL_REVIEW` | A moved package specifier, removed root export or removed localization key that cannot be rewritten safely. |
1937
+ | `THEME_SCOPE_CSS_INPUT_REVIEW`, `THEME_SCOPE_OUTPUT_REVIEW`, `THEME_SCOPE_DYNAMIC_INPUT_REVIEW`, `THEME_SCOPE_REPEATED_REVIEW`, `THEME_SCOPE_DOUBLE_LAYER_REVIEW` | The `theme-scopes` rule found an input, shared output or marker that needs a theme scope by hand, or `tokens-root.css` imported next to `theme.css`, which already carries the layer. |
1938
+ | `MODULE_NAMESPACE_REVIEW` | A namespace, dynamic import or CommonJS module access whose exported bindings need review. |
1939
+ | `RENAME_CONFLICT_REVIEW` | The element already binds the new name, or the same receiver already listens to it with the same handler. |
1940
+ | `UNUSED_ACKNOWLEDGEMENT` | An acknowledgement comment matches no report. |
1941
+
1942
+ After reviewing a site, add a comment containing `lyra-migrate-reviewed: CODE:name` (for example
1943
+ `DETAIL_SHAPE_REVIEW:lr-close`) on the reported line, alone on the line above it, or directly before
1944
+ the element's opening tag. Acknowledged reports no longer fail `--check`. Re-running the profile
1945
+ is idempotent. Templates rendered on the server must be re-rendered after migrating, because Lit
1946
+ hydration compares template strings.
1947
+
1948
+ | Component | Property | Semantic change in Lyra 33 (reported, never rewritten) |
1949
+ |---|---|---|
1950
+ | `<lr-copy-button>` | `feedbackDuration` | An omitted feedback-duration now shows the copied or failed feedback for 1000 ms instead of 1500 ms, matching Web Awesome and Shoelace; set feedback-duration="1500" to keep the longer feedback. |
1951
+ | `<lr-timeline>` | `orientation` | orientation="auto" is now accepted instead of falling back to vertical: an auto timeline runs as a row while its measured inline size gives every item about 10em, and the property's type includes 'auto', so review code that switches over orientation (read effectiveOrientation for the axis in effect). |
1952
+ | `<lr-token-input>` | `delimiter` | Each character of delimiter is now a separate delimiter (";," splits at every semicolon and every comma, and typing either commits); a multi-character value no longer matches only as one whole string, so review a delimiter longer than one character. |
1953
+
1954
+ Entries no component owns. A module specifier is rewritten where it is provably an import, re-export,
1955
+ dynamic import, `require()`, CSS `@import`, `<link href>`/`<script src>` or a `node_modules/` path, and in any
1956
+ string of a JSON file such as `.vscode/settings.json` (pass it as an explicit target); anywhere else it is
1957
+ reported. A removed root or barrel export is re-bound as `New as Old` in the import clause, so local references keep
1958
+ working. A removed custom property whose replacement is one custom property is rewritten to it. Other uses (a
1959
+ deep import, a namespace member), prefix or prose custom-property guidance and removed localization keys are
1960
+ reported as `GLOBAL_REVIEW`, acknowledged as `lyra-migrate-reviewed: GLOBAL_REVIEW:<name>`.
1961
+
1962
+ | Kind | From | To | Handling |
1963
+ |---|---|---|---|
1964
+ | css-property | `--lr-form-control-label-block-gap` | --lr-form-control-label-gap | Rewritten; custom properties inherit, so the reach is unchanged. One label gap spaces a label above the field as well as a label-placement="start" column, so a value set for the start column now also spaces top labels; scope it to the start-placed controls if only the column should change. |
1965
+
1888
1966
  ## Upstream compatibility spellings
1889
1967
 
1890
1968
  The deprecated upstream compatibility spellings have retired; see the v29 to v30 migration guide for their replacements and review requirements.
@@ -1895,11 +1973,11 @@ For `lr-icon`, the retired `auto-width` attribute migrates to `canvas="auto"`. R
1895
1973
 
1896
1974
  | Ecosystem | Exact | Rewritten | Warning required | Conceptual only | Unsupported | Automatic | Manual |
1897
1975
  |---|---:|---:|---:|---:|---:|---:|---:|
1898
- | Web Awesome | 30 | 44 | 21 | 0 | 0 | 74 | 21 |
1976
+ | Web Awesome | 30 | 44 | 21 | 0 | 1 | 74 | 22 |
1899
1977
  | Shoelace | 18 | 28 | 12 | 0 | 0 | 46 | 12 |
1900
- | **Total** | **48** | **72** | **33** | **0** | **0** | **120** | **33** |
1978
+ | **Total** | **48** | **72** | **33** | **0** | **1** | **120** | **34** |
1901
1979
 
1902
- ## Web Awesome (95)
1980
+ ## Web Awesome (96)
1903
1981
 
1904
1982
  The pinned Web Awesome manifest is authoritative for this inventory; only rows marked automatic are codemod inputs.
1905
1983
 
@@ -1924,11 +2002,11 @@ The pinned Web Awesome manifest is authoritative for this inventory; only rows m
1924
2002
  | `<wa-chart>` | `<lr-chart>` | `exact` | Automatic: tag and supported side-effect registration import. Core Chart.js wrapper (`LyraChartSeries`-based, plus raw `config` passthrough) with bounded `appendData()` streaming and `exportData('csv'. |
1925
2003
  | `<wa-checkbox>` | `<lr-checkbox>` | `rewritten` | Automatic: tag/import plus events: wa-invalid → lr-invalid. Equivalent surface representation: name defaults null ≡ ; no source rewrite. |
1926
2004
  | `<wa-checkbox-group>` | `<lr-checkbox-group>` | `exact` | Automatic: tag and supported side-effect registration import. Form-associated group of checkboxes with array values and group validation. |
1927
- | `<wa-code-highlighter>` | `<lr-code-block>` | `warning-required` | Manual: lr-code-block exposes its code as a named, focusable role="group" surface where wa-code-highlighter exposes a region landmark, so assistive-technology navigation that relies on the region landmark needs review. Highlighting also needs the optional shiki peer. |
2005
+ | `<wa-code-highlighter>` | `<lr-code-block>` | `warning-required` | Manual: lr-code-block exposes its code as a named, focusable role="group" surface where wa-code-highlighter exposes a region landmark, so assistive-technology navigation that relies on the region landmark needs review. Highlighting also needs the optional shiki peer. A global registerCodeGrammar() call maps to registerCodeGrammar() from the root barrel or @aceshooting/lyra-ui/components/conversation/code-block/code-grammar-registry.js, which also accepts lazy loaders and aliases. |
1928
2006
  | `<wa-color-picker>` | `<lr-color-picker>` | `rewritten` | Automatic: tag/import plus events: wa-after-hide → lr-after-hide; events: wa-after-show → lr-after-show; events: wa-hide → lr-hide; events: wa-invalid → lr-invalid; events: wa-show → lr-show; parts: base → color-picker; parts: eyedropper-button__base → eyedropper-button__button; parts: format-button__base → format-button__button. Equivalent surface representation: name defaults null ≡ ; no source rewrite. |
1929
2007
  | `<wa-combobox>` | `<lr-combobox>` | `warning-required` | Manual: Native input/change notifications on lr-combobox are bubbling, composed Event instances without a detail payload. Its lr-input/lr-change aliases carry the frozen readonly value, previousValue and row data, narrowed by the picker value generic; migrated handlers reading or mutating upstream CustomEvent detail must use the prefixed aliases and review the narrower single-select type. Its appearance also accepts the full shared LyraAppearance vocabulary (accent and plain in addition to the three upstream values) since 20.0.0; every upstream value keeps its meaning, so only exhaustive TypeScript switches over the narrower upstream union need review. |
1930
2008
  | `<wa-comparison>` | `<lr-image-comparer>` | `exact` | Automatic: tag and supported side-effect registration import. Before/after slotted surfaces with a keyboard-accessible range divider. |
1931
- | `<wa-copy-button>` | `<lr-copy-button>` | `rewritten` | Automatic: tag/import plus events: wa-copy → lr-copy; events: wa-error → lr-error; insert feedback-duration=1000. Equivalent surface representation: feedbackDuration defaults 1000 ≡ 1500; no source rewrite. |
2009
+ | `<wa-copy-button>` | `<lr-copy-button>` | `rewritten` | Automatic: tag/import plus events: wa-copy → lr-copy; events: wa-error → lr-error. |
1932
2010
  | `<wa-counter>` | `<lr-counter>` | `rewritten` | Automatic: tag/import plus events: wa-finish → lr-finish. |
1933
2011
  | `<wa-data-grid>` | `<lr-data-grid>` | `warning-required` | Manual: Lyra snapshots collection inputs and event details synchronously into frozen readonly values, removes the redundant wa-data-request alias, and deprecates the unprefixed request event in favor of lr-request. Migrated code that mutates arrays or event details in place, assigns derived collections, listens for the removed alias, or relies on the unprefixed request event must be reviewed. |
1934
2012
  | `<wa-date-input>` | `<lr-date-input>` | `warning-required` | Manual: Since 20.0.0 lr-date-input accepts the full shared LyraAppearance vocabulary (accent and plain in addition to the three upstream values). Every upstream value keeps its meaning, so migrated markup is unaffected; only exhaustive TypeScript switches over the narrower upstream union need review. Its lr-hide is cancelable except when disabling the field or making it readonly closes an open popup, which a listener cannot veto; handlers that rely on vetoing every hide need review. |
@@ -1974,6 +2052,7 @@ The pinned Web Awesome manifest is authoritative for this inventory; only rows m
1974
2052
  | `<wa-rating>` | `<lr-rating>` | `rewritten` | Automatic: tag/import plus events: wa-hover → lr-hover; events: wa-invalid → lr-invalid. Equivalent surface representation: name defaults null ≡ ; getSymbol is analyzer-inferred for property-only getSymbol; no source rewrite. |
1975
2053
  | `<wa-relative-time>` | `<lr-relative-time>` | `exact` | Automatic: tag and supported side-effect registration import. Locale-aware formatting primitives. |
1976
2054
  | `<wa-resize-observer>` | `<lr-resize-observer>` | `warning-required` | Manual: Lyra freezes the entries array into an immutable snapshot at dispatch time; migrated code that mutates the array in place must create its own copy. |
2055
+ | `<wa-rich-text-editor>` | — | `unsupported` | Manual: Lyra UI ships no rich-text editor. lr-docx-editor in @aceshooting/lyra-docs edits DOCX documents through a different public contract, so it is not a migration target for this tag; keep the upstream element or choose an editor by hand. |
1977
2056
  | `<wa-scatter-chart>` | `<lr-scatter-chart>` | `exact` | Automatic: tag and supported side-effect registration import. Typed `<lr-chart>` subclasses with tag-specific defaults and the full writable `LyraChartType` vocabulary — same optional peer deps as `<lr-chart>`. |
1978
2057
  | `<wa-scroller>` | `<lr-scroller>` | `exact` | Automatic: tag and supported side-effect registration import. Responsive overflow surface with optional navigation controls. |
1979
2058
  | `<wa-select>` | `<lr-select>` | `rewritten` | Automatic: tag/import plus events: wa-after-hide → lr-after-hide; events: wa-after-show → lr-after-show; events: wa-clear → lr-clear; events: wa-hide → lr-hide; events: wa-invalid → lr-invalid; events: wa-show → lr-show; parts: label → form-control-label; parts: tag__remove-button__base → tag__remove-button__button. |
@@ -2021,7 +2100,7 @@ Shoelace relationships are classified independently; a same-suffix tag is never
2021
2100
  | `<sl-carousel-item>` | `<lr-carousel-item>` | `exact` | Automatic: tag and supported side-effect registration import. Optional semantic slide wrapper for carousel content. |
2022
2101
  | `<sl-checkbox>` | `<lr-checkbox>` | `warning-required` | Manual: Lyra uses the checked attribute as the reset default while Shoelace reflects the live checked state; migration leaves the use unchanged and reports the reflection-sensitive CSS, observer, serialization, and property-write difference. |
2023
2102
  | `<sl-color-picker>` | `<lr-color-picker>` | `rewritten` | Automatic: tag/import plus events: sl-blur → blur; events: sl-change → lr-change; events: sl-focus → focus; events: sl-input → lr-input; events: sl-invalid → lr-invalid. Equivalent surface representation: form defaults ≡ null; size defaults medium ≡ m; no source rewrite. |
2024
- | `<sl-copy-button>` | `<lr-copy-button>` | `rewritten` | Automatic: tag/import plus events: sl-copy → lr-copy; events: sl-error → lr-error; insert feedback-duration=1000. Equivalent surface representation: feedbackDuration defaults 1000 ≡ 1500; no source rewrite. |
2103
+ | `<sl-copy-button>` | `<lr-copy-button>` | `rewritten` | Automatic: tag/import plus events: sl-copy → lr-copy; events: sl-error → lr-error. |
2025
2104
  | `<sl-details>` | `<lr-details>` | `rewritten` | Automatic: tag/import plus events: sl-after-hide → lr-after-hide; events: sl-after-show → lr-after-show; events: sl-hide → lr-hide; events: sl-show → lr-show. |
2026
2105
  | `<sl-dialog>` | `<lr-dialog>` | `warning-required` | Manual: Pinned runtime evidence shows Shoelace emits non-cancelable state-change lifecycle notifications while Lyra provides synchronous pre-state veto events; automatic migration therefore requires review of listener timing and preventDefault() behavior. |
2027
2106
  | `<sl-divider>` | `<lr-divider>` | `exact` | Automatic: tag and supported side-effect registration import. Horizontal or vertical semantic separator. |
package/llms/peers.md CHANGED
@@ -40,7 +40,7 @@ for the page.
40
40
  | `@aceshooting/lyra-3d` | `^1.2.0` | `lr-chart-3d`, `lr-embedding-explorer`, `lr-graph`, `lr-image-viewer`, `lr-knowledge-graph-explorer`, `lr-model-viewer`, `lr-video` |
41
41
  | `@aceshooting/lyra-flags` | `^2.3.1` | opt-in `lr-flag` entries `./components/media/flag/flag-peer-bulk-standard.js`, `./components/media/flag/flag-peer-bulk.js`, `./components/media/flag/flag-peer.js` |
42
42
  | `@aceshooting/lyra-map` | `^1.5.2 \|\| ^2.0.0` | `lr-geojson-viewer`, `lr-map` |
43
- | `@aceshooting/lyra-translations` | `^32.1.0` | _(not referenced by any component)_ |
43
+ | `@aceshooting/lyra-translations` | `^33.1.0` | _(not referenced by any component)_ |
44
44
  | `@aiden0z/pptx-renderer` | `^1.4.0` | `lr-pptx-viewer` |
45
45
  | `@sgratzl/chartjs-chart-boxplot` | `^4.0.0` | `lr-box-plot` |
46
46
  | `chart.js` | `^4.0.1` | `lr-bar-chart`, `lr-box-plot`, `lr-bubble-chart`, `lr-chart`, `lr-doughnut-chart`, `lr-histogram`, `lr-line-chart`, `lr-pie-chart`, `lr-polar-area-chart`, `lr-radar-chart`, `lr-scatter-chart` |
@@ -51,7 +51,7 @@ for the page.
51
51
  | `d3-force` | `^3.0.1` | `lr-graph`, `lr-knowledge-graph-explorer` |
52
52
  | `d3-selection` | `^3.0.1` | `lr-graph`, `lr-knowledge-graph-explorer` |
53
53
  | `d3-zoom` | `^3.0.1` | `lr-graph`, `lr-knowledge-graph-explorer` |
54
- | `dompurify` | `^3.4.14` | `lr-agent-workspace`, `lr-dashboard-grid`, `lr-docx-viewer`, `lr-email-viewer`, `lr-eval-run`, `lr-geojson-viewer`, `lr-html-viewer`, `lr-icon`, `lr-icon-button`, `lr-include`, `lr-map`, `lr-markdown`, `lr-markdown-core`, `lr-message-parts`, `lr-notebook-viewer`, `lr-rag-answer`, `lr-streaming-text`, `lr-streaming-text-core`, `lr-svg-viewer`, `lr-video`, `lr-video-playlist`, `lr-widget-renderer` |
54
+ | `dompurify` | `^3.4.14` | `lr-agent-workspace`, `lr-combobox`, `lr-dashboard-grid`, `lr-docx-viewer`, `lr-email-viewer`, `lr-eval-run`, `lr-geojson-viewer`, `lr-html-viewer`, `lr-icon`, `lr-icon-button`, `lr-include`, `lr-map`, `lr-markdown`, `lr-markdown-core`, `lr-message-parts`, `lr-notebook-viewer`, `lr-rag-answer`, `lr-streaming-text`, `lr-streaming-text-core`, `lr-svg-viewer`, `lr-video`, `lr-video-playlist`, `lr-widget-renderer` |
55
55
  | `emoji-picker-element-data` | `^1.8.0` | `lr-emoji-picker` |
56
56
  | `epubjs` | `^0.3.93` | `lr-ebook-viewer` |
57
57
  | `ical.js` | `^2.2.1` | `lr-calendar-viewer` |
@@ -1530,7 +1530,7 @@ These named interfaces and helper signatures are available to typed integrations
1530
1530
  Return shape of `buildLyraSsrStaticSafety()`: `classification` holds one entry per classified tag
1531
1531
  (a tag absent from it was neither capability-bearing nor audited), and a non-empty `unaudited`
1532
1532
  means the check must fail closed.
1533
- `lyraSsrElementRenderers<T extends LyraLitElementRendererConstructor>(litElementRenderer: T): readonly [typeof LyraSsrFallbackRenderer, T]`
1533
+ `lyraSsrElementRenderers<T extends LyraLitElementRendererConstructor>(litElementRenderer: T): [typeof LyraSsrFallbackRenderer, T]`
1534
1534
 
1535
1535
  - **`svelte-contracts`** — Framework integration type contracts, including the multi-split
1536
1536
  `for` launcher id and `trigger` element reference.
@@ -40,7 +40,10 @@ labels are inserted, removed, retargeted, or edited. A host `aria-label` always
40
40
  controls such as `lr-tool-param-form`, `lr-rubric-form`, and `lr-time-range` put that aggregate name
41
41
  on an internal `role="group"` while retaining the more specific names of their fields/handles.
42
42
  Disabled controls, including controls disabled by an ancestor `<fieldset disabled>`, ignore label
43
- activation.
43
+ activation. A label already associated when a control connects is applied in its first update. The
44
+ indexed observer that tracks later association changes is a separate chunk under code splitting,
45
+ loaded only once some control has a label or a mutation could give it one; changes made before it
46
+ first arrives are replayed when it does, so pages that never use external labels never load it.
44
47
 
45
48
  - **Read `effectiveDisabled`, not `disabled`, for the merged state.** `effectiveDisabled` is own
46
49
  `disabled` OR an ancestor `<fieldset disabled>`'s cascaded state.
@@ -60,7 +60,7 @@ page that does not use `theme.css` links `styles/tokens-root.css`, the layer alo
60
60
  <link rel="stylesheet" href="/node_modules/@aceshooting/lyra-ui/dist/theme.css" />
61
61
  ```
62
62
 
63
- Hydration then skips the constructed copy. An application's **own** declarative shadow roots that
63
+ Hydration then skips the constructed copy and never requests the layer's script. An application's **own** declarative shadow roots that
64
64
  contain theme scopes (for example a `.lr-dark` region or a `data-lr-theme-scope` wrapper) include the
65
65
  same `<link rel="stylesheet" href="…/tokens-root.css">` inside their template: document styles do not
66
66
  reach into a shadow root until hydration adopts the layer there. Without any link and without
@@ -89,6 +89,43 @@ and a shadow root exists; it does not claim that server markup was observed or h
89
89
  diagnostic's separate `mode` to distinguish the declared `render-and-hydrate` and `client-render`
90
90
  tiers.
91
91
 
92
+ **Code-split bundles must keep that order.** A bundler that splits page modules into chunks can
93
+ move Lit (`lit`, `lit-html`, `lit-element`, `@lit/reactive-element`) into a shared chunk that the
94
+ entry imports statically. An imported chunk evaluates before the importing chunk's own code, so Lit
95
+ reads the hydrate-support hook before `hydration.js` sets it, even though the entry imports
96
+ `hydration.js` first. Lyra detects that case: a host that finds a server-rendered shadow root while
97
+ Lit has no hydrate support discards the server markup and renders into the same shadow root (never a
98
+ second copy), and the development build warns once (`lyra-hydration:unpatched`). The page is then
99
+ client-rendered rather than hydrated, so fix the order with one of these recipes:
100
+
101
+ - Put the hydration entry and Lit in one chunk, where modules keep their import order. With Vite 8
102
+ (Rolldown):
103
+
104
+ ```ts
105
+ // vite.config.ts
106
+ export default defineConfig({
107
+ build: {
108
+ rolldownOptions: {
109
+ output: {
110
+ codeSplitting: {
111
+ groups: [{
112
+ name: 'lit',
113
+ test: /[\\/]node_modules[\\/](lit|lit-html|lit-element|@lit[\\/]reactive-element|@lit-labs[\\/]ssr-client)[\\/]|[\\/]@aceshooting[\\/]lyra-ui[\\/]dist[\\/]hydration\.js$/,
114
+ }],
115
+ },
116
+ },
117
+ },
118
+ },
119
+ });
120
+ ```
121
+
122
+ Rolldown's deprecated `advancedChunks` takes the same `groups`. With Rollup or Vite 7 and earlier,
123
+ return `'lit'` from `build.rollupOptions.output.manualChunks(id)` for the same module ids.
124
+ - Or load hydration as its own first script, so its module graph finishes evaluating before the
125
+ application's starts: a separate entry containing only
126
+ `import '@aceshooting/lyra-ui/hydration.js';`, referenced by a `<script type="module">` placed
127
+ before the application's (module scripts without `async` run in document order).
128
+
92
129
  The loader preserves optional-peer isolation: import a root-excluded component's granular
93
130
  registration after the loader. A fallback cannot serialize JS property bindings, so put initial
94
131
  server state in attributes/light DOM or assign it client-side. A `render-and-hydrate` component
@@ -98,6 +135,15 @@ corrects itself on the next update, so a slotted override lands one frame after
98
135
  browser-only mount is unaffected and renders the final result the first time. Layout/observer/canvas/media work
99
136
  begins after hydration, and remote content is client-only.
100
137
 
138
+ **Localized server output.** The server renderer gives a component no ancestors, so an ancestor
139
+ `lang` (`<html lang="fr">`, `<div lang="fr">`) reaches only the browser. The server resolves
140
+ messages and number/date formats from the host's own `locale`/`lang`, else the active locale. To
141
+ serve translated text, import the catalog on the server and call `setLyraLocale(requestLocale)`
142
+ around the render (clear it with `setLyraLocale('')` afterwards), matching the page's `lang`; also
143
+ import the catalog in the browser before hydration. The hydrated page then keeps the server text
144
+ with no flash. When the server rendered a different locale than the browser inherits, the
145
+ hydrating render reproduces the server's text and the next update commits the inherited locale.
146
+
101
147
  **If hydration never runs at all** — a page that intentionally ships no script bundle, a reader
102
148
  that fetches the raw HTML, or a crawler — a `render-and-hydrate` tag's declarative-shadow-DOM
103
149
  output is either permanently complete and correct on its own, or only ever promised once hydration
@@ -78,13 +78,20 @@ cross-shadow-selection gap and conditions for dropping a `@supports` fallback:
78
78
  ## Importing and registering components
79
79
 
80
80
  Every component has a stable, tag-shaped side-effect entry point that registers its own tag. Use
81
- `components/<tag>.js`; this public boundary stays unchanged if the internal family folders move:
81
+ `components/<tag>.js`; this public boundary stays unchanged if the internal family folders move.
82
+ Load the token stylesheet first — `theme.css`, or `tokens-root.css` (the document token layer
83
+ alone) when the page does not use `theme.css` — with a `<link>` in `<head>` or a bundler CSS import:
82
84
 
83
85
  ```js
86
+ import "@aceshooting/lyra-ui/theme.css"; // or tokens-root.css; once per page, before any component
84
87
  import "@aceshooting/lyra-ui/components/lr-combobox.js"; // registers <lr-combobox>
85
88
  import "@aceshooting/lyra-ui/components/lr-table.js"; // registers <lr-table>
86
89
  ```
87
90
 
91
+ Without either stylesheet, the first registration loads the layer as a separate script on demand
92
+ and components hold their first render until it arrives, so a missed import still renders
93
+ correctly, one request later.
94
+
88
95
  Family barrels register their family. Registration-free `.class.js` entries retain the owning
89
96
  family/component path, exposing source organization.
90
97
 
@@ -80,6 +80,11 @@ writing direction remain live references: loading or extending the parent later
80
80
  components. Ordinary `registerLyraLocale()` calls can extend the delta without discarding its
81
81
  parent. Self-references, cycles and parent chains beyond 32 edges reject before changing the outer
82
82
  registration. Delta catalogs do not become reverse fallbacks for another tag sharing the language.
83
+
84
+ The full fallback chain (truncation, implied script, regional siblings and delta parents) is
85
+ installed by the first registration. Until then every message is the built-in English default, so
86
+ only the inherited tag itself is consulted, for plural selection and number formatting. Register
87
+ catalogs before the first render, as usual, to render localized text without a re-render.
83
88
  The existing complete built-in regional catalogs retain their original messages.
84
89
 
85
90
  ```js
@@ -39,18 +39,20 @@ the first connected Lyra element would otherwise adopt, available before any com
39
39
  | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
40
  | Display and composition | `lr-block`, `lr-inline-block`, `lr-flex`, `lr-inline-flex`, `lr-grid`, `lr-flow-root`, `lr-stack`, `lr-cluster`, `lr-grid-auto` |
41
41
  | Static 12-column grid | `lr-grid-12`, `lr-span-1` – `lr-span-12`, `lr-row-span-2` – `lr-row-span-4` |
42
- | Flex direction and wrapping | `lr-row`, `lr-column`, `lr-wrap`, `lr-nowrap`, `lr-grow`, `lr-grow-0`, `lr-shrink`, `lr-shrink-0` |
43
- | Item alignment | `lr-items-start`, `lr-items-center`, `lr-items-end`, `lr-items-stretch`, `lr-items-baseline`, `lr-self-start`, `lr-self-center`, `lr-self-end`, `lr-self-stretch` |
44
- | Distribution | `lr-justify-start`, `lr-justify-center`, `lr-justify-end`, `lr-justify-between`, `lr-justify-around` |
42
+ | Flex direction and wrapping | `lr-row`, `lr-column`, `lr-wrap`, `lr-wrap-reverse`, `lr-nowrap`, `lr-grow`, `lr-grow-0`, `lr-shrink`, `lr-shrink-0` |
43
+ | Item alignment | `lr-items-start`, `lr-items-center`, `lr-items-end`, `lr-items-stretch`, `lr-items-baseline`, `lr-self-baseline`, `lr-self-start`, `lr-self-center`, `lr-self-end`, `lr-self-stretch` |
44
+ | Distribution | `lr-justify-start`, `lr-justify-center`, `lr-justify-end`, `lr-justify-between`, `lr-justify-around`, `lr-justify-evenly` |
45
45
  | Gaps | `lr-gap-0`, `lr-gap-2xs`, `lr-gap-xs`, `lr-gap-s`, `lr-gap-m`, `lr-gap-l`, `lr-gap-xl`, `lr-gap-2xl`, `lr-gap-3xl`, `lr-gap-4xl` |
46
46
  | Compositions | `lr-flank`, `lr-flank-end`, `lr-split`, `lr-split-column`, `lr-frame`, `lr-frame-square`, `lr-frame-landscape`, `lr-frame-portrait`, `lr-span-grid`, `lr-container` |
47
47
  | Plain-element helpers | `lr-link-plain`, `lr-list-plain`, `lr-placeholder`, `lr-scroll-lock`, `lr-cloak` |
48
48
  | Radius and case | `lr-radius-none`, `lr-radius-xs`, `lr-radius-m`, `lr-radius-container`, `lr-radius-pill`, `lr-radius-circle`, `lr-uppercase`, `lr-lowercase`, `lr-capitalize`, `lr-normal-case` |
49
49
  | Variant and size | `lr-neutral`, `lr-brand`, `lr-success`, `lr-warning`, `lr-danger`; `lr-size-2xs`, `lr-size-xs`, `lr-size-s`, `lr-size-m`, `lr-size-l`, `lr-size-xl` (`lr-size-full` stays the 100% box) |
50
+ | Component looks | `lr-button`, `lr-card`; appearances `lr-accent`, `lr-filled`, `lr-outlined`, `lr-filled-outlined`, `lr-plain` (only with `lr-button` or `lr-card`) |
50
51
  | Logical sizing | `lr-inline-full`, `lr-block-full`, `lr-size-full`, `lr-min-inline-0`, `lr-min-block-0`, `lr-max-inline-full`, `lr-max-inline-prose`, `lr-center` |
51
52
  | Overflow | `lr-overflow-auto`, `lr-overflow-hidden` |
52
- | Text alignment and size | `lr-text-start`, `lr-text-center`, `lr-text-end`, `lr-text-xs`, `lr-text-sm`, `lr-text-base`, `lr-text-lg`, `lr-text-xl`, `lr-text-2xl` – `lr-text-5xl`, `lr-text-quiet` |
53
- | Font | `lr-font-normal`, `lr-font-medium`, `lr-font-semibold`, `lr-font-bold`, `lr-font-mono` |
53
+ | Text alignment and size | `lr-text-start`, `lr-text-center`, `lr-text-end`, `lr-text-justify`, `lr-text-xs`, `lr-text-sm`, `lr-text-base`, `lr-text-lg`, `lr-text-xl`, `lr-text-2xl` – `lr-text-5xl`, `lr-text-quiet` |
54
+ | Font | `lr-font-normal`, `lr-font-medium`, `lr-font-light`, `lr-font-semibold`, `lr-font-bold`, `lr-font-mono`, `lr-tabular-nums` |
55
+ | Table rows | `lr-zebra-rows`, `lr-hover-rows` (on the `table`; tint `tbody` rows from `--lr-color-text` and `--lr-color-mix-hover`) |
54
56
  | Text flow | `lr-text-break`, `lr-text-nowrap`, `lr-truncate`, `lr-text-balance`, `lr-text-pretty`, `lr-prose` |
55
57
  | Typography | `lr-typography`, `lr-not-typography`, `lr-heading-1`, `lr-heading-2`, `lr-heading-3`, `lr-heading-4`, `lr-heading-5`, `lr-heading-6`, `lr-inline-code` |
56
58
  | Visibility and focus | `lr-visually-hidden`, `lr-visually-hidden-focusable`, `lr-fouce-hidden`, `lr-hidden` |
@@ -95,8 +97,8 @@ All spacing here reads `--lr-layout-gap` (default `--lr-space-m`).
95
97
  `lr-lowercase`, `lr-capitalize`, `lr-normal-case`** set `text-transform`.
96
98
  - **Variants** `lr-neutral|brand|success|warning|danger` (the `variant` vocabulary) colour the
97
99
  element's text and native-control accent with that tone's loud fill and publish
98
- `--lr-variant-fill-quiet`, `--lr-variant-fill-loud`, `--lr-variant-on-quiet` and
99
- `--lr-variant-border` for your own rules. **Sizes** `lr-size-2xs … lr-size-xl` (the `size` ladder;
100
+ `--lr-variant-fill-quiet`, `--lr-variant-fill-loud`, `--lr-variant-on-quiet`, `--lr-variant-on-loud`
101
+ and `--lr-variant-border` for your own rules. **Sizes** `lr-size-2xs … lr-size-xl` (the `size` ladder;
100
102
  `small`/`medium`/`large` spellings are not classes) set the type size and scale the native control
101
103
  block size and padding that `.lr-native` reads.
102
104
  - **`lr-scroll-lock`** is pure CSS (`overflow: hidden`, `overscroll-behavior: contain`, plus a stable
@@ -118,6 +120,52 @@ The Page helpers key off the reflected `view` state of their containing `<lr-pag
118
120
  `lr-page-mobile-only` is hidden for `view="desktop"`, and `lr-page-desktop-only` is hidden for
119
121
  `view="mobile"`. Page derives that state from its own allocated inline size, not the viewport.
120
122
 
123
+ ### Component looks without hydration: `lr-button` and `lr-card`
124
+
125
+ `lr-button` gives a light-DOM `<a href>` or `<button>` the look of `<lr-button>`, and `lr-card` gives
126
+ any element the surface of `<lr-card>`. Nothing has to upgrade or hydrate, so a prerendered page can
127
+ ship its calls to action as real links. Both classes read the same hooks as the components
128
+ (`--lr-button-*`, `--lr-card-*`) and the same theme tokens, so a retheme, a dark scope or a look
129
+ sheet moves the class and the component together.
130
+
131
+ ```html
132
+ <a class="lr-button lr-brand lr-size-l" href="/signup">Start free</a>
133
+ <a class="lr-button lr-neutral lr-outlined" href="/pricing">See pricing</a>
134
+ <button class="lr-button lr-danger lr-filled lr-size-s" type="button">Delete</button>
135
+
136
+ <a class="lr-card" href="/guide">
137
+ <h3>Getting started</h3>
138
+ <p>A whole-card link with the card's hover edge and focus ring.</p>
139
+ </a>
140
+ <div class="lr-card lr-accent">A passive card with the accent stripe.</div>
141
+ ```
142
+
143
+ - **Variant** comes from `lr-neutral` (default), `lr-brand`, `lr-success`, `lr-warning` or
144
+ `lr-danger`, and **size** from `lr-size-2xs` … `lr-size-xl` (default `m`). Either can sit on the
145
+ element or on an ancestor, so one `lr-size-s` on a toolbar sizes every button in it.
146
+ - **Appearance** sits on the element itself: `lr-accent` (default for `lr-button`), `lr-filled`,
147
+ `lr-outlined`, `lr-filled-outlined` or `lr-plain`. A card without an appearance class is the
148
+ outlined card. These classes do nothing on an element without `lr-button` or `lr-card`.
149
+ - **States.** Hover and press mix the fill as `<lr-button>` does, press scales by
150
+ `--lr-button-active-scale` (not under `prefers-reduced-motion: reduce`), and keyboard focus shows
151
+ the shared focus ring. `:disabled` and `aria-disabled="true"` dim the element and remove pointer
152
+ feedback; drop the `href` from a disabled link as well, because `aria-disabled` alone does not stop
153
+ navigation. The block size never falls below the size step, and a short label is never narrower
154
+ than it is tall.
155
+ - **Cards.** A card on an `<a href>` or `<button>` is one whole-card control: it takes the
156
+ control-grade edge, the brand hover and press edge, `--lr-card-interactive-hover-shadow`,
157
+ `--lr-card-interactive-hover-transform` and an inset focus ring. Content is padded by
158
+ `--lr-card-body-padding` (default `--lr-space-m`). The accent stripe is on the inline start
159
+ edge, so it moves to the right under `dir="rtl"`.
160
+ - **Type comes from the tokens.** Both use the Lyra font as the components do, and a button takes
161
+ its type size from the size step and weight from `--lr-button-font-weight`, so `lr-text-*` and
162
+ `lr-font-*` do not change it. `lr-radius-*` and the case classes still apply on top.
163
+ - Load `theme.css` or `tokens-root.css` with `utilities.css` so the tokens resolve before any
164
+ component connects; every value also has a fallback.
165
+ - The slotted structure of the components (header, footer, media, start and end slots, caret,
166
+ loading spinner, `appearance="link"` and `"quiet"`) has no class. Use the components where you need
167
+ it.
168
+
121
169
  ### Typography
122
170
 
123
171
  `utilities.css` also carries an opt-in typography look for light-DOM content. Nothing changes for
@@ -453,15 +501,27 @@ because it is as likely your own class as an upstream one.
453
501
  | `wa-align-items-*`, `wa-align-self-*`, `wa-justify-content-*`, `wa-flex-wrap`/`wa-flex-nowrap` | `lr-items-*`, `lr-self-*`, `lr-justify-*`, `lr-wrap`/`lr-nowrap` |
454
502
  | `wa-text-*`, `wa-font-weight-*`, `wa-color-text-quiet`, `wa-link-plain`, `wa-list-plain`, `wa-prose`, `wa-visually-hidden`, `wa-cloak`, `wa-placeholder`, `wa-scroll-lock` | the same helper under `lr-`; see the inventory above |
455
503
  | `wa-brand`, `wa-neutral`, `wa-success`, `wa-warning`, `wa-danger`, `wa-size-*` | `lr-brand`, `lr-neutral`, `lr-success`, `lr-warning`, `lr-danger`, `lr-size-*` |
504
+ | `wa-button`, `wa-accent`, `wa-filled`, `wa-outlined`, `wa-plain`, `wa-pill` | `lr-button`, `lr-accent`, `lr-filled`, `lr-outlined`, `lr-plain`, `lr-radius-pill` |
456
505
  | `wa-dark`, `wa-light`, `sl-theme-dark`, `sl-theme-light` | `lr-dark`, `lr-light` |
457
506
 
458
507
  `wa-font-size-*`, `wa-body-*` and `wa-border-radius-s`/`-m` rewrite to the nearest class
459
508
  (`lr-text-*`, `lr-radius-*`) and report `UPSTREAM_CLASS_APPROXIMATE_REVIEW`: the type and radius scales
460
509
  are not value-aligned. `wa-heading-*`, `wa-caption-*`, `wa-longform-*`, the hue-pinned variants
461
- (`wa-brand-blue`), `wa-theme-*`, the `native.css` opt-ins (`wa-button`, `wa-zebra-rows`, ...), the
510
+ (`wa-brand-blue`), `wa-theme-*`, the `native.css` validity opt-ins (`wa-valid`, `wa-invalid`), the
462
511
  `wa-form-control-*` classes and the gaps Lyra has no step for are reported as `UPSTREAM_CLASS_REVIEW`
463
512
  with the nearest alternative and are not rewritten.
464
513
 
514
+ Design-token references (`var(--wa-*)`, `var(--sl-*)`) follow a reviewed route table, matched by role
515
+ and resolved value rather than by name, and every target is a document-layer token. Semantic colours
516
+ (`--wa-color-brand-fill-loud` becomes `--lr-color-brand-fill-loud`; surface, text, border, overlay,
517
+ shadow and focus colours likewise), border widths, font families and weights, and spacing steps
518
+ with the same length (`--wa-space-m` and `--sl-spacing-medium`, both 1rem, become `--lr-space-l`) are
519
+ rewritten silently. Type sizes, radii, line heights, shadows, durations, easing and the Shoelace
520
+ `-600` palette steps rewrite to the nearest role and report `UPSTREAM_TOKEN_APPROXIMATE_REVIEW`.
521
+ A token with no equivalent (`--wa-space-2xl` at 2.5rem, numbered and hue palettes) stays as-is and is
522
+ reported as `UPSTREAM_TOKEN_REVIEW` with the nearest alternatives. A token the file declares itself
523
+ (`--wa-space-m: 2rem`) is treated as its own property and left alone.
524
+
465
525
  Stylesheet and loader imports (`import '...'` and CSS `@import`) map to real package subpaths:
466
526
  `dist/styles/webawesome.css` becomes `theme.css`, `native.css` and `utilities.css`;
467
527
  `styles/native.css`, `styles/utilities.css`, `styles/themes/default.css` and Shoelace
@@ -473,6 +533,23 @@ self-starting loaders (`webawesome.loader.js`, `shoelace-autoloader.js`) become
473
533
  `utilities/base-path`, `layers.css`, the `awesome` and `shoelace` themes and the colour palettes have no
474
534
  Lyra counterpart and are reported as `UPSTREAM_ASSET_REVIEW`.
475
535
 
536
+ Translation imports (`dist/translations/<lang>.js`) become the matching
537
+ `@aceshooting/lyra-translations/<locale>.js` catalog with Lyra's casing (`de-ch` becomes `de-CH`)
538
+ and report `OPTIONAL_PEER_REQUIRED` once, because that package is an optional peer. The `en` import is
539
+ removed, because English is built in. A bare `pt` or `zh` loads `pt-BR` or `zh-CN`, the region CLDR
540
+ resolves it to, and reports `TRANSLATION_LOCALE_REVIEW`. A locale Lyra does not ship stays unchanged
541
+ and reports `UPSTREAM_ASSET_REVIEW`.
542
+
543
+ Named imports from `dist/utilities/*.js` are rewritten symbol by symbol when every name has a Lyra
544
+ export with the same call shape: `serialize` (`utilities/form.js`), `registerIconLibrary`,
545
+ `unregisterIconLibrary`, `setDefaultIconFamily`, `getDefaultIconFamily` and `getDefaultIconVariant`
546
+ (`components/utility/icon/icon-library.js`), `allDefined` (`utilities/defined.js`),
547
+ `setDefaultAnimation`, `setAnimation` and `getAnimation` (`utilities/animation-registry.js`, with a
548
+ `UTILITY_BEHAVIOR_REVIEW` note to check animation names), and `getAnimationNames` and
549
+ `getEasingNames` (`components/media/animation/animation.class.js`). A statement that also imports
550
+ an unlisted name, a type-only import or a re-export stays unchanged with
551
+ `IMPORT_BINDING_REVIEW_REQUIRED`.
552
+
476
553
  ### Hue palette
477
554
 
478
555
  ```css
@@ -64,8 +64,9 @@ Three layers, and **which one you set decides how far the override reaches**:
64
64
  **Layer 2 (`--lr-*`) is declared once per document, not on each component**. The
65
65
  _document token layer_ declares every shared output on `:root` and re-derives it only at
66
66
  [theme scopes](#theme-scopes). `theme.css` carries it, so a page that imports `theme.css` has it from
67
- first paint; on a page without `theme.css`, registering the first `lr-*` element adopts the same text
68
- as a constructed stylesheet. Components inherit the result, and so do your own elements —
67
+ first paint; on a page without `theme.css` or `tokens-root.css`, registering the first `lr-*` element
68
+ loads the same text on demand and adopts it as a constructed stylesheet, and components hold their
69
+ first render until it arrives. Components inherit the result, and so do your own elements —
69
70
  `body { color: var(--lr-color-text) }` resolves everywhere the layer applies.
70
71
  [`tokens-root.css`](#reading-the-resolved-tokens-from-your-own-components--tokens-rootcss) is the
71
72
  layer alone, for pages that do not use `theme.css`. Retheme through layer 1 (`--lr-theme-*`) **on a theme scope**: `:root`, a
@@ -273,8 +274,11 @@ component does: `var(--lr-color-border)` inside **your** component resolves wher
273
274
  applies. `theme.css` carries the layer, so importing `theme.css` is enough, including for
274
275
  server-rendered pages and for application elements that paint before any Lyra element exists.
275
276
  `tokens-root.css` is the same layer alone, as a static stylesheet, for pages that do not use
276
- `theme.css`:
277
+ `theme.css`. Link one of them on every page: the layer then costs components no JavaScript.
277
278
 
279
+ - **Every page, for size.** Component modules do not bundle the layer. Without a static copy, the
280
+ first registration imports it as a separate module (about 4 KB gzip) and adopts it; with
281
+ `theme.css` or `tokens-root.css` present, that module is never requested.
278
282
  - **Server-rendered pages.** See
279
283
  [SSR and declarative shadow DOM](./frameworks-and-ssr.md#ssr-and-declarative-shadow-dom) and
280
284
  [Theme scopes](#theme-scopes) for application shadow roots.
@@ -359,7 +363,9 @@ properties only — notably not `color-scheme` — so importing it paints nothin
359
363
  A **theme scope** is an element that re-derives the whole token layer from the `--lr-theme-*` inputs
360
364
  and the mode it sees. The list is closed: `:root`; the mode scopes `.lr-light`, `.lr-dark` and
361
365
  `[data-lr-theme]` (any value); the style-axis boundaries `[data-lr-mode]`, `[data-lr-look]`,
362
- `[data-lr-accent]`, `[data-lr-density]`, `[data-lr-contrast]`, `[data-lr-motion]`; a look's scoped
366
+ `[data-lr-accent]`, the per-role `[data-lr-accent-neutral]`, `[data-lr-accent-success]`,
367
+ `[data-lr-accent-warning]`, `[data-lr-accent-danger]`, `[data-lr-density]`, `[data-lr-contrast]`,
368
+ `[data-lr-motion]`; a look's scoped
363
369
  `.light` / `.dark` aliases; the design-token fixture scopes `.lr-token-light`, `.lr-token-dark`,
364
370
  `[data-lr-design-token-mode]`; and the mode-neutral marker **`data-lr-theme-scope`**.
365
371
 
@@ -664,6 +670,7 @@ Each sheet is the one that style needs under `theme-core.css`:
664
670
  | `look: 'shadcn'`, `'material'`, `'data'`, `'terminal'`, `'high-contrast'` | `looks/<look>.css` |
665
671
  | `surface: 'glass'`, or the `.lr-surface-chrome` class | `surfaces/glass.css` |
666
672
  | a named `accent` such as `'emerald'` | `accents.css` |
673
+ | a per-role `data-lr-accent-<role>` remap | `accent-roles.css` |
667
674
  | `density: 'compact'` or `'touch'` | `density.css` |
668
675
 
669
676
  An application that keeps the whole built-in profile should stay on `theme.css`, which is smaller
@@ -685,6 +692,53 @@ axes on `<html>` and restore only the mode, as in
685
692
  </html>
686
693
  ```
687
694
 
695
+ ### Per-role accents — accent-roles.css
696
+
697
+ `data-lr-accent` names the brand palette. To recolor another semantic role declaratively, import
698
+ `accent-roles.css` and name a gemstone on the role's own attribute: `data-lr-accent-neutral`,
699
+ `data-lr-accent-success`, `data-lr-accent-warning` or `data-lr-accent-danger`. The values are the
700
+ nine gemstones that `data-lr-accent` accepts (`emerald`, `peridot`, `topaz`, `ruby`, `tourmaline`,
701
+ `amethyst`, `aquamarine`, `sapphire`, `hematite`), plus `none`.
702
+
703
+ ```css
704
+ @import "@aceshooting/lyra-ui/theme.css";
705
+ @import "@aceshooting/lyra-ui/accent-roles.css";
706
+ ```
707
+
708
+ ```html
709
+ <html data-lr-accent-success="aquamarine" data-lr-accent-danger="tourmaline">
710
+ …
711
+ <section data-lr-accent-success="sapphire">…</section> <!-- this region only -->
712
+ <aside data-lr-accent-success="none">…</aside> <!-- the look's own success colours -->
713
+ </html>
714
+ ```
715
+
716
+ - **Same ramp as brand.** A remapped role gets exactly the quiet, normal and loud fill, border and
717
+ `on` ramp that `data-lr-accent="<gemstone>"` gives brand, in both light and dark mode, qualified
718
+ by the same rules: every `on` colour meets 4.5:1 on its fill, the loud fill meets 4.5:1 as text on
719
+ the quiet fill and on every built-in reference surface (each look's page and raised surfaces),
720
+ and normal and loud borders meet 3:1 against those surfaces. Every component that reads `--lr-color-<role>-*` follows, including
721
+ `variant="success"` and friends.
722
+ - **Defaults are unchanged.** Without a role attribute, or without `accent-roles.css`, each role
723
+ keeps the look's colours. Brand and the focus ring belong to `data-lr-accent`; a role attribute
724
+ never moves them, and remapping one role leaves the others alone.
725
+ - **Scoping.** Each attribute is a theme scope, so it works on any element and nests: a closer
726
+ attribute wins, `none` restores the look's colours for that role below it, and an unknown value
727
+ changes nothing. A `data-lr-accent` element starts a fresh accent scope for every role, so set the
728
+ role attributes on that element (or inside it) as well when you nest a brand accent. Both
729
+ attributes compose on one element.
730
+ - **Mode, contrast and forced colours.** The role follows the mode of its nearest scope
731
+ (`data-lr-mode`, `.lr-dark`, System). `prefers-contrast: more` and `data-lr-contrast="more"` still
732
+ strengthen control borders and focus rings exactly as they do with a brand accent. Under `forced-colors: active` the role aliases resolve to system colours, so
733
+ a remap never overrides the user's palette.
734
+ - **Runtime precedence.** `setLyraStyle({ accent: { success: '#0d9488' } })` and
735
+ `applyLyraStyleScope()` write inline per-role ramps, which win over the attribute on the same
736
+ element; use them for arbitrary colours, and the attributes for the built-in palette with no
737
+ JavaScript and no first-paint flash.
738
+ - **Cost.** `theme.css` and `theme-core.css` carry only the four scope selectors;
739
+ `accent-roles.css` (under 3 KB gzipped) holds the palettes, so pages that never remap a role pay
740
+ nothing.
741
+
688
742
  ### Cascade layers
689
743
 
690
744
  `theme.css` declares its layer order up front, with base inputs in `lr-theme` and built-in profile
@@ -275,6 +275,15 @@ files matter when scaffolding a project's editor configuration. Build tools can
275
275
  through the explicit `@aceshooting/lyra-ide/custom-elements.json` package export; native Node ESM
276
276
  uses `with { type: 'json' }` on that import.
277
277
 
278
+ **Slim manifest in `@aceshooting/lyra-ui`.** The main package's `customElements` field points at
279
+ `custom-elements.slim.json` (export `@aceshooting/lyra-ui/custom-elements.slim.json`), so Storybook,
280
+ wc-toolkit and analyzers discover every tag without installing `@aceshooting/lyra-ide`. Per tag it
281
+ lists attributes (name, `fieldName`, type, default), public fields and methods, events, slots, CSS
282
+ parts, CSS properties and CSS states, already flattened across superclasses, with module paths at the
283
+ shipped `dist/` files. It carries no descriptions, status, `since` or deprecation records and no
284
+ companion-package tags; use the full `@aceshooting/lyra-ide/custom-elements.json` for those. The
285
+ inheritance note below applies to the full manifest only.
286
+
278
287
  **Inherited members in `custom-elements.json`.** A subclass declaration's `cssParts` array is
279
288
  always the complete flattened set, including everything inherited from a superclass — `::part()`
280
289
  has no type-level inheritance chain a consumer could otherwise walk. `attributes`, `members`,