@aceshooting/lyra-ui 10.0.1 → 11.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/custom-elements.json +1 -1
  3. package/design-tokens.json +13 -0
  4. package/dist/cli/migrate-wa.mjs +164 -1
  5. package/dist/cli/migration-contract.json +1 -1
  6. package/dist/components/charts/chart/box-plot.class.d.ts +27 -0
  7. package/dist/components/charts/chart/box-plot.class.js +14 -4
  8. package/dist/components/charts/chart/box-plot.styles.js +28 -0
  9. package/dist/components/charts/chart/chart.class.d.ts +27 -0
  10. package/dist/components/charts/chart/chart.class.js +15 -5
  11. package/dist/components/charts/chart/chart.styles.js +28 -0
  12. package/dist/components/data/heatmap/heatmap.class.d.ts +35 -2
  13. package/dist/components/data/heatmap/heatmap.class.js +2 -2
  14. package/dist/components/forms/combobox/combobox.class.d.ts +71 -3
  15. package/dist/components/forms/combobox/combobox.class.js +4 -2
  16. package/dist/components/forms/combobox/combobox.styles.js +9 -0
  17. package/dist/components/forms/date-picker/date-picker.class.d.ts +46 -0
  18. package/dist/components/forms/date-picker/date-picker.class.js +15 -3
  19. package/dist/components/forms/date-picker/date-picker.styles.js +46 -0
  20. package/dist/components/media/flag/flag.class.d.ts +3 -1
  21. package/dist/components/media/flag/flag.class.js +1 -1
  22. package/dist/components/media/map/map.class.d.ts +39 -2
  23. package/dist/components/media/map/map.class.js +1 -1
  24. package/dist/components/overlays/dialog/dialog.class.d.ts +20 -0
  25. package/dist/components/overlays/overlay/popover.class.d.ts +19 -3
  26. package/dist/components/overlays/overlay/popover.class.js +1 -1
  27. package/dist/custom-elements-jsx.d.ts +27 -14
  28. package/dist/internal/package-metadata.d.ts +1 -1
  29. package/dist/internal/package-metadata.js +1 -1
  30. package/dist/internal/tokens.styles.js +1 -0
  31. package/dist/lyra.d.ts +1 -1
  32. package/dist/svelte.d.ts +27 -14
  33. package/dist/vue.d.ts +27 -14
  34. package/llms/components/lr-bar-chart.md +4 -3
  35. package/llms/components/lr-box-plot.md +14 -3
  36. package/llms/components/lr-bubble-chart.md +4 -3
  37. package/llms/components/lr-chart.md +13 -3
  38. package/llms/components/lr-combobox.md +42 -6
  39. package/llms/components/lr-date-input.md +22 -2
  40. package/llms/components/lr-date-picker.md +23 -3
  41. package/llms/components/lr-dialog.md +2 -1
  42. package/llms/components/lr-doughnut-chart.md +4 -3
  43. package/llms/components/lr-flag.md +10 -3
  44. package/llms/components/lr-heatmap.md +20 -2
  45. package/llms/components/lr-histogram.md +4 -3
  46. package/llms/components/lr-line-chart.md +4 -3
  47. package/llms/components/lr-map.md +21 -4
  48. package/llms/components/lr-option.md +41 -5
  49. package/llms/components/lr-pie-chart.md +4 -3
  50. package/llms/components/lr-polar-area-chart.md +4 -3
  51. package/llms/components/lr-popover.md +20 -1
  52. package/llms/components/lr-radar-chart.md +4 -3
  53. package/llms/components/lr-scatter-chart.md +4 -3
  54. package/llms/tokens.md +15 -1
  55. package/llms-full.txt +197 -26
  56. package/package.json +1 -1
  57. package/vscode-css-data.json +56 -0
  58. package/vscode-html-data.json +115 -18
  59. package/web-types.json +162 -21
package/llms-full.txt CHANGED
@@ -4041,6 +4041,24 @@ An `lr-option` row remains bounded by its owning listbox: the default label elli
4041
4041
  `start`/`end` (or `prefix`/`suffix`) adornment is capped at 40% of the row. Unbroken metadata
4042
4042
  therefore cannot widen a 320px LTR or RTL picker.
4043
4043
 
4044
+ **Adornments in the popup (fixed in 10.1.0).** Before 10.1.0 this paragraph described behavior the
4045
+ code did not have: `lr-combobox` builds its popup from normalized row *data* rather than from the
4046
+ light-DOM nodes, so a slotted `start`/`end`/`prefix`/`suffix` adornment had nowhere to land and
4047
+ simply never rendered — the documented slots and their documented parts were both dead inside the
4048
+ one component `lr-option` exists to feed. They now render. The nodes are **cloned** into the row
4049
+ (`option-start` / `option-end` parts, inert and `aria-hidden`, so they never join the option's
4050
+ accessible name), which means the author's own `<lr-option>` subtree is left exactly where they put
4051
+ it rather than being moved into a shadow root as a side effect of opening a dropdown:
4052
+
4053
+ ```html
4054
+ <lr-combobox label="Country">
4055
+ <lr-option value="fr"><lr-flag slot="start" country="fr"></lr-flag>France</lr-option>
4056
+ <lr-option value="mt"><lr-flag slot="start" country="mt"></lr-flag>Malta</lr-option>
4057
+ </lr-combobox>
4058
+ ```
4059
+
4060
+ An async `source` row can carry the same two fields (`start`, `end`) alongside its existing `icon`.
4061
+
4044
4062
  ### `lr-combobox`
4045
4063
 
4046
4064
  **Properties:**
@@ -4107,8 +4125,21 @@ therefore cannot widen a 320px LTR or RTL picker.
4107
4125
  mapped IDLs `inputmode` and `enterkeyhint` delegate to the corresponding camel-case native
