@aceshooting/lyra-ui 33.0.0 → 33.1.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 +30 -0
- package/README.md +3 -1
- package/custom-elements.slim.json +1 -1
- package/dist/cli/migrate-wa.mjs +2 -2
- package/dist/components/lr-map-anchor.d.ts +1 -1
- package/dist/components/media/map/map-anchor-avoid.js +1 -1
- package/dist/components/media/map/map-anchor-options.d.ts +9 -0
- package/dist/components/media/map/map.class.d.ts +19 -5
- package/dist/components/media/map/map.class.js +3 -3
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/lyra-element.d.ts +1 -1
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/package-metadata.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/ssr.d.ts +1 -1
- package/dist/styles/utilities.css +1 -1
- package/llms/components/lr-button.md +4 -0
- package/llms/components/lr-card.md +2 -0
- package/llms/components/lr-map.md +16 -1
- package/llms/index.md +33 -33
- package/llms/peers.md +1 -1
- package/llms/shared/events-and-types.md +1 -1
- package/llms/shared/frameworks-and-ssr.md +37 -0
- package/llms/shared/native-styles-and-utilities.md +51 -3
- package/llms/shared.md +89 -4
- package/package.json +3 -3
- package/skills/compose-lyra-interfaces/SKILL.md +1 -1
- package/skills/lyra-ui/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 33.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 328e3cd: `lr-map` gains `anchorAvoidSides`, a list of `{ element, side }` obstacles that keeps anchors on a
|
|
8
|
+
named side of each: `'block-end'` (below it), `'block-start'`, `'inline-start'` or `'inline-end'`
|
|
9
|
+
(logical, so they follow RTL), or `'auto'`, the cheapest edge that `anchorAvoid` uses. Use it for
|
|
10
|
+
chrome whose cheapest edge changes with its size, such as a floating search bar whose results list
|
|
11
|
+
opens and would otherwise squeeze the anchored panel into a narrow column beside it. An element in
|
|
12
|
+
both `anchorAvoid` and `anchorAvoidSides` takes its side from the latter; `anchorAvoid` itself is
|
|
13
|
+
unchanged. The new `LyraMapAnchorAvoidObstacle` and `LyraMapAnchorAvoidSide` types are exported.
|
|
14
|
+
`anchorAvoid`, `anchorAvoidSides` and `controlsAvoid` also no longer reserve space for an obstacle
|
|
15
|
+
hidden with `visibility: hidden` (including an inherited one), and re-measure when an obstacle's own
|
|
16
|
+
`style`, `class` or `hidden` attribute changes.
|
|
17
|
+
- 03bca9a: `utilities.css` adds `lr-button` and `lr-card`, light-DOM classes that give a plain `<a href>` or
|
|
18
|
+
`<button>` the look of `<lr-button>` and any element the surface of `<lr-card>`, with nothing to
|
|
19
|
+
hydrate. They read the same `--lr-button-*` and `--lr-card-*` hooks and theme tokens as the
|
|
20
|
+
components. Variant comes from `lr-neutral|brand|success|warning|danger` and size from
|
|
21
|
+
`lr-size-2xs` … `lr-size-xl`, on the element or an ancestor. Appearance comes from `lr-accent`,
|
|
22
|
+
`lr-filled`, `lr-outlined`, `lr-filled-outlined` or `lr-plain` on the element. Hover, press, keyboard
|
|
23
|
+
focus, `:disabled` and `aria-disabled="true"` states, RTL, dark scopes and reduced motion are covered.
|
|
24
|
+
The variant classes also publish `--lr-variant-on-loud`. `lyra-ui-migrate` now rewrites Web Awesome's
|
|
25
|
+
`wa-button`, `wa-accent`, `wa-filled`, `wa-outlined`, `wa-plain` and `wa-pill` classes to these
|
|
26
|
+
counterparts instead of only reporting them.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 328e3cd: Server-rendered components no longer render a second copy of their template when Lit's hydration support was not installed in time. A code-splitting bundler can move Lit into a shared chunk that evaluates before `@aceshooting/lyra-ui/hydration.js`, which left the server's declarative shadow root in place with a duplicate tree rendered in front of it. A component now detects a server-rendered shadow root that Lit cannot hydrate, discards the server markup and renders into the same shadow root, and the development build warns once naming the cause. The SSR guide adds a bundler recipe (one shared chunk for Lit and `hydration.js`, or `hydration.js` as a separate first script) so such pages hydrate instead of re-rendering.
|
|
31
|
+
- 29841f7: `lyraSsrElementRenderers()` now returns a fresh mutable array type instead of a readonly tuple, so the documented `render(template, { elementRenderers: lyraSsrElementRenderers(LitElementRenderer) })` call compiles under strict TypeScript against `@lit-labs/ssr`'s `RenderInfo` (it previously failed with TS4104). Each call returns a new array, so a caller that mutates it affects nobody else.
|
|
32
|
+
|
|
3
33
|
## 33.0.0
|
|
4
34
|
|
|
5
35
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -304,7 +304,9 @@ attributes and light DOM and create their shadow DOM on upgrade (`LYRA_SSR_SUPPO
|
|
|
304
304
|
`elementRenderers: lyraSsrElementRenderers(LitElementRenderer)` to `@lit-labs/ssr`'s `render()`.
|
|
305
305
|
|
|
306
306
|
In the browser, make `@aceshooting/lyra-ui/hydration.js` the first import that can reach Lit, then register tags;
|
|
307
|
-
`diagnoseLyraHydration(document)` checks the result. A
|
|
307
|
+
`diagnoseLyraHydration(document)` checks the result. A code-splitting bundler that moves Lit into a shared chunk
|
|
308
|
+
breaks that order; group `hydration.js` with Lit or load it as a separate first script
|
|
309
|
+
([bundler recipe](./llms/shared/frameworks-and-ssr.md#ssr-and-declarative-shadow-dom)). A fallback renderer cannot serialize property bindings, so
|
|
308
310
|
pass initial state as attributes or light DOM. Measurement, observers, canvas and media start after hydration; remote
|
|
309
311
|
content stays client-only ([details](./llms/shared/frameworks-and-ssr.md#ssr-and-declarative-shadow-dom)).
|
|
310
312
|
Declarative shadow roots don't carry the token layer: link `@aceshooting/lyra-ui/theme.css` (which includes it) or,
|