@aceshooting/lyra-ui 14.2.0 → 14.3.1

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 (46) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/custom-elements.json +1 -1
  3. package/dist/cli/migration-contract.json +1 -1
  4. package/dist/components/charts/chart/chart-legend-visibility.d.ts +8 -0
  5. package/dist/components/charts/chart/chart.class.d.ts +48 -12
  6. package/dist/components/charts/chart/chart.class.js +10 -10
  7. package/dist/components/data/table/table.class.d.ts +9 -1
  8. package/dist/components/data/table/table.class.js +4 -3
  9. package/dist/components/data/table/table.styles.js +1 -1
  10. package/dist/components/forms/button/button.class.d.ts +8 -2
  11. package/dist/components/forms/button/button.class.js +6 -2
  12. package/dist/components/media/map/map.class.d.ts +34 -6
  13. package/dist/components/media/map/map.class.js +1 -1
  14. package/dist/components/media/map/map.styles.js +1 -1
  15. package/dist/components/overlays/overlay/dropdown.class.d.ts +3 -1
  16. package/dist/components/overlays/overlay/dropdown.styles.js +1 -1
  17. package/dist/custom-elements-jsx.d.ts +1 -1
  18. package/dist/events.d.ts +17 -1
  19. package/dist/internal/icons.d.ts +2 -0
  20. package/dist/internal/icons.js +2 -2
  21. package/dist/internal/package-metadata.d.ts +1 -1
  22. package/dist/internal/package-metadata.js +1 -1
  23. package/dist/lyra.d.ts +1 -1
  24. package/dist/svelte.d.ts +1 -1
  25. package/dist/vue.d.ts +1 -1
  26. package/llms/components/lr-accordion-item.md +36 -0
  27. package/llms/components/lr-accordion.md +36 -0
  28. package/llms/components/lr-bar-chart.md +4 -1
  29. package/llms/components/lr-bubble-chart.md +4 -1
  30. package/llms/components/lr-button.md +5 -0
  31. package/llms/components/lr-chart.md +40 -2
  32. package/llms/components/lr-details.md +36 -0
  33. package/llms/components/lr-doughnut-chart.md +4 -1
  34. package/llms/components/lr-dropdown.md +5 -0
  35. package/llms/components/lr-histogram.md +6 -2
  36. package/llms/components/lr-line-chart.md +4 -1
  37. package/llms/components/lr-map.md +45 -7
  38. package/llms/components/lr-pie-chart.md +4 -1
  39. package/llms/components/lr-polar-area-chart.md +4 -1
  40. package/llms/components/lr-radar-chart.md +4 -1
  41. package/llms/components/lr-scatter-chart.md +4 -1
  42. package/llms/components/lr-table.md +10 -4
  43. package/llms-full.txt +176 -16
  44. package/package.json +8 -8
  45. package/vscode-html-data.json +1 -1
  46. package/web-types.json +1 -1
package/llms-full.txt CHANGED
@@ -6047,6 +6047,11 @@ box no matter what tier or override is in play.
6047
6047
  are resolved onto the focused internal control through `ariaDescribedByElements`; external
6048
6048
  `aria-labelledby` is not copied across the shadow boundary.
6049
6049
  - Host `aria-haspopup` and `aria-expanded` values are forwarded to the internal semantic control.
6050
+ For toggle buttons, host `aria-pressed="true|false|mixed"` reaches the focused native button.
6051
+ Navigation can use `aria-current="page|step|location|date|time|true|false"`. Both states update
6052
+ reactively, including native `ariaPressed`/`ariaCurrent` property assignments, attribute removal
6053
+ and `href` changes. Empty or unsupported tokens are omitted. The native button/link role remains
6054
+ unchanged: use pressed state for button toggles and current state for navigation links.
6050
6055
  For host `aria-controls`, targets in the host's own root are resolved through the reflected
6051
6056
  element-reference API so a popup relationship survives the component's shadow boundary; browsers
6052
6057
  with that API expose the relationship through `ariaControlsElements` and intentionally serialize