4108
4126
  properties
4109
4127
  - `inputValue: string` — the live filter input text; programmatic writes are event-silent
4110
- - `maxOptionsVisible: number = 3` (attribute `max-options-visible` — caps how many selected tags
4111
- show before collapsing to `+N`)
4128
+ - `maxOptionsVisible: number = 3` (attribute `max-options-visible` — caps how many selected **tags**
4129
+ show before collapsing to `+N`; nothing to do with the suggestion list, see the three-caps note
4130
+ below)
4131
+ - `visibleOptions?: number` (attribute `visible-options`, new in 10.1.0) — bounds the popup to about
4132
+ this many suggestion rows, leaving the rest reachable by scrolling. Purely presentational: every
4133
+ row is still rendered. Measured from where row N actually starts rather than computed from a
4134
+ token, because a row's height varies with `sub` lines, adornments and group labels. Unset imposes
4135
+ no bound of its own and the listbox keeps exactly its previous max-height behavior; zero,
4136
+ negative, and non-finite values normalize to unset rather than collapsing the popup
4137
+
4138
+ **The three caps, which are easy to confuse.** `visibleOptions` caps how many suggestion rows are
4139
+ *visible* (presentation; the rest scroll). `maxRender` caps how many suggestion rows are *rendered
4140
+ at all* (performance; the rest do not exist and are summarized by `option-overflow`).
4141
+ `maxOptionsVisible` caps how many *selected tags* show in multi-select and never touches the
4142
+ suggestion list.
4112
4143
  - `emptyText?: string` (attribute `empty-text`) — omission displays localized `noMatches` (`"No
4113
4144
  matches"` in the built-in English locale); any supplied string, including `''`, renders verbatim
4114
4145
  - `loadingText?: string` (attribute `loading-text`) — shown while a `source` fetch is in flight;
@@ -4171,9 +4202,12 @@ every selection change and a `form.reset()` — like a native control, only anot
4171
4202
  **8.0 migration:** the former camel-case string property `autoCorrect` is not retained as a public
4172
4203
  alias. Set the boolean `autocorrect` IDL, or use `autocorrect="on"` / `autocorrect="off"` in markup.
4173
4204
 
4174
- `ComboboxSourceRow = { readonly value: string; readonly label: string; readonly sub?: string; readonly icon?: unknown; readonly badge?: string |
4205
+ `ComboboxSourceRow = { readonly value: string; readonly label: string; readonly sub?: string; readonly icon?: unknown; readonly start?: unknown;
4206
+ readonly end?: unknown; readonly badge?: string |
4175
4207
  number; accessibleLabel?: string; data?: unknown; dotColor?: string; group?: string; disabled?:
4176
- boolean }` — the row shape used by the async `source` path. `icon` renders as a decorative leading
4208
+ boolean }` — the row shape used by the async `source` path. `start` and `end` (new in 10.1.0) are
4209
+ the async counterparts of `<lr-option>`'s `start`/`end` adornment slots and render as the
4210
+ `option-start` / `option-end` parts, inert and aria-hidden exactly like `icon`. `icon` renders as a decorative leading
4177
4211
  visual whose rendered subtree stays visible but is inert and hidden from assistive technology;
4178
4212
  put independent actions outside it. `badge` renders as trailing metadata, `accessibleLabel` can
4179
4213
  provide richer spoken text than the visible label, and `data` is retained without being rendered
@@ -4281,7 +4315,9 @@ adornment-slot wrappers, each `hidden` while nothing is slotted into it), `tags`
4281
4315
  `lr-emoji-picker` so one rule styles every grouped list; it labels the `role="group"` wrapper here),
4282
4316
  `option`,
