@aceshooting/lyra-ui 14.2.0 → 14.3.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 (43) hide show
  1. package/CHANGELOG.md +24 -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/custom-elements-jsx.d.ts +1 -1
  16. package/dist/events.d.ts +17 -1
  17. package/dist/internal/icons.d.ts +2 -0
  18. package/dist/internal/icons.js +2 -2
  19. package/dist/internal/package-metadata.d.ts +1 -1
  20. package/dist/internal/package-metadata.js +1 -1
  21. package/dist/lyra.d.ts +1 -1
  22. package/dist/svelte.d.ts +1 -1
  23. package/dist/vue.d.ts +1 -1
  24. package/llms/components/lr-accordion-item.md +36 -0
  25. package/llms/components/lr-accordion.md +36 -0
  26. package/llms/components/lr-bar-chart.md +4 -1
  27. package/llms/components/lr-bubble-chart.md +4 -1
  28. package/llms/components/lr-button.md +5 -0
  29. package/llms/components/lr-chart.md +40 -2
  30. package/llms/components/lr-details.md +36 -0
  31. package/llms/components/lr-doughnut-chart.md +4 -1
  32. package/llms/components/lr-histogram.md +6 -2
  33. package/llms/components/lr-line-chart.md +4 -1
  34. package/llms/components/lr-map.md +45 -7
  35. package/llms/components/lr-pie-chart.md +4 -1
  36. package/llms/components/lr-polar-area-chart.md +4 -1
  37. package/llms/components/lr-radar-chart.md +4 -1
  38. package/llms/components/lr-scatter-chart.md +4 -1
  39. package/llms/components/lr-table.md +10 -4
  40. package/llms-full.txt +171 -16
  41. package/package.json +1 -1
  42. package/vscode-html-data.json +1 -1
  43. 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
@@ -23865,16 +23912,36 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
23865
23912
  defaults to 5 CSS pixels and `strokeWidth` to 0; both clamp to `[0, 200]`. `strokeColor` overrides
23866
23913
  the outline only, with the layer's flat color as fallback. Dropping options restores defaults.
23867
23914
 
23915
+ `radius` also accepts `LyraMapPointRadiusOptions { field, stops, interpolation?, fallback? }`
23916
+ for **numeric** feature-driven sizes. `field` is independent of the category field. The first 32
23917
+ pairs are inspected and finite `[value, radius]` pairs are sorted ascending; duplicate thresholds are first-wins and
23918
+ radii clamp to `[0, 200]`. `interpolation` defaults to `'step'`: below the first threshold use
23919
+ its radius, and each threshold is inclusive. `'linear'` interpolates between adjacent stops and
23920
+ clamps outside the domain. One usable stop is a constant for numeric features. Missing, null,
23921
+ non-numeric and non-finite feature values use `fallback` (default 5, clamped to `[0, 200]`), as
23922
+ do an empty field, unusable stops or a linear domain that cannot retain distinct finite intervals.
23923
+ Invalid interpolation values use step. These options style individual/unclustered points;
23924
+ cluster-count radii remain independent. Switching back to a number or removing the radius
23925
+ scale restores the fixed radius without recreating the source.
23926
+
23868
23927
  `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,
23928
+ viewBox?: readonly [number, number, number, number]; mode?: LyraMapPointIconMode;
23929
+ strokeWidth?: number; lineCap?: LyraMapPointIconLineCap; lineJoin?: LyraMapPointIconLineJoin }`.
23930
+ `iconField` defaults to `field`. Each icon is **SVG path data**, not SVG markup or a URL. Copy an icon's path data,
23871
23931
  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.
23932
+ (default `[0, 0, 24, 24]`). `mode` defaults to `'fill'`; `'stroke'` draws open outline paths,
23933
+ and `'fill-stroke'` paints both. `strokeWidth` uses **viewBox units** (default 2, clamped to
23934
+ `[0, 200]`; zero omits the stroke), so it scales with the icon. `lineCap` accepts `'butt'`,
23935
+ `'round'`, or `'square'`; `lineJoin` accepts `'miter'`, `'round'`, or `'bevel'`. Both default
23936
+ to round; miter joins retain a limit of 10. Invalid modes/caps/joins restore their defaults,
23937
+ and a non-finite stroke width restores 2. Keep padding inside the viewBox for strokes at its
23938
+ edges, which are clipped to the fixed atlas square. These are icon-path options;
23939
+ `point.strokeWidth` and `point.strokeColor` continue to style the surrounding circle only.
23873
23940
  The first 32 entries are inspected, valid duplicates are first-wins, path data is capped at