@@ -10654,6 +10659,10 @@ cell: (row) => unknown }` —
10654
10659
  the two consequences of the fixed algorithm worth knowing before opting in
10655
10660
  - `sortKey: string = ''` (attribute `sort-key`)
10656
10661
  - `sortDir: 'asc'|'desc' = 'asc'` (attribute `sort-dir`)
10662
+ - `sortIndicators: TableSortIndicators = 'active'` (attribute `sort-indicators`) — `'all'` adds a
10663
+ muted bidirectional indicator to each inactive sortable header, reserving the same space as the
10664
+ active chevron. The default retains only the active column's indicator. This presentation does
10665
+ not change keyboard interaction, client/server sorting, or `aria-sort="none"` on inactive columns.
10657
10666
  - `sortMode: 'client'|'server' = 'client'` (attribute `sort-mode`, reflected) — mirrors
10658
10667
  `paginationMode`'s identical split. `'client'` (the default) orders `rows` in the browser from
10659
10668
  `sortKey`/`sortDir` and the active column's `sortValue`; `'server'` renders `rows` exactly as
@@ -10824,8 +10833,9 @@ slot-replaceable: it reports a configuration problem (`noColumnsHeading`), not "
10824
10833
  nothing", and one slot covering all three would collapse that distinction. Everything else comes
10825
10834
  from `columns`/`rows`.
10826
10835
 
10827
- **CSS parts:** `base`, `table`, `caption`, `head`, `header-cell`, `row`, `cell`, `more-button`, `sort-icon` (a
10828
- chevron indicator shown on the active sortable header, rotated per `sortDir`), `reveal-columns-button`
10836
+ **CSS parts:** `base`, `table`, `caption`, `head`, `header-cell`, `row`, `cell`, `more-button`, `sort-icon`
10837
+ (each sort indicator), `sort-icon-active` (the active chevron, rotated per `sortDir`),
10838
+ `sort-icon-inactive` (the muted bidirectional indicator under `sort-indicators="all"`), `reveal-columns-button`
10829
10839
  (shown when priority columns are hidden or when a narrow allocation is currently force-visible),
10830
10840
  `foot` (the `<tfoot>`, only rendered when at least one
10831
10841
  column defines `footer`), `footer-row`, `footer-cell`, `row-total-cell` (each body row's trailing
@@ -10895,7 +10905,8 @@ or structural-pseudo-class selector and does not affect group, expanded, hover,
10895
10905
  showing through the sticky header while it scrolls.
10896
10906
  Same shape and rationale as `--lr-table-row-selected-bg`: inline `var()` fallbacks, not on `:host`,
10897
10907
  because `::part(header-cell)[aria-sort]` is invalid CSS. The `sort-icon` part styles only the
10898
- chevron; these tokens style the header cell itself.
10908
+ indicator; these tokens style the header cell itself. Use `::part(sort-icon-inactive)` and
10909
+ `::part(sort-icon-active)` to style the two indicator states without private selectors.
10899
10910
  `--lr-table-sticky-offset` (default `0`) is measured and written inline per column by the component
10900
10911
  so multiple `sticky` columns stack instead of overlapping; it is a read-out, not a knob you set.
10901
10912
  `--lr-table-heat-t` is likewise component-written (each `[data-heat]` cell's position on the ramp).
@@ -17456,6 +17467,42 @@ findable `hidden="until-found"` closed-state gate.
17456
17467
  The Details icon wrapper also carries Shoelace's `summary-icon` alias, so either part name styles
17457
17468
  the same node. `header-actions` is the wrapper around the `header-actions` slot.
17458
17469
 
17470
+ For rich independent actions, reserve a useful basis on `header-actions` so the complete action
17471
+ group wraps onto another row before its checkbox label becomes too narrow. The header already
17472
+ wraps; its summary belongs to a private native-details flex item, so setting `flex` on
17473
+ `::part(summary)` does not control that item's allocation. This recipe uses public parts and
17474
+ ordinary light-DOM layout:
17475
+
17476
+ ```html
17477
+ <style>
17478
+ lr-details.responsive-actions::part(header-actions) {
17479
+ flex: 1 1 12rem;
17480
+ min-inline-size: min(100%, 12rem);
17481
+ padding: var(--lr-space-xs);
17482
+ box-sizing: border-box;
17483
+ }
17484
+ .details-action-group {
17485
+ display: flex;
17486
+ flex-wrap: wrap;
17487
+ align-items: center;
17488
+ gap: var(--lr-space-s);
17489
+ min-inline-size: 0;
17490
+ }
17491
+ .details-action-group lr-checkbox { flex: 1 1 auto; min-inline-size: 0; }
17492
+ </style>
17493
+ <lr-details class="responsive-actions" summary="Settings">
17494
+ <span slot="header-actions" class="details-action-group">
17495
+ <lr-checkbox size="s">Show distribution details</lr-checkbox>
17496
+ <lr-badge>Live</lr-badge>
17497
+ </span>
17498
+ Distribution settings.
17499
+ </lr-details>
17500
+ ```
17501
+
17502
+ Import the granular details, checkbox and badge registration entries. Adjust the `12rem` basis
17503
+ for the actual labels. Logical sizing supports RTL and narrower allocations; the checkbox remains
17504
+ independently focusable and operable when the summary is disabled.
17505
+
17459
17506
  **Themeable custom properties:** accordion item exposes `--lr-accordion-item-spacing` (default
17460
17507
  `var(--lr-form-control-padding-inline)`), `--lr-accordion-item-show-duration` and
17461
17508
  `--lr-accordion-item-hide-duration` (both default `var(--lr-duration-base)`), and
@@ -20386,6 +20433,11 @@ consumer-supplied `lr-menu` in the default slot becomes that contained engine in
20386
20433
  wrapped in another menu. This supports both Web Awesome's direct-item shape and Shoelace's
20387
20434
  consumer-menu shape.
20388
20435
 
20436
+ The inner menu list owns scrolling within the popup's height limit, keeping a consumer menu's
20437
+ header and footer visible. The outer `popup` and `content` parts allow overflow so nested submenus
20438
+ remain clickable outside the parent menu in every supported browser. This works with either
20439
+ submenu authoring shape, with or without `hoist` or an arrow; no overflow override is required.
20440
+
20389
20441
  An open lr-dropdown repositions when its effective host or inherited text direction changes,
20390
20442
  preserving open state without emitting lifecycle events.
20391
20443
 
@@ -23865,16 +23917,36 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
23865
23917
  defaults to 5 CSS pixels and `strokeWidth` to 0; both clamp to `[0, 200]`. `strokeColor` overrides
23866
23918
  the outline only, with the layer's flat color as fallback. Dropping options restores defaults.
23867
23919
 
23920
+ `radius` also accepts `LyraMapPointRadiusOptions { field, stops, interpolation?, fallback? }`
23921
+ for **numeric** feature-driven sizes. `field` is independent of the category field. The first 32
23922
+ pairs are inspected and finite `[value, radius]` pairs are sorted ascending; duplicate thresholds are first-wins and
23923
+ radii clamp to `[0, 200]`. `interpolation` defaults to `'step'`: below the first threshold use
23924
+ its radius, and each threshold is inclusive. `'linear'` interpolates between adjacent stops and
23925
+ clamps outside the domain. One usable stop is a constant for numeric features. Missing, null,
23926
+ non-numeric and non-finite feature values use `fallback` (default 5, clamped to `[0, 200]`), as
23927
+ do an empty field, unusable stops or a linear domain that cannot retain distinct finite intervals.
23928
+ Invalid interpolation values use step. These options style individual/unclustered points;
23929
+ cluster-count radii remain independent. Switching back to a number or removing the radius
23930
+ scale restores the fixed radius without recreating the source.
23931
+
23868
23932
  `point.icons` maps exact category values to `LyraMapPointIcon { value: string; path: string;
23869
- viewBox?: readonly [number, number, number, number] }`. `iconField` defaults to `field`.
23870
- Each icon is a **filled SVG path string**, not SVG markup or a URL. Copy an icon's path data,
23933
+ viewBox?: readonly [number, number, number, number]; mode?: LyraMapPointIconMode;
23934
+ strokeWidth?: number; lineCap?: LyraMapPointIconLineCap; lineJoin?: LyraMapPointIconLineJoin }`.
23935
+ `iconField` defaults to `field`. Each icon is **SVG path data**, not SVG markup or a URL. Copy an icon's path data,
23871
23936
  combine filled subpaths in that string, and supply its `[minX, minY, width, height]` viewBox