4283
4317
  `option-dot` (the leading status dot, when a row's `dotColor` is set), `option-icon` (the inert,
4284
- aria-hidden decorative leading visual for an async row), `option-label`, `option-sub` (a row's
4318
+ aria-hidden decorative leading visual for an async row), `option-start` and `option-end` (the inert,
4319
+ aria-hidden adornments cloned from the source option's `start`/`prefix` and `end`/`suffix` slots, or
4320
+ from an async row's `start`/`end`), `option-label`, `option-sub` (a row's
4285
4321
  secondary line, when `sub` is set), `option-badge` (an async row's trailing metadata),
4286
4322
  `option-overflow` (the "+N more" indicator from `maxRender`), `error`, `hint`
4287
4323
 
@@ -4803,9 +4839,22 @@ Arabic/Persian display round-trips to the same ISO value.
4803
4839
  Inline month-grid calendar, not form-associated (used standalone or embedded inside
4804
4840
  `lr-date-input`'s popover).
4805
4841
 
4806
- **Properties (27):**
4842
+ **Properties (28):**
4807
4843
 
4808
4844
  - `dayContent` (JS only): `LyraDatePickerDayContent | undefined`
4845
+ - `presets: LyraDateRangePreset[] = []` (JS only, new in 10.1.0) —
4846
+ `LyraDateRangePreset { label: string; start: string; end: string }`, where `start`/`end` are ISO
4847
+ `YYYY-MM-DD`. Renders a `[part="presets"]` quick-range button row above the calendar, for the
4848
+ dashboard time-filter shape (Today / Last 7 days / Last 30 days / This month / All time).
4849
+ **Range mode only** — a preset names two dates, so it is ignored for a single-date picker rather
4850
+ than rendering a row that cannot do anything; unset renders nothing at all. Applying one commits
4851
+ through the same path a two-click selection uses, so the ISO serialization, the `min`/`max`
4852
+ clamping and the `input`-then-`change` pair are identical and a consumer's change handler cannot
4853
+ tell them apart. A reversed preset normalizes; a malformed one is ignored rather than clearing the
4854
+ current value, so a bad entry in a config-driven list never reads as "the user picked nothing".
4855
+ The active button carries `aria-pressed="true"` and `data-active`. Deliberately the same
4856
+ `label`/`start`/`end` shape as `<lr-time-range>`'s `TimeRangePreset`, so the library has one
4857
+ preset vocabulary rather than two — the only difference is the unit (ISO dates, not numbers)
4809
4858
  - `disabled: boolean = false` (reflected)
4810
4859
  - `disabledDates: string | string[] | Date[] = ''` (attribute `disabled-dates`)
4811
4860
  - `disabledDaysOfWeek: string = ''` (attribute `disabled-days-of-week`)
@@ -4857,11 +4906,13 @@ values. `lr-focus-day` carries `{ date: Date }`, and `lr-view-change` carries `{
4857
4906
 
4858
4907
  **Custom states:** `disabled`, `range`, and `readonly`.
4859
4908
 
4860
- **CSS parts (35):** `date-picker` / permanent compatibility name `base` (tokens on the same
4909
+ **CSS parts (37):** `date-picker` / permanent compatibility name `base` (tokens on the same
4861
4910
  visible shell; both names remain supported), `day`, `day-disabled`, `day-label`, `day-outside`,
4862
4911
  `day-placeholder`, `day-range-end`, `day-range-inner`, `day-range-preview`, `day-range-start`,
4863
4912
  `day-selected`, `day-today`, `day-weekend`, `footer`, `grid`, `header`, `month`, `month-label`,
4864
4913
  `months`, `nav`, `next`, `previous`, `title`, `view-cell`, `view-grid`, `view-item`,
4914
+ `presets` (the quick-range row), `preset-button` (one quick-range button; carries `data-active`
4915
+ while its range is the current value),
4865
4916
  `view-item-disabled`, `view-item-selected`, `view-item-today`, `view-row`, `weekday`, `weekdays`,
4866
4917
  `weeknumber`, and `weeknumbers`. Lyra additionally retains the existing `week` part.
4867
4918
 
@@ -5103,6 +5154,11 @@ and `dateTimeFormat(locale, options)`.
5103
5154
  `::part(previous):hover` still wins without `!important`.
5104
5155
  - `--lr-date-picker-nav-active-bg` — Pressed navigation background; defaults to the hover color
5105
5156
  mixed by `--lr-color-mix-active`.
5157
+ - `--lr-date-picker-preset-hover-bg`, `--lr-date-picker-preset-active-bg`, and
5158
+ `--lr-date-picker-preset-selected-bg` (new in 10.1.0) — hover, pressed, and
5159
+ currently-selected paint for a `presets` quick-range button. Defaults are
5160
+ `var(--lr-color-brand-quiet)`, that hover colour mixed by `--lr-color-mix-active`, and
5161
+ `var(--lr-color-brand)` respectively.
5106
5162
  - `--lr-date-picker-title-hover-color`, `--lr-date-picker-title-active-color`,
5107
5163
  `--lr-date-picker-title-active-bg`, and `--lr-date-picker-title-active-radius` — Month-title
5108
5164
  hover/press paint and pressed shape; defaults to brand, brand, brand-quiet, and
@@ -9110,6 +9166,8 @@ These named interfaces and helper signatures are available to typed integrations
9110
9166
  label: unknown;
9111
9167
  sub: unknown;
9112
9168
  icon: unknown;
9169
+ start: unknown;
9170
+ end: unknown;
9113
9171
  badge: unknown;
9114
9172
  accessibleLabel: unknown;
9115
9173
  data: unknown;
@@ -9147,6 +9205,11 @@ These named interfaces and helper signatures are available to typed integrations
9147
9205
  from: unknown;
9148
9206
  to: unknown;
9149
9207
  }`
9208
+ `LyraDateRangePreset {
9209
+ label: unknown;
9210
+ start: unknown;
9211
+ end: unknown;
9212
+ }`
9150
9213
 
9151
9214
  - **`components-forms-emoji-picker-emoji-types-contracts`** — Supporting data types and helpers for this component family.
9152
9215
  `EmojiPickerGroup {
@@ -10772,8 +10835,26 @@ weekdayLabelText?: (jsWeekday:number)=>string|undefined; monthLabelText?:
10772
10835
  more here". `cellText` still carries the full label to the tooltip and the keyboard announcement.
10773
10836
  A malformed value is ignored rather than collapsing the gutter. Calendar mode is unaffected; it
10774
10837
  has its own fixed weekday gutter
10775
- - `colLabelHeight?: number` (attribute `col-label-height`) height, in CSS px, of the matrix
10776
- column-label band. Unset keeps the built-in `20`
10838
+ - `colLabelHeight?: number | 'auto'` (attribute `col-label-height`, not reflected, `'auto'` new in
10839
+ 10.1.0) — height, in CSS px, of the matrix column-label band, or `'auto'` to measure the labels
10840
+ and size the band to fit them. Under a non-zero `colLabelRotation` the measurement projects each
10841
+ label's width through the rotation, which is what makes a rotated axis usable without hand-tuning
10842
+ a magic number. Never below the built-in `20`, and bounded above by a sanity ceiling so a
10843
+ pathological label cannot produce an absurd canvas. Note this deliberately does **not** use
10844
+ `rowLabelWidth`'s "40% of the host" rule: the row gutter steals width from the cells and so must
10845
+ be bounded relative to them, whereas the canvas simply grows taller for this band and the cells
10846
+ keep their size. Unset keeps the built-in `20`, so no existing chart reflows. A malformed value is
10847
+ ignored
10848
+ - `colLabelRotation?: number` (attribute `col-label-rotation`, new in 10.1.0) — rotation, in
10849
+ degrees, applied to matrix column labels. Unset or `0` paints them horizontally exactly as before.
10850
+ In a dense matrix the per-column width is far narrower than a typical label, so horizontal labels
10851
+ collide with their neighbours; `45` or `90` is the standard remedy. Each label rotates about an
10852
+ anchor at its own column's centre with the label's *end* at that anchor, so it leans back over the
10853
+ columns to its left and the last column's label cannot overflow the canvas. Values outside
10854
+ `[0, 90]` clamp into that range and non-finite values normalize to `0`. Pair with
10855
+ `colLabelHeight="auto"` to have the band size itself to the rotated extent. **Not mirrored under
10856
+ `dir="rtl"`** — both grid modes deliberately retain physical LTR geometry, so leaning one axis'
10857
+ labels the other way would be incoherent
10777
10858
  - `maxCellSize?: number` (attribute `max-cell-size`) — ceiling, in CSS px, on the cell size
10778
10859
  `fitToWidth` derives from the host width, in **both** modes. Exists because `fitToWidth` divides
10779
10860
  the _whole_ host width across the grid, so a 5-week calendar or a 3-column matrix in a wide pane
@@ -17164,6 +17245,26 @@ close. The same name is already used by the `lr-tool-select-dialog`/`lr-tool-res
17164
17245
  `lr-tool-approval-dialog` trio, which mirrors this identical detail shape, so one listener covers
17165
17246
  all of them. `lr-drawer` inherits `lr-close` unchanged.
17166
17247
 
17248
+ > **`lr-close` is not a dialog-scoped name — filter by target.** Nine components in this library
17249
+ > emit `lr-close`, several of them commonly nested *inside* a dialog: `<lr-callout>` (an inline
17250
+ > notice above a form), `<lr-tab>`/`<lr-tab-group>`, `<lr-command-palette>`,
17251
+ > `<lr-document-viewer>`, `<lr-responsive-panel>`, and the three tool dialogs. Library events bubble
17252
+ > and are composed, so a listener bound directly on `<lr-dialog>` **also receives a descendant's
17253
+ > close** — a closable callout inside a dialog would otherwise dismiss the whole dialog. The details
17254
+ > differ too (`<lr-callout>` and `<lr-tab>` carry none, where the dialog carries a
17255
+ > `DialogCloseReason`), so a handler reading `event.detail.reason` throws on a foreign one. It is
17256
+ > latent rather than broken-on-arrival, because a callout or tab only emits once it is given a close
17257
+ > affordance — which is what makes it a bad failure mode: it shows up later and presents as the
17258
+ > dialog dismissing itself. Guard on the target, the way `<lr-document-viewer>` already does
17259
+ > internally:
17260
+ >
17261
+ > ```js
17262
+ > dialog.addEventListener('lr-close', (event) => {
17263
+ > if (event.target !== event.currentTarget) return; // a descendant's close, not this dialog's
17264
+ > // ...
17265
+ > });
17266
+ > ```
17267
+
17167
17268
  **The top layer.** An open `lr-dialog` or modal `lr-drawer` is promoted into the browser **top layer**
17168
17269
  (through `popover="manual"`) rather than stacked with `z-index`. It therefore escapes every ancestor
17169
17270
  stacking context and every ancestor `overflow` clip: a `transform`ed parent, an `isolation: isolate`
@@ -17742,7 +17843,8 @@ chrome remains visible. The fallback order appears below.
17742
17843
  `<lr-tool-approval-dialog>`, whose own docs describe an identical detail shape, so one listener
17743
17844
  covers all of them. A listener calling `preventDefault()` vetoes the close. Also fired (with
17744
17845
  reason `'unmount'`, non-cancelable there) when the dialog is removed from the DOM while still
17745
- open.
17846
+ open. **But the name is not dialog-scoped** — see the target-filtering note above; nine
17847
+ components emit `lr-close`, and several are routinely nested inside a dialog.
17746
17848
 
17747
17849
  The two `lr-after-*` events are never cancelable.
17748
17850
 
@@ -18449,7 +18551,26 @@ A click-triggered, light-dismiss floating surface positioned with the shared Flo
18449
18551
  - `accessibleLabel: string = ''` (attribute **`aria-label`**) — names the popup. An authored host
18450
18552
  attribute wins by presence, including `aria-label=""`; only when it is absent does the property
18451
18553
  or localized "Popover" ("Menu" when `popupRole` is `menu`) fallback apply
18452
- - `popupRole: 'dialog'|'menu' = 'dialog'` (attribute `popup-role`)
18554
+ - `popupRole: 'dialog'|'menu'|'none' = 'dialog'` (attribute `popup-role`). `none` (new in 10.1.0)
18555
+ renders **no** `role` and no generated `aria-label` on the popup surface, and leaves
18556
+ `aria-haspopup` off the trigger, so slotted content owns its own semantics and accessible name.
18557
+ It exists for the WAI-ARIA **disclosure navigation** pattern: a flyout of links is not an
18558
+ application action menu (`menu` announces "menu, menu item" and expects `menuitem` children) and
18559
+ is not an interruptive surface (`dialog`). The `aria-expanded`/`aria-controls` wiring that pattern
18560
+ requires is unchanged, as are light dismiss, Escape, focus return, and positioning:
18561
+
18562
+ ```html
18563
+ <lr-popover popup-role="none">
18564
+ <button slot="trigger">Products</button>
18565
+ <nav aria-label="Products">
18566
+ <ul><li><a href="/overview">Overview</a></li><li><a href="/pricing">Pricing</a></li></ul>
18567
+ </nav>
18568
+ </lr-popover>
18569
+ ```
18570
+
18571
+ Note there is deliberately no `aria-haspopup="none"` — that is an invalid attribute value, not a
18572
+ neutral one, and axe reports it as a critical violation. `lr-dropdown` still pins `popupRole` to
18573
+ `menu`; the escape hatch lives on the general-purpose primitive.
18453
18574
  - `disabled: boolean = false` (reflected, new in 10.0.0) — prevents opening the popover; pointer,
18454
18575
  keyboard, and programmatic `show()`/`open = true` are all refused while set. Becoming disabled also
18455
18576
  closes an already-open popover, and initial `disabled` plus `open` normalizes closed in either
@@ -21581,8 +21702,10 @@ rectangular corner radius), `--lr-flag-aspect-ratio` (default `4 / 3`), and
21581
21702
  image when `country` or `language` is used. Import
21582
21703
  `@aceshooting/lyra-ui/components/media/flag/flag-peer.js` once to opt into
21583
21704
  that resolver; a pre-resolved `src` works without the peer registration entry. If the peer is not
21584
- installed, the component fails closed with localized visible `[part="error"]` text and a shared
21585
- light-DOM assertive announcement (see gotchas).
21705
+ installed or if `flag-peer.js` was simply never imported, which looks identical from the page —
21706
+ the component fails closed with localized visible `[part="error"]` text, a shared light-DOM
21707
+ assertive announcement, and a one-time `console.warn` naming the unresolved code and this import
21708
+ (see gotchas).
21586
21709
 
21587
21710
  Also exported from the package root:
21588
21711
  `languageToCountry(language: string): string | undefined` and the `LANGUAGE_TO_COUNTRY` lookup
@@ -21668,7 +21791,12 @@ import "@aceshooting/lyra-ui/components/media/flag/flag-peer.js";
21668
21791
  `[data-lr-live-region="assertive"]` sink, so the shadow chrome itself is not live and identical
21669
21792
  retries remain separate additions. The failure also produces a one-time `console.warn`
21670
21793
  once the resolver rejects (lazy `import()`, cached module-wide so the warning fires only once per
21671
- page even with many `<lr-flag>` instances). An _empty_ template is a different, non-error outcome:
21794
+ page even with many `<lr-flag>` instances). A **separate** one-time `console.warn` covers the
21795
+ commonest setup mistake — `country`/`language` set while no resolver was ever registered, i.e.
21796
+ `flag-peer.js` was not imported. It names the offending code and that import path, because the
21797
+ visible `[part="error"]` state alone is indistinguishable from missing flag data. It is armed
21798
+ once per resolver-registration generation, so a table of many flags warns once.
21799
+ An _empty_ template is a different, non-error outcome:
21672
21800
  the peer resolved fine but returned no URL for that code (e.g. `country="zz"`) — no `[part="error"]`,
