@aceshooting/lyra-ui 33.0.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/llms/shared.md CHANGED
@@ -2511,6 +2511,7 @@ the first connected Lyra element would otherwise adopt, available before any com
2511
2511
  | Plain-element helpers | `lr-link-plain`, `lr-list-plain`, `lr-placeholder`, `lr-scroll-lock`, `lr-cloak` |
2512
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` |
2513
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`) |
2514
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` |
2515
2516
  | Overflow | `lr-overflow-auto`, `lr-overflow-hidden` |
2516
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` |
@@ -2560,8 +2561,8 @@ All spacing here reads `--lr-layout-gap` (default `--lr-space-m`).
2560
2561
  `lr-lowercase`, `lr-capitalize`, `lr-normal-case`** set `text-transform`.
2561
2562
  - **Variants** `lr-neutral|brand|success|warning|danger` (the `variant` vocabulary) colour the
2562
2563
  element's text and native-control accent with that tone's loud fill and publish
2563
- `--lr-variant-fill-quiet`, `--lr-variant-fill-loud`, `--lr-variant-on-quiet` and
2564
- `--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;
2565
2566
  `small`/`medium`/`large` spellings are not classes) set the type size and scale the native control
2566
2567
  block size and padding that `.lr-native` reads.
2567
2568
  - **`lr-scroll-lock`** is pure CSS (`overflow: hidden`, `overscroll-behavior: contain`, plus a stable
@@ -2583,6 +2584,52 @@ The Page helpers key off the reflected `view` state of their containing `<lr-pag
2583
2584
  `lr-page-mobile-only` is hidden for `view="desktop"`, and `lr-page-desktop-only` is hidden for
2584
2585
  `view="mobile"`. Page derives that state from its own allocated inline size, not the viewport.
2585
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
+
2586
2633
  ### Typography
2587
2634
 
2588
2635
  `utilities.css` also carries an opt-in typography look for light-DOM content. Nothing changes for
@@ -2916,12 +2963,13 @@ because it is as likely your own class as an upstream one.
2916
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` |
2917
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 |
2918
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` |
2919
2967
  | `wa-dark`, `wa-light`, `sl-theme-dark`, `sl-theme-light` | `lr-dark`, `lr-light` |
2920
2968
 
2921
2969
  `wa-font-size-*`, `wa-body-*` and `wa-border-radius-s`/`-m` rewrite to the nearest class
2922
2970
  (`lr-text-*`, `lr-radius-*`) and report `UPSTREAM_CLASS_APPROXIMATE_REVIEW`: the type and radius scales
2923
2971
  are not value-aligned. `wa-heading-*`, `wa-caption-*`, `wa-longform-*`, the hue-pinned variants
2924
- (`wa-brand-blue`), `wa-theme-*`, the `native.css` opt-ins (`wa-button`, `wa-zebra-rows`, ...), the
2972
+ (`wa-brand-blue`), `wa-theme-*`, the `native.css` validity opt-ins (`wa-valid`, `wa-invalid`), the
2925
2973
  `wa-form-control-*` classes and the gaps Lyra has no step for are reported as `UPSTREAM_CLASS_REVIEW`
2926
2974
  with the nearest alternative and are not rewritten.
2927
2975
 
@@ -3770,6 +3818,43 @@ and a shadow root exists; it does not claim that server markup was observed or h
3770
3818
  diagnostic's separate `mode` to distinguish the declared `render-and-hydrate` and `client-render`
3771
3819
  tiers.
3772
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
+
3773
3858
  The loader preserves optional-peer isolation: import a root-excluded component's granular
3774
3859
  registration after the loader. A fallback cannot serialize JS property bindings, so put initial
3775
3860
  server state in attributes/light DOM or assign it client-side. A `render-and-hydrate` component
@@ -6298,7 +6383,7 @@ These named interfaces and helper signatures are available to typed integrations
6298
6383
  Return shape of `buildLyraSsrStaticSafety()`: `classification` holds one entry per classified tag