23872
- (default `[0, 0, 24, 24]`). Stroke-only drawings must first be converted to filled outlines.
23937
+ (default `[0, 0, 24, 24]`). `mode` defaults to `'fill'`; `'stroke'` draws open outline paths,
23938
+ and `'fill-stroke'` paints both. `strokeWidth` uses **viewBox units** (default 2, clamped to
23939
+ `[0, 200]`; zero omits the stroke), so it scales with the icon. `lineCap` accepts `'butt'`,
23940
+ `'round'`, or `'square'`; `lineJoin` accepts `'miter'`, `'round'`, or `'bevel'`. Both default
23941
+ to round; miter joins retain a limit of 10. Invalid modes/caps/joins restore their defaults,
23942
+ and a non-finite stroke width restores 2. Keep padding inside the viewBox for strokes at its
23943
+ edges, which are clipped to the fixed atlas square. These are icon-path options;
23944
+ `point.strokeWidth` and `point.strokeColor` continue to style the surrounding circle only.
23873
23945
  The first 32 entries are inspected, valid duplicates are first-wins, path data is capped at
23874
23946
  8192 characters, and viewBox coordinates must be finite within ±10000 with dimensions at least
23875
23947
  0.001. Invalid paths are ignored; markup, external references and event handlers cannot execute.
