@aceshooting/lyra-ui 10.0.1 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/custom-elements.json +1 -1
  3. package/design-tokens.json +13 -0
  4. package/dist/cli/migrate-wa.mjs +164 -1
  5. package/dist/cli/migration-contract.json +1 -1
  6. package/dist/components/charts/chart/box-plot.class.d.ts +27 -0
  7. package/dist/components/charts/chart/box-plot.class.js +14 -4
  8. package/dist/components/charts/chart/box-plot.styles.js +28 -0
  9. package/dist/components/charts/chart/chart.class.d.ts +27 -0
  10. package/dist/components/charts/chart/chart.class.js +15 -5
  11. package/dist/components/charts/chart/chart.styles.js +28 -0
  12. package/dist/components/data/heatmap/heatmap.class.d.ts +35 -2
  13. package/dist/components/data/heatmap/heatmap.class.js +2 -2
  14. package/dist/components/forms/combobox/combobox.class.d.ts +71 -3
  15. package/dist/components/forms/combobox/combobox.class.js +4 -2
  16. package/dist/components/forms/combobox/combobox.styles.js +9 -0
  17. package/dist/components/forms/date-picker/date-picker.class.d.ts +46 -0
  18. package/dist/components/forms/date-picker/date-picker.class.js +15 -3
  19. package/dist/components/forms/date-picker/date-picker.styles.js +46 -0
  20. package/dist/components/media/flag/flag.class.d.ts +3 -1
  21. package/dist/components/media/flag/flag.class.js +1 -1
  22. package/dist/components/media/map/map.class.d.ts +39 -2
  23. package/dist/components/media/map/map.class.js +1 -1
  24. package/dist/components/overlays/dialog/dialog.class.d.ts +20 -0
  25. package/dist/components/overlays/overlay/popover.class.d.ts +19 -3
  26. package/dist/components/overlays/overlay/popover.class.js +1 -1
  27. package/dist/custom-elements-jsx.d.ts +27 -14
  28. package/dist/internal/package-metadata.d.ts +1 -1
  29. package/dist/internal/package-metadata.js +1 -1
  30. package/dist/internal/tokens.styles.js +1 -0
  31. package/dist/lyra.d.ts +1 -1
  32. package/dist/svelte.d.ts +27 -14
  33. package/dist/vue.d.ts +27 -14
  34. package/llms/components/lr-bar-chart.md +4 -3
  35. package/llms/components/lr-box-plot.md +14 -3
  36. package/llms/components/lr-bubble-chart.md +4 -3
  37. package/llms/components/lr-chart.md +13 -3
  38. package/llms/components/lr-combobox.md +42 -6
  39. package/llms/components/lr-date-input.md +22 -2
  40. package/llms/components/lr-date-picker.md +23 -3
  41. package/llms/components/lr-dialog.md +2 -1
  42. package/llms/components/lr-doughnut-chart.md +4 -3
  43. package/llms/components/lr-flag.md +10 -3
  44. package/llms/components/lr-heatmap.md +20 -2
  45. package/llms/components/lr-histogram.md +4 -3
  46. package/llms/components/lr-line-chart.md +4 -3
  47. package/llms/components/lr-map.md +21 -4
  48. package/llms/components/lr-option.md +41 -5
  49. package/llms/components/lr-pie-chart.md +4 -3
  50. package/llms/components/lr-polar-area-chart.md +4 -3
  51. package/llms/components/lr-popover.md +20 -1
  52. package/llms/components/lr-radar-chart.md +4 -3
  53. package/llms/components/lr-scatter-chart.md +4 -3
  54. package/llms/tokens.md +15 -1
  55. package/llms-full.txt +197 -26
  56. package/package.json +1 -1
  57. package/vscode-css-data.json +56 -0
  58. package/vscode-html-data.json +115 -18
  59. package/web-types.json +162 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,193 @@
1
1
  # Changelog
2
2
 