23874
23941
  8192 characters, and viewBox coordinates must be finite within ±10000 with dimensions at least
23875
23942
  0.001. Invalid paths are ignored; markup, external references and event handlers cannot execute.
23876
23943
  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`
23944
+ `iconColor` supplies both fill and stroke ink, accepts CSS variables and defaults to the tone's contrasting foreground; `iconSize`
23878
23945
  is the displayed bounding square in CSS pixels (default 16, clamped to `[1, 200]`). The fixed
23879
23946
  64px raster preserves the viewBox aspect ratio. Unknown categories, invalid icons and partial
23880
23947
  peers lacking image-atlas methods retain their colored circles. No sprite or glyph URL is needed.
@@ -23894,11 +23961,14 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
23894
23961
  map.dataLayers = [{
23895
23962
  sourceId: 'places', geojson: locations, cluster: {},
23896
23963
  point: {
23897
- field: 'category', radius: 12, strokeWidth: 1,
23964
+ field: 'category',
23965
+ radius: { field: 'visits', stops: [[0, 10], [10, 12], [50, 14], [100, 16]], fallback: 10 },
23966
+ strokeWidth: 1,
23898
23967
  colors: [['home', 'var(--lr-color-brand)'], ['work', 'var(--lr-color-success)']],
23899
23968
  icons: [
23900
23969
  { value: 'home', path: 'M2 12L12 2L22 12V22H2Z' },
23901
- { value: 'work', path: 'M8 2H16V6H22V22H2V6H8Z' },
23970
+ { value: 'work', path: 'M8 6V3H16V6M3 6H21V21H3ZM3 11H21',
23971
+ mode: 'stroke', strokeWidth: 1.75, lineCap: 'round', lineJoin: 'round' },
23902
23972
  ],
23903
23973
  iconSize: 14,
23904
23974
  },
@@ -23962,7 +24032,9 @@ payload beside the map.
23962
24032
 
23963
24033
  **Authoring types:** `LyraMapLegendEntry`, `LyraMapLegendPattern`, `LyraMapLegendProjection`, `LyraMapChoroplethLayer`,
23964
24034
  `LyraMapGeoJsonDataLayer`, `LyraMapDataLayerKind`, `LyraMapClusterOptions`, `LyraMapHeatmapOptions`,
23965
- `LyraMapHeatmapZoomValue`, `LyraMapLineOptions`, `LyraMapPointOptions`, `LyraMapPointIcon`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
24035
+ `LyraMapHeatmapZoomValue`, `LyraMapLineOptions`, `LyraMapPointOptions`, `LyraMapPointRadiusOptions`,
24036
+ `LyraMapPointRadiusInterpolation`, `LyraMapPointIcon`, `LyraMapPointIconMode`,
24037
+ `LyraMapPointIconLineCap`, `LyraMapPointIconLineJoin`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
23966
24038
  `LyraMapMarkerActivationSource`, `LyraMapStyleSpecification`, and `LyraMapInstance`.
23967
24039
  The former `LegendEntry`, `ChoroplethLayer`, `GeoJsonDataLayer`, and `MapMarker` names are removed
23968
24040
  in v9 rather than retained as aliases.
@@ -24007,6 +24079,16 @@ when `legend` and `legendGradient` are both empty.
24007
24079
  `legend-hi`, `legend-limit`, `marker`, `popup`,
24008
24080
  `popup-content`, `popup-close-button`, `attribution`, `attribution-toggle`, `navigation`,
24009
24081
  `zoom-in`, `zoom-out`, `compass`, `scale`, `error`.
24082
+ The compact attribution summary has a decorative, current-color information glyph and retains
24083
+ MapLibre's accessible name, keyboard/touch disclosure behavior and attribution links. To make
24084
+ only this control compact, scope the shared target-size token to its public wrapper:
24085
+
24086
+ ```css
24087
+ lr-map::part(attribution) { --lr-icon-button-size: var(--lr-size-24px); }
24088
+ ```
24089
+
24090
+ Keep that target at least 24px in both axes. This leaves navigation controls at their existing size.
24091
+
24010
24092
  `legend` is a localized `role="group"` containing a real list associated to the map canvas with
24011
24093
  `aria-describedby`; each entry is a `listitem`, decorative swatches are inert/accessibility-hidden,
24012
24094
  and the overlay is bounded to the map allocation with scrolling and long-label wrapping.
@@ -24025,6 +24107,9 @@ and use `addControl(new NavigationControl(), 'bottom-right')` and
24025
24107
  shadow-root modification is needed: navigation buttons, compass glyph, scale bar and control
24026
24108
  corners are styled with Lyra tokens. The corners follow inline start/end under RTL. The legend
24027
24109
  reserves vertical room for these controls and attribution, including after resize or removal.
24110
+ Attribution also reserves legend space when it is the only control. Opposing occupied corners
24111
+ share the available width, so expanded attribution wraps without covering a scale or navigation
24112
+ control on the other side; controls stay aligned to their logical edge in both text directions.
24028
24113
  Navigation exposes `navigation`, `zoom-in`, `zoom-out`, and `compass` parts; the scale exposes `scale`.
24029
24114
  Button names update through `zoomIn`, `zoomOut`, and `mapResetNorth` locale strings. MapLibre retains
24030
24115
  keyboard activation, compass rotation, zoom limits, scale units and viewport updates. No controls
@@ -26427,12 +26512,16 @@ These named interfaces and helper signatures are available to typed integrations
26427
26512
  readonly value: string;
26428
26513
  readonly path: string;
26429
26514
  readonly viewBox?: readonly [number, number, number, number];
26515
+ readonly mode?: LyraMapPointIconMode;
26516
+ readonly strokeWidth?: number;
26517
+ readonly lineCap?: LyraMapPointIconLineCap;
26518
+ readonly lineJoin?: LyraMapPointIconLineJoin;
26430
26519
  }`