23876
23948
  Rasterization is synchronous and local, with no fetch or HTML/SVG document insertion.
23877
- `iconColor` accepts CSS variables and defaults to the tone's contrasting foreground; `iconSize`
23949
+ `iconColor` supplies both fill and stroke ink, accepts CSS variables and defaults to the tone's contrasting foreground; `iconSize`
23878
23950
  is the displayed bounding square in CSS pixels (default 16, clamped to `[1, 200]`). The fixed
23879
23951
  64px raster preserves the viewBox aspect ratio. Unknown categories, invalid icons and partial
23880
23952
  peers lacking image-atlas methods retain their colored circles. No sprite or glyph URL is needed.
@@ -23894,11 +23966,14 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
23894
23966
  map.dataLayers = [{
23895
23967
  sourceId: 'places', geojson: locations, cluster: {},
23896
23968
  point: {
23897
- field: 'category', radius: 12, strokeWidth: 1,
23969
+ field: 'category',
23970
+ radius: { field: 'visits', stops: [[0, 10], [10, 12], [50, 14], [100, 16]], fallback: 10 },
23971
+ strokeWidth: 1,
23898
23972
  colors: [['home', 'var(--lr-color-brand)'], ['work', 'var(--lr-color-success)']],
23899
23973
  icons: [
23900
23974
  { value: 'home', path: 'M2 12L12 2L22 12V22H2Z' },
23901
- { value: 'work', path: 'M8 2H16V6H22V22H2V6H8Z' },
23975
+ { value: 'work', path: 'M8 6V3H16V6M3 6H21V21H3ZM3 11H21',
23976
+ mode: 'stroke', strokeWidth: 1.75, lineCap: 'round', lineJoin: 'round' },
23902
23977
  ],
23903
23978
  iconSize: 14,
23904
23979
  },
@@ -23962,7 +24037,9 @@ payload beside the map.
23962
24037
 
23963
24038
  **Authoring types:** `LyraMapLegendEntry`, `LyraMapLegendPattern`, `LyraMapLegendProjection`, `LyraMapChoroplethLayer`,
23964
24039
  `LyraMapGeoJsonDataLayer`, `LyraMapDataLayerKind`, `LyraMapClusterOptions`, `LyraMapHeatmapOptions`,
23965
- `LyraMapHeatmapZoomValue`, `LyraMapLineOptions`, `LyraMapPointOptions`, `LyraMapPointIcon`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
24040
+ `LyraMapHeatmapZoomValue`, `LyraMapLineOptions`, `LyraMapPointOptions`, `LyraMapPointRadiusOptions`,
24041
+ `LyraMapPointRadiusInterpolation`, `LyraMapPointIcon`, `LyraMapPointIconMode`,
24042
+ `LyraMapPointIconLineCap`, `LyraMapPointIconLineJoin`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
23966
24043
  `LyraMapMarkerActivationSource`, `LyraMapStyleSpecification`, and `LyraMapInstance`.
23967
24044
  The former `LegendEntry`, `ChoroplethLayer`, `GeoJsonDataLayer`, and `MapMarker` names are removed
23968
24045
  in v9 rather than retained as aliases.
@@ -24007,6 +24084,16 @@ when `legend` and `legendGradient` are both empty.
24007
24084
  `legend-hi`, `legend-limit`, `marker`, `popup`,
24008
24085
  `popup-content`, `popup-close-button`, `attribution`, `attribution-toggle`, `navigation`,
24009
24086
  `zoom-in`, `zoom-out`, `compass`, `scale`, `error`.
24087
+ The compact attribution summary has a decorative, current-color information glyph and retains
24088
+ MapLibre's accessible name, keyboard/touch disclosure behavior and attribution links. To make
24089
+ only this control compact, scope the shared target-size token to its public wrapper:
24090
+
24091
+ ```css
24092
+ lr-map::part(attribution) { --lr-icon-button-size: var(--lr-size-24px); }
24093
+ ```
24094
+
24095
+ Keep that target at least 24px in both axes. This leaves navigation controls at their existing size.
24096
+
24010
24097
  `legend` is a localized `role="group"` containing a real list associated to the map canvas with
24011
24098
  `aria-describedby`; each entry is a `listitem`, decorative swatches are inert/accessibility-hidden,
24012
24099
  and the overlay is bounded to the map allocation with scrolling and long-label wrapping.
@@ -24025,6 +24112,9 @@ and use `addControl(new NavigationControl(), 'bottom-right')` and
24025
24112
  shadow-root modification is needed: navigation buttons, compass glyph, scale bar and control
24026
24113
  corners are styled with Lyra tokens. The corners follow inline start/end under RTL. The legend
24027
24114
  reserves vertical room for these controls and attribution, including after resize or removal.
24115
+ Attribution also reserves legend space when it is the only control. Opposing occupied corners
24116
+ share the available width, so expanded attribution wraps without covering a scale or navigation
24117
+ control on the other side; controls stay aligned to their logical edge in both text directions.
24028
24118
  Navigation exposes `navigation`, `zoom-in`, `zoom-out`, and `compass` parts; the scale exposes `scale`.
24029
24119
  Button names update through `zoomIn`, `zoomOut`, and `mapResetNorth` locale strings. MapLibre retains
24030
24120
  keyboard activation, compass rotation, zoom limits, scale units and viewport updates. No controls
@@ -26427,12 +26517,16 @@ These named interfaces and helper signatures are available to typed integrations
26427
26517
  readonly value: string;
26428
26518
  readonly path: string;
26429
26519
  readonly viewBox?: readonly [number, number, number, number];
26520
+ readonly mode?: LyraMapPointIconMode;
26521
+ readonly strokeWidth?: number;
26522
+ readonly lineCap?: LyraMapPointIconLineCap;
26523
+ readonly lineJoin?: LyraMapPointIconLineJoin;
26430
26524
  }`
26431
26525
  Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
26432
26526
  `LyraMapPointOptions {
26433
26527
  readonly field?: string;
26434
26528
  readonly colors?: readonly (readonly [string, string])[];
26435
- readonly radius?: number;
26529
+ readonly radius?: number | LyraMapPointRadiusOptions;
26436
26530
  readonly strokeWidth?: number;
26437
26531
  readonly strokeColor?: string;
26438
26532
  readonly iconField?: string;
@@ -26441,6 +26535,17 @@ These named interfaces and helper signatures are available to typed integrations
26441
26535
  readonly iconSize?: number;
26442
26536
  }`
26443
26537
  Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
26538
+ `LyraMapPointRadiusOptions {
26539
+ readonly field: string;
26540
+ readonly stops: readonly (readonly [number, number])[];
26541
+ readonly interpolation?: LyraMapPointRadiusInterpolation;
26542
+ readonly fallback?: number;
26543
+ }`
26544
+ `LyraMapPointRadiusInterpolation = 'step' | 'linear'`;
26545
+ `LyraMapPointIconMode = 'fill' | 'stroke' | 'fill-stroke'`;
26546
+ `LyraMapPointIconLineCap = 'butt' | 'round' | 'square'`;
26547
+ `LyraMapPointIconLineJoin = 'miter' | 'round' | 'bevel'`.
26548
+ Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
26444
26549
  `LyraMapInstance {
26445
26550
  getCanvas(): HTMLCanvasElement;
26446
26551
  getCenter(): {
@@ -26699,6 +26804,28 @@ structured points retain their y-value formatting.
26699
26804
  would clip. Its pressed state follows `hiddenDatasets` whenever that controlled snapshot is
26700
26805
  defined, otherwise the effective dataset's declarative `hidden` value before Chart.js is ready
26701
26806
  and across chart type/plugin rebuilds.
26807
+ - `legendMode: LyraChartLegendMode = 'dataset'` (attribute `legend-mode`) — `dataset` preserves
26808
+ dataset toggles. `datum` shows one category toggle per slice in pie, doughnut and polar-area
26809
+ charts; other types retain dataset legends. Category names use source labels with localized
26810
+ numbered fallbacks. Colors and values come from the first dataset. With multiple datasets/rings,
26811
+ a category toggle hides that source index in every ring, matching Chart.js category visibility.
26812
+ - `hiddenDatums: readonly number[] = []` (attribute: false) — clone-owned hidden source category
26813
+ indexes for radial charts. `[]` restores all categories. Invalid, duplicate and out-of-range
26814
+ indexes are ignored when applied or emitted. Programmatic changes are silent; accepted datum
26815
+ legend toggles write the complete next snapshot. Data and type replacements, reconnection and
26816
+ sampling retain source-index meaning. This state is independent of `hiddenDatasets`; hiding a
26817
+ whole dataset continues to hide its ring. Accessible data and CSV export retain hidden values.
26818
+ - `legendDisplay: LyraChartLegendDisplay = 'auto'` (attribute `legend-display`) — `auto` preserves
26819
+ the existing label with optional legend formatting. `label` always shows labels alone, even when
26820
+ `formatter`/`valueFormatter` supplies values for tooltips or axes. `value` appends the formatted
26821
+ numeric value. `percentage` appends a locale-formatted share independently of these callbacks:
26822
+ the denominator is the sum of absolute represented legend values, including hidden entries.
26823
+ Dataset entries use sampled sums; category entries use the first dataset's represented values.
26824
+ Zero totals give 0%. These options affect the DOM legend; tooltip/axis/table formatting is unchanged.
26825
+ Simplified pie/doughnut datasets with magnitudes above `Number.MAX_SAFE_INTEGER` are uniformly
26826
+ rescaled for finite canvas geometry. Lyra tooltips, data labels, legends, events and CSV retain
26827
+ original values; direct Chart.js callbacks see the rescaled peer data. Explicit `config.data`
26828
+ remains the unmodified full-fidelity escape hatch.
26702
26829
  - `legendPosition: LyraChartLegendPosition = 'top'` (attribute `legend-position`) — accepts the
26703
26830
  Chart.js `left|top|right|bottom|center|chartArea|{ [scaleId]: number }` positions plus logical
26704
26831
  `start`/`end`; the additive `auto` chooses right above 480px and bottom below that allocation
@@ -26882,6 +27009,22 @@ family-wide handling; `lr-point-click` remains as a compatibility event. Also
26882
27009
  `{ datasetIndex: number, visible: boolean, hiddenDatasets: readonly number[] }`; the latter is the
26883
27010
  complete, sorted, valid next snapshot. Call `preventDefault()` on the proposal to veto the toggle;
26884
27011
  then no property change or commit event occurs.
27012
+ Category toggles use a separate pair, `lr-before-datum-visibility-change` (cancelable proposal) and
27013
+ `lr-datum-visibility-change` (accepted commit), carrying
27014
+ `{ index: number, visible: boolean, hiddenDatums: readonly number[] }`. Both details and their
27015
+ complete, sorted index snapshots are frozen. `index` is the source category index, including when
27016
+ the displayed data is sampled; it applies across all rings. Programmatic assignments emit neither
27017
+ pair. `preventDefault()` leaves both controlled state and the chart unchanged.
27018
+
27019
+ ```html
27020
+ <lr-doughnut-chart
27021
+ legend-mode="datum"
27022
+ legend-display="label"
27023
+ .labels=${['A', 'B', 'C']}
27024
+ .datasets=${[{ label: 'Distribution', data: [5, 3, 2] }]}
27025
+ .hiddenDatums=${[]}
27026
+ ></lr-doughnut-chart>
27027
+ ```
26885
27028
 
26886
27029
  **Slots:** default — one optional `<script type="application/json">` Chart.js configuration;
26887
27030
  `data-table` — an optional consumer-provided complete, paginated, or virtualized accessible table
@@ -26899,8 +27042,8 @@ another application-owned presentation. Explicit `config.data` is the deliberate
26899
27042
  Chart.js escape hatch and is not rewritten by the simplified-surface sampler.
26900
27043
 
26901
27044
  **CSS parts:** `base`, `plot` (the fixed-height canvas/overlay region), `canvas`, `legend` (the
26902
- wrapping DOM legend), `legend-item` (a dataset-visibility button), `legend-item-hidden` (added to
26903
- that button while its dataset is hidden), `legend-swatch`,
27045
+ wrapping DOM legend), `legend-item` (a dataset/category visibility button), `legend-item-hidden`
27046
+ (added while the dataset/category is hidden), `legend-swatch`,
26904
27047
  `reset-zoom-button`, `description`, `notices` (wrapper for nonfatal feature warnings and
26905
27048
  bounded-alternative truncation notices), `data-table`, `data-table-toggle` (the `dataTableToggle` disclosure button), `data-truncation` (the bounded-alternative
26906
27049
  notice), `feature-warning` (a nonfatal missing optional-feature warning), `center` (the
@@ -27358,7 +27501,8 @@ and behavior there. **See `llms/components/lr-chart.md` for the details, code ex
27358
27501
  of every entry in these lists.**
27359
27502
 
27360
27503
  **Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
27361
- (`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
27504
+ (`legend-position`), `hiddenDatums`, `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`),
27505
+ `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
27362
27506
  `stacked`, `withoutAnimation` (`without-animation`),
27363
27507
  `withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
27364
27508
  `yLabel` (`y-label`), plus additive `labels`, `datasets`, `valueFormatter`, `formatter`, `area`, `zoom`,
@@ -27374,6 +27518,8 @@ of every entry in these lists.**
27374
27518
  index, label, value }`), `lr-before-legend-visibility-change` (cancelable), and
27375
27519
  `lr-legend-visibility-change` (commit; both legend events carry `datasetIndex`, `visible`, and the
27376
27520
  complete `hiddenDatasets` snapshot).
27521
+ Radial category legends additionally emit `lr-before-datum-visibility-change` (cancelable) and
27522
+ `lr-datum-visibility-change`, carrying `index`, `visible` and the frozen `hiddenDatums` snapshot.
27377
27523
 
27378
27524
  **Slots:** default JSON configuration script, `data-table`, `center`.
27379
27525
 
@@ -27443,7 +27589,8 @@ Bins `values` into `bins` equal-width buckets and renders as a bar chart (extend
27443
27589
  normalized `bins`), and `type` always reads back `'bar'` regardless of any assignment. This
27444
27590
  specialist owns its controller because a non-bar type would contradict the derived distribution.
27445
27591
  - All other `LyraChart` properties are inherited and usable: `description`, `grid`, `axes`, `compact`, `indexAxis`
27446
- (`index-axis`), `hiddenDatasets`, `legendPosition` (`legend-position`), `max`, `min`, `plugins`,
27592
+ (`index-axis`), `hiddenDatasets`, `hiddenDatums`, `legendPosition` (`legend-position`),
27593
+ `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`), `max`, `min`, `plugins`,
27447
27594
  `withoutAnimation` (`without-animation`), `withoutLegend` (`without-legend`), `withoutTooltip`
27448
27595
  (`without-tooltip`), `valueFormatter`, `formatter`, `area`, `zoom`, `config`, `height`, `xLabel` (`x-label`),
27449
27596
  `yLabel` (`y-label`), `y2Label` (`y2-label`), `beginAtZero` (`begin-at-zero`),
@@ -27455,9 +27602,12 @@ maxSamples?)` appends finite raw samples and optionally retains only the newest
27455
27602
  `appendData()` remains a working compatibility adapter (no longer deprecated); prefer
27456
27603
  `appendSamples()` for new code.
27457
27604
 
27458
- **Events:** `lr-zoom`, `lr-datum-activate`, `lr-point-click`, `lr-before-legend-visibility-change` (cancelable), and
27605
+ **Events:** `lr-zoom`, `lr-datum-activate`, `lr-point-click`, `lr-before-datum-visibility-change`
27606
+ (cancelable), `lr-datum-visibility-change`, `lr-before-legend-visibility-change` (cancelable), and
27459
27607
  `lr-legend-visibility-change` — inherited; `lr-point-click`'s `index` is the bucket index and
27460
27608
  `label` the generated bucket range string (`"lo–hi"`, both bounds at one decimal place).
27609
+ The inherited datum-visibility events apply only to radial controllers; the histogram keeps its
27610
+ bar controller and dataset legend even with `legend-mode="datum"`.
27461
27611
 
27462
27612
  **Slots:** default JSON configuration script, `data-table`, `center`.
27463
27613
 
@@ -27774,6 +27924,14 @@ These named interfaces and helper signatures are available to typed integrations
27774
27924
  readonly visible: boolean;
27775
27925
  readonly hiddenDatasets: readonly number[];
27776
27926
  }`
27927
+ Import: `@aceshooting/lyra-ui/components/charts/chart/chart.class.js`.
27928
+ `LyraChartDatumVisibilityChangeDetail {
27929
+ readonly index: number;
27930
+ readonly visible: boolean;
27931
+ readonly hiddenDatums: readonly number[];
27932
+ }`
27933
+ `LyraChartLegendMode = 'dataset' | 'datum'`
27934
+ `LyraChartLegendDisplay = 'auto' | 'label' | 'value' | 'percentage'`
27777
27935
 
27778
27936
  - **`components-charts-chart-chart-loader-contracts`** — Supporting data types and helpers for this component family.
27779
27937
  Import: `@aceshooting/lyra-ui/components/charts/chart/chart-feature-loader.js`.
@@ -27910,6 +28068,8 @@ These named interfaces and helper signatures are available to typed integrations
27910
28068
  };