3
+ ## 11.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 5066d4b: **Version note: this major carries no known breaking change for consumers.**
8
+
9
+ Everything in this release is additive or a bug fix — no public member was removed, renamed, or
10
+ had its behaviour or default altered. The major bump is taken because the public-API semver gate
11
+ (`check:public-api`) classifies 328 changes as breaking, and every one of them is fingerprint or
12
+ generated-type churn rather than a real break:
13
+
14
+ - 248 `:dependencies` and 39 `:contract` hash changes — a symbol's transitive-dependency
15
+ fingerprint moves whenever a widely-composed base class gains a member, so adding one property to
16
+ `LyraChart` rewrites the hash of every chart subclass and every subpath that re-exports it.
17
+ - 39 generated React/Vue/Svelte props **type strings**, widened by the newly added props. The
18
+ differ compares the printed type text, which cannot distinguish an additive union widening from a
19
+ removal.
20
+ - 2 `lr-popover` `popup-role` default entries moving `null → 'dialog'`. The default did not change;
21
+ this release simply documents it with `@default` for the first time, so the manifest records a
22
+ value where it previously recorded none.
23
+
24
+ Consumers upgrading from 10.x should not need code changes. If you use the generated framework
25
+ prop types, the unions gained members but lost none.
26
+
27
+ ### Minor Changes
28
+
29
+ - 2fb4af7: `<lr-chart>` (and every chart subclassing it — bar, line, pie, doughnut, radar, polar-area,
30
+ scatter, bubble, histogram) and `<lr-box-plot>` gain `dataTableToggle` (`data-table-toggle`), which
31
+ renders a localized disclosure button above the accessible data table.
32
+
33
+ `showDataTable` was all-or-nothing: the table was either permanently screen-reader-only or
34
+ permanently visible, so a sighted reader who wanted the numbers behind a chart could only get them
35
+ if the consumer hand-rolled a `<details>` around a duplicated copy of the table. With the toggle
36
+ on, `showDataTable` becomes the disclosure's initial state rather than its whole behavior. The
37
+ table stays in the DOM in both states, so assistive technology never loses it, and the button
38
+ carries `aria-expanded` plus `aria-controls`. A new `data-table-toggle` CSS part styles the
39
+ control. Unset, nothing renders and behavior is unchanged.
40
+ - e084afb: `<lr-combobox>` now renders `<lr-option>`'s adornment slots, and gains `visibleOptions` for bounding
41
+ the suggestion popup's height.
42
+
43
+ **Adornments (a fixed contract, not just a new feature).** `<lr-option>` documented `start`/`end`
44
+ slots, their `prefix`/`suffix` aliases, and four matching CSS parts — but `<lr-combobox>` builds its
45
+ popup from normalized row *data* rather than from the light-DOM nodes, so inside the one component
46
+ `<lr-option>` exists to feed, none of them rendered. A row could show a colour dot, a badge and a
47
+ sub-line but not a 16px image, which is the one adornment a country, currency, language or user
48
+ picker most often wants, and neither documented workaround was available (`::part(option)` cannot be
49
+ compounded past the part, and `dot-color` rejects `url()`).
50
+
51
+ Adornments now render as new `option-start` / `option-end` parts, inert and `aria-hidden` so they
52
+ never join the option's accessible name. The nodes are **cloned** into the row, so the author's own
53
+ `<lr-option>` subtree is left exactly where they put it rather than being moved into a shadow root
54
+ as a side effect of opening a dropdown. Async `source` rows can supply the same `start`/`end`
55
+ fields alongside the existing `icon`.
56
+
57
+ **`visibleOptions`** (`visible-options`) bounds the popup to about that many rows, leaving the rest
58
+ reachable by scrolling. It is measured from where row N actually starts, since a row's height varies
59
+ with sub-lines, adornments and group labels. Unset, the listbox keeps exactly its previous
60
+ max-height behavior.
61
+
62
+ The doc comments on all three caps — `visibleOptions`, `maxRender`, and `maxOptionsVisible` — now
63
+ each state how they differ from the other two, which was the confusion that prompted this.
64
+ - 3b3af14: `<lr-date-picker>` gains `presets`, a quick-range button row for the dashboard time-filter shape
65
+ (Today / Last 7 days / Last 30 days / This month / All time).
66
+
67
+ The pieces for this existed but were split across two components that each held half the contract:
68
+ the date components had the calendar, locale and range logic but no preset affordance, while
69
+ `<lr-time-range>` had exactly the wanted preset API but is a two-handle numeric brush with no date
70
+ logic, so a caller had to map a time axis onto `[min, max]` themselves and got no calendar. Building
71
+ it by hand meant a ~260-line control plus its own preset/custom state machine.
72
+
73
+ `LyraDateRangePreset` is deliberately the same `label`/`start`/`end` shape as `TimeRangePreset`, so
74
+ the library has one preset vocabulary rather than two — only the unit differs (ISO `YYYY-MM-DD`
75
+ instead of numbers). Range mode only; unset renders nothing. Applying a preset commits through the
76
+ same path a two-click selection uses, so ISO serialization, `min`/`max` clamping and the
77
+ `input`-then-`change` pair are identical. A reversed preset normalizes, and a malformed one is
78
+ ignored rather than clearing the value, so a bad entry in a config-driven list never reads as "the
79
+ user picked nothing". New `presets` and `preset-button` CSS parts.
80
+ - c915980: Added `--lr-focus-ring`, a composite outline shorthand (`var(--lr-focus-ring-width) solid
81
+ var(--lr-focus-ring-color)`) alongside the three existing parts, which stay exactly as they are.
82
+
83
+ Web Awesome exposes `--wa-focus-ring` as a ready-made outline value, so the common consumer idiom
84
+ is `outline: var(--wa-focus-ring)`. Migrating it meant hand-expanding every site, which is easy to
85
+ get subtly wrong — omitting the `solid` keyword yields an outline that renders in some engines and
86
+ not others — and each hand-expanded copy stops tracking any future change to how the ring is
87
+ composed. `--lr-focus-ring-offset` stays separate because `outline-offset` is its own property, not
88
+ part of the `outline` shorthand.
89
+
90
+ `llms/tokens.md` also now documents why an ancestor `--lr-*` override does not survive a nested
91
+ component boundary: every component re-derives that layer from `--lr-theme-*` on its own `:host`,
92
+ so the override is reset at the first `lr-*` inside another `lr-*`'s shadow root and degrades
93
+ silently. The `--lr-theme-*` input layer is the one that inherits.
94
+ - 3d7a6a5: `<lr-heatmap>` matrix mode gains `colLabelRotation` (`col-label-rotation`) and an `'auto'` value for
95
+ `colLabelHeight` (`col-label-height`), giving column labels the escape hatch the row gutter got in
96
+ 10.0.0.
97
+
98
+ Column labels were horizontal-only in a fixed 20px band, so in a dense matrix — where every column
99
+ is far narrower than a typical label — adjacent labels collided and the axis became unreadable,
100
+ with no rotation or angle property anywhere in the surface. Each label now rotates about an anchor
101
+ at its own column's centre with the label's end at that anchor, so it leans back over the columns
102
+ to its left and the last column's label cannot overflow the canvas. `col-label-height="auto"`
103
+ measures the labels and projects their width through the rotation, so the band sizes itself.
104
+
105
+ Unset, both are inert and painting is unchanged. Values outside `[0, 90]` clamp and non-finite
106
+ values normalize to `0`. Rotation is deliberately not mirrored under `dir="rtl"`, matching the
107
+ documented rule that both grid modes retain physical LTR geometry.
108
+ - 20728fb: `<lr-map>` gains a `'step'` choropleth interpolation and independent fill/stroke colours on
109
+ `dataLayers` — the two declarative gaps that stopped an application migrating off a first-party
110
+ MapLibre wrapper after every other property already matched.
111
+
112
+ **`interpolation: 'step'`** emits maplibre's `['step', …]` instead of `['interpolate', …]`, giving
113
+ discrete bands rather than a continuous ramp. A ramp is wrong whenever the legend advertises a fixed
114
+ set of ranges with one swatch each: it puts colours on the map that appear nowhere in the legend and
115
+ renders two regions in the same advertised band as visibly different colours. `stepBaseColor` sets
116
+ the colour below the first threshold (which `['step', …]` requires) and defaults to the first stop's
117
+ own colour.
118
+
119
+ **`dataLayers[].color` / `.strokeColor`** override `tone` for the fill and for the line/circle
120
+ layers respectively, falling back to `color` and then `tone`. They are separable because a fill and
121
+ its outline want opposite things on a choropleth-plus-overlay map: the fill competes for area and
122
+ must sit quiet, while the 1px outline competes with nothing and is the only thing keeping a no-data
123
+ region's shape readable once the fill is that faint. Deriving one from the other measured 1.41:1
124
+ against a light basemap, under WCAG 1.4.11's 3:1 floor for graphical objects. A `var(--lr-…)`
125
+ reference is resolved against the host first, since MapLibre paints to a WebGL canvas and never sees
126
+ the CSS cascade.
127
+
128
+ Both are additive: an unset `interpolation` still interpolates linearly, and a `tone`-only data
129
+ layer paints exactly as before.
130
+ - 4a701e7: `<lr-popover>` gains a third `popupRole` value, `none`, so the library can express the WAI-ARIA
131
+ disclosure-navigation pattern. Previously `popupRole` was `dialog | menu` only, which left a header
132
+ nav flyout with no correct option: `menu` announces "menu, menu item" and expects `menuitem`
133
+ children, while a navigation flyout is a list of links, and `dialog` implies an interruptive
134
+ surface. Consumers had to abandon the library's overlays and hand-roll a
135
+ `button[aria-expanded][aria-controls]` plus a plain list.
136
+
137
+ Under `popup-role="none"` the popup surface renders no `role` and no generated `aria-label`, and
138
+ the trigger carries no `aria-haspopup`, so the slotted `<nav>` owns the semantics and the
139
+ accessible name. Everything else — `aria-expanded`/`aria-controls`, light dismiss, Escape, focus
140
+ return, positioning — is unchanged. Purely additive: `dialog` remains the default, and
141
+ `lr-dropdown` still pins its own role to `menu`.
142
+
143
+ ### Patch Changes
144
+
145
+ - e6ed0ca: The migration codemod now warns about four classes of `wa-*`/`sl-*` reference it does not rewrite,
146
+ instead of leaving them silent: tag selectors inside a `` css`` `` tagged template, `::slotted()`,
147
+ DOM selector strings reached through `this`/`this.shadowRoot`, and `--wa-*`/`--sl-*` custom
148
+ properties.
149
+
150
+ Each of these fails silently at runtime after a migration — a CSS rule keyed on a tag that no
151
+ longer exists matches nothing, `::slotted()` likewise, `querySelector` returns null, and a `var()`
152
+ naming a removed token falls back to its second argument or to nothing. Nothing throws, nothing
153
+ fails a build, and a typechecker cannot see inside a template literal. Because `--check` is
154
+ documented as a CI gate, the silence meant CI certified a migration that had visibly broken the
155
+ component's styling.
156
+
157
+ Tokens are deliberately reported rather than rewritten: the two spacing scales are offset by one
158
+ step (Web Awesome `m` is 1rem, Lyra `m` is 0.75rem), so renaming by name alone silently tightens
159
+ every gap, while mapping by value has no target for 1.5rem or 2.5rem. Warnings are filtered against
160
+ the rewrites the same pass produced, so a reference the inventory does map is never both rewritten
161
+ and warned about, and a self-declared `--wa-*` property (the consumer's own, merely sharing the
162
+ prefix) is exempt.
163
+
164
+ `<lr-dialog>`'s docs also now warn that `lr-close` is not a dialog-scoped name — nine components
165
+ emit it, several of which are routinely nested inside a dialog, and library events bubble and are
166
+ composed, so a listener bound on the dialog also receives a descendant's close.
167
+ - c5baec5: `<lr-flag>` now warns once in the console when `country`/`language` is set but no flag resolver has
168
+ been registered, naming the offending code and the `flag-peer.js` import that fixes it. Previously
169
+ this failed to the visible `[part="error"]` state in complete silence, which is indistinguishable
170
+ from missing flag data — the resolver is deliberately absent from the core component's module
171
+ graph, so an unimported peer entry is the single likeliest cause and was the hardest to diagnose.
172
+ The warning is emitted once per resolver-registration generation, so a page of many flags does not
173
+ repeat it. An already-resolved `src`, a registered resolver, and a well-formed-but-unmapped code
174
+ (which is data, not a defect) all stay silent.
175
+ - b573859: The `lr-locale-picker` Storybook page now registers the optional flag peer, so its rows render real
176
+ flags instead of silently empty frames. Found by the new `<lr-flag>` missing-resolver warning on its
177
+ first run — `flag.stories.ts` had always imported `flag-peer.js` for exactly this reason, and the
178
+ locale-picker page never did.
179
+ - c915980: The `lyra-ui-migrate` CLI no longer silently does nothing when launched through a package manager's
180
+ bin shim. Its entry guard compared `process.argv[1]` to `import.meta.url` as raw paths; under pnpm
181
+ the package directory is a symlink into the virtual store, so the two never matched and `run()`
182
+ never executed. The process printed nothing — not even `--help` — rewrote nothing, wrote no report,
183
+ and exited 0.
184
+
185
+ The serious half is that `--check` is documented as a CI gate that "exits nonzero while rewrites or
186
+ warnings remain". A silent exit 0 is indistinguishable from success, so on every pnpm project the
187
+ gate passed unconditionally — worse than having no gate, because it is trusted. npm and yarn were
188
+ unaffected, which is why it survived. The guard now compares realpaths, and a regression test
189
+ invokes the CLI through a symlink that mimics the pnpm layout.
190
+
3
191
  ## 10.0.1
4
192
 
5
193
  ### Patch Changes