21673
21801
  no `<img>`, no warning.
21674
21802
  - Rendering is async even when the peer _is_ installed: `src` resolves after an `import()` +
@@ -21850,7 +21978,7 @@ omittedCount, truncatedLabelCount, truncated }` result for the latest assignment
21850
21978
  the bounded rows are complete.
21851
21979
  - `choropleth?: LyraMapChoroplethLayer` (attribute: false) — `LyraMapChoroplethLayer { sourceId:
21852
21980
  string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, string][]; interpolation?:
21853
- 'linear' | 'logarithmic' }` (interpolated
21981
+ 'linear' | 'logarithmic' | 'step'; stepBaseColor?: string }` (interpolated
21854
21982
  fill-color expression from `field`'s value against `stops`; `stops` must contain at least one
21855
21983
  `[value, color]` pair — an empty array is ignored, leaving whatever fill layer already exists, if
21856
21984
  any, untouched, rather than being applied).
@@ -21862,7 +21990,14 @@ string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, strin
21862
21990
  rather than adding one (maplibre has no `['log']` interpolation type; a sub-1 exponential base is
21863
21991
  the documented way to weight a ramp toward the low end). **`stops` stay in the data's own units
21864
21992
  under either mode**, so the legend keeps reading in real values instead of log units — no
21865
- pre-transforming to log10 and hand-relabelling the legend back
21993
+ pre-transforming to log10 and hand-relabelling the legend back.
21994
+ `'step'` (new in 10.1.0) emits maplibre's `['step', …]` instead of `['interpolate', …]`, giving
21995
+ **discrete bands rather than a continuous ramp**. Use it whenever the legend advertises a fixed
21996
+ set of ranges with one swatch each: a ramp would put colours on the map that appear nowhere in the
21997
+ legend, and would render two regions in the same advertised band as visibly different colours
21998
+ (`legendGradient` covers the opposite case, a gradient legend). `stepBaseColor` is the colour for
21999
+ values below the first threshold, which `['step', …]` requires; it defaults to the first stop's own
22000
+ colour, so a legend whose first band starts at the data minimum needs no extra configuration
21866
22001
  - `markers: LyraMapMarker[] = []` (attribute: false) — `LyraMapMarker { id?: string; lngLat:
21867
22002
  [number, number]; color?: string; label?: string; unsafeHtml?: string }`; an explicit `id` is