27911
28069
  isDatasetVisible(index: number): boolean;
27912
28070
  setDatasetVisibility(index: number, visible: boolean): void;
28071
+ getDataVisibility?(index: number): boolean;
28072
+ toggleDataVisibility?(index: number): void;
27913
28073
  }`
27914
28074
  Import: `@aceshooting/lyra-ui/components/charts/chart/chart.class.js`.
27915
28075
  `LyraChartPlugin {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "14.2.0",
3
+ "version": "14.3.1",
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",
@@ -2408,7 +2408,7 @@
2408
2408
  "@types/mocha": "^10.0.10",
2409
2409
  "@types/papaparse": "^5.5.2",
2410
2410
  "@types/qrcode": "^1.5.6",
2411
- "@types/react": "^19.2.18",
2411
+ "@types/react": "^19.3.0",
2412
2412
  "@web/dev-server-esbuild": "^2.0.0",
2413
2413
  "@web/test-runner": "^1.0.0",
2414
2414
  "@web/test-runner-commands": "^1.0.1",
@@ -2430,13 +2430,13 @@
2430
2430
  "istanbul-lib-coverage": "^3.2.2",
2431
2431
  "istanbul-lib-report": "^3.0.1",
2432
2432
  "istanbul-reports": "^3.2.0",
2433
- "jszip": "^3.10.1",
2433
+ "jszip": "^3.10.2",
2434
2434
  "katex": "^0.18.7",
2435
- "libphonenumber-js": "^1.13.12",
2435
+ "libphonenumber-js": "^1.13.13",
2436
2436
  "mammoth": "^1.12.2",
2437
- "maplibre-gl": "^6.7.0",
2438
- "marked": "^18.0.11",
2439
- "oxc-parser": "^0.148.0",
2437
+ "maplibre-gl": "^6.9.0",
2438
+ "marked": "^18.0.12",
2439
+ "oxc-parser": "^0.149.0",
2440
2440
  "papaparse": "^5.7.0",
2441
2441
  "pdfjs-dist": "^6.3.289",
2442
2442
  "pixelmatch": "^7.2.0",
@@ -2444,7 +2444,7 @@
2444
2444
  "pngjs": "^7.0.0",
2445
2445
  "postal-mime": "^3.0.0",
2446
2446
  "qrcode": "^1.5.4",
2447
- "react": "^19.2.8",
2447
+ "react": "^19.3.0",
2448
2448
  "shiki": "^4.4.3",
2449
2449
  "svelte": "^5.57.0",
2450
2450
  "typescript": "^7.0.2",