@aceshooting/lyra-ui 25.3.0 → 25.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/custom-elements.json +1 -1
  3. package/dist/cli/migration-contract.json +1 -1
  4. package/dist/components/agent-tools/browser-frame/browser-frame.styles.js +1 -1
  5. package/dist/components/charts/chart/chart-sync.d.ts +4 -0
  6. package/dist/components/charts/chart/chart-sync.js +1 -0
  7. package/dist/components/charts/chart/chart-sync.styles.d.ts +1 -0
  8. package/dist/components/charts/chart/chart-sync.styles.js +1 -0
  9. package/dist/components/charts/chart/chart.class.d.ts +12 -2
  10. package/dist/components/charts/chart/chart.class.js +5 -4
  11. package/dist/components/charts/chart/histogram.class.js +1 -1
  12. package/dist/components/charts/chart/lite-chart.class.d.ts +18 -5
  13. package/dist/components/charts/chart/lite-chart.class.js +11 -11
  14. package/dist/components/data/heatmap/heatmap-grid-navigation.d.ts +2 -2
  15. package/dist/components/data/heatmap/heatmap-grid-navigation.js +1 -1
  16. package/dist/components/data/heatmap/heatmap.class.d.ts +24 -9
  17. package/dist/components/data/heatmap/heatmap.class.js +3 -3
  18. package/dist/components/forms/button/button.styles.js +1 -1
  19. package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
  20. package/dist/components/layout/app-rail/app-rail.class.d.ts +1 -1
  21. package/dist/components/layout/app-rail/app-rail.class.js +1 -1
  22. package/dist/components/layout/card/card.styles.js +1 -1
  23. package/dist/components/layout/details/accordion-item.styles.js +1 -1
  24. package/dist/components/layout/details/details.styles.js +1 -1
  25. package/dist/components/layout/menu/menu.class.js +1 -1
  26. package/dist/components/layout/reorder-list/reorder-item.class.js +2 -0
  27. package/dist/components/media/avatar/avatar.class.d.ts +3 -0
  28. package/dist/components/media/avatar/avatar.styles.js +1 -1
  29. package/dist/components/media/pan-zoom/pan-zoom.styles.js +1 -1
  30. package/dist/framework-types.d.ts +1 -1
  31. package/dist/internal/glass-surface.styles.js +1 -1
  32. package/dist/internal/opaque-content-border.styles.d.ts +3 -0
  33. package/dist/internal/opaque-content-border.styles.js +1 -0
  34. package/dist/internal/package-metadata.d.ts +1 -1
  35. package/dist/internal/package-metadata.js +1 -1
  36. package/dist/internal/tokens.styles.js +1 -1
  37. package/dist/surfaces/glass.css +1 -1
  38. package/dist/theme.css +1 -1
  39. package/llms/components/lr-avatar.md +9 -3
  40. package/llms/components/lr-bar-chart.md +1 -1
  41. package/llms/components/lr-bubble-chart.md +1 -1
  42. package/llms/components/lr-chart.md +11 -2
  43. package/llms/components/lr-doughnut-chart.md +1 -1
  44. package/llms/components/lr-heatmap.md +16 -3
  45. package/llms/components/lr-histogram.md +9 -1
  46. package/llms/components/lr-line-chart.md +11 -1
  47. package/llms/components/lr-lite-chart.md +14 -4
  48. package/llms/components/lr-locale-picker.md +5 -5
  49. package/llms/components/lr-menu.md +4 -0
  50. package/llms/components/lr-pie-chart.md +1 -1
  51. package/llms/components/lr-polar-area-chart.md +1 -1
  52. package/llms/components/lr-radar-chart.md +1 -1
  53. package/llms/components/lr-reorder-list.md +5 -0
  54. package/llms/components/lr-scatter-chart.md +1 -1
  55. package/llms/peers.md +2 -2
  56. package/llms/shared/styles-and-tokens.md +31 -14
  57. package/llms/shared.md +31 -14
  58. package/llms/tokens.md +7 -4
  59. package/package.json +5 -5
  60. package/vscode-css-data.json +1 -1
  61. package/vscode-html-data.json +1 -1
  62. package/web-types.json +1 -1
package/llms/shared.md CHANGED
@@ -1315,7 +1315,8 @@ page you are on — that is what keeps two overlapping surfaces reading in the c
1315
1315
 
1316
1316
  ### Cascade layers
1317
1317
 
1318
- `theme.css` declares its layer order up front, then puts all of its own tokens in `lr-theme`:
1318
+ `theme.css` declares its layer order up front, with base inputs in `lr-theme` and built-in profile
1319
+ rules in the `lr-theme-preset` sublayers:
1319
1320
 