21868
22003
  trimmed and must be nonempty, and the first marker for an explicit ID wins. Markers are reconciled
@@ -21884,11 +22019,21 @@ string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, strin
21884
22019
  - `dataLayers: LyraMapGeoJsonDataLayer[] = []` (attribute: false) —
21885
22020
  `LyraMapGeoJsonDataLayer { sourceId: string; geojson: GeoJSON.Feature |
21886
22021
  GeoJSON.FeatureCollection; tone?: 'accent' | 'success' | 'warning' |
21887
- 'danger' | 'neutral' }`. `sourceId` is trimmed and must be nonempty; the first layer for a
22022
+ 'danger' | 'neutral'; color?: string; strokeColor?: string }`. `sourceId` is trimmed and must be nonempty; the first layer for a
21888
22023
  `sourceId` wins and blank or later duplicate records are ignored. Each retained entry adds one
21889
22024
  GeoJSON source plus three geometry-filtered layers
21890
22025
  (fill, line, and circle, so a mixed `FeatureCollection` renders correctly), colored from the
21891
- matching `--lr-color-*` token (`tone` defaults to `'accent'` → `--lr-color-brand`). The component
22026
+ matching `--lr-color-*` token (`tone` defaults to `'accent'` → `--lr-color-brand`).
22027
+ `color` and `strokeColor` (both new in 10.1.0) override that per surface — `color` paints the
22028
+ polygon fill, `strokeColor` the line and circle layers, falling back to `color` and then to `tone`.
22029
+ They are separable because a fill and its outline want opposite things on a
22030
+ choropleth-plus-overlay map, and the difference is measurable rather than aesthetic: the fill
22031
+ competes for area with the choropleth beside it and has to sit quiet, while the 1px outline
22032
+ competes with nothing and is the only thing keeping a no-data region's shape readable once the
22033
+ fill is that faint. Deriving one from the other measured 1.41:1 against a light basemap — under
22034
+ WCAG 1.4.11's 3:1 floor for graphical objects. A `var(--lr-…)` reference is resolved against the
22035
+ host before it reaches MapLibre, which paints to a WebGL canvas and never sees the CSS cascade.
22036
+ The component
21892
22037
  assigns collision-free private MapLibre ids for those resources: `sourceId` is the stable
21893
22038
  declarative reconciliation key, **not** an id to retrieve from `map`. This prevents a data layer
21894
22039
  from overwriting or removing a same-named source supplied by `mapStyle`. Independent of
@@ -24208,11 +24353,14 @@ These named interfaces and helper signatures are available to typed integrations
24208
24353
  field: unknown;
24209
24354
  stops: unknown;
24210
24355
  interpolation: unknown;
24356
+ stepBaseColor: unknown;
24211
24357
  }`
