@johnmorrisdotca/kazoku-ui 0.15.0 → 0.15.2
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 +13 -0
- package/dist/embed-panel/element.js +12 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.15.2] - 2026-11-04
|
|
6
|
+
|
|
7
|
+
The embed panel no longer scrolls the page.
|
|
8
|
+
|
|
9
|
+
- The family `templates/AGENTS.md` has the rules that keep every `main` green (all of a release's checks before a push; a red main fixed or reverted within the hour; a flaky test ticketed and fixed; a shared file tried in every repo's CI first; machine1's daily check), from KAZOKU-UI-41. A repo takes them with the rest of the family part when it next replaces everything above the marker.
|
|
10
|
+
- **Fixed: every draw of the embed panel's picker scrolled the page to the panel.** The picker kept the pressed button in view with `scrollIntoView`, which scrolls the page too, so a page with the panel below the fold jumped to it on load and again each time the language changed. Only the picker's own list scrolls now. New test in `e2e/embed-panel.demo.mjs`.
|
|
11
|
+
|
|
12
|
+
## [0.15.1] - 2026-11-04
|
|
13
|
+
|
|
14
|
+
The embed panel asks for one frame at a time.
|
|
15
|
+
|
|
16
|
+
- **Fixed: the embed panel cancelled its fit frame and asked again**, so a page that counts animation frames (wakusei-planets' freeze test) saw several asked-for frames at once. The panel now asks for one frame and keeps it, reading the choices when it runs. New test in `e2e/embed-panel.demo.mjs`: no frame at rest, and never more than one pending, whatever is pressed.
|
|
17
|
+
|
|
5
18
|
## [0.15.0] - 2026-11-03
|
|
6
19
|
|
|
7
20
|
One "Put it in your page" panel for every package of the family.
|
|
@@ -580,8 +580,9 @@ export class EmbedPanelElement extends HTMLElement {
|
|
|
580
580
|
#fit() {
|
|
581
581
|
if (!this.#built || this.hasAttribute("no-preview"))
|
|
582
582
|
return;
|
|
583
|
+
// One frame at a time, never cancelled: a frame already asked for reads the choices as they are when it runs.
|
|
583
584
|
if (this.#frame !== 0)
|
|
584
|
-
|
|
585
|
+
return;
|
|
585
586
|
this.#frame = requestAnimationFrame(() => {
|
|
586
587
|
this.#frame = 0;
|
|
587
588
|
const el = this.#el;
|
|
@@ -675,7 +676,16 @@ export class EmbedPanelElement extends HTMLElement {
|
|
|
675
676
|
return button;
|
|
676
677
|
}));
|
|
677
678
|
box.querySelector(".none").textContent = shown.length === 0 ? words.none : "";
|
|
678
|
-
list
|
|
679
|
+
// Only the list scrolls to the pressed button: scrollIntoView would also scroll the page to the panel each time it draws.
|
|
680
|
+
const pressed = list.querySelector('[aria-pressed="true"]');
|
|
681
|
+
if (pressed !== null) {
|
|
682
|
+
const room = list.getBoundingClientRect();
|
|
683
|
+
const at = pressed.getBoundingClientRect();
|
|
684
|
+
if (at.top < room.top)
|
|
685
|
+
list.scrollTop -= room.top - at.top;
|
|
686
|
+
else if (at.bottom > room.bottom)
|
|
687
|
+
list.scrollTop += at.bottom - room.bottom;
|
|
688
|
+
}
|
|
679
689
|
}
|
|
680
690
|
#dispatch(reason) {
|
|
681
691
|
this.dispatchEvent(new CustomEvent(EVENT, { detail: { kind: this.#kind, size: this.#size, value: this.#value, code: this.#code, reason }, bubbles: true, composed: true }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnmorrisdotca/kazoku-ui",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Kazoku UI 家族, the family's shared interface parts as their own versioned package: view controls for any 3D or zoomable view (angle, tilt, auto-turn, zoom about the pointer, pan, touch, address state) a light, dark and auto theme switch, a language picker, choices kept in the address, a save-as-image button and one set of speed buttons (0.5×, 1×, 2× or your own steps) and the \"Put it in your page\" embed panel (a compact picker, sizes, HTML, ES module, React, Vue, Angular, Svelte and iframe tabs, a picture that fits its box, Copy), each a framework-free custom element and a plain controller. Zero dependencies; the shared 3D renderer takes three.js as an optional peer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"view-controls",
|