1320
1321
  ```css
1321
1322
  @layer lr-base, lr-theme, lr-theme-preset, lr-utilities, lr-overrides;
@@ -1323,9 +1324,10 @@ page you are on — that is what keeps two overlapping surfaces reading in the c
1323
1324
 
1324
1325
  - **`lr-base`** — contains the explicitly scoped native-element rules only when the optional
1325
1326
  `native.css` asset is imported.
1326
- - **`lr-theme`** — where every `--lr-theme-*` token `theme.css` ships is declared.
1327
- - **`lr-theme-preset`** — the compatibility layer name that holds optional look stylesheets, such as
1328
- [`looks/shadcn.css`](#the-shadcn-look--looksshadcncss). Empty unless one is imported.
1327
+ - **`lr-theme`** — contains the base theme inputs and token resolvers.
1328
+ - **`lr-theme-preset`** — the compatibility layer name for look, density, surface, accent and mode
1329
+ rules. `theme.css` already supplies the built-in Shadcn, Glass and Emerald profile here; optional
1330
+ look stylesheets add their own rules to the same sublayers.
1329
1331
  - **`lr-utilities`** — contains exact `lr-*` classes only when the optional `utilities.css` asset is
1330
1332
  imported.
1331
1333
  - **`lr-overrides`** — named so an application can opt its own rules into a defined position
@@ -1384,17 +1386,25 @@ reason.
1384
1386
 
1385
1387
  ### The shadcn look — looks/shadcn.css
1386
1388
 
1387
- Import the base resolver and the optional look stylesheet, then select the look on the scope that should receive it:
1389
+ `theme.css` already installs Shadcn as the built-in default and supports explicit
1390
+ `data-lr-look="shadcn"` scopes. Import it once; the separate Shadcn sheet is unnecessary for this
1391
+ profile:
1388
1392
 
1389
1393
  ~~~ts
1390
1394
  import "@aceshooting/lyra-ui/theme.css";
1391
- import "@aceshooting/lyra-ui/looks/shadcn.css";
1392
1395
  import { setLyraStyle } from "@aceshooting/lyra-ui/theme.js";
1393
1396
 
1394
1397
  setLyraStyle({ look: "shadcn" });
1395
1398
  ~~~
1396
1399
 
1397
- The stylesheet declares values only under data-lr-look="shadcn". It composes with the independent mode, surface, density, and accent axes. For a local region, set data-lr-look="shadcn" on that region or use applyLyraStyleScope(). A nested data-lr-mode="dark" still changes mode without changing the look.
1400
+ Shadcn composes with the independent mode, surface, density and accent axes. For a local region,
1401
+ set data-lr-look="shadcn" on that region or use applyLyraStyleScope(). A nested data-lr-mode="dark"
1402
+ still changes mode without changing the look.
1403
+
1404
+ The separate `looks/shadcn.css` sheet remains compatible. Besides the same scoped look values, it
1405
+ adds legacy `.light` and `.dark` mode aliases inside a Shadcn scope. Import that sheet only when
1406
+ those aliases are needed; prefer `data-lr-mode`, `data-lr-theme` or `.lr-light`/`.lr-dark` for new
1407
+ code. Explicit Lyra mode selectors on the same element take precedence over the compatibility aliases.
1398
1408
 
1399
1409
  The look sets --lr-theme-* inputs, so no component API changes. Its rules use Lyra's named cascade layers: unlayered application rules still win, and runtime accent ramps still take precedence over look values for the roles they paint. Import order between theme.css and looks/shadcn.css does not change the layer order.
1400
1410
 
@@ -1412,7 +1422,9 @@ Override the look through an unlayered application rule or the lr-overrides laye
1412
1422
  }
1413
1423
  ~~~
1414
1424
 
1415
- The former global themes/shadcn.css facade and its data-lr-theme-preset behavior have been removed. Use looks/shadcn.css and the data-lr-look axis for new styling.
1425
+ The former global themes/shadcn.css facade and its data-lr-theme-preset behavior have been removed.
1426
+ Use theme.css and the data-lr-look axis for new styling; looks/shadcn.css is needed only for the
1427
+ compatibility aliases above.
1416
1428
 
1417
1429
  ### Where an override actually reaches
1418
1430
 
@@ -1655,7 +1667,7 @@ bytes; build plugins must not prepend the bootstrap ahead of it.
1655
1667
 
1656
1668
  For a strict CSP that disallows inline scripts, the package also publishes theme-bootstrap.js, a classic script asset with identical bytes. Load it synchronously after the charset declaration and before stylesheets. Its optional data-lr-theme-storage-key and data-lr-theme-attributes attributes select an application-owned storage key or mode-attribute list; values are validated and fall back to defaults when invalid.
1657
1669
 
1658
- **Migrating the retired theme facade.** New code uses setLyraStyle() and getLyraStyle(). Map old auto mode to system, an old surface reference color to accentBackground, and an old token map to overrides; review custom CSS colors that share a gemstone name before choosing a named accent. Replace preset definitions with a LyraLook plus explicit style choices. Replace selectors for data-lr-theme-preset with the actual axis they need, such as data-lr-look="shadcn". Import looks/shadcn.css in place of the removed fixed themes/shadcn.css facade and select the look with setLyraStyle({ look: "shadcn" }) or a scoped data-lr-look attribute. Listen for lr-style-change and read event.detail.style and event.detail.changed; the old theme and preset events are no longer emitted. For the complete project-by-project sequence, see [Upgrading from v23 to v24](v23-to-v24-migration.md).
1670
+ **Migrating the retired theme facade.** New code uses setLyraStyle() and getLyraStyle(). Map old auto mode to system, an old surface reference color to accentBackground, and an old token map to overrides; review custom CSS colors that share a gemstone name before choosing a named accent. Replace preset definitions with a LyraLook plus explicit style choices. Replace selectors for data-lr-theme-preset with the actual axis they need, such as data-lr-look="shadcn". Import theme.css in place of the removed fixed themes/shadcn.css facade and select the look with setLyraStyle({ look: "shadcn" }) or a scoped data-lr-look attribute. Listen for lr-style-change and read event.detail.style and event.detail.changed; the old theme and preset events are no longer emitted. For the complete project-by-project sequence, see [Upgrading from v23 to v24](v23-to-v24-migration.md).
1659
1671
 
1660
1672
  Historical v1 stored records remain readable by the runtime and bootstrap. The removed JavaScript functions, preset subpaths, preset event, root marker, and fixed stylesheet are not available in the current API.
1661
1673
 
@@ -5547,10 +5559,8 @@ mode and accent; the axes compose independently.
5547
5559
 
5548
5560
  ```js