26431
26520
  Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
26432
26521
  `LyraMapPointOptions {
26433
26522
  readonly field?: string;
26434
26523
  readonly colors?: readonly (readonly [string, string])[];
26435
- readonly radius?: number;
26524
+ readonly radius?: number | LyraMapPointRadiusOptions;
26436
26525
  readonly strokeWidth?: number;
26437
26526
  readonly strokeColor?: string;
26438
26527
  readonly iconField?: string;
@@ -26441,6 +26530,17 @@ These named interfaces and helper signatures are available to typed integrations
26441
26530
  readonly iconSize?: number;
26442
26531
  }`
26443
26532
  Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
26533
+ `LyraMapPointRadiusOptions {
26534
+ readonly field: string;
26535
+ readonly stops: readonly (readonly [number, number])[];
26536
+ readonly interpolation?: LyraMapPointRadiusInterpolation;
26537
+ readonly fallback?: number;
26538
+ }`
26539
+ `LyraMapPointRadiusInterpolation = 'step' | 'linear'`;
26540
+ `LyraMapPointIconMode = 'fill' | 'stroke' | 'fill-stroke'`;
26541
+ `LyraMapPointIconLineCap = 'butt' | 'round' | 'square'`;
26542
+ `LyraMapPointIconLineJoin = 'miter' | 'round' | 'bevel'`.
26543
+ Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
26444
26544
  `LyraMapInstance {
26445
26545
  getCanvas(): HTMLCanvasElement;
26446
26546
  getCenter(): {
@@ -26699,6 +26799,28 @@ structured points retain their y-value formatting.
26699
26799
  would clip. Its pressed state follows `hiddenDatasets` whenever that controlled snapshot is
26700
26800
  defined, otherwise the effective dataset's declarative `hidden` value before Chart.js is ready
26701
26801
  and across chart type/plugin rebuilds.
26802
+ - `legendMode: LyraChartLegendMode = 'dataset'` (attribute `legend-mode`) — `dataset` preserves
26803
+ dataset toggles. `datum` shows one category toggle per slice in pie, doughnut and polar-area
26804
+ charts; other types retain dataset legends. Category names use source labels with localized
26805
+ numbered fallbacks. Colors and values come from the first dataset. With multiple datasets/rings,
26806
+ a category toggle hides that source index in every ring, matching Chart.js category visibility.
26807
+ - `hiddenDatums: readonly number[] = []` (attribute: false) — clone-owned hidden source category
26808
+ indexes for radial charts. `[]` restores all categories. Invalid, duplicate and out-of-range
26809
+ indexes are ignored when applied or emitted. Programmatic changes are silent; accepted datum
26810
+ legend toggles write the complete next snapshot. Data and type replacements, reconnection and
26811
+ sampling retain source-index meaning. This state is independent of `hiddenDatasets`; hiding a
26812
+ whole dataset continues to hide its ring. Accessible data and CSV export retain hidden values.
26813
+ - `legendDisplay: LyraChartLegendDisplay = 'auto'` (attribute `legend-display`) — `auto` preserves
26814
+ the existing label with optional legend formatting. `label` always shows labels alone, even when
26815
+ `formatter`/`valueFormatter` supplies values for tooltips or axes. `value` appends the formatted
26816
+ numeric value. `percentage` appends a locale-formatted share independently of these callbacks:
26817
+ the denominator is the sum of absolute represented legend values, including hidden entries.
26818
+ Dataset entries use sampled sums; category entries use the first dataset's represented values.
26819
+ Zero totals give 0%. These options affect the DOM legend; tooltip/axis/table formatting is unchanged.
26820
+ Simplified pie/doughnut datasets with magnitudes above `Number.MAX_SAFE_INTEGER` are uniformly
26821
+ rescaled for finite canvas geometry. Lyra tooltips, data labels, legends, events and CSV retain
26822
+ original values; direct Chart.js callbacks see the rescaled peer data. Explicit `config.data`
26823
+ remains the unmodified full-fidelity escape hatch.
26702
26824
  - `legendPosition: LyraChartLegendPosition = 'top'` (attribute `legend-position`) — accepts the
26703
26825
  Chart.js `left|top|right|bottom|center|chartArea|{ [scaleId]: number }` positions plus logical
26704
26826
  `start`/`end`; the additive `auto` chooses right above 480px and bottom below that allocation
@@ -26882,6 +27004,22 @@ family-wide handling; `lr-point-click` remains as a compatibility event. Also
26882
27004
  `{ datasetIndex: number, visible: boolean, hiddenDatasets: readonly number[] }`; the latter is the
26883
27005
  complete, sorted, valid next snapshot. Call `preventDefault()` on the proposal to veto the toggle;
26884
27006
  then no property change or commit event occurs.
27007
+ Category toggles use a separate pair, `lr-before-datum-visibility-change` (cancelable proposal) and
27008
+ `lr-datum-visibility-change` (accepted commit), carrying
27009
+ `{ index: number, visible: boolean, hiddenDatums: readonly number[] }`. Both details and their
27010
+ complete, sorted index snapshots are frozen. `index` is the source category index, including when
27011
+ the displayed data is sampled; it applies across all rings. Programmatic assignments emit neither
27012
+ pair. `preventDefault()` leaves both controlled state and the chart unchanged.
27013
+
27014
+ ```html
27015
+ <lr-doughnut-chart
27016
+ legend-mode="datum"
27017
+ legend-display="label"
27018
+ .labels=${['A', 'B', 'C']}
27019
+ .datasets=${[{ label: 'Distribution', data: [5, 3, 2] }]}
27020
+ .hiddenDatums=${[]}
27021
+ ></lr-doughnut-chart>
27022
+ ```
26885
27023
 
26886
27024
  **Slots:** default — one optional `<script type="application/json">` Chart.js configuration;
26887
27025
  `data-table` — an optional consumer-provided complete, paginated, or virtualized accessible table
@@ -26899,8 +27037,8 @@ another application-owned presentation. Explicit `config.data` is the deliberate
26899
27037
  Chart.js escape hatch and is not rewritten by the simplified-surface sampler.
26900
27038
 
26901
27039
  **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`,