24212
24358
  `LyraMapGeoJsonDataLayer {
24213
24359
  sourceId: unknown;
24214
24360
  geojson: unknown;
24215
24361
  tone: unknown;
24362
+ color: unknown;
24363
+ strokeColor: unknown;
24216
24364
  }`
24217
24365
  `LyraMapInstance {
24218
24366
  getCanvas: unknown;
@@ -24490,6 +24638,14 @@ property).
24490
24638
  ignored without evaluating script or exposing prototype-pollution keys to the merge.
24491
24639
  - `showDataTable: boolean = false` (attribute `show-data-table`) — makes the always-available
24492
24640
  accessible data table visible rather than screen-reader-only
24641
+ - `dataTableToggle: boolean = false` (attribute `data-table-toggle`, new in 10.1.0) — renders a
24642
+ localized disclosure button (`part="data-table-toggle"`) above the data table so a *sighted*
24643
+ reader can reveal the numbers on demand. `showDataTable` alone is all-or-nothing, which left
24644
+ consumers wrapping a duplicated table in their own `<details>`. With the toggle on,
24645
+ `showDataTable` becomes the disclosure's **initial** state rather than its whole behavior; the
24646
+ table stays in the DOM in both states, so assistive technology never loses it, and the button
24647
+ carries `aria-expanded` plus `aria-controls` pointing at the `data-table` wrapper. Unset, nothing
24648
+ renders and behavior is identical to before.
24493
24649
  - `chartArea: LyraChartArea | undefined` (readonly) — current Chart.js chart-area geometry in
24494
24650
  canvas-local coordinates (`top`, `left`, `right`, `bottom`, `width`, `height`), when a chart is
24495
24651
  drawn
@@ -24609,7 +24765,7 @@ Chart.js escape hatch and is not rewritten by the simplified-surface sampler.
24609
24765
  wrapping DOM legend), `legend-item` (a dataset-visibility button), `legend-item-hidden` (added to
24610
24766
  that button while its dataset is hidden), `legend-swatch`,
24611
24767
  `reset-zoom-button`, `description`, `notices` (wrapper for nonfatal feature warnings and
24612
- bounded-alternative truncation notices), `data-table`, `data-truncation` (the bounded-alternative
24768
+ bounded-alternative truncation notices), `data-table`, `data-table-toggle` (the `dataTableToggle` disclosure button), `data-truncation` (the bounded-alternative
24613
24769
  notice), `feature-warning` (a nonfatal missing optional-feature warning), `center` (the
24614
24770
  chart-area-centered wrapper for the `center` slot), `error` (neutral visible message rendered in
24615
24771
  place of `canvas` when the optional `chart.js` peer dependency fails to load; the failure transition
@@ -24629,7 +24785,9 @@ ancestor, not a shadow-tree descendant, since custom properties only cascade dow
24629
24785
  `y2Label` title text reuses `--lr-chart-tick-color` too — there's no separate title-color token),
24630
24786
  legend text, and tooltip background/text respectively; plus
24631
24787
  `--lr-chart-legend-item-hover-bg` / `--lr-chart-legend-item-active-bg`,
24632
- `--lr-chart-data-table-button-hover-bg` / `--lr-chart-data-table-button-active-bg`, and
24788
+ `--lr-chart-data-table-button-hover-bg` / `--lr-chart-data-table-button-active-bg`,
24789
+ `--lr-chart-data-table-toggle-hover-bg` / `--lr-chart-data-table-toggle-active-bg` (the
24790
+ `dataTableToggle` disclosure button), and
24633
24791
  `--lr-chart-reset-zoom-button-hover-bg` / `--lr-chart-reset-zoom-button-active-bg` — independent
24634
24792
  background hooks for each DOM control's hover and pressed states. Hover defaults to
24635
24793
  `--lr-color-brand-quiet`; pressed defaults to its standard active color mix. Override one pair
@@ -25023,7 +25181,7 @@ complete `hiddenDatasets` snapshot).
25023
25181
  **Slots:** default JSON configuration script, `data-table`, `center`.
25024
25182
 
25025
25183
  **CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
25026
- `reset-zoom-button`, `description`, `notices`, `data-table`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
25184
+ `reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
25027
25185
  rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
