@aceshooting/lyra-ui 14.1.0 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/custom-elements.json +1 -1
- package/design-tokens.json +1 -1
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +16 -3
- package/dist/components/charts/chart/chart.class.js +3 -3
- package/dist/components/data/heatmap/heatmap.class.d.ts +44 -6
- package/dist/components/data/heatmap/heatmap.class.js +8 -2
- package/dist/components/data/heatmap/heatmap.styles.js +1 -1
- package/dist/components/forms/checkbox/checkbox.styles.js +1 -1
- package/dist/components/forms/date-picker/date-input.class.d.ts +7 -8
- package/dist/components/forms/date-picker/date-input.styles.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +12 -2
- package/dist/components/forms/locale-picker/locale-picker.class.js +7 -6
- package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
- package/dist/components/forms/slider/slider.class.d.ts +21 -5
- package/dist/components/forms/slider/slider.class.js +6 -5
- package/dist/components/forms/slider/slider.styles.js +1 -1
- package/dist/components/media/map/map-loader.d.ts +3 -1
- package/dist/components/media/map/map.class.d.ts +57 -5
- package/dist/components/media/map/map.class.js +1 -1
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/custom-elements-jsx.d.ts +1 -1
- package/dist/events.d.ts +4 -4
- package/dist/internal/default-strings.generated.d.ts +1 -1
- package/dist/internal/default-strings.generated.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/pt-BR.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/zh-CN.js +1 -1
- package/dist/vue.d.ts +1 -1
- package/llms/components/lr-bar-chart.md +1 -1
- package/llms/components/lr-bubble-chart.md +1 -1
- package/llms/components/lr-chart.md +27 -1
- package/llms/components/lr-checkbox.md +3 -1
- package/llms/components/lr-date-input.md +19 -33
- package/llms/components/lr-date-picker.md +19 -33
- package/llms/components/lr-doughnut-chart.md +1 -1
- package/llms/components/lr-heatmap.md +63 -4
- package/llms/components/lr-histogram.md +1 -1
- package/llms/components/lr-line-chart.md +1 -1
- package/llms/components/lr-locale-picker.md +16 -2
- package/llms/components/lr-map.md +93 -4
- package/llms/components/lr-pie-chart.md +1 -1
- package/llms/components/lr-polar-area-chart.md +1 -1
- package/llms/components/lr-radar-chart.md +1 -1
- package/llms/components/lr-scatter-chart.md +1 -1
- package/llms/components/lr-slider.md +20 -4
- package/llms-full.txt +276 -48
- package/package.json +4 -4
- package/vscode-css-data.json +1 -1
- package/vscode-html-data.json +1 -1
- package/web-types.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 26 parts, 24 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -113,6 +113,15 @@ single numeric string entry.
|
|
|
113
113
|
- `showValue: boolean = false` (attribute `show-value`) — opt-in numeric readout next to the track;
|
|
114
114
|
a range readout joins both values with an en dash. The explicit HTML spelling
|
|
115
115
|
`show-value="false"` stays false.
|
|
116
|
+
- `valueDisplay: SliderValueDisplay = 'numeric'` (attribute `value-display`) — `'numeric' |
|
|
117
|
+
'formatted'`. Opt into `formatted` to reuse `valueFormatter` (or `tooltipFormatter` when no
|
|
118
|
+
value formatter is supplied) for the visible readout too. Each range handle is formatted
|
|
119
|
+
separately; nullish results fall back to localized numbers. Existing ARIA and tooltip behavior
|
|
120
|
+
is unchanged. The callback owns its unit labels and locale formatting.
|
|
121
|
+
- `valuePlacement: SliderValuePlacement = 'inline'` (attribute `value-placement`) — `'inline' |
|
|
122
|
+
'label'`. With `showValue`, `label` places the readout opposite the label in a wrapping row that
|
|
123
|
+
follows RTL. The readout stays outside the accessible label. These presentation options update
|
|
124
|
+
on live `lr-input` changes without changing the commit-only `lr-change` contract.
|
|
116
125
|
- `value: number = 0`, `defaultValue: number = 0` (attribute `value`), `valueAsNumber: number`, and
|
|
117
126
|
`valueAsString: string` are synchronized and finite. Values normalize the low/high domain, snap
|
|
118
127
|
to the grid anchored at the low endpoint, then clamp so a non-grid endpoint remains reachable;
|
|
@@ -165,7 +174,8 @@ live value bubble per handle, present only with `with-tooltip`), `tooltip-visibl
|
|
|
165
174
|
`tooltip` element's part list_ while that handle is focused or dragged — visibility is encoded in
|
|
166
175
|
the part name because `::part(tooltip)[data-visible]` is invalid CSS and never matches; write
|
|
167
176
|
`::part(tooltip-visible)`). The tooltip also exposes `tooltip__tooltip`, `tooltip__content`, and
|
|
168
|
-
`tooltip__arrow`. `value` is the opt-in
|
|
177
|
+
`tooltip__arrow`. `value` is the opt-in readout; `label-row` contains the separate label and value
|
|
178
|
+
nodes when `showValue` and `valuePlacement="label"` are enabled.
|
|
169
179
|
|
|
170
180
|
**CSS custom states:** `disabled`, `dragging`, `focused`, `required`, `optional`, `valid`,
|
|
171
181
|
`invalid`, `user-valid`, and `user-invalid`. A slider always has a finite numeric value, so
|
|
@@ -270,8 +280,14 @@ is present for upstream form-surface parity but adds no missing-value constraint
|
|
|
270
280
|
value); ArrowUp/ArrowDown are never swapped, since direction only affects the horizontal inline axis.
|
|
271
281
|
- Changing `min`/`max`/`step` after mount automatically re-clamps/re-snaps the current `value` in the
|
|
272
282
|
next update — narrowing the domain can silently move the slider's value.
|
|
273
|
-
- `valueFormatter` is presentation-only: `aria-valuenow`,
|
|
274
|
-
|
|
283
|
+
- `valueFormatter` is presentation-only: `aria-valuenow`, geometry, form value, and emitted values
|
|
284
|
+
stay numeric. The visible readout stays numeric unless `valueDisplay="formatted"` is set.
|
|
285
|
+
- Numeric value/domain assignments in the same Lit update batch are normalized against the final
|
|
286
|
+
`min`, `max`, and `step`, regardless of binding order. Await `updateComplete` to read the settled
|
|
287
|
+
scalar or range endpoints. Immediate imperative readback remains clamped to the current domain;
|
|
288
|
+
separate update batches intentionally normalize independently. Programmatic normalization emits
|
|
289
|
+
no user input/change event.
|
|
290
|
+
With no formatter, `aria-valuetext` remains the
|
|
275
291
|
numeric string rendered by earlier versions; a nullish formatter result omits it.
|
|
276
292
|
- A pointer drag fires `lr-input` continuously and a single `lr-change` on release; a keyboard step
|
|
277
293
|
fires exactly one of each per press, but OS key-repeat while a key is held re-fires `lr-input` on
|
package/llms-full.txt
CHANGED
|
@@ -5373,44 +5373,30 @@ use the same normalization path as direct property writes.
|
|
|
5373
5373
|
`--lr-form-control-required-offset` retune or suppress it here exactly as they do on `lr-input`.
|
|
5374
5374
|
With no label text the part is hidden and no glyph is painted.
|
|
5375
5375
|
|
|
5376
|
-
**Themeable custom properties:** `--lr-date-input-padding-block` (default
|
|
5377
|
-
`--lr-
|
|
5378
|
-
`--lr-
|
|
5379
|
-
`--lr-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5376
|
+
**Themeable custom properties:** `--lr-date-input-padding-block` (default
|
|
5377
|
+
`--lr-form-control-padding-block`) pads the native text input; `--lr-date-input-padding-inline`
|
|
5378
|
+
(default `--lr-form-control-padding-inline`) pads the row. `--lr-date-input-font-size` defaults to
|
|
5379
|
+
`--lr-form-control-font-size`. The row floor `--lr-date-input-control-min-height` defaults to
|
|
5380
|
+
`--lr-form-control-height`. All four defaults follow the shared size ladder, including
|
|
5381
|
+
`small`/`medium`/`large` aliases and inherited `--lr-theme-form-control-height-*` overrides.
|
|
5382
|
+
Inherited or direct public values win. `pill` changes the private radius default to
|
|
5383
|
+
`--lr-radius-pill`; a public `--lr-date-input-radius` still wins.
|
|
5384
|
+
|
|
5385
|
+
Calendar and clear actions fit inside the selected row height while retaining at least 24×24
|
|
5386
|
+
CSS-pixel targets. At the default root size, rows measure 30/40/48/56px for s/m/l/xl; 2xs and xs
|
|
5387
|
+
grow to 26px to accommodate the 24px action plus the row borders. Custom content or font metrics
|
|
5388
|
+
can grow an unconstrained row. A theme setting the small tier to 36px produces a 36px date row.
|
|
5389
|
+
`--lr-date-input-control-height` remains undeclared by default and pins an exact row height when
|
|
5390
|
+
set. If it forces a row below its target size, the action overflows instead of shrinking.
|
|
5391
|
+
|
|
5392
|
+
The mapped `--show-duration` and `--hide-duration` hooks independently retime the popup's enter
|
|
5393
|
+
and exit transitions; both default to `var(--lr-transition-fast)`. Clear and calendar action
|
|
5394
|
+
state hooks are `--lr-date-input-action-hover-color`, `--lr-date-input-action-hover-bg`, and
|
|
5389
5395
|
`--lr-date-input-action-hover-radius` (defaults: text, transparent, and the input radius), plus
|
|
5390
5396
|
`--lr-date-input-action-active-color`, `--lr-date-input-action-active-bg`, and
|
|
5391
5397
|
`--lr-date-input-action-active-radius` for the pressed state. They inherit from theme ancestors;
|
|
5392
5398
|
direct values on `lr-date-input` win without retuning library-wide tokens.
|
|
5393
5399
|
|
|
5394
|
-
`--lr-date-input-control-height` pins an **exact** `input-wrapper` height (both floors and caps it).
|
|
5395
|
-
It is **undeclared by default**, so the row grows to fit its content — see "exact-height hatches"
|
|
5396
|
-
under `lr-input`. Pinning it _below_ the calendar toggle's 24×24 target is safe: the toggle keeps
|
|
5397
|
-
its own `--lr-icon-button-size` floor and simply overflows a short row rather than shrinking, so
|
|
5398
|
-
WCAG 2.2 SC 2.5.8 is preserved either way.
|
|
5399
|
-
|
|
5400
|
-
**Height parity with `lr-input` is density parity, not pixel parity.** The per-`size` padding and
|
|
5401
|
-
font-size scale is shared with `lr-input`, so the two look equally dense at a given `size` — but a
|
|
5402
|
-
same-`size` pair does **not** end up the same height, and code that assumes it will be
|
|
5403
|
-
disappointed at the small tiers. `[part='input-wrapper']` carries no intrinsic `min-block-size` of
|
|
5404
|
-
its own, while `[part='expand-button']` pins `min-block-size: var(--lr-icon-button-size)` that is
|
|
5405
|
-
deliberately **not** gated by `size` — the calendar toggle must keep a 24×24 touch target at every
|
|
5406
|
-
tier, and `lr-input`'s own password-toggle floors identically. So the row height is pinned
|
|
5407
|
-
transitively by that button: at `size="s"` an `lr-input` floors at `1.875rem`/30px, while an
|
|
5408
|
-
`lr-date-input` cannot go below roughly 40px plus its padding. Every default value of
|
|
5409
|
-
`--lr-date-input-control-min-height` sits below that transitive height, which means the floor is
|
|
5410
|
-
inert until you raise it past the button — a lower value changes nothing. To line the two controls
|
|
5411
|
-
up exactly, either raise `lr-input`'s floor to meet the date input, or lower
|
|
5412
|
-
`--lr-theme-icon-button-size` on a common ancestor (never below 24px).
|
|
5413
|
-
|
|
5414
5400
|
**Optional peer deps:** none.
|
|
5415
5401
|
|
|
5416
5402
|
```html
|
|
@@ -7682,7 +7668,9 @@ compacts this control with it. Set it to pin the box independently of the tier.
|
|
|
7682
7668
|
the label text: the box plus the gap beside it. It defaults to
|
|
7683
7669
|
`calc(var(--lr-checkbox-box-size) + var(--lr-space-s))`, and the rendered gap is
|
|
7684
7670
|
_derived_ from it, so the advertised value and the real label offset cannot drift. Setting it on
|
|
7685
|
-
the element (or on `lr-checkbox` in your own stylesheet) moves the label.
|
|
7671
|
+
the element (or on `lr-checkbox` in your own stylesheet) moves the label. The visible box
|
|
7672
|
+
aligns with the inline start of its transparent hit target, so a compact box plus gap remains
|
|
7673
|
+
clear of the label in both directions even when the hit target is wider than the box.
|
|
7686
7674
|
|
|
7687
7675
|
It is published so you can align your own per-option hint text under the label without re-deriving
|
|
7688
7676
|
that formula by reading the shadow styles. **But custom properties inherit down, not sideways**, so
|
|
@@ -7981,6 +7969,15 @@ single numeric string entry.
|
|
|
7981
7969
|
- `showValue: boolean = false` (attribute `show-value`) — opt-in numeric readout next to the track;
|
|
7982
7970
|
a range readout joins both values with an en dash. The explicit HTML spelling
|
|
7983
7971
|
`show-value="false"` stays false.
|
|
7972
|
+
- `valueDisplay: SliderValueDisplay = 'numeric'` (attribute `value-display`) — `'numeric' |
|
|
7973
|
+
'formatted'`. Opt into `formatted` to reuse `valueFormatter` (or `tooltipFormatter` when no
|
|
7974
|
+
value formatter is supplied) for the visible readout too. Each range handle is formatted
|
|
7975
|
+
separately; nullish results fall back to localized numbers. Existing ARIA and tooltip behavior
|
|
7976
|
+
is unchanged. The callback owns its unit labels and locale formatting.
|
|
7977
|
+
- `valuePlacement: SliderValuePlacement = 'inline'` (attribute `value-placement`) — `'inline' |
|
|
7978
|
+
'label'`. With `showValue`, `label` places the readout opposite the label in a wrapping row that
|
|
7979
|
+
follows RTL. The readout stays outside the accessible label. These presentation options update
|
|
7980
|
+
on live `lr-input` changes without changing the commit-only `lr-change` contract.
|
|
7984
7981
|
- `value: number = 0`, `defaultValue: number = 0` (attribute `value`), `valueAsNumber: number`, and
|
|
7985
7982
|
`valueAsString: string` are synchronized and finite. Values normalize the low/high domain, snap
|
|
7986
7983
|
to the grid anchored at the low endpoint, then clamp so a non-grid endpoint remains reachable;
|
|
@@ -8033,7 +8030,8 @@ live value bubble per handle, present only with `with-tooltip`), `tooltip-visibl
|
|
|
8033
8030
|
`tooltip` element's part list_ while that handle is focused or dragged — visibility is encoded in
|
|
8034
8031
|
the part name because `::part(tooltip)[data-visible]` is invalid CSS and never matches; write
|
|
8035
8032
|
`::part(tooltip-visible)`). The tooltip also exposes `tooltip__tooltip`, `tooltip__content`, and
|
|
8036
|
-
`tooltip__arrow`. `value` is the opt-in
|
|
8033
|
+
`tooltip__arrow`. `value` is the opt-in readout; `label-row` contains the separate label and value
|
|
8034
|
+
nodes when `showValue` and `valuePlacement="label"` are enabled.
|
|
8037
8035
|
|
|
8038
8036
|
**CSS custom states:** `disabled`, `dragging`, `focused`, `required`, `optional`, `valid`,
|
|
8039
8037
|
`invalid`, `user-valid`, and `user-invalid`. A slider always has a finite numeric value, so
|
|
@@ -8138,8 +8136,14 @@ is present for upstream form-surface parity but adds no missing-value constraint
|
|
|
8138
8136
|
value); ArrowUp/ArrowDown are never swapped, since direction only affects the horizontal inline axis.
|
|
8139
8137
|
- Changing `min`/`max`/`step` after mount automatically re-clamps/re-snaps the current `value` in the
|
|
8140
8138
|
next update — narrowing the domain can silently move the slider's value.
|
|
8141
|
-
- `valueFormatter` is presentation-only: `aria-valuenow`,
|
|
8142
|
-
|
|
8139
|
+
- `valueFormatter` is presentation-only: `aria-valuenow`, geometry, form value, and emitted values
|
|
8140
|
+
stay numeric. The visible readout stays numeric unless `valueDisplay="formatted"` is set.
|
|
8141
|
+
- Numeric value/domain assignments in the same Lit update batch are normalized against the final
|
|
8142
|
+
`min`, `max`, and `step`, regardless of binding order. Await `updateComplete` to read the settled
|
|
8143
|
+
scalar or range endpoints. Immediate imperative readback remains clamped to the current domain;
|
|
8144
|
+
separate update batches intentionally normalize independently. Programmatic normalization emits
|
|
8145
|
+
no user input/change event.
|
|
8146
|
+
With no formatter, `aria-valuetext` remains the
|
|
8143
8147
|
numeric string rendered by earlier versions; a nullish formatter result omits it.
|
|
8144
8148
|
- A pointer drag fires `lr-input` continuously and a single `lr-change` on release; a keyboard step
|
|
8145
8149
|
fires exactly one of each per press, but OS key-repeat while a key is held re-fires `lr-input` on
|
|
@@ -9605,6 +9609,14 @@ readonly LyraLocaleEntry[]`, `LyraLocaleEntry { tag: string; label?: string; cou
|
|
|
9605
9609
|
- `showFlags: boolean = true` — each row's leading `<lr-flag language={tag} variant="compact">`
|
|
9606
9610
|
(or `<lr-flag country={country} variant="compact">` when the entry sets `country`); `false`
|
|
9607
9611
|
omits the flag element entirely (not just visually).
|
|
9612
|
+
- `triggerDisplay: LyraLocaleTriggerDisplay = 'flag-label'` (attribute `trigger-display`) —
|
|
9613
|
+
`'flag' | 'label' | 'flag-label'`. The default keeps the flag, label and chevron. `label`
|
|
9614
|
+
omits only the trigger flag; the menu keeps its flags and endonyms. `flag` centers the flag in
|
|
9615
|
+
a square and hides the visible label and chevron. The `trigger-label` remains available to
|
|
9616
|
+
assistive technology and describes the trigger's current language; its accessible name still
|
|
9617
|
+
follows `label`/the host `aria-label`. The square uses the shared/scoped trigger height with a
|
|
9618
|
+
24px floor. `showFlags=false` retains visible text in every mode. Selection, keyboard navigation,
|
|
9619
|
+
form values and the uncommitted effective-locale preview keep their usual behavior.
|
|
9608
9620
|
- `value: string = ''` — the **committed** selection (form value, drives `lr-change`). While `''`
|
|
9609
9621
|
and untouched, the trigger _displays_ `effectiveLocale` as a preview label, but
|
|
9610
9622
|
`checkValidity()`/`required` are governed by the real `value`, which stays `''` until a real
|
|
@@ -9668,7 +9680,8 @@ priority until cleared.
|
|
|
9668
9680
|
|
|
9669
9681
|
**CSS parts:** `form-control`, `form-control-label`, `trigger`,
|
|
9670
9682
|
`trigger-flag` (the trigger's leading `<lr-flag>` for the current value, present only while
|
|
9671
|
-
`showFlags` is on
|
|
9683
|
+
`showFlags` is on and `triggerDisplay` is not `label`), `trigger-label` (the current language,
|
|
9684
|
+
visually hidden in flag-only mode), `listbox`, `option`, `option-flag` (present only while `showFlags` is on),
|
|
9672
9685
|
`option-label`, `option-tag` (the row's secondary line — the raw BCP-47 tag), `expand-icon`,
|
|
9673
9686
|
`hint`, `error`.
|
|
9674
9687
|
|
|
@@ -9693,6 +9706,11 @@ quiet-brand, and semibold semantic tokens.
|
|
|
9693
9706
|
peer warning duplication; `lr-flag` itself already logs one) when the optional
|
|
9694
9707
|
`@aceshooting/lyra-flags` package isn't installed and `showFlags` is left on.
|
|
9695
9708
|
|
|
9709
|
+
A compact header can set `trigger-display="flag"` and
|
|
9710
|
+
`--lr-locale-picker-trigger-height: 2.25rem` for a 36px square at the usual 16px root size.
|
|
9711
|
+
Import `@aceshooting/lyra-ui/components/media/flag/flag-peer.js` to register the optional flag
|
|
9712
|
+
resolver. Menu labels stay visible; a per-entry `country` override also reaches the compact trigger.
|
|
9713
|
+
|
|
9696
9714
|
```html
|
|
9697
9715
|
<lr-locale-picker label="Language"></lr-locale-picker>
|
|
9698
9716
|
<script type="module">
|
|
@@ -11660,6 +11678,20 @@ weekdayLabelWidth?: number|'auto'; weekdayLabelText?: (jsWeekday:number)=>string
|
|
|
11660
11678
|
- `cellSize: number = 22` (attribute `cell-size` — default `22` in matrix mode, `11` in calendar
|
|
11661
11679
|
mode when left unset; explicitly setting it now governs both modes' per-cell size alike, and it's
|
|
11662
11680
|
ignored in either mode when `fitToWidth` is set)
|
|
11681
|
+
- `cellGapX: number = 1` / `cellGapY: number = 1` (attributes `cell-gap-x` / `cell-gap-y`) —
|
|
11682
|
+
matrix-only trailing horizontal/vertical gaps in CSS pixels, subtracted from the square
|
|
11683
|
+
`cellSize` pitch. Negative values clamp to zero, non-finite values use `1`, and oversized gaps
|
|
11684
|
+
leave at least one painted pixel. Custom geometry with `accessibleCells` grows the minimum pitch
|
|
11685
|
+
and caps gaps to preserve the `--lr-icon-button-size` target floor. Calendar spacing is unchanged.
|
|
11686
|
+
- `cellRadius: number = 0` (attribute `cell-radius`) — matrix-only painted corner radius in CSS
|
|
11687
|
+
pixels, clamped from zero to half the smaller painted side; non-finite values use zero. Custom
|
|
11688
|
+
cell fills, focus/selection/annotation rings, semantic overlays, and PNG canvas output share the
|
|
11689
|
+
same bounds. Custom gaps are excluded from canvas pointer hits; rounded cells retain rectangular
|
|
11690
|
+
interaction bounds. The default one-pixel separator retains its existing hit area.
|
|
11691
|
+
- `colLabelInterval: number = 1` (attribute `col-label-interval`) — paint every Nth matrix column
|
|
11692
|
+
label starting at column zero, including frozen labels and rotated label measurement. Truncated
|
|
11693
|
+
to an integer of at least one; non-finite values use `1`. Every original `data.colLabels` value
|
|
11694
|
+
remains available to tooltips, keyboard announcements, semantic cells, and `cellText`.
|
|
11663
11695
|
- `fitToWidth: boolean = false` (attribute `fit-to-width` — derives `cellSize` from the host's
|
|
11664
11696
|
measured `clientWidth` on every draw/resize instead of the fixed `cell-size`, so the grid actually
|
|
11665
11697
|
fills the available width; now applies to calendar mode as well as matrix mode — see gotchas for
|
|
@@ -11774,6 +11806,44 @@ row?: number; col?: number; date?: string }`, matched the same way as `annotatio
|
|
|
11774
11806
|
announcement when the focused cell is the selection. Purely a controlled property — mirrors
|
|
11775
11807
|
`<lr-lite-chart>`'s `selectedIndices`, this component never mutates it itself. Unset (the default,
|
|
11776
11808
|
`null`) reproduces today's exact output.
|
|
11809
|
+
- `multiple: boolean = false` — opts into controlled multi-cell selection through `selectedCells`.
|
|
11810
|
+
The existing `selectedCell` is ignored while enabled and resumes when disabled. Single-cell
|
|
11811
|
+
behavior is unchanged when omitted.
|
|
11812
|
+
- `selectedCells: readonly HeatmapSelectedCell[] = []` (attribute: false) — clone-owned selection
|
|
11813
|
+
input, inspected up to `MAX_HEATMAP_CELLS` (10,000) entries. Duplicates, non-integer/out-of-grid
|
|
11814
|
+
coordinates and non-interactive cells are ignored. Matrix records use `{ row, col }`; calendar
|
|
11815
|
+
records use `{ date }`, including interactive calendar gaps. The component never assigns this
|
|
11816
|
+
property in response to user input. It draws selected rings and, with `accessibleCells`, exposes
|
|
11817
|
+
per-cell `aria-selected` plus grid `aria-multiselectable="true"`. The localized accessible summary
|
|
11818
|
+
reports the selected count through `heatmapSelectedCount`.
|
|
11819
|
+
|
|
11820
|
+
`lr-selection-change` is a non-cancelable proposal: frozen `HeatmapSelectionChangeDetail {
|
|
11821
|
+
selectedCells: readonly Readonly<HeatmapSelectedCell>[]; source: HeatmapSelectionSource }`, with
|
|
11822
|
+
source `'pointer' | 'keyboard' | 'row' | 'column'`. Assign the event's array back to `selectedCells`
|
|
11823
|
+
to accept it; property assignments are silent. Output is deduplicated in row/column order. Click
|
|
11824
|
+
or Enter/Space toggles one cell and retains `lr-cell-click`. Pointer dragging paints or erases
|
|
11825
|
+
according to the starting cell, previews transient selection, and proposes once on release;
|
|
11826
|
+
pointer cancellation, Escape, disconnect, data/mode changes discard the gesture. A drag does
|
|
11827
|
+
not emit a cell click. Shift+arrows extends/contracts a rectangle from the anchor while retaining
|
|
11828
|
+
unrelated pre-range selection. Directions remain physical under RTL, matching the canvas.
|
|
11829
|
+
|
|
11830
|
+
`toggleRowSelection(row: number): void` and `toggleColumnSelection(col: number): void` propose
|
|
11831
|
+
whole-axis toggles for application-owned controls: remove an entirely selected axis, otherwise
|
|
11832
|
+
add its interactive cells. Shift+Space and Ctrl/Meta+Space invoke those actions for the focused
|
|
11833
|
+
row/column. Calendar rows are weekday rows 0–6 and columns are zero-based weeks. Invalid indices
|
|
11834
|
+
and calls outside `multiple` mode are no-ops. For a narrow day/hour matrix, use `accessibleCells`
|
|
11835
|
+
and `stickyLabels="both"` to retain usable targets within the component's own scrollport.
|
|
11836
|
+
|
|
11837
|
+
```js
|
|
11838
|
+
import '@aceshooting/lyra-ui/components/lr-heatmap.js';
|
|
11839
|
+
const heatmap = document.querySelector('lr-heatmap');
|
|
11840
|
+
heatmap.multiple = true;
|
|
11841
|
+
heatmap.accessibleCells = true;
|
|
11842
|
+
heatmap.addEventListener('lr-selection-change', event => {
|
|
11843
|
+
heatmap.selectedCells = event.detail.selectedCells;
|
|
11844
|
+
// Derive filter state from the accepted row/column coordinates.
|
|
11845
|
+
});
|
|
11846
|
+
```
|
|
11777
11847
|
- `accessibleCells: boolean = false` (attribute `accessible-cells`) — renders `[part="cells"]` with
|
|
11778
11848
|
at most 400 `[part="cell"]` native buttons around the active cell. The semantic grid exposes the
|
|
11779
11849
|
full row/column counts, buttons expose localized `aria-label`s and explicit `aria-selected`, and
|
|
@@ -11865,16 +11935,23 @@ color?: string; label?: string; partOfRamp?: boolean }`: a discrete legend key r
|
|
|
11865
11935
|
|
|
11866
11936
|
**Getters/methods:** `refreshTheme()` — redraws canvas content after an upstream design-token or
|
|
11867
11937
|
color-scheme change; called automatically on theme changes, exposed for a consumer that needs to
|
|
11868
|
-
force a redraw manually. `matrixGeometry: Readonly<
|
|
11869
|
-
number }> | undefined` — the gutter/cell geometry the last matrix-mode draw actually painted with,
|
|
11938
|
+
force a redraw manually. `matrixGeometry: Readonly<LyraHeatmapMatrixGeometryChangeDetail> | undefined` — the gutter/cell geometry the last matrix-mode draw actually painted with,
|
|
11870
11939
|
in CSS pixels; `undefined` in calendar mode. Lets a light-DOM consumer line up with the canvas
|
|
11871
11940
|
without hardcoding the same numbers `row-label-width`/`col-label-height`'s `"auto"` resolution would
|
|
11872
11941
|
otherwise keep private. For the case that motivated it — a frozen header or gutter on a tall or wide
|
|
11873
11942
|
matrix — prefer `stickyLabels`, which freezes the band inside the component and needs no mirror at
|
|
11874
11943
|
all; the getter remains the way to align a *separate* element (a sibling chart, a custom overlay)
|
|
11875
|
-
with the grid.
|
|
11944
|
+
with the grid. `LyraHeatmapMatrixGeometryChangeDetail` contains `padLeft`, `padTop`, and `cellSize`
|
|
11945
|
+
(the square pitch), plus optional `cellWidth`, `cellHeight`, and `cellRadius` for custom matrix
|
|
11946
|
+
presentation. When those optional fields are absent, painted width/height are `cellSize - 1` and
|
|
11947
|
+
radius is zero. The getter and geometry-change event always share one frozen snapshot, including
|
|
11948
|
+
changes to the resolved gaps/radius.
|
|
11876
11949
|
|
|
11877
|
-
|
|
11950
|
+
For a fluid day/hour matrix, keep all 24 hour strings in `data.colLabels` and use
|
|
11951
|
+
`fit-to-width cell-gap-x="1" cell-gap-y="2" cell-radius="2" col-label-interval="3"`.
|
|
11952
|
+
For a single fluid square cell, use `fit-to-width` with equal horizontal and vertical gaps.
|
|
11953
|
+
|
|
11954
|
+
**Events:** `lr-selection-change` (not cancelable; frozen readonly `HeatmapSelectionChangeDetail { selectedCells, source }` proposal in multiple mode, with `source: 'pointer' | 'keyboard' | 'row' | 'column'`; accept it by assigning `selectedCells`). `lr-cell-click` (fired on click, or Enter/Space on the keyboard-focused cell —
|
|
11878
11955
|
`detail: { row, col, value }` in matrix mode, `detail: { date, value }` in calendar mode),
|
|
11879
11956
|
`lr-matrix-geometry-change` (fired after a matrix-mode draw whose resolved `matrixGeometry` differs
|
|
11880
11957
|
from the previous draw — e.g. after `row-label-width="auto"`/`col-label-height="auto"` resolves
|
|
@@ -14116,6 +14193,11 @@ These named interfaces and helper signatures are available to typed integrations
|
|
|
14116
14193
|
date?: string;
|
|
14117
14194
|
}`
|
|
14118
14195
|
Import: `@aceshooting/lyra-ui/components/data/heatmap/heatmap.class.js`.
|
|
14196
|
+
`HeatmapSelectionChangeDetail {
|
|
14197
|
+
readonly selectedCells: readonly Readonly<HeatmapSelectedCell>[];
|
|
14198
|
+
readonly source: HeatmapSelectionSource;
|
|
14199
|
+
}`
|
|
14200
|
+
Import: `@aceshooting/lyra-ui/components/data/heatmap/heatmap.class.js`.
|
|
14119
14201
|
`hexToRgb(hex: string): [number, number, number, number] | null`
|
|
14120
14202
|
Import: `@aceshooting/lyra-ui/components/data/heatmap/heatmap.class.js`.
|
|
14121
14203
|
`MatrixCellPos {
|
|
@@ -23677,7 +23759,8 @@ string; geojson: GeoJSON.FeatureCollection; field: string; stops: [number, strin
|
|
|
23677
23759
|
- `dataLayers: LyraMapGeoJsonDataLayer[] = []` (attribute: false) —
|
|
23678
23760
|
`LyraMapGeoJsonDataLayer { sourceId: string; geojson: GeoJSON.Feature |
|
|
23679
23761
|
GeoJSON.FeatureCollection; tone?: 'accent' | 'success' | 'warning' |
|
|
23680
|
-
'danger' | 'neutral'; color?: string; strokeColor?: string;
|
|
23762
|
+
'danger' | 'neutral'; color?: string; strokeColor?: string; line?: LyraMapLineOptions;
|
|
23763
|
+
point?: LyraMapPointOptions; kind?: LyraMapDataLayerKind;
|
|
23681
23764
|
heatmap?: LyraMapHeatmapOptions; cluster?: LyraMapClusterOptions }`. `sourceId` is trimmed and must be nonempty; the first layer for a
|
|
23682
23765
|
`sourceId` that is successfully admitted wins; blank, malformed, and later duplicate records are
|
|
23683
23766
|
ignored without reserving an identity for a valid later sibling. Each retained entry adds one
|
|
@@ -23762,6 +23845,81 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
|
|
|
23762
23845
|
peer's default untouched on construction, and dropping a previously-authored value restores 1.
|
|
23763
23846
|
`cluster` is ignored on a heatmap entry: a heatmap already aggregates density, and clustering its
|
|
23764
23847
|
input would feed it one point per cluster instead of the real distribution.
|
|
23848
|
+
`line?: LyraMapLineOptions { field?: string; stops?: readonly (readonly [number, string])[];
|
|
23849
|
+
width?: number; opacity?: number }` configures line/outline paint for an ordinary `dataLayers`
|
|
23850
|
+
entry. `field` names a numeric feature property; two usable `[value, color]` stops produce a
|
|
23851
|
+
continuous linear ramp. Missing, null, and non-numeric feature values use `strokeColor`, then
|
|
23852
|
+
`color`, then `tone`. Stops inspect the first 64 entries, discard non-finite values and invalid
|
|
23853
|
+
CSS colors, sort ascending, and retain the first duplicate threshold. Fewer than two stops or
|
|
23854
|
+
an absent field preserves flat color. Values beyond the endpoints clamp to their endpoint color.
|
|
23855
|
+
CSS variables resolve on the host during reconciliation and retheming. `width` defaults to 2 CSS
|
|
23856
|
+
pixels and clamps to `[0, 200]`; `opacity` defaults to 1 and clamps to `[0, 1]`. Non-finite values
|
|
23857
|
+
restore those defaults, as does dropping a previously-authored option. Point colors and polygon
|
|
23858
|
+
fills are unaffected; cluster and heatmap entries ignore `line`.
|
|
23859
|
+
|
|
23860
|
+
`point?: LyraMapPointOptions` styles individual points on ordinary and clustered auto entries.
|
|
23861
|
+
It is ignored for heatmaps. `field` names a **string** feature property; `colors` maps exact
|
|
23862
|
+
`[category, CSS color]` pairs. Missing, unknown and non-string categories use the existing
|
|
23863
|
+
`strokeColor`/`color`/`tone` fallback. The first 32 pairs are inspected and valid duplicates are
|
|
23864
|
+
first-wins. CSS variables resolve on the host and follow ancestor theme changes. `radius`
|
|
23865
|
+
defaults to 5 CSS pixels and `strokeWidth` to 0; both clamp to `[0, 200]`. `strokeColor` overrides
|
|
23866
|
+
the outline only, with the layer's flat color as fallback. Dropping options restores defaults.
|
|
23867
|
+
|
|
23868
|
+
`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,
|
|
23871
|
+
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.
|
|
23873
|
+
The first 32 entries are inspected, valid duplicates are first-wins, path data is capped at
|
|
23874
|
+
8192 characters, and viewBox coordinates must be finite within ±10000 with dimensions at least
|
|
23875
|
+
0.001. Invalid paths are ignored; markup, external references and event handlers cannot execute.
|
|
23876
|
+
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`
|
|
23878
|
+
is the displayed bounding square in CSS pixels (default 16, clamped to `[1, 200]`). The fixed
|
|
23879
|
+
64px raster preserves the viewBox aspect ratio. Unknown categories, invalid icons and partial
|
|
23880
|
+
peers lacking image-atlas methods retain their colored circles. No sprite or glyph URL is needed.
|
|
23881
|
+
|
|
23882
|
+
All categories use the **same GeoJSON source** and cluster across categories. Cluster circles
|
|
23883
|
+
keep the existing count-based styling; only unclustered points get category colors/icons.
|
|
23884
|
+
An optional symbol layer and at most 32 images are allocated per configured source, with no
|
|
23885
|
+
per-feature DOM markers. Data changes reuse the source, retheming updates paint/icon pixels,
|
|
23886
|
+
and style reloads restore the owned resources. Removing the entry or icons releases its images.
|
|
23887
|
+
`lr-map-click` on either a point's circle or icon returns `origin: 'data-layer'`, the public
|
|
23888
|
+
`sourceId`, and the rendered feature. For clustered GeoJSON, use numeric feature IDs and keep
|
|
23889
|
+
string business IDs in feature properties, as MapLibre's cluster tiling uses numeric IDs. Canvas export includes both; supply an accessible textual
|
|
23890
|
+
legend/list for category interpretation and individual keyboard actions.
|
|
23891
|
+
|
|
23892
|
+
```js
|
|
23893
|
+
import '@aceshooting/lyra-ui/components/lr-map.js';
|
|
23894
|
+
map.dataLayers = [{
|
|
23895
|
+
sourceId: 'places', geojson: locations, cluster: {},
|
|
23896
|
+
point: {
|
|
23897
|
+
field: 'category', radius: 12, strokeWidth: 1,
|
|
23898
|
+
colors: [['home', 'var(--lr-color-brand)'], ['work', 'var(--lr-color-success)']],
|
|
23899
|
+
icons: [
|
|
23900
|
+
{ value: 'home', path: 'M2 12L12 2L22 12V22H2Z' },
|
|
23901
|
+
{ value: 'work', path: 'M8 2H16V6H22V22H2V6H8Z' },
|
|
23902
|
+
],
|
|
23903
|
+
iconSize: 14,
|
|
23904
|
+
},
|
|
23905
|
+
}];
|
|
23906
|
+
```
|
|
23907
|
+
|
|
23908
|
+
Share the same stops with `legendGradient` and set its endpoint labels for units. A gradient
|
|
23909
|
+
matching a line ramp remains linear even alongside a logarithmic choropleth. Changing metric,
|
|
23910
|
+
filtered GeoJSON, width or opacity reconciles existing resources; style reloads restore the layer.
|
|
23911
|
+
Lines remain in MapLibre's canvas and can be captured with the map's normal render-event PNG
|
|
23912
|
+
export flow.
|
|
23913
|
+
|
|
23914
|
+
```js
|
|
23915
|
+
mapElement.dataLayers = [{
|
|
23916
|
+
sourceId: 'routes', geojson: routes,
|
|
23917
|
+
line: { field: 'kmh', stops: speedStops, width: 4, opacity: 0.9 }
|
|
23918
|
+
}];
|
|
23919
|
+
mapElement.legendGradient = speedStops;
|
|
23920
|
+
mapElement.legendGradientLoLabel = '0 km/h';
|
|
23921
|
+
mapElement.legendGradientHiLabel = '100 km/h';
|
|
23922
|
+
```
|
|
23765
23923
|
- `maxBounds: LyraMapBounds | null = null` (attribute: false) — box the map may not pan outside,
|
|
23766
23924
|
`[[west, south], [east, north]]`. Prefer it over calling `map.setMaxBounds()` through the `.map`
|
|
23767
23925
|
escape hatch: constraining the camera can wedge maplibre-gl at a sub-1 fractional zoom in a wide
|
|
@@ -23804,7 +23962,7 @@ payload beside the map.
|
|
|
23804
23962
|
|
|
23805
23963
|
**Authoring types:** `LyraMapLegendEntry`, `LyraMapLegendPattern`, `LyraMapLegendProjection`, `LyraMapChoroplethLayer`,
|
|
23806
23964
|
`LyraMapGeoJsonDataLayer`, `LyraMapDataLayerKind`, `LyraMapClusterOptions`, `LyraMapHeatmapOptions`,
|
|
23807
|
-
`LyraMapHeatmapZoomValue`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
|
|
23965
|
+
`LyraMapHeatmapZoomValue`, `LyraMapLineOptions`, `LyraMapPointOptions`, `LyraMapPointIcon`, `LyraMapMarker`, `LyraMapMarkerActivationDetail`,
|
|
23808
23966
|
`LyraMapMarkerActivationSource`, `LyraMapStyleSpecification`, and `LyraMapInstance`.
|
|
23809
23967
|
The former `LegendEntry`, `ChoroplethLayer`, `GeoJsonDataLayer`, and `MapMarker` names are removed
|
|
23810
23968
|
in v9 rather than retained as aliases.
|
|
@@ -23847,7 +24005,8 @@ when `legend` and `legendGradient` are both empty.
|
|
|
23847
24005
|
|
|
23848
24006
|
**CSS parts:** `base`, `container`, `legend`, `legend-swatch`, `legend-gradient`, `legend-lo`,
|
|
23849
24007
|
`legend-hi`, `legend-limit`, `marker`, `popup`,
|
|
23850
|
-
`popup-content`, `popup-close-button`, `attribution`, `attribution-toggle`, `
|
|
24008
|
+
`popup-content`, `popup-close-button`, `attribution`, `attribution-toggle`, `navigation`,
|
|
24009
|
+
`zoom-in`, `zoom-out`, `compass`, `scale`, `error`.
|
|
23851
24010
|
`legend` is a localized `role="group"` containing a real list associated to the map canvas with
|
|
23852
24011
|
`aria-describedby`; each entry is a `listitem`, decorative swatches are inert/accessibility-hidden,
|
|
23853
24012
|
and the overlay is bounded to the map allocation with scrolling and long-label wrapping.
|
|
@@ -23860,6 +24019,18 @@ peer unavailable, owner-realm WebGL2 unavailable, or initialization failed. A po
|
|
|
23860
24019
|
appended to the document's pre-mounted `[data-lr-live-region="assertive"]` sink rather than making
|
|
23861
24020
|
shadow chrome live; raw caught errors are never exposed.
|
|
23862
24021
|
|
|
24022
|
+
**Standard peer controls:** after `lr-map-load`, narrow `.map` to the installed MapLibre peer
|
|
24023
|
+
and use `addControl(new NavigationControl(), 'bottom-right')` and
|
|
24024
|
+
`addControl(new ScaleControl({ unit: 'metric' }), 'bottom-left')`. No document-level peer CSS or
|
|
24025
|
+
shadow-root modification is needed: navigation buttons, compass glyph, scale bar and control
|
|
24026
|
+
corners are styled with Lyra tokens. The corners follow inline start/end under RTL. The legend
|
|
24027
|
+
reserves vertical room for these controls and attribution, including after resize or removal.
|
|
24028
|
+
Navigation exposes `navigation`, `zoom-in`, `zoom-out`, and `compass` parts; the scale exposes `scale`.
|
|
24029
|
+
Button names update through `zoomIn`, `zoomOut`, and `mapResetNorth` locale strings. MapLibre retains
|
|
24030
|
+
keyboard activation, compass rotation, zoom limits, scale units and viewport updates. No controls
|
|
24031
|
+
are created until the application explicitly adds them. This is a supported imperative peer-control
|
|
24032
|
+
integration; there is no declarative controls property.
|
|
24033
|
+
|
|
23863
24034
|
**Themeable custom properties:**
|
|
23864
24035
|
|
|
23865
24036
|
- `--lr-map-height` (default `var(--lr-size-24rem)`) — host block size, shared with the optional
|
|
@@ -26166,6 +26337,10 @@ These named interfaces and helper signatures are available to typed integrations
|
|
|
26166
26337
|
addLayer(layer: unknown): this;
|
|
26167
26338
|
removeLayer(id: string): this;
|
|
26168
26339
|
setPaintProperty(layerId: string, name: string, value: unknown): this;
|
|
26340
|
+
hasImage?(id: string): boolean;
|
|
26341
|
+
addImage?(id: string, image: ImageData, options: { pixelRatio: number }): unknown;
|
|
26342
|
+
updateImage?(id: string, image: ImageData): unknown;
|
|
26343
|
+
removeImage?(id: string): unknown;
|
|
26169
26344
|
queryRenderedFeatures(point: unknown, options?: {
|
|
26170
26345
|
layers?: string[];
|
|
26171
26346
|
}): unknown[];
|
|
@@ -26225,6 +26400,8 @@ These named interfaces and helper signatures are available to typed integrations
|
|
|
26225
26400
|
readonly tone?: 'accent' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
26226
26401
|
readonly color?: string;
|
|
26227
26402
|
readonly strokeColor?: string;
|
|
26403
|
+
readonly line?: LyraMapLineOptions;
|
|
26404
|
+
readonly point?: LyraMapPointOptions;
|
|
26228
26405
|
readonly kind?: LyraMapDataLayerKind;
|
|
26229
26406
|
readonly heatmap?: LyraMapHeatmapOptions;
|
|
26230
26407
|
readonly cluster?: LyraMapClusterOptions;
|
|
@@ -26239,6 +26416,31 @@ These named interfaces and helper signatures are available to typed integrations
|
|
|
26239
26416
|
readonly opacity?: number;
|
|
26240
26417
|
}`
|
|
26241
26418
|
Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
|
|
26419
|
+
`LyraMapLineOptions {
|
|
26420
|
+
readonly field?: string;
|
|
26421
|
+
readonly stops?: readonly (readonly [number, string])[];
|
|
26422
|
+
readonly width?: number;
|
|
26423
|
+
readonly opacity?: number;
|
|
26424
|
+
}`
|
|
26425
|
+
Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
|
|
26426
|
+
`LyraMapPointIcon {
|
|
26427
|
+
readonly value: string;
|
|
26428
|
+
readonly path: string;
|
|
26429
|
+
readonly viewBox?: readonly [number, number, number, number];
|
|
26430
|
+
}`
|
|
26431
|
+
Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
|
|
26432
|
+
`LyraMapPointOptions {
|
|
26433
|
+
readonly field?: string;
|
|
26434
|
+
readonly colors?: readonly (readonly [string, string])[];
|
|
26435
|
+
readonly radius?: number;
|
|
26436
|
+
readonly strokeWidth?: number;
|
|
26437
|
+
readonly strokeColor?: string;
|
|
26438
|
+
readonly iconField?: string;
|
|
26439
|
+
readonly icons?: readonly LyraMapPointIcon[];
|
|
26440
|
+
readonly iconColor?: string;
|
|
26441
|
+
readonly iconSize?: number;
|
|
26442
|
+
}`
|
|
26443
|
+
Import: `@aceshooting/lyra-ui/components/media/map/map.class.js`.
|
|
26242
26444
|
`LyraMapInstance {
|
|
26243
26445
|
getCanvas(): HTMLCanvasElement;
|
|
26244
26446
|
getCenter(): {
|
|
@@ -26396,6 +26598,24 @@ an effective raw `config.options.indexAxis` override. Both formatter APIs follow
|
|
|
26396
26598
|
structured points retain their y-value formatting.
|
|
26397
26599
|
|
|
26398
26600
|
**Properties:**
|
|
26601
|
+
- `axes: LyraChartAxes = 'both'` — `'x' | 'y' | 'both' | 'none'`, controlling complete cartesian
|
|
26602
|
+
axes: labels, ticks, borders and grid lines. The `y` setting includes `y2`; invalid values use
|
|
26603
|
+
`both`. Radial charts ignore this setting. Use `grid` when only grid lines should disappear.
|
|
26604
|
+
- `compact: boolean = false` — hides cartesian axes and removes automatic plot padding. Combine
|
|
26605
|
+
with `withoutLegend` and a short `height` (for example `64px`) for an inline histogram or
|
|
26606
|
+
sparkline. Tooltips, accessible data, formatting and keyboard activation remain available.
|
|
26607
|
+
`config` still wins over generated options, so explicit scale visibility or layout padding
|
|
26608
|
+
can override the preset. Leaving compact mode restores `axes`. Radial charts are unaffected.
|
|
26609
|
+
|
|
26610
|
+
For a monthly histogram above `lr-slider`, give both controls the same inline allocation and
|
|
26611
|
+
use `lr-bar-chart compact without-legend height="64px"`. Map range values to bin edges: with
|
|
26612
|
+
twelve months, set the slider's `min=0`, `max=12`, `step=1` and treat its values as the half-open
|
|
26613
|
+
interval `[minValue, maxValue)`. Equal edges select no months. Use `show-value`,
|
|
26614
|
+
`value-display="formatted"` and `value-placement="label"` to display application-formatted month
|
|
26615
|
+
names without a separate readout listener. Commit filtering on `lr-change`; `lr-input` remains
|
|
26616
|
+
available for live previews. Chart categories retain their authored physical order: for an RTL
|
|
26617
|
+
slider that starts at the right edge, reverse both histogram labels and counts. The Monthly
|
|
26618
|
+
Range bar-chart story demonstrates both directions without scale configuration.
|
|
26399
26619
|
- `type: LyraChartType = 'bar'` — `LyraChartType = 'line' | 'bar' | 'scatter' | 'pie' | 'doughnut' |
|
|
26400
26620
|
'radar' | 'polarArea' | 'bubble'` — every named default used by a typed `lr-*-chart` is
|
|
26401
26621
|
already a first-class member, so `<lr-chart type="pie">` needs no subclass or cast to work;
|
|
@@ -26540,6 +26760,14 @@ structured points retain their y-value formatting.
|
|
|
26540
26760
|
explicit array replaces that generated member rather than concatenating with it. This effective
|
|
26541
26761
|
model drives canvas rendering, `appendData()`, export, the accessible name/summary, keyboard
|
|
26542
26762
|
navigation and activation events, the DOM legend, and the generated fallback table.
|
|
26763
|
+
For generated **bar** series, an explicit series `width` wins. Otherwise authored bar
|
|
26764
|
+
`borderWidth`/`borderRadius` defaults in `options.datasets.bar`, its nested `elements.bar`,
|
|
26765
|
+
`options.elements.bar`, or root `options` are left for Chart.js to resolve, including scriptable,
|
|
26766
|
+
indexable and `barBorderWidth`/`barBorderRadius` forms. Unset values retain Lyra's `--border-width`
|
|
26767
|
+
and `--border-radius` defaults; removing config restores those defaults. Raw `config.data.datasets`
|
|
26768
|
+
remain authoritative. Dense charts with transparent borders should set
|
|
26769
|
+
`config.options.datasets.bar.borderWidth = 0` (or the public `--border-width: 0` CSS hook):
|
|
26770
|
+
a one-pixel transparent stroke can consume the fill of a bar narrower than two pixels.
|
|
26543
26771
|
As a declarative alternative, place one `<script type="application/json">` in the default slot;
|
|
26544
26772
|
an explicitly assigned `config` property wins over the slotted object. Invalid/non-object JSON is
|
|
26545
26773
|
ignored without evaluating script or exposing prototype-pollution keys to the merge.
|
|
@@ -26809,7 +27037,7 @@ announced. In particular, unavailable data labels do not remove generated table
|
|
|
26809
27037
|
the observer, drawing starts when the peer and canvas are ready. An empty delivered callback
|
|
26810
27038
|
retains the visible fallback. Peer loading and accessible DOM may settle while visibility is
|
|
26811
27039
|
pending. Independently, `updated()` only reaches
|
|
26812
|
-
Chart.js when at least one of `type`, `labels`, `datasets`, `description`, `grid`, `indexAxis`,
|
|
27040
|
+
Chart.js when at least one of `type`, `labels`, `datasets`, `description`, `grid`, `axes`, `compact`, `indexAxis`,
|
|
26813
27041
|
`label`, `hiddenDatasets`, `legendPosition`, `min`, `max`, `plugins`, the internal resolved auto legend
|
|
26814
27042
|
position, `valueFormatter`, `formatter`, `area`, `height`, `xLabel`, `yLabel`, `y2Label`, `beginAtZero`,
|
|
26815
27043
|
`stacked`, any `without*` control, `dataLabels`, `stackTotals`, `config`, the parsed
|
|
@@ -27129,7 +27357,7 @@ Everything else is inherited verbatim from `lr-chart`; each name below has the s
|
|
|
27129
27357
|
and behavior there. **See `llms/components/lr-chart.md` for the details, code example, and gotchas
|
|
27130
27358
|
of every entry in these lists.**
|
|
27131
27359
|
|
|
27132
|
-
**Properties:** `description`, `grid`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
27360
|
+
**Properties:** `description`, `grid`, `axes`, `compact`, `indexAxis` (`index-axis`), `label`, `hiddenDatasets`, `legendPosition`
|
|
27133
27361
|
(`legend-position`), `max`, `min`, `plugins`, `scaleType` (`scale-type`), `annotations`,
|
|
27134
27362
|
`stacked`, `withoutAnimation` (`without-animation`),
|
|
27135
27363
|
`withoutLegend` (`without-legend`), `withoutTooltip` (`without-tooltip`), `xLabel` (`x-label`),
|
|
@@ -27214,7 +27442,7 @@ Bins `values` into `bins` equal-width buckets and renders as a bar chart (extend
|
|
|
27214
27442
|
`values`/`bins` (memoized per instance, keyed by reference equality on `values` plus the
|
|
27215
27443
|
normalized `bins`), and `type` always reads back `'bar'` regardless of any assignment. This
|
|
27216
27444
|
specialist owns its controller because a non-bar type would contradict the derived distribution.
|
|
27217
|
-
- All other `LyraChart` properties are inherited and usable: `description`, `grid`, `indexAxis`
|
|
27445
|
+
- All other `LyraChart` properties are inherited and usable: `description`, `grid`, `axes`, `compact`, `indexAxis`
|
|
27218
27446
|
(`index-axis`), `hiddenDatasets`, `legendPosition` (`legend-position`), `max`, `min`, `plugins`,
|
|
27219
27447
|
`withoutAnimation` (`without-animation`), `withoutLegend` (`without-legend`), `withoutTooltip`
|
|
27220
27448
|
(`without-tooltip`), `valueFormatter`, `formatter`, `area`, `zoom`, `config`, `height`, `xLabel` (`x-label`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aceshooting/lyra-ui",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.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",
|
|
@@ -2422,7 +2422,7 @@
|
|
|
2422
2422
|
"d3-force": "^3.0.0",
|
|
2423
2423
|
"d3-selection": "^3.0.0",
|
|
2424
2424
|
"d3-zoom": "^3.0.0",
|
|
2425
|
-
"dompurify": "^3.4.
|
|
2425
|
+
"dompurify": "^3.4.15",
|
|
2426
2426
|
"emoji-picker-element-data": "^1.8.0",
|
|
2427
2427
|
"epubjs": "^0.3.93",
|
|
2428
2428
|
"fast-check": "^4.9.0",
|
|
@@ -2431,7 +2431,7 @@
|
|
|
2431
2431
|
"istanbul-lib-report": "^3.0.1",
|
|
2432
2432
|
"istanbul-reports": "^3.2.0",
|
|
2433
2433
|
"jszip": "^3.10.1",
|
|
2434
|
-
"katex": "^0.18.
|
|
2434
|
+
"katex": "^0.18.7",
|
|
2435
2435
|
"libphonenumber-js": "^1.13.12",
|
|
2436
2436
|
"mammoth": "^1.12.2",
|
|
2437
2437
|
"maplibre-gl": "^6.7.0",
|
|
@@ -2440,7 +2440,7 @@
|
|
|
2440
2440
|
"papaparse": "^5.7.0",
|
|
2441
2441
|
"pdfjs-dist": "^6.3.289",
|
|
2442
2442
|
"pixelmatch": "^7.2.0",
|
|
2443
|
-
"playwright": "^1.
|
|
2443
|
+
"playwright": "^1.63.0",
|
|
2444
2444
|
"pngjs": "^7.0.0",
|
|
2445
2445
|
"postal-mime": "^3.0.0",
|
|
2446
2446
|
"qrcode": "^1.5.4",
|