6299
6384
  (a tag absent from it was neither capability-bearing nor audited), and a non-empty `unaudited`
6300
6385
  means the check must fail closed.
6301
- `lyraSsrElementRenderers<T extends LyraLitElementRendererConstructor>(litElementRenderer: T): readonly [typeof LyraSsrFallbackRenderer, T]`
6386
+ `lyraSsrElementRenderers<T extends LyraLitElementRendererConstructor>(litElementRenderer: T): [typeof LyraSsrFallbackRenderer, T]`
6302
6387
 
6303
6388
  - **`svelte-contracts`** — Framework integration type contracts, including the multi-split
6304
6389
  `for` launcher id and `trigger` element reference.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "33.0.0",
3
+ "version": "33.1.0",
4
4
  "description": "Free, independent Lit web components: an open-source alternative to Shoelace and Web Awesome with accessible forms, dashboards, charts, and agent UI.",
5
5
  "keywords": [
6
6
  "web-components",
@@ -2103,7 +2103,7 @@
2103
2103
  "@aceshooting/lyra-3d": "^1.2.0",
2104
2104
  "@aceshooting/lyra-flags": "^2.3.1",
2105
2105
  "@aceshooting/lyra-map": "^1.5.2 || ^2.0.0",
2106
- "@aceshooting/lyra-translations": "^33.0.0",
2106
+ "@aceshooting/lyra-translations": "^33.1.0",
2107
2107
  "@aiden0z/pptx-renderer": "^1.4.0",
2108
2108
  "@sgratzl/chartjs-chart-boxplot": "^4.0.0",
2109
2109
  "chart.js": "^4.0.1",
@@ -2283,7 +2283,7 @@
2283
2283
  "mammoth": "^1.13.0",
2284
2284
  "maplibre-gl": "^6.19.0",
2285
2285
  "marked": "^18.2.1",
2286
- "oxc-parser": "^0.159.0",
2286
+ "oxc-parser": "^0.160.0",
2287
2287
  "papaparse": "^5.7.1",
2288
2288
  "pdfjs-dist": "^6.5.438",
2289
2289
  "pixelmatch": "^8.0.0",
@@ -12,7 +12,7 @@ routes cover the experimental DOCX editor, generated views, flag assets, locale
12
12
 
13
13
  Appearance defaults and the optional spotlights, gemstone selector, 44px mode/design/flag-language
14
14
  controls and persistence recipe are owned by the sibling `lyra-ui` skill ("Appearance defaults") and the
15
- [Lyra signature starter](https://github.com/aceshooting/lyra-ui/blob/lyra-ui@33.0.0/packages/lyra-ui/llms/shared/styles-and-tokens.md#lyra-signature-starter);
15
+ [Lyra signature starter](https://github.com/aceshooting/lyra-ui/blob/lyra-ui@33.1.0/packages/lyra-ui/llms/shared/styles-and-tokens.md#lyra-signature-starter);
16
16
  older releases have different defaults, so read the installed `llms/shared/styles-and-tokens.md`.
17
17
  Language menus keep flags and readable localized names. Preserve saved preferences and branding, and
18
18
  retheme an existing app only within an authorized migration or redesign.
@@ -70,7 +70,7 @@ density. Preserve saved style/locale choices and explicit project branding; rest
70
70
  only inside an authorized migration or redesign. To keep the pre-default look select
71
71
  `look: 'lyra'`, `surface: 'solid'`, `accent: null` explicitly (`accent: null` clears;
72
72
  `resetLyraStyle()` restores Emerald). Read the
73
- [Lyra signature starter](https://github.com/aceshooting/lyra-ui/blob/lyra-ui@33.0.0/packages/lyra-ui/llms/shared/styles-and-tokens.md#lyra-signature-starter) before
73
+ [Lyra signature starter](https://github.com/aceshooting/lyra-ui/blob/lyra-ui@33.1.0/packages/lyra-ui/llms/shared/styles-and-tokens.md#lyra-signature-starter) before
74
74
  changing startup or persistence.
75
75
 
76
76
  ## Companion packages