@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.
- package/CHANGELOG.md +247 -1576
- package/README.md +15 -2
- 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/lr-map-anchor.d.ts +1 -1
- 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/media/map/map-anchor-avoid.js +1 -1
- package/dist/components/media/map/map-anchor-options.d.ts +9 -0
- package/dist/components/media/map/map.class.d.ts +19 -5
- package/dist/components/media/map/map.class.js +3 -3
- 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 +12 -3
- 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/ssr.d.ts +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-button.md +4 -0
- package/llms/components/lr-card.md +2 -0
- 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-map.md +16 -1
- 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 +128 -128
- package/llms/migration.md +87 -8
- package/llms/peers.md +2 -2
- package/llms/shared/events-and-types.md +1 -1
- package/llms/shared/forms-and-accessibility.md +4 -1
- package/llms/shared/frameworks-and-ssr.md +47 -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 +85 -8
- package/llms/shared/styles-and-tokens.md +58 -4
- package/llms/shared/testing-and-utilities.md +9 -0
- package/llms/shared.md +217 -16
- package/locales.json +1 -1
- package/package.json +15 -6
- 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/shared.md
CHANGED
|
@@ -77,13 +77,20 @@ cross-shadow-selection gap and conditions for dropping a `@supports` fallback:
|
|
|
77
77
|
## Importing and registering components
|
|
78
78
|
|
|
79
79
|
Every component has a stable, tag-shaped side-effect entry point that registers its own tag. Use
|
|
80
|
-
`components/<tag>.js`; this public boundary stays unchanged if the internal family folders move
|
|
80
|
+
`components/<tag>.js`; this public boundary stays unchanged if the internal family folders move.
|
|
81
|
+
Load the token stylesheet first — `theme.css`, or `tokens-root.css` (the document token layer
|
|
82
|
+
alone) when the page does not use `theme.css` — with a `<link>` in `<head>` or a bundler CSS import:
|
|
81
83
|
|
|
82
84
|
```js
|
|
85
|
+
import "@aceshooting/lyra-ui/theme.css"; // or tokens-root.css; once per page, before any component
|
|
83
86
|
import "@aceshooting/lyra-ui/components/lr-combobox.js"; // registers <lr-combobox>
|
|
84
87
|
import "@aceshooting/lyra-ui/components/lr-table.js"; // registers <lr-table>
|
|
85
88
|
```
|
|
86
89
|
|
|
90
|
+
Without either stylesheet, the first registration loads the layer as a separate script on demand
|
|
91
|
+
and components hold their first render until it arrives, so a missed import still renders
|
|
92
|
+
correctly, one request later.
|
|
93
|
+
|
|
87
94
|
Family barrels register their family. Registration-free `.class.js` entries retain the owning
|
|
88
95
|
family/component path, exposing source organization.
|
|
89
96
|
|
|
@@ -802,7 +809,10 @@ labels are inserted, removed, retargeted, or edited. A host `aria-label` always
|
|
|
802
809
|
controls such as `lr-tool-param-form`, `lr-rubric-form`, and `lr-time-range` put that aggregate name
|
|
803
810
|
on an internal `role="group"` while retaining the more specific names of their fields/handles.
|
|
804
811
|
Disabled controls, including controls disabled by an ancestor `<fieldset disabled>`, ignore label
|
|
805
|
-
activation.
|
|
812
|
+
activation. A label already associated when a control connects is applied in its first update. The
|
|
813
|
+
indexed observer that tracks later association changes is a separate chunk under code splitting,
|
|
814
|
+
loaded only once some control has a label or a mutation could give it one; changes made before it
|
|
815
|
+
first arrives are replayed when it does, so pages that never use external labels never load it.
|
|
806
816
|
|
|
807
817
|
- **Read `effectiveDisabled`, not `disabled`, for the merged state.** `effectiveDisabled` is own
|
|
808
818
|
`disabled` OR an ancestor `<fieldset disabled>`'s cascaded state.
|
|
@@ -1187,8 +1197,9 @@ Three layers, and **which one you set decides how far the override reaches**:
|
|
|
1187
1197
|
**Layer 2 (`--lr-*`) is declared once per document, not on each component**. The
|
|
1188
1198
|
_document token layer_ declares every shared output on `:root` and re-derives it only at
|
|
1189
1199
|
[theme scopes](#theme-scopes). `theme.css` carries it, so a page that imports `theme.css` has it from
|
|
1190
|
-
first paint; on a page without `theme.css`, registering the first `lr-*` element
|
|
1191
|
-
|
|
1200
|
+
first paint; on a page without `theme.css` or `tokens-root.css`, registering the first `lr-*` element
|
|
1201
|
+
loads the same text on demand and adopts it as a constructed stylesheet, and components hold their
|
|
1202
|
+
first render until it arrives. Components inherit the result, and so do your own elements —
|
|
1192
1203
|
`body { color: var(--lr-color-text) }` resolves everywhere the layer applies.
|
|
1193
1204
|
[`tokens-root.css`](#reading-the-resolved-tokens-from-your-own-components--tokens-rootcss) is the
|
|
1194
1205
|
layer alone, for pages that do not use `theme.css`. Retheme through layer 1 (`--lr-theme-*`) **on a theme scope**: `:root`, a
|
|
@@ -1396,8 +1407,11 @@ component does: `var(--lr-color-border)` inside **your** component resolves wher
|
|
|
1396
1407
|
applies. `theme.css` carries the layer, so importing `theme.css` is enough, including for
|
|
1397
1408
|
server-rendered pages and for application elements that paint before any Lyra element exists.
|
|
1398
1409
|
`tokens-root.css` is the same layer alone, as a static stylesheet, for pages that do not use
|
|
1399
|
-
`theme.css
|
|
1410
|
+
`theme.css`. Link one of them on every page: the layer then costs components no JavaScript.
|
|
1400
1411
|
|
|
1412
|
+
- **Every page, for size.** Component modules do not bundle the layer. Without a static copy, the
|
|
1413
|
+
first registration imports it as a separate module (about 4 KB gzip) and adopts it; with
|
|
1414
|
+
`theme.css` or `tokens-root.css` present, that module is never requested.
|
|
1401
1415
|
- **Server-rendered pages.** See
|
|
1402
1416
|
[SSR and declarative shadow DOM](./shared/frameworks-and-ssr.md#ssr-and-declarative-shadow-dom) and
|
|
1403
1417
|
[Theme scopes](#theme-scopes) for application shadow roots.
|
|
@@ -1482,7 +1496,9 @@ properties only — notably not `color-scheme` — so importing it paints nothin
|
|
|
1482
1496
|
A **theme scope** is an element that re-derives the whole token layer from the `--lr-theme-*` inputs
|
|
1483
1497
|
and the mode it sees. The list is closed: `:root`; the mode scopes `.lr-light`, `.lr-dark` and
|
|
1484
1498
|
`[data-lr-theme]` (any value); the style-axis boundaries `[data-lr-mode]`, `[data-lr-look]`,
|
|
1485
|
-
`[data-lr-accent]`,
|
|
1499
|
+
`[data-lr-accent]`, the per-role `[data-lr-accent-neutral]`, `[data-lr-accent-success]`,
|
|
1500
|
+
`[data-lr-accent-warning]`, `[data-lr-accent-danger]`, `[data-lr-density]`, `[data-lr-contrast]`,
|
|
1501
|
+
`[data-lr-motion]`; a look's scoped
|
|
1486
1502
|
`.light` / `.dark` aliases; the design-token fixture scopes `.lr-token-light`, `.lr-token-dark`,
|
|
1487
1503
|
`[data-lr-design-token-mode]`; and the mode-neutral marker **`data-lr-theme-scope`**.
|
|
1488
1504
|
|
|
@@ -1787,6 +1803,7 @@ Each sheet is the one that style needs under `theme-core.css`:
|
|
|
1787
1803
|
| `look: 'shadcn'`, `'material'`, `'data'`, `'terminal'`, `'high-contrast'` | `looks/<look>.css` |
|
|
1788
1804
|
| `surface: 'glass'`, or the `.lr-surface-chrome` class | `surfaces/glass.css` |
|
|
1789
1805
|
| a named `accent` such as `'emerald'` | `accents.css` |
|
|
1806
|
+
| a per-role `data-lr-accent-<role>` remap | `accent-roles.css` |
|
|
1790
1807
|
| `density: 'compact'` or `'touch'` | `density.css` |
|
|
1791
1808
|
|
|
1792
1809
|
An application that keeps the whole built-in profile should stay on `theme.css`, which is smaller
|
|
@@ -1808,6 +1825,53 @@ axes on `<html>` and restore only the mode, as in
|
|
|
1808
1825
|
</html>
|
|
1809
1826
|
```
|
|
1810
1827
|
|
|
1828
|
+
### Per-role accents — accent-roles.css
|
|
1829
|
+
|
|
1830
|
+
`data-lr-accent` names the brand palette. To recolor another semantic role declaratively, import
|
|
1831
|
+
`accent-roles.css` and name a gemstone on the role's own attribute: `data-lr-accent-neutral`,
|
|
1832
|
+
`data-lr-accent-success`, `data-lr-accent-warning` or `data-lr-accent-danger`. The values are the
|
|
1833
|
+
nine gemstones that `data-lr-accent` accepts (`emerald`, `peridot`, `topaz`, `ruby`, `tourmaline`,
|
|
1834
|
+
`amethyst`, `aquamarine`, `sapphire`, `hematite`), plus `none`.
|
|
1835
|
+
|
|
1836
|
+
```css
|
|
1837
|
+
@import "@aceshooting/lyra-ui/theme.css";
|
|
1838
|
+
@import "@aceshooting/lyra-ui/accent-roles.css";
|
|
1839
|
+
```
|
|
1840
|
+
|
|
1841
|
+
```html
|
|
1842
|
+
<html data-lr-accent-success="aquamarine" data-lr-accent-danger="tourmaline">
|
|
1843
|
+
…
|
|
1844
|
+
<section data-lr-accent-success="sapphire">…</section> <!-- this region only -->
|
|
1845
|
+
<aside data-lr-accent-success="none">…</aside> <!-- the look's own success colours -->
|
|
1846
|
+
</html>
|
|
1847
|
+
```
|
|
1848
|
+
|
|
1849
|
+
- **Same ramp as brand.** A remapped role gets exactly the quiet, normal and loud fill, border and
|
|
1850
|
+
`on` ramp that `data-lr-accent="<gemstone>"` gives brand, in both light and dark mode, qualified
|
|
1851
|
+
by the same rules: every `on` colour meets 4.5:1 on its fill, the loud fill meets 4.5:1 as text on
|
|
1852
|
+
the quiet fill and on every built-in reference surface (each look's page and raised surfaces),
|
|
1853
|
+
and normal and loud borders meet 3:1 against those surfaces. Every component that reads `--lr-color-<role>-*` follows, including
|
|
1854
|
+
`variant="success"` and friends.
|
|
1855
|
+
- **Defaults are unchanged.** Without a role attribute, or without `accent-roles.css`, each role
|
|
1856
|
+
keeps the look's colours. Brand and the focus ring belong to `data-lr-accent`; a role attribute
|
|
1857
|
+
never moves them, and remapping one role leaves the others alone.
|
|
1858
|
+
- **Scoping.** Each attribute is a theme scope, so it works on any element and nests: a closer
|
|
1859
|
+
attribute wins, `none` restores the look's colours for that role below it, and an unknown value
|
|
1860
|
+
changes nothing. A `data-lr-accent` element starts a fresh accent scope for every role, so set the
|
|
1861
|
+
role attributes on that element (or inside it) as well when you nest a brand accent. Both
|
|
1862
|
+
attributes compose on one element.
|
|
1863
|
+
- **Mode, contrast and forced colours.** The role follows the mode of its nearest scope
|
|
1864
|
+
(`data-lr-mode`, `.lr-dark`, System). `prefers-contrast: more` and `data-lr-contrast="more"` still
|
|
1865
|
+
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
|
|
1866
|
+
a remap never overrides the user's palette.
|
|
1867
|
+
- **Runtime precedence.** `setLyraStyle({ accent: { success: '#0d9488' } })` and
|
|
1868
|
+
`applyLyraStyleScope()` write inline per-role ramps, which win over the attribute on the same
|
|
1869
|
+
element; use them for arbitrary colours, and the attributes for the built-in palette with no
|
|
1870
|
+
JavaScript and no first-paint flash.
|
|
1871
|
+
- **Cost.** `theme.css` and `theme-core.css` carry only the four scope selectors;
|
|
1872
|
+
`accent-roles.css` (under 3 KB gzipped) holds the palettes, so pages that never remap a role pay
|
|
1873
|
+
nothing.
|
|
1874
|
+
|
|
1811
1875
|
### Cascade layers
|
|
1812
1876
|
|
|
1813
1877
|
`theme.css` declares its layer order up front, with base inputs in `lr-theme` and built-in profile
|
|
@@ -2439,18 +2503,20 @@ the first connected Lyra element would otherwise adopt, available before any com
|
|
|
2439
2503
|
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2440
2504
|
| 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` |
|
|
2441
2505
|
| Static 12-column grid | `lr-grid-12`, `lr-span-1` – `lr-span-12`, `lr-row-span-2` – `lr-row-span-4` |
|
|
2442
|
-
| Flex direction and wrapping | `lr-row`, `lr-column`, `lr-wrap`, `lr-nowrap`, `lr-grow`, `lr-grow-0`, `lr-shrink`, `lr-shrink-0` |
|
|
2443
|
-
| 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` |
|
|
2444
|
-
| Distribution | `lr-justify-start`, `lr-justify-center`, `lr-justify-end`, `lr-justify-between`, `lr-justify-around` |
|
|
2506
|
+
| 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` |
|
|
2507
|
+
| 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` |
|
|
2508
|
+
| Distribution | `lr-justify-start`, `lr-justify-center`, `lr-justify-end`, `lr-justify-between`, `lr-justify-around`, `lr-justify-evenly` |
|
|
2445
2509
|
| 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` |
|
|
2446
2510
|
| 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` |
|
|
2447
2511
|
| Plain-element helpers | `lr-link-plain`, `lr-list-plain`, `lr-placeholder`, `lr-scroll-lock`, `lr-cloak` |
|
|
2448
2512
|
| 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` |
|
|
2449
2513
|
| 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) |
|
|
2514
|
+
| 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`) |
|
|
2450
2515
|
| 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` |
|
|
2451
2516
|
| Overflow | `lr-overflow-auto`, `lr-overflow-hidden` |
|
|
2452
|
-
| 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` |
|
|
2453
|
-
| Font | `lr-font-normal`, `lr-font-medium`, `lr-font-semibold`, `lr-font-bold`, `lr-font-mono` |
|
|
2517
|
+
| 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` |
|
|
2518
|
+
| Font | `lr-font-normal`, `lr-font-medium`, `lr-font-light`, `lr-font-semibold`, `lr-font-bold`, `lr-font-mono`, `lr-tabular-nums` |
|
|
2519
|
+
| Table rows | `lr-zebra-rows`, `lr-hover-rows` (on the `table`; tint `tbody` rows from `--lr-color-text` and `--lr-color-mix-hover`) |
|
|
2454
2520
|
| Text flow | `lr-text-break`, `lr-text-nowrap`, `lr-truncate`, `lr-text-balance`, `lr-text-pretty`, `lr-prose` |
|
|
2455
2521
|
| 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` |
|
|
2456
2522
|
| Visibility and focus | `lr-visually-hidden`, `lr-visually-hidden-focusable`, `lr-fouce-hidden`, `lr-hidden` |
|
|
@@ -2495,8 +2561,8 @@ All spacing here reads `--lr-layout-gap` (default `--lr-space-m`).
|
|
|
2495
2561
|
`lr-lowercase`, `lr-capitalize`, `lr-normal-case`** set `text-transform`.
|
|
2496
2562
|
- **Variants** `lr-neutral|brand|success|warning|danger` (the `variant` vocabulary) colour the
|
|
2497
2563
|
element's text and native-control accent with that tone's loud fill and publish
|
|
2498
|
-
`--lr-variant-fill-quiet`, `--lr-variant-fill-loud`, `--lr-variant-on-quiet`
|
|
2499
|
-
`--lr-variant-border` for your own rules. **Sizes** `lr-size-2xs … lr-size-xl` (the `size` ladder;
|
|
2564
|
+
`--lr-variant-fill-quiet`, `--lr-variant-fill-loud`, `--lr-variant-on-quiet`, `--lr-variant-on-loud`
|
|
2565
|
+
and `--lr-variant-border` for your own rules. **Sizes** `lr-size-2xs … lr-size-xl` (the `size` ladder;
|
|
2500
2566
|
`small`/`medium`/`large` spellings are not classes) set the type size and scale the native control
|
|
2501
2567
|
block size and padding that `.lr-native` reads.
|
|
2502
2568
|
- **`lr-scroll-lock`** is pure CSS (`overflow: hidden`, `overscroll-behavior: contain`, plus a stable
|
|
@@ -2518,6 +2584,52 @@ The Page helpers key off the reflected `view` state of their containing `<lr-pag
|
|
|
2518
2584
|
`lr-page-mobile-only` is hidden for `view="desktop"`, and `lr-page-desktop-only` is hidden for
|
|
2519
2585
|
`view="mobile"`. Page derives that state from its own allocated inline size, not the viewport.
|
|
2520
2586
|
|
|
2587
|
+
### Component looks without hydration: `lr-button` and `lr-card`
|
|
2588
|
+
|
|
2589
|
+
`lr-button` gives a light-DOM `<a href>` or `<button>` the look of `<lr-button>`, and `lr-card` gives
|
|
2590
|
+
any element the surface of `<lr-card>`. Nothing has to upgrade or hydrate, so a prerendered page can
|
|
2591
|
+
ship its calls to action as real links. Both classes read the same hooks as the components
|
|
2592
|
+
(`--lr-button-*`, `--lr-card-*`) and the same theme tokens, so a retheme, a dark scope or a look
|
|
2593
|
+
sheet moves the class and the component together.
|
|
2594
|
+
|
|
2595
|
+
```html
|
|
2596
|
+
<a class="lr-button lr-brand lr-size-l" href="/signup">Start free</a>
|
|
2597
|
+
<a class="lr-button lr-neutral lr-outlined" href="/pricing">See pricing</a>
|
|
2598
|
+
<button class="lr-button lr-danger lr-filled lr-size-s" type="button">Delete</button>
|
|
2599
|
+
|
|
2600
|
+
<a class="lr-card" href="/guide">
|
|
2601
|
+
<h3>Getting started</h3>
|
|
2602
|
+
<p>A whole-card link with the card's hover edge and focus ring.</p>
|
|
2603
|
+
</a>
|
|
2604
|
+
<div class="lr-card lr-accent">A passive card with the accent stripe.</div>
|
|
2605
|
+
```
|
|
2606
|
+
|
|
2607
|
+
- **Variant** comes from `lr-neutral` (default), `lr-brand`, `lr-success`, `lr-warning` or
|
|
2608
|
+
`lr-danger`, and **size** from `lr-size-2xs` … `lr-size-xl` (default `m`). Either can sit on the
|
|
2609
|
+
element or on an ancestor, so one `lr-size-s` on a toolbar sizes every button in it.
|
|
2610
|
+
- **Appearance** sits on the element itself: `lr-accent` (default for `lr-button`), `lr-filled`,
|
|
2611
|
+
`lr-outlined`, `lr-filled-outlined` or `lr-plain`. A card without an appearance class is the
|
|
2612
|
+
outlined card. These classes do nothing on an element without `lr-button` or `lr-card`.
|
|
2613
|
+
- **States.** Hover and press mix the fill as `<lr-button>` does, press scales by
|
|
2614
|
+
`--lr-button-active-scale` (not under `prefers-reduced-motion: reduce`), and keyboard focus shows
|
|
2615
|
+
the shared focus ring. `:disabled` and `aria-disabled="true"` dim the element and remove pointer
|
|
2616
|
+
feedback; drop the `href` from a disabled link as well, because `aria-disabled` alone does not stop
|
|
2617
|
+
navigation. The block size never falls below the size step, and a short label is never narrower
|
|
2618
|
+
than it is tall.
|
|
2619
|
+
- **Cards.** A card on an `<a href>` or `<button>` is one whole-card control: it takes the
|
|
2620
|
+
control-grade edge, the brand hover and press edge, `--lr-card-interactive-hover-shadow`,
|
|
2621
|
+
`--lr-card-interactive-hover-transform` and an inset focus ring. Content is padded by
|
|
2622
|
+
`--lr-card-body-padding` (default `--lr-space-m`). The accent stripe is on the inline start
|
|
2623
|
+
edge, so it moves to the right under `dir="rtl"`.
|
|
2624
|
+
- **Type comes from the tokens.** Both use the Lyra font as the components do, and a button takes
|
|
2625
|
+
its type size from the size step and weight from `--lr-button-font-weight`, so `lr-text-*` and
|
|
2626
|
+
`lr-font-*` do not change it. `lr-radius-*` and the case classes still apply on top.
|
|
2627
|
+
- Load `theme.css` or `tokens-root.css` with `utilities.css` so the tokens resolve before any
|
|
2628
|
+
component connects; every value also has a fallback.
|
|
2629
|
+
- The slotted structure of the components (header, footer, media, start and end slots, caret,
|
|
2630
|
+
loading spinner, `appearance="link"` and `"quiet"`) has no class. Use the components where you need
|
|
2631
|
+
it.
|
|
2632
|
+
|
|
2521
2633
|
### Typography
|
|
2522
2634
|
|
|
2523
2635
|
`utilities.css` also carries an opt-in typography look for light-DOM content. Nothing changes for
|
|
@@ -2851,15 +2963,27 @@ because it is as likely your own class as an upstream one.
|
|
|
2851
2963
|
| `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` |
|
|
2852
2964
|
| `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 |
|
|
2853
2965
|
| `wa-brand`, `wa-neutral`, `wa-success`, `wa-warning`, `wa-danger`, `wa-size-*` | `lr-brand`, `lr-neutral`, `lr-success`, `lr-warning`, `lr-danger`, `lr-size-*` |
|
|
2966
|
+
| `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` |
|
|
2854
2967
|
| `wa-dark`, `wa-light`, `sl-theme-dark`, `sl-theme-light` | `lr-dark`, `lr-light` |
|
|
2855
2968
|
|
|
2856
2969
|
`wa-font-size-*`, `wa-body-*` and `wa-border-radius-s`/`-m` rewrite to the nearest class
|
|
2857
2970
|
(`lr-text-*`, `lr-radius-*`) and report `UPSTREAM_CLASS_APPROXIMATE_REVIEW`: the type and radius scales
|
|
2858
2971
|
are not value-aligned. `wa-heading-*`, `wa-caption-*`, `wa-longform-*`, the hue-pinned variants
|
|
2859
|
-
(`wa-brand-blue`), `wa-theme-*`, the `native.css` opt-ins (`wa-
|
|
2972
|
+
(`wa-brand-blue`), `wa-theme-*`, the `native.css` validity opt-ins (`wa-valid`, `wa-invalid`), the
|
|
2860
2973
|
`wa-form-control-*` classes and the gaps Lyra has no step for are reported as `UPSTREAM_CLASS_REVIEW`
|
|
2861
2974
|
with the nearest alternative and are not rewritten.
|
|
2862
2975
|
|
|
2976
|
+
Design-token references (`var(--wa-*)`, `var(--sl-*)`) follow a reviewed route table, matched by role
|
|
2977
|
+
and resolved value rather than by name, and every target is a document-layer token. Semantic colours
|
|
2978
|
+
(`--wa-color-brand-fill-loud` becomes `--lr-color-brand-fill-loud`; surface, text, border, overlay,
|
|
2979
|
+
shadow and focus colours likewise), border widths, font families and weights, and spacing steps
|
|
2980
|
+
with the same length (`--wa-space-m` and `--sl-spacing-medium`, both 1rem, become `--lr-space-l`) are
|
|
2981
|
+
rewritten silently. Type sizes, radii, line heights, shadows, durations, easing and the Shoelace
|
|
2982
|
+
`-600` palette steps rewrite to the nearest role and report `UPSTREAM_TOKEN_APPROXIMATE_REVIEW`.
|
|
2983
|
+
A token with no equivalent (`--wa-space-2xl` at 2.5rem, numbered and hue palettes) stays as-is and is
|
|
2984
|
+
reported as `UPSTREAM_TOKEN_REVIEW` with the nearest alternatives. A token the file declares itself
|
|
2985
|
+
(`--wa-space-m: 2rem`) is treated as its own property and left alone.
|
|
2986
|
+
|
|
2863
2987
|
Stylesheet and loader imports (`import '...'` and CSS `@import`) map to real package subpaths:
|
|
2864
2988
|
`dist/styles/webawesome.css` becomes `theme.css`, `native.css` and `utilities.css`;
|
|
2865
2989
|
`styles/native.css`, `styles/utilities.css`, `styles/themes/default.css` and Shoelace
|
|
@@ -2871,6 +2995,23 @@ self-starting loaders (`webawesome.loader.js`, `shoelace-autoloader.js`) become
|
|
|
2871
2995
|
`utilities/base-path`, `layers.css`, the `awesome` and `shoelace` themes and the colour palettes have no
|
|
2872
2996
|
Lyra counterpart and are reported as `UPSTREAM_ASSET_REVIEW`.
|
|
2873
2997
|
|
|
2998
|
+
Translation imports (`dist/translations/<lang>.js`) become the matching
|
|
2999
|
+
`@aceshooting/lyra-translations/<locale>.js` catalog with Lyra's casing (`de-ch` becomes `de-CH`)
|
|
3000
|
+
and report `OPTIONAL_PEER_REQUIRED` once, because that package is an optional peer. The `en` import is
|
|
3001
|
+
removed, because English is built in. A bare `pt` or `zh` loads `pt-BR` or `zh-CN`, the region CLDR
|
|
3002
|
+
resolves it to, and reports `TRANSLATION_LOCALE_REVIEW`. A locale Lyra does not ship stays unchanged
|
|
3003
|
+
and reports `UPSTREAM_ASSET_REVIEW`.
|
|
3004
|
+
|
|
3005
|
+
Named imports from `dist/utilities/*.js` are rewritten symbol by symbol when every name has a Lyra
|
|
3006
|
+
export with the same call shape: `serialize` (`utilities/form.js`), `registerIconLibrary`,
|
|
3007
|
+
`unregisterIconLibrary`, `setDefaultIconFamily`, `getDefaultIconFamily` and `getDefaultIconVariant`
|
|
3008
|
+
(`components/utility/icon/icon-library.js`), `allDefined` (`utilities/defined.js`),
|
|
3009
|
+
`setDefaultAnimation`, `setAnimation` and `getAnimation` (`utilities/animation-registry.js`, with a
|
|
3010
|
+
`UTILITY_BEHAVIOR_REVIEW` note to check animation names), and `getAnimationNames` and
|
|
3011
|
+
`getEasingNames` (`components/media/animation/animation.class.js`). A statement that also imports
|
|
3012
|
+
an unlisted name, a type-only import or a re-export stays unchanged with
|
|
3013
|
+
`IMPORT_BINDING_REVIEW_REQUIRED`.
|
|
3014
|
+
|
|
2874
3015
|
### Hue palette
|
|
2875
3016
|
|
|
2876
3017
|
```css
|
|
@@ -2965,6 +3106,11 @@ writing direction remain live references: loading or extending the parent later
|
|
|
2965
3106
|
components. Ordinary `registerLyraLocale()` calls can extend the delta without discarding its
|
|
2966
3107
|
parent. Self-references, cycles and parent chains beyond 32 edges reject before changing the outer
|
|
2967
3108
|
registration. Delta catalogs do not become reverse fallbacks for another tag sharing the language.
|
|
3109
|
+
|
|
3110
|
+
The full fallback chain (truncation, implied script, regional siblings and delta parents) is
|
|
3111
|
+
installed by the first registration. Until then every message is the built-in English default, so
|
|
3112
|
+
only the inherited tag itself is consulted, for plural selection and number formatting. Register
|
|
3113
|
+
catalogs before the first render, as usual, to render localized text without a re-render.
|
|
2968
3114
|
The existing complete built-in regional catalogs retain their original messages.
|
|
2969
3115
|
|
|
2970
3116
|
```js
|
|
@@ -3643,7 +3789,7 @@ page that does not use `theme.css` links `styles/tokens-root.css`, the layer alo
|
|
|
3643
3789
|
<link rel="stylesheet" href="/node_modules/@aceshooting/lyra-ui/dist/theme.css" />
|
|
3644
3790
|
```
|
|
3645
3791
|
|
|
3646
|
-
Hydration then skips the constructed copy. An application's **own** declarative shadow roots that
|
|
3792
|
+
Hydration then skips the constructed copy and never requests the layer's script. An application's **own** declarative shadow roots that
|
|
3647
3793
|
contain theme scopes (for example a `.lr-dark` region or a `data-lr-theme-scope` wrapper) include the
|
|
3648
3794
|
same `<link rel="stylesheet" href="…/tokens-root.css">` inside their template: document styles do not
|
|
3649
3795
|
reach into a shadow root until hydration adopts the layer there. Without any link and without
|
|
@@ -3672,6 +3818,43 @@ and a shadow root exists; it does not claim that server markup was observed or h
|
|
|
3672
3818
|
diagnostic's separate `mode` to distinguish the declared `render-and-hydrate` and `client-render`
|
|
3673
3819
|
tiers.
|
|
3674
3820
|
|
|
3821
|
+
**Code-split bundles must keep that order.** A bundler that splits page modules into chunks can
|
|
3822
|
+
move Lit (`lit`, `lit-html`, `lit-element`, `@lit/reactive-element`) into a shared chunk that the
|
|
3823
|
+
entry imports statically. An imported chunk evaluates before the importing chunk's own code, so Lit
|
|
3824
|
+
reads the hydrate-support hook before `hydration.js` sets it, even though the entry imports
|
|
3825
|
+
`hydration.js` first. Lyra detects that case: a host that finds a server-rendered shadow root while
|
|
3826
|
+
Lit has no hydrate support discards the server markup and renders into the same shadow root (never a
|
|
3827
|
+
second copy), and the development build warns once (`lyra-hydration:unpatched`). The page is then
|
|
3828
|
+
client-rendered rather than hydrated, so fix the order with one of these recipes:
|
|
3829
|
+
|
|
3830
|
+
- Put the hydration entry and Lit in one chunk, where modules keep their import order. With Vite 8
|
|
3831
|
+
(Rolldown):
|
|
3832
|
+
|
|
3833
|
+
```ts
|
|
3834
|
+
// vite.config.ts
|
|
3835
|
+
export default defineConfig({
|
|
3836
|
+
build: {
|
|
3837
|
+
rolldownOptions: {
|
|
3838
|
+
output: {
|
|
3839
|
+
codeSplitting: {
|
|
3840
|
+
groups: [{
|
|
3841
|
+
name: 'lit',
|
|
3842
|
+
test: /[\\/]node_modules[\\/](lit|lit-html|lit-element|@lit[\\/]reactive-element|@lit-labs[\\/]ssr-client)[\\/]|[\\/]@aceshooting[\\/]lyra-ui[\\/]dist[\\/]hydration\.js$/,
|
|
3843
|
+
}],
|
|
3844
|
+
},
|
|
3845
|
+
},
|
|
3846
|
+
},
|
|
3847
|
+
},
|
|
3848
|
+
});
|
|
3849
|
+
```
|
|
3850
|
+
|
|
3851
|
+
Rolldown's deprecated `advancedChunks` takes the same `groups`. With Rollup or Vite 7 and earlier,
|
|
3852
|
+
return `'lit'` from `build.rollupOptions.output.manualChunks(id)` for the same module ids.
|
|
3853
|
+
- Or load hydration as its own first script, so its module graph finishes evaluating before the
|
|
3854
|
+
application's starts: a separate entry containing only
|
|
3855
|
+
`import '@aceshooting/lyra-ui/hydration.js';`, referenced by a `<script type="module">` placed
|
|
3856
|
+
before the application's (module scripts without `async` run in document order).
|
|
3857
|
+
|
|
3675
3858
|
The loader preserves optional-peer isolation: import a root-excluded component's granular
|
|
3676
3859
|
registration after the loader. A fallback cannot serialize JS property bindings, so put initial
|
|
3677
3860
|
server state in attributes/light DOM or assign it client-side. A `render-and-hydrate` component
|
|
@@ -3681,6 +3864,15 @@ corrects itself on the next update, so a slotted override lands one frame after
|
|
|
3681
3864
|
browser-only mount is unaffected and renders the final result the first time. Layout/observer/canvas/media work
|
|
3682
3865
|
begins after hydration, and remote content is client-only.
|
|
3683
3866
|
|
|
3867
|
+
**Localized server output.** The server renderer gives a component no ancestors, so an ancestor
|
|
3868
|
+
`lang` (`<html lang="fr">`, `<div lang="fr">`) reaches only the browser. The server resolves
|
|
3869
|
+
messages and number/date formats from the host's own `locale`/`lang`, else the active locale. To
|
|
3870
|
+
serve translated text, import the catalog on the server and call `setLyraLocale(requestLocale)`
|
|
3871
|
+
around the render (clear it with `setLyraLocale('')` afterwards), matching the page's `lang`; also
|
|
3872
|
+
import the catalog in the browser before hydration. The hydrated page then keeps the server text
|
|
3873
|
+
with no flash. When the server rendered a different locale than the browser inherits, the
|
|
3874
|
+
hydrating render reproduces the server's text and the next update commits the inherited locale.
|
|
3875
|
+
|
|
3684
3876
|
**If hydration never runs at all** — a page that intentionally ships no script bundle, a reader
|
|
3685
3877
|
that fetches the raw HTML, or a crawler — a `render-and-hydrate` tag's declarative-shadow-DOM
|
|
3686
3878
|
output is either permanently complete and correct on its own, or only ever promised once hydration
|
|
@@ -4023,6 +4215,15 @@ files matter when scaffolding a project's editor configuration. Build tools can
|
|
|
4023
4215
|
through the explicit `@aceshooting/lyra-ide/custom-elements.json` package export; native Node ESM
|
|
4024
4216
|
uses `with { type: 'json' }` on that import.
|
|
4025
4217
|
|
|
4218
|
+
**Slim manifest in `@aceshooting/lyra-ui`.** The main package's `customElements` field points at
|
|
4219
|
+
`custom-elements.slim.json` (export `@aceshooting/lyra-ui/custom-elements.slim.json`), so Storybook,
|
|
4220
|
+
wc-toolkit and analyzers discover every tag without installing `@aceshooting/lyra-ide`. Per tag it
|
|
4221
|
+
lists attributes (name, `fieldName`, type, default), public fields and methods, events, slots, CSS
|
|
4222
|
+
parts, CSS properties and CSS states, already flattened across superclasses, with module paths at the
|
|
4223
|
+
shipped `dist/` files. It carries no descriptions, status, `since` or deprecation records and no
|
|
4224
|
+
companion-package tags; use the full `@aceshooting/lyra-ide/custom-elements.json` for those. The
|
|
4225
|
+
inheritance note below applies to the full manifest only.
|
|
4226
|
+
|
|
4026
4227
|
**Inherited members in `custom-elements.json`.** A subclass declaration's `cssParts` array is
|
|
4027
4228
|
always the complete flattened set, including everything inherited from a superclass — `::part()`
|
|
4028
4229
|
has no type-level inheritance chain a consumer could otherwise walk. `attributes`, `members`,
|
|
@@ -6182,7 +6383,7 @@ These named interfaces and helper signatures are available to typed integrations
|
|
|
6182
6383
|
Return shape of `buildLyraSsrStaticSafety()`: `classification` holds one entry per classified tag
|
|
6183
6384
|
(a tag absent from it was neither capability-bearing nor audited), and a non-empty `unaudited`
|
|
6184
6385
|
means the check must fail closed.
|
|
6185
|
-
`lyraSsrElementRenderers<T extends LyraLitElementRendererConstructor>(litElementRenderer: T):
|
|
6386
|
+
`lyraSsrElementRenderers<T extends LyraLitElementRendererConstructor>(litElementRenderer: T): [typeof LyraSsrFallbackRenderer, T]`
|
|
6186
6387
|
|
|
6187
6388
|
- **`svelte-contracts`** — Framework integration type contracts, including the multi-split
|
|
6188
6389
|
`for` launcher id and `trigger` element reference.
|