27040
+ wrapping DOM legend), `legend-item` (a dataset/category visibility button), `legend-item-hidden`
27041
+ (added while the dataset/category is hidden), `legend-swatch`,
26904
27042
  `reset-zoom-button`, `description`, `notices` (wrapper for nonfatal feature warnings and
26905
27043
  bounded-alternative truncation notices), `data-table`, `data-table-toggle` (the `dataTableToggle` disclosure button), `data-truncation` (the bounded-alternative
26906
27044
  notice), `feature-warning` (a nonfatal missing optional-feature warning), `center` (the
@@ -27358,7 +27496,8 @@ and behavior there. **See `llms/components/lr-chart.md` for the details, code ex
27358
27496
  of every entry in these lists.**
27359
27497
 
27360
27498
  **Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
27361
- (`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
27499
+ (`legend-position`), `hiddenDatums`, `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`),
27500
+ `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
27362
27501
  `stacked`, `withoutAnimation` (`without-animation`),
27363
27502
  `withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
27364
27503
  `yLabel` (`y-label`), plus additive `labels`, `datasets`, `valueFormatter`, `formatter`, `area`, `zoom`,
@@ -27374,6 +27513,8 @@ of every entry in these lists.**
27374
27513
  index, label, value }`), `lr-before-legend-visibility-change` (cancelable), and
27375
27514
  `lr-legend-visibility-change` (commit; both legend events carry `datasetIndex`, `visible`, and the
27376
27515
  complete `hiddenDatasets` snapshot).
27516
+ Radial category legends additionally emit `lr-before-datum-visibility-change` (cancelable) and
27517
+ `lr-datum-visibility-change`, carrying `index`, `visible` and the frozen `hiddenDatums` snapshot.
27377
27518
 
27378
27519
  **Slots:** default JSON configuration script, `data-table`, `center`.
27379
27520
 
@@ -27443,7 +27584,8 @@ Bins `values` into `bins` equal-width buckets and renders as a bar chart (extend
27443
27584
  normalized `bins`), and `type` always reads back `'bar'` regardless of any assignment. This
27444
27585
  specialist owns its controller because a non-bar type would contradict the derived distribution.
27445
27586
  - All other `LyraChart` properties are inherited and usable: `description`, `grid`, `axes`, `compact`, `indexAxis`
27446
- (`index-axis`), `hiddenDatasets`, `legendPosition` (`legend-position`), `max`, `min`, `plugins`,
27587
+ (`index-axis`), `hiddenDatasets`, `hiddenDatums`, `legendPosition` (`legend-position`),
27588
+ `legendMode` (`legend-mode`), `legendDisplay` (`legend-display`), `max`, `min`, `plugins`,
27447
27589
  `withoutAnimation` (`without-animation`), `withoutLegend` (`without-legend`), `withoutTooltip`
27448
27590
  (`without-tooltip`), `valueFormatter`, `formatter`, `area`, `zoom`, `config`, `height`, `xLabel` (`x-label`),
27449
27591
  `yLabel` (`y-label`), `y2Label` (`y2-label`), `beginAtZero` (`begin-at-zero`),
@@ -27455,9 +27597,12 @@ maxSamples?)` appends finite raw samples and optionally retains only the newest
27455
27597
  `appendData()` remains a working compatibility adapter (no longer deprecated); prefer
27456
27598
  `appendSamples()` for new code.
27457
27599
 
27458
- **Events:** `lr-zoom`, `lr-datum-activate`, `lr-point-click`, `lr-before-legend-visibility-change` (cancelable), and
27600
+ **Events:** `lr-zoom`, `lr-datum-activate`, `lr-point-click`, `lr-before-datum-visibility-change`
27601
+ (cancelable), `lr-datum-visibility-change`, `lr-before-legend-visibility-change` (cancelable), and
27459
27602
  `lr-legend-visibility-change` — inherited; `lr-point-click`'s `index` is the bucket index and
27460
27603
  `label` the generated bucket range string (`"lo–hi"`, both bounds at one decimal place).
27604
+ The inherited datum-visibility events apply only to radial controllers; the histogram keeps its
27605
+ bar controller and dataset legend even with `legend-mode="datum"`.
27461
27606
 
27462
27607
  **Slots:** default JSON configuration script, `data-table`, `center`.
27463
27608
 
@@ -27774,6 +27919,14 @@ These named interfaces and helper signatures are available to typed integrations
27774
27919
  readonly visible: boolean;
27775
27920
  readonly hiddenDatasets: readonly number[];
27776
27921
  }`