25028
25186
  failure transition is announced through the shared document-level light-DOM assertive sink — see
25029
25187
  `llms/components/lr-chart.md`).
@@ -25032,7 +25190,8 @@ failure transition is announced through the shared document-level light-DOM asse
25032
25190
  `--lr-chart-tick-color`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
25033
25191
  `--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
25034
25192
  `--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
25035
- `--lr-chart-data-table-button-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
25193
+ `--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
25194
+ `--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
25036
25195
  `--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
25037
25196
  `--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — all inherited from `LyraChart`, identical in meaning and default (see
25038
25197
  `lr-chart` above); each of the eight variants below reads the same set, so one rule retunes them
@@ -25105,7 +25264,7 @@ maxSamples?)` appends finite raw samples and optionally retains only the newest
25105
25264
  **Slots:** default JSON configuration script, `data-table`, `center`.
25106
25265
 
25107
25266
  **CSS parts:** `base`, `plot`, `canvas`, `legend`, `legend-item`, `legend-item-hidden`, `legend-swatch`,
25108
- `reset-zoom-button`, `description`, `notices`, `data-table`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
25267
+ `reset-zoom-button`, `description`, `notices`, `data-table`, `data-table-toggle`, `data-truncation`, `feature-warning`, `center`, `error` (neutral visible message
25109
25268
  rendered in place of `canvas` when the optional `chart.js` peer dependency fails to load; the
25110
25269
  failure transition is announced through the shared document-level light-DOM assertive sink —
25111
25270
  inherited from `LyraChart`, unaffected by the binning logic).
@@ -25114,7 +25273,8 @@ inherited from `LyraChart`, unaffected by the binning logic).
25114
25273
  `--lr-chart-tick-color`, `--lr-chart-legend-color`, `--lr-chart-tooltip-bg`,
25115
25274
  `--lr-chart-tooltip-text`, `--lr-chart-legend-item-hover-bg`,
25116
25275
  `--lr-chart-legend-item-active-bg`, `--lr-chart-data-table-button-hover-bg`,
25117
- `--lr-chart-data-table-button-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
25276
+ `--lr-chart-data-table-button-active-bg`, `--lr-chart-data-table-toggle-hover-bg`,
25277
+ `--lr-chart-data-table-toggle-active-bg`, `--lr-chart-reset-zoom-button-hover-bg`,
25118
25278
  `--lr-chart-reset-zoom-button-active-bg`, `--lr-chart-canvas-hover-outline-width`, and
25119
25279
  `--lr-chart-pattern-step`, plus `--lr-chart-legend-side-max` — inherited from `LyraChart`, identical in meaning, together with the
25120
25280
  mirrored `--border-color-1`,
@@ -25185,6 +25345,14 @@ browser). Does **not** extend `LyraChart` — a deliberately bespoke API.
25185
25345
  - `formatter?: LyraChartFormatter`, `valueFormatter?: LyraChartValueFormatter` — numeric axis,
25186
25346
  tooltip, table, summary, and export formatting; the context-object formatter takes precedence
25187
25347
  - `showDataTable: boolean = false` (attribute `show-data-table`) — reveals the accessible data table
25348
+ - `dataTableToggle: boolean = false` (attribute `data-table-toggle`, new in 10.1.0) — renders a
25349
+ localized disclosure button (`part="data-table-toggle"`) above the data table so a *sighted*
25350
+ reader can reveal the numbers on demand. `showDataTable` alone is all-or-nothing, which left
25351
+ consumers wrapping a duplicated table in their own `<details>`. With the toggle on,
25352
+ `showDataTable` becomes the disclosure's **initial** state rather than its whole behavior; the
25353
+ table stays in the DOM in both states, so assistive technology never loses it, and the button
25354
+ carries `aria-expanded` plus `aria-controls` pointing at the `data-table` wrapper. Unset, nothing
25355
+ renders and behavior is identical to before.
25188
25356
 
25189
25357
  **Methods:** `exportData('csv'|'png')` returns spreadsheet-safe summary rows or the current canvas
25190
25358
  PNG data URL. `refreshTheme()` re-reads canvas theme custom properties after an ancestor theme
@@ -25223,7 +25391,7 @@ detailed sample and notice, making it the escape hatch for complete data.
25223
25391
 
25224
25392
  **CSS parts:** `base`, `plot` (the fixed-height canvas region), `canvas`, `legend`,
25225
25393
  `legend-item`, `legend-item-hidden` (added to a legend item while its box series is hidden),
25226
- `legend-swatch`, `description`, `data-table`, `error` (neutral visible message shown
25394
+ `legend-swatch`, `description`, `data-table`, `data-table-toggle` (the `dataTableToggle` disclosure button), `error` (neutral visible message shown
25227
25395
  instead of `canvas` when the optional box-plot peer fails to load; the failure transition is
25228
25396
  announced through the shared document-level light-DOM assertive sink), `data-truncation` (the
25229
25397
  bounded-alternative sampling notice)
@@ -25240,7 +25408,10 @@ so `--lr-theme-color-chart-*` retheming reaches box plots too. `--lr-chart-patte
25240
25408
  `--lr-chart-canvas-hover-outline-width` (default `var(--lr-border-width-thin)`) sizes the `canvas`
