@aceshooting/lyra-ui 32.1.0 → 33.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.
- package/CHANGELOG.md +224 -1583
- package/README.md +12 -1
- package/custom-elements.slim.json +1 -0
- package/dist/accent-roles.css +1 -0
- package/dist/cli/migrate-wa.mjs +50 -48
- package/dist/cli/migration-contract.json.gz +0 -0
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +1 -1
- package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +10 -0
- package/dist/components/conversation/code-block/code-block-base.class.d.ts +3 -1
- package/dist/components/conversation/code-block/code-block-base.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-core.class.d.ts +1 -1
- package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
- package/dist/components/conversation/code-block/code-block.class.d.ts +3 -2
- package/dist/components/conversation/code-block/code-block.class.js +1 -1
- package/dist/components/conversation/code-block/code-grammar-registry.d.ts +35 -0
- package/dist/components/conversation/code-block/code-grammar-registry.js +1 -0
- package/dist/components/conversation/model-select/model-select.class.d.ts +8 -7
- package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +1 -1
- package/dist/components/conversation/usage-badge/usage-badge.class.d.ts +1 -1
- package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +8 -7
- package/dist/components/data/table/table-support.d.ts +2 -3
- package/dist/components/data/table/table.class.d.ts +2 -1
- package/dist/components/data/timeline/timeline.class.d.ts +17 -6
- package/dist/components/data/timeline/timeline.class.js +2 -2
- package/dist/components/data/timeline/timeline.styles.js +1 -1
- package/dist/components/forms/catalog-picker-base.d.ts +14 -1
- package/dist/components/forms/checkbox/checkbox.class.js +1 -1
- package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +4 -5
- package/dist/components/forms/checkbox-group/checkbox-group.styles.js +1 -1
- package/dist/components/forms/code-editor/code-editor.class.d.ts +14 -5
- package/dist/components/forms/code-editor/code-editor.styles.js +1 -1
- package/dist/components/forms/color-picker/color-picker.class.d.ts +18 -7
- package/dist/components/forms/color-picker/color-picker.styles.js +1 -1
- package/dist/components/forms/combobox/combobox-option-html.js +1 -0
- package/dist/components/forms/combobox/combobox.class.d.ts +30 -9
- package/dist/components/forms/combobox/combobox.class.js +110 -21
- package/dist/components/forms/combobox/combobox.styles.js +1 -1
- package/dist/components/forms/country-picker/country-picker.class.d.ts +4 -5
- package/dist/components/forms/currency-picker/currency-picker.class.d.ts +4 -5
- package/dist/components/forms/date-picker/date-input.class.d.ts +14 -5
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +10 -0
- package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +2 -1
- package/dist/components/forms/input/input-shared.d.ts +14 -5
- package/dist/components/forms/input/time-input.class.d.ts +15 -6
- package/dist/components/forms/input/time-input.styles.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +8 -7
- package/dist/components/forms/otp-input/otp-input.class.d.ts +4 -5
- package/dist/components/forms/otp-input/otp-input.styles.js +1 -1
- package/dist/components/forms/phone-input/phone-input.class.d.ts +14 -5
- package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
- package/dist/components/forms/radio/radio-group.class.d.ts +4 -5
- package/dist/components/forms/radio/radio-group.styles.js +1 -1
- package/dist/components/forms/radio/radio.class.js +2 -2
- package/dist/components/forms/select/select.class.d.ts +5 -6
- package/dist/components/forms/signature-pad/signature-pad.class.d.ts +4 -5
- package/dist/components/forms/signature-pad/signature-pad.styles.js +1 -1
- package/dist/components/forms/slider/slider.class.d.ts +6 -5
- package/dist/components/forms/slider/slider.styles.js +1 -1
- package/dist/components/forms/textarea/textarea.class.d.ts +14 -5
- package/dist/components/forms/time-zone-picker/time-zone-picker.class.d.ts +4 -5
- package/dist/components/forms/token-input/token-input.class.d.ts +10 -10
- package/dist/components/forms/token-input/token-input.class.js +1 -1
- package/dist/components/forms/token-input/token-input.styles.js +1 -1
- package/dist/components/forms/unit-picker/unit-picker.class.d.ts +4 -5
- package/dist/components/layout/command-palette/command-palette.class.d.ts +1 -1
- package/dist/components/layout/menu/menu.class.d.ts +1 -1
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.d.ts +1 -1
- package/dist/components/layout/segmented/segmented.class.d.ts +2 -2
- package/dist/components/layout/stepper/step.class.d.ts +14 -1
- package/dist/components/layout/stepper/step.class.js +2 -2
- package/dist/components/media/file-input/file-input.class.d.ts +2 -1
- package/dist/components/media/file-input/file-input.class.js +1 -1
- package/dist/components/media/file-input/file-input.styles.js +1 -1
- package/dist/components/media/lightbox/lightbox-item.class.d.ts +10 -0
- package/dist/components/media/lightbox/lightbox-item.class.js +1 -1
- package/dist/components/media/lightbox/lightbox-source.js +1 -1
- package/dist/components/media/lightbox/lightbox-types.d.ts +4 -1
- package/dist/components/media/lightbox/lightbox.class.d.ts +42 -19
- package/dist/components/media/lightbox/lightbox.class.js +4 -3
- package/dist/components/media/lightbox/lightbox.styles.js +1 -1
- package/dist/components/overlays/context-menu/context-menu.class.d.ts +1 -1
- package/dist/components/overlays/dialog/dialog.class.d.ts +19 -3
- package/dist/components/overlays/dialog/dialog.class.js +1 -1
- package/dist/components/overlays/dialog/dialog.styles.js +1 -1
- package/dist/components/overlays/drawer/drawer.class.d.ts +8 -2
- package/dist/components/overlays/drawer/drawer.class.js +1 -1
- package/dist/components/overlays/overlay/dropdown.class.d.ts +1 -1
- package/dist/components/overlays/overlay/overlay.styles.js +1 -1
- package/dist/components/overlays/overlay/popover.class.d.ts +1 -1
- package/dist/components/overlays/overlay/popover.class.js +1 -1
- package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -0
- package/dist/components/overlays/overlay/tooltip.class.js +2 -2
- package/dist/components/overlays/toast/toast-item.class.d.ts +2 -2
- package/dist/components/overlays/toast/toast-item.styles.js +1 -1
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +1 -1
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +1 -1
- package/dist/components/utility/copy-button/copy-button.class.d.ts +2 -1
- package/dist/components/utility/copy-button/copy-button.class.js +1 -1
- package/dist/components/utility/export-button/export-button.class.d.ts +1 -1
- package/dist/components/utility/icon/icon-library-bootstrap.d.ts +50 -0
- package/dist/components/utility/icon/icon-library-bootstrap.js +1 -0
- package/dist/components/utility/icon/icon-library-font-awesome.d.ts +68 -0
- package/dist/components/utility/icon/icon-library-font-awesome.js +1 -0
- package/dist/components/utility/known-date/known-date.class.d.ts +10 -0
- package/dist/components/utility/mention-popover/mention-popover.class.d.ts +1 -1
- package/dist/components/utility/number-ticker/number-ticker.class.d.ts +10 -2
- package/dist/components/utility/number-ticker/number-ticker.class.js +1 -1
- package/dist/components/utility/tour/tour.class.d.ts +1 -1
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/accessibility-visibility.js +1 -1
- package/dist/internal/autoloader-manifest.js +1 -1
- package/dist/internal/declarative-overlay-action.js +1 -0
- package/dist/internal/default-strings/forms.generated.js +1 -1
- package/dist/internal/document-token-css.generated.js +10 -0
- package/dist/internal/document-tokens.generated.js +2 -11
- package/dist/internal/document-tokens.js +2 -2
- package/dist/internal/dom-guards.js +1 -1
- package/dist/internal/external-label-association.js +1 -0
- package/dist/internal/focus-navigation.js +1 -1
- package/dist/internal/form-control/chrome.styles.js +1 -1
- package/dist/internal/form-control-labels.js +1 -1
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/lyra-element.d.ts +11 -2
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/theme-observation.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/lyra.js +1 -1
- package/dist/styles/tokens-root.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/theme-core.css +1 -1
- package/dist/theme.css +1 -1
- package/llms/components/lr-checkbox-group.md +2 -2
- package/llms/components/lr-citation-badge.md +1 -1
- package/llms/components/lr-code-block-core.md +3 -1
- package/llms/components/lr-code-block.md +14 -0
- package/llms/components/lr-code-editor.md +2 -2
- package/llms/components/lr-color-picker.md +4 -4
- package/llms/components/lr-combobox.md +21 -5
- package/llms/components/lr-context-menu.md +1 -1
- package/llms/components/lr-copy-button.md +4 -3
- package/llms/components/lr-country-picker.md +2 -2
- package/llms/components/lr-currency-picker.md +2 -2
- package/llms/components/lr-date-input.md +1 -1
- package/llms/components/lr-date-picker.md +1 -1
- package/llms/components/lr-dialog.md +30 -2
- package/llms/components/lr-drawer.md +7 -1
- package/llms/components/lr-entity-chip.md +1 -1
- package/llms/components/lr-export-button.md +1 -1
- package/llms/components/lr-file-input.md +1 -1
- package/llms/components/lr-icon.md +96 -0
- package/llms/components/lr-input.md +2 -2
- package/llms/components/lr-lightbox.md +43 -17
- package/llms/components/lr-locale-picker.md +2 -2
- package/llms/components/lr-mention-popover.md +1 -1
- package/llms/components/lr-menu.md +1 -1
- package/llms/components/lr-model-select.md +4 -4
- package/llms/components/lr-native-time-input.md +2 -2
- package/llms/components/lr-number-input.md +2 -2
- package/llms/components/lr-number-ticker.md +7 -2
- package/llms/components/lr-otp-input.md +2 -2
- package/llms/components/lr-phone-input.md +2 -2
- package/llms/components/lr-popover.md +1 -1
- package/llms/components/lr-radio-group.md +2 -2
- package/llms/components/lr-segmented.md +1 -1
- package/llms/components/lr-select.md +3 -3
- package/llms/components/lr-selection-toolbar.md +1 -1
- package/llms/components/lr-signature-pad.md +2 -2
- package/llms/components/lr-slider.md +1 -1
- package/llms/components/lr-step.md +7 -1
- package/llms/components/lr-textarea.md +2 -2
- package/llms/components/lr-time-input.md +3 -3
- package/llms/components/lr-time-zone-picker.md +2 -2
- package/llms/components/lr-timeline.md +12 -5
- package/llms/components/lr-toast.md +1 -1
- package/llms/components/lr-token-input.md +10 -9
- package/llms/components/lr-tool-call-chip.md +1 -1
- package/llms/components/lr-tooltip.md +5 -0
- package/llms/components/lr-unit-picker.md +2 -2
- package/llms/components/lr-usage-badge.md +1 -1
- package/llms/components/lr-voice-picker.md +4 -3
- package/llms/index.md +115 -115
- package/llms/migration.md +87 -8
- package/llms/peers.md +2 -2
- package/llms/shared/forms-and-accessibility.md +4 -1
- package/llms/shared/frameworks-and-ssr.md +10 -1
- package/llms/shared/imports-and-registration.md +8 -1
- package/llms/shared/localization-and-rtl.md +5 -0
- package/llms/shared/native-styles-and-utilities.md +34 -5
- package/llms/shared/styles-and-tokens.md +58 -4
- package/llms/shared/testing-and-utilities.md +9 -0
- package/llms/shared.md +128 -12
- package/locales.json +1 -1
- package/package.json +14 -5
- package/registrations.json +1 -1
- package/skills/compose-lyra-interfaces/SKILL.md +1 -1
- package/skills/lyra-ui/SKILL.md +1 -1
- 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
|
-
|
|
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 |
|
|
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** | **
|
|
1978
|
+
| **Total** | **48** | **72** | **33** | **0** | **1** | **120** | **34** |
|
|
1901
1979
|
|
|
1902
|
-
## Web Awesome (
|
|
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
|
|
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
|
|
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` | `^
|
|
43
|
+
| `@aceshooting/lyra-translations` | `^33.0.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` |
|
|
@@ -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
|
|
@@ -98,6 +98,15 @@ corrects itself on the next update, so a slotted override lands one frame after
|
|
|
98
98
|
browser-only mount is unaffected and renders the final result the first time. Layout/observer/canvas/media work
|
|
99
99
|
begins after hydration, and remote content is client-only.
|
|
100
100
|
|
|
101
|
+
**Localized server output.** The server renderer gives a component no ancestors, so an ancestor
|
|
102
|
+
`lang` (`<html lang="fr">`, `<div lang="fr">`) reaches only the browser. The server resolves
|
|
103
|
+
messages and number/date formats from the host's own `locale`/`lang`, else the active locale. To
|
|
104
|
+
serve translated text, import the catalog on the server and call `setLyraLocale(requestLocale)`
|
|
105
|
+
around the render (clear it with `setLyraLocale('')` afterwards), matching the page's `lang`; also
|
|
106
|
+
import the catalog in the browser before hydration. The hydrated page then keeps the server text
|
|
107
|
+
with no flash. When the server rendered a different locale than the browser inherits, the
|
|
108
|
+
hydrating render reproduces the server's text and the next update commits the inherited locale.
|
|
109
|
+
|
|
101
110
|
**If hydration never runs at all** — a page that intentionally ships no script bundle, a reader
|
|
102
111
|
that fetches the raw HTML, or a crawler — a `render-and-hydrate` tag's declarative-shadow-DOM
|
|
103
112
|
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,9 +39,9 @@ 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` |
|
|
@@ -49,8 +49,9 @@ the first connected Lyra element would otherwise adopt, available before any com
|
|
|
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
50
|
| 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
51
|
| 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` |
|
|
52
|
+
| 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` |
|
|
53
|
+
| Font | `lr-font-normal`, `lr-font-medium`, `lr-font-light`, `lr-font-semibold`, `lr-font-bold`, `lr-font-mono`, `lr-tabular-nums` |
|
|
54
|
+
| Table rows | `lr-zebra-rows`, `lr-hover-rows` (on the `table`; tint `tbody` rows from `--lr-color-text` and `--lr-color-mix-hover`) |
|
|
54
55
|
| Text flow | `lr-text-break`, `lr-text-nowrap`, `lr-truncate`, `lr-text-balance`, `lr-text-pretty`, `lr-prose` |
|
|
55
56
|
| 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
57
|
| Visibility and focus | `lr-visually-hidden`, `lr-visually-hidden-focusable`, `lr-fouce-hidden`, `lr-hidden` |
|
|
@@ -462,6 +463,17 @@ are not value-aligned. `wa-heading-*`, `wa-caption-*`, `wa-longform-*`, the hue-
|
|
|
462
463
|
`wa-form-control-*` classes and the gaps Lyra has no step for are reported as `UPSTREAM_CLASS_REVIEW`
|
|
463
464
|
with the nearest alternative and are not rewritten.
|
|
464
465
|
|
|
466
|
+
Design-token references (`var(--wa-*)`, `var(--sl-*)`) follow a reviewed route table, matched by role
|
|
467
|
+
and resolved value rather than by name, and every target is a document-layer token. Semantic colours
|
|
468
|
+
(`--wa-color-brand-fill-loud` becomes `--lr-color-brand-fill-loud`; surface, text, border, overlay,
|
|
469
|
+
shadow and focus colours likewise), border widths, font families and weights, and spacing steps
|
|
470
|
+
with the same length (`--wa-space-m` and `--sl-spacing-medium`, both 1rem, become `--lr-space-l`) are
|
|
471
|
+
rewritten silently. Type sizes, radii, line heights, shadows, durations, easing and the Shoelace
|
|
472
|
+
`-600` palette steps rewrite to the nearest role and report `UPSTREAM_TOKEN_APPROXIMATE_REVIEW`.
|
|
473
|
+
A token with no equivalent (`--wa-space-2xl` at 2.5rem, numbered and hue palettes) stays as-is and is
|
|
474
|
+
reported as `UPSTREAM_TOKEN_REVIEW` with the nearest alternatives. A token the file declares itself
|
|
475
|
+
(`--wa-space-m: 2rem`) is treated as its own property and left alone.
|
|
476
|
+
|
|
465
477
|
Stylesheet and loader imports (`import '...'` and CSS `@import`) map to real package subpaths:
|
|
466
478
|
`dist/styles/webawesome.css` becomes `theme.css`, `native.css` and `utilities.css`;
|
|
467
479
|
`styles/native.css`, `styles/utilities.css`, `styles/themes/default.css` and Shoelace
|
|
@@ -473,6 +485,23 @@ self-starting loaders (`webawesome.loader.js`, `shoelace-autoloader.js`) become
|
|
|
473
485
|
`utilities/base-path`, `layers.css`, the `awesome` and `shoelace` themes and the colour palettes have no
|
|
474
486
|
Lyra counterpart and are reported as `UPSTREAM_ASSET_REVIEW`.
|
|
475
487
|
|
|
488
|
+
Translation imports (`dist/translations/<lang>.js`) become the matching
|
|
489
|
+
`@aceshooting/lyra-translations/<locale>.js` catalog with Lyra's casing (`de-ch` becomes `de-CH`)
|
|
490
|
+
and report `OPTIONAL_PEER_REQUIRED` once, because that package is an optional peer. The `en` import is
|
|
491
|
+
removed, because English is built in. A bare `pt` or `zh` loads `pt-BR` or `zh-CN`, the region CLDR
|
|
492
|
+
resolves it to, and reports `TRANSLATION_LOCALE_REVIEW`. A locale Lyra does not ship stays unchanged
|
|
493
|
+
and reports `UPSTREAM_ASSET_REVIEW`.
|
|
494
|
+
|
|
495
|
+
Named imports from `dist/utilities/*.js` are rewritten symbol by symbol when every name has a Lyra
|
|
496
|
+
export with the same call shape: `serialize` (`utilities/form.js`), `registerIconLibrary`,
|
|
497
|
+
`unregisterIconLibrary`, `setDefaultIconFamily`, `getDefaultIconFamily` and `getDefaultIconVariant`
|
|
498
|
+
(`components/utility/icon/icon-library.js`), `allDefined` (`utilities/defined.js`),
|
|
499
|
+
`setDefaultAnimation`, `setAnimation` and `getAnimation` (`utilities/animation-registry.js`, with a
|
|
500
|
+
`UTILITY_BEHAVIOR_REVIEW` note to check animation names), and `getAnimationNames` and
|
|
501
|
+
`getEasingNames` (`components/media/animation/animation.class.js`). A statement that also imports
|
|
502
|
+
an unlisted name, a type-only import or a re-export stays unchanged with
|
|
503
|
+
`IMPORT_BINDING_REVIEW_REQUIRED`.
|
|
504
|
+
|
|
476
505
|
### Hue palette
|
|
477
506
|
|
|
478
507
|
```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
|
|
68
|
-
|
|
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]`,
|
|
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`,
|