5549
5561
  import '@aceshooting/lyra-ui/theme.css';
5550
- import '@aceshooting/lyra-ui/looks/shadcn.css';
5551
5562
  import '@aceshooting/lyra-ui/looks/material.css';
5552
5563
  import '@aceshooting/lyra-ui/density.css';
5553
- import '@aceshooting/lyra-ui/surfaces/glass.css';
5554
5564
  import '@aceshooting/lyra-ui/accents.css';
5555
5565
  import { setLyraStyle, resetLyraStyle, applyLyraStyleScope } from '@aceshooting/lyra-ui/theme.js';
5556
5566
 
@@ -5568,7 +5578,8 @@ inherit), without persistence or global events; clearing preserves later author
5568
5578
  reports requested axes and resolved mode.
5569
5579
 
5570
5580
  Set `data-lr-look`, `data-lr-surface`, `data-lr-density`, `data-lr-mode` and `data-lr-accent`
5571
- directly if needed. Stylesheet look ids need their sheet; arbitrary ids neither load nor register.
5581
+ directly if needed. Shadcn and Lyra are included in `theme.css`; other stylesheet look ids need
5582
+ their optional sheet. Arbitrary ids neither load nor register.
5572
5583
  `defineLyraLook({ id, tokens })` defines a validated immutable runtime look;
5573
5584
  `lyraLookCss()` from `theme/look-css.js` creates CSS without DOM access. In app-owned shadow roots
5574
5585
  with local boundaries, install `theme.css` and selected sheets; selectors stop at roots, inheritance
@@ -5774,12 +5785,18 @@ The public `--lr-theme-surface-opacity` input accepts 0 through 1. Lower opacity
5774
5785
  of the backdrop; the default foreground qualification covers 70%, while a custom lower setting
5775
5786
  cannot guarantee contrast against every backdrop. Solid and accessibility preferences retain
5776
5787
  opaque fills regardless of this input.
5777
- Quiet text, necessary control edges, focus indicators and transparent actions gain a local
5788
+ Necessary control borders use the effective painted opacity: their glass adjustment grows as
5789
+ transparency increases and disappears at 100% opacity. Ordinary and strong borders share this
5790
+ adjustment; decorative borders and explicit component border overrides keep their own tokens.
5791
+ Quiet text, focus indicators and transparent actions retain their separate local
5778
5792
  contrast-qualified foreground; opaque accent fills retain their own on-colours. Supported chrome