25241
25409
  hover outline, `--lr-chart-legend-item-active-bg` and `--lr-chart-legend-item-hover-bg` retune the
25242
25410
  pressed and hovered legend rows, and `--lr-chart-legend-side-max` caps a side legend — the same tokens and defaults as
25243
- `lr-chart`.
25411
+ `lr-chart`. Its own `dataTableToggle` disclosure button carries box-plot-namespaced hooks rather
25412
+ than inheriting the chart pair, since its stylesheet is not a re-export:
25413
+ `--lr-box-plot-data-table-toggle-hover-bg` (defaults to `--lr-color-brand-quiet`) and
25414
+ `--lr-box-plot-data-table-toggle-active-bg` (defaults to its standard active color mix).
25244
25415
 
25245
25416
  **Forced colors:** under `forced-colors: active` the eight-color ramp is remapped onto the small
25246
25417
  repeating system-color cycle the platform exposes, so series 1/4/7 (and 2/5/8, 3/6) would otherwise
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "10.0.1",
3
+ "version": "11.0.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",
@@ -1597,6 +1597,20 @@
1597
1597
  "value": "**Shared design token** — Canonical shared component token for border width thin. Reads `--lr-theme-border-width-thin`."
1598
1598
  }
1599
1599
  },
1600
+ {
1601
+ "name": "--lr-box-plot-data-table-toggle-active-bg",
1602
+ "description": {
1603
+ "kind": "markdown",
1604
+ "value": "**`<lr-box-plot>`** — Pressed background of the `dataTableToggle` disclosure button; defaults to a mix of the hover background with the shared active mix partner."
1605
+ }
1606
+ },
1607
+ {
1608
+ "name": "--lr-box-plot-data-table-toggle-hover-bg",
1609
+ "description": {
1610
+ "kind": "markdown",
1611
+ "value": "**`<lr-box-plot>`** (default: `var(--lr-color-brand-quiet)`) — Hover background of the `dataTableToggle` disclosure button."
1612
+ }
1613
+ },
1600
1614
  {
1601
1615
  "name": "--lr-breadcrumb-current-color",
1602
1616
  "description": {
@@ -2185,6 +2199,20 @@
2185
2199
  "value": "**`<lr-bar-chart>`, `<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>`** (default: `var(--lr-color-brand-quiet)`) — Hover background of an actionable generated-table value."
2186
2200
  }
2187
2201
  },
2202
+ {
2203
+ "name": "--lr-chart-data-table-toggle-active-bg",
2204
+ "description": {
2205
+ "kind": "markdown",
2206
+ "value": "**`<lr-bar-chart>`, `<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>`** — Pressed background of the `dataTableToggle` disclosure button; defaults to a mix of the hover background with the shared active mix partner."
2207
+ }
2208
+ },
2209
+ {
2210
+ "name": "--lr-chart-data-table-toggle-hover-bg",
2211
+ "description": {
2212
+ "kind": "markdown",
2213
+ "value": "**`<lr-bar-chart>`, `<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>`** (default: `var(--lr-color-brand-quiet)`) — Hover background of the `dataTableToggle` disclosure button."
2214
+ }
2215
+ },
2188
2216
  {
2189
2217
  "name": "--lr-chart-grid-color",
2190
2218
  "description": {
@@ -3963,6 +3991,27 @@
3963
3991
  "value": "**`<lr-date-picker>`** (default: `var(--lr-color-brand-quiet)`) — Hover background of the `[part=\"previous\"]`/`[part=\"next\"]` month-navigation buttons."
3964
3992
  }
3965
3993
  },
3994
+ {
3995
+ "name": "--lr-date-picker-preset-active-bg",
3996
+ "description": {
3997
+ "kind": "markdown",
3998
+ "value": "**`<lr-date-picker>`** — Pressed background of a quick-range button; defaults to a mix of the hover background with the shared active mix partner."
3999
+ }
4000
+ },
4001
+ {
4002
+ "name": "--lr-date-picker-preset-hover-bg",
4003
+ "description": {
4004
+ "kind": "markdown",
4005
+ "value": "**`<lr-date-picker>`** (default: `var(--lr-color-brand-quiet)`) — Hover background of a quick-range button."
4006
+ }
4007
+ },
4008
+ {
4009
+ "name": "--lr-date-picker-preset-selected-bg",
4010
+ "description": {
4011
+ "kind": "markdown",
4012
+ "value": "**`<lr-date-picker>`** (default: `var(--lr-color-brand)`) — Background and border of the quick-range button whose range is currently selected."
4013
+ }
4014
+ },
3966
4015
  {
3967
4016
  "name": "--lr-date-picker-radius",
3968
4017
  "description": {
@@ -5104,6 +5153,13 @@
5104
5153
  "value": "**`<lr-flow-minimap>`** (default: `var(--lr-color-success)`) — Successful-node fill.\n\n**`<lr-flow-node>`** (default: `var(--lr-color-success)`) — Success status-dot color.\n\n**`<lr-flow-run-status>`** (default: `var(--lr-color-success)`) — Success count-dot color."
5105
5154
  }
5106
5155
  },
5156
+ {
5157
+ "name": "--lr-focus-ring",
5158
+ "description": {
5159
+ "kind": "markdown",
5160
+ "value": "**Shared design token** — Composite focus-ring outline shorthand, derived from the width and color parts. Mirrors the ready-made outline value Web Awesome exposes as --wa-focus-ring so a migrating consumer has a one-to-one target instead of hand-expanding every site. Offset stays separate because outline-offset is its own property."
5161
+ }
5162
+ },
5107
5163
  {
5108
5164
  "name": "--lr-focus-ring-color",
5109
5165
  "description": {