27922
+ Import: `@aceshooting/lyra-ui/components/charts/chart/chart.class.js`.
27923
+ `LyraChartDatumVisibilityChangeDetail {
27924
+ readonly index: number;
27925
+ readonly visible: boolean;
27926
+ readonly hiddenDatums: readonly number[];
27927
+ }`
27928
+ `LyraChartLegendMode = 'dataset' | 'datum'`
27929
+ `LyraChartLegendDisplay = 'auto' | 'label' | 'value' | 'percentage'`
27777
27930
 
27778
27931
  - **`components-charts-chart-chart-loader-contracts`** — Supporting data types and helpers for this component family.
27779
27932
  Import: `@aceshooting/lyra-ui/components/charts/chart/chart-feature-loader.js`.
@@ -27910,6 +28063,8 @@ These named interfaces and helper signatures are available to typed integrations
27910
28063
  };
27911
28064
  isDatasetVisible(index: number): boolean;
27912
28065
  setDatasetVisibility(index: number, visible: boolean): void;
28066
+ getDataVisibility?(index: number): boolean;
28067
+ toggleDataVisibility?(index: number): void;
27913
28068
  }`
27914
28069
  Import: `@aceshooting/lyra-ui/components/charts/chart/chart.class.js`.
27915
28070
  `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.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",