5779
5793
  includes app rails, navigation menus, menubars, menus and their context-menu composition, popovers,
5780
5794
  selection toolbars, toast items and the owned playback-rate toolbar of `lr-av-player`. Nested glass
5781
5795
  chrome is opaque, preventing repeated blur. Independently promoted menus and modal panels start a
5782
- new material root. Content cards and editing fields remain opaque.
5796
+ new material root. Surface-colored outlined card and disclosure interiors let nested Lyra
5797
+ controls use their solid border colors while preserving the enclosing edge against glass.
5798
+ Filled accent interiors retain qualification. Native descendants retain inherited public color
5799
+ aliases. Custom translucent content fills require the author to choose suitable control borders.
5783
5800
  A design panel can offer a Glass opacity range from 0–100%, shown when the selected surface is
5784
5801
  Glass. Start and reset it at 70%; convert the displayed percentage to the public token's 0–1 range.
5785
5802
  Apply this CSS input independently of look overrides: `setLyraStyle()` does not accept surface
package/llms/tokens.md CHANGED
@@ -12,10 +12,13 @@ Every `lr-*` component resolves its styling through this two-layer token system,
12
12
  with a built-in fallback. Other tokens are aliases, computed or environment-backed values,
13
13
  or fixed contract constants. Every component renders correctly with no theme configured.
14
14
 
15
- For a ready-made light/dark base, import `@aceshooting/lyra-ui/theme.css` once and put
16
- `class="lr-light"`/`class="lr-dark"` (or `data-lr-theme="light"`/`"dark"`) on an ancestor.
17
- For the shadcn/ui look, also import `@aceshooting/lyra-ui/looks/shadcn.css` and select
18
- `data-lr-look="shadcn"` on the root or a scoped ancestor; look and mode remain independent.
15
+ Import `@aceshooting/lyra-ui/theme.css` once for the built-in Shadcn, Glass and Emerald profile.
16
+ `theme.css` already includes Shadcn; no separate Shadcn look import is required.
17
+ Select `data-lr-look="shadcn"` on a scoped ancestor when needed. Choose light/dark mode with
18
+ `class="lr-light"`/`class="lr-dark"`, `data-lr-theme`, or the independent `data-lr-mode` axis.
19
+ Other stylesheet looks, such as Material, require their optional `looks/<look>.css` sheet.
20
+ The separate `looks/shadcn.css` sheet remains optional for its scoped `.light`/`.dark`
21
+ compatibility aliases; look and mode remain independent.
19
22
  See [Styles and tokens](./shared/styles-and-tokens.md) for runtime and stylesheet options.
20
23
  Per-component `--lr-<component>-*` custom properties (listed in each component's own section)
21
24
  override a single element without touching the shared layer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "25.3.0",
3
+ "version": "25.4.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",
@@ -11690,7 +11690,7 @@
11690
11690
  "emoji-picker-element-data": "^1.8.0",
11691
11691
  "epubjs": "^0.3.93",
11692
11692
  "ical.js": "^2.2.1",
11693
- "katex": "^0.18.4",
11693
+ "katex": "^0.18.4 || ^0.19.0",
11694
11694
  "libphonenumber-js": ">=1.11.0 <2",
11695
11695
  "mammoth": "^1.12.1",
11696
11696
  "maplibre-gl": ">=5 <7",
@@ -11832,7 +11832,7 @@
11832
11832
  "istanbul-lib-report": "^3.0.1",
11833
11833
  "istanbul-reports": "^3.2.0",
11834
11834
  "jszip": "^3.10.2",
11835
- "katex": "^0.18.9",
11835
+ "katex": "^0.19.0",
11836
11836
  "libphonenumber-js": "^1.13.14",
11837
11837
  "mammoth": "^1.13.0",
11838
11838
  "maplibre-gl": "^6.11.2",
@@ -11843,10 +11843,10 @@
11843
11843
  "pixelmatch": "^7.2.0",
11844
11844
  "playwright": "^1.63.0",
11845
11845
  "pngjs": "^7.0.0",
11846
- "postal-mime": "^4.0.1",
11846
+ "postal-mime": "^4.0.2",
11847
11847
  "qrcode": "^1.5.4",
11848
11848
  "react": "^19.3.0",
11849
- "shiki": "^4.4.3",
11849
+ "shiki": "^4.5.0",
11850
11850
  "svelte": "^5.57.1",
11851
11851
  "typescript": "^7.0.2",
11852
11852
  "vue": "^3.5.43",