@cardstack/boxel-cli 0.11.0-unstable.1 → 0.11.0-unstable.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/bundled-test-harness/assets/{app-QAuw0l8v.js → app-CtezUCip.js} +1 -1
- package/bundled-test-harness/assets/choreo-BEHW-NOc.js +2 -0
- package/bundled-test-harness/assets/{choreo-CJfBb_EY.js → choreo-C2cpCfhA.js} +164 -13
- package/bundled-test-harness/assets/{choreo-feature-reel-test-D2OrygZv.js → choreo-feature-reel-test-CPI_6nkT.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-w07xqtO-.js → choreo-gallery-BxA9cyzF.js} +3 -3
- package/bundled-test-harness/assets/{choreo-gallery-build-order-test-yQg4JER6.js → choreo-gallery-build-order-test-CLVoseAJ.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-compositor-test-C2THCXJN.js → choreo-gallery-compositor-test-BpT5Ia6B.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-cover-test-D4T_Tk4s.js → choreo-gallery-cover-test-DL_fdSsh.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-crossing-stage-test-tHUPJ-Hy.js → choreo-gallery-crossing-stage-test-BcKHhpOK.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-demos-alive-test-BOtBOnEZ.js → choreo-gallery-demos-alive-test-KufLhXG8.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-drift-test-D_6U1Z2c.js → choreo-gallery-drift-test-Cx58rYIA.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-escort-test-DDBU0n4C.js → choreo-gallery-escort-test-Wz-emmID.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-films-test-CgW1NSdr.js → choreo-gallery-films-test-BFrVs5WW.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-filter-test-DUIsNwdO.js → choreo-gallery-filter-test-DCKQkhwe.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-fold-test-Chzlxvdr.js → choreo-gallery-fold-test-UtpDgpG9.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-guide-pages-test-DOWnqALT.js → choreo-gallery-guide-pages-test-rXDU9JLM.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-guides-test-Dra2J4LJ.js → choreo-gallery-guides-test-DfVFdIuU.js} +3 -3
- package/bundled-test-harness/assets/{choreo-gallery-hang-test-zzn1eiB-.js → choreo-gallery-hang-test-Cj7MbkFf.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-highlight-test-CW99hncQ.js → choreo-gallery-highlight-test-D6CF3IYZ.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-inline-edit-test-CYFm1kUz.js → choreo-gallery-inline-edit-test-LfHWsbqc.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-interruption-test-CYIBrKV9.js → choreo-gallery-interruption-test-CvQQAgTp.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-lone-stack-test-DL8R3SG7.js → choreo-gallery-lone-stack-test-D7Zci7fm.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-navigation-test-Dcv04kDx.js → choreo-gallery-navigation-test-DB1EnBEW.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-playhead-transport-test-Cfz7GsXl.js → choreo-gallery-playhead-transport-test-CtBlc6AJ.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-poplayout-subtree-test-CwoklBkW.js → choreo-gallery-poplayout-subtree-test-BQbmjsvI.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-presence-modes-test-BDCIZzJ0.js → choreo-gallery-presence-modes-test-CIdXVG1K.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-presentation-test-DlyiHwFf.js → choreo-gallery-presentation-test-C_rPFp29.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-reduced-motion-test-DVz5SKNR.js → choreo-gallery-reduced-motion-test-CH5w8Lw-.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-sheet-standalone-test-CpD_-BvS.js → choreo-gallery-sheet-standalone-test-CDgI4mGX.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-sheet-test-BjvAKHDL.js → choreo-gallery-sheet-test-5lsFX7Rk.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-site-test-oq_7y_PN.js → choreo-gallery-site-test-DbMa2xeC.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-stage-Bzr4_8Xd.js → choreo-gallery-stage-b3Sk86hp.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-stage-keyboard-test-a83d2euJ.js → choreo-gallery-stage-keyboard-test-ds6fT5Eg.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-stages-test-C9Sl1kH6.js → choreo-gallery-stages-test-ahioKCct.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-subdivision-test-BVVnkOwk.js → choreo-gallery-subdivision-test-g7anTDhT.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-table-plan-test-B0YdYEA0.js → choreo-gallery-table-plan-test-Bozc4uUf.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-theater-test-BLA147xw.js → choreo-gallery-theater-test-kE535d-b.js} +3 -3
- package/bundled-test-harness/assets/{choreo-gallery-tuning-test-DSXiNzCh.js → choreo-gallery-tuning-test-6rHkQBnZ.js} +1 -1
- package/bundled-test-harness/assets/{choreo-gallery-widget-room-test-BI574PdO.js → choreo-gallery-widget-room-test-0Vq-uTo1.js} +2 -2
- package/bundled-test-harness/assets/{choreo-gallery-wires-test-B6Mz2WZl.js → choreo-gallery-wires-test-CdtnAWYO.js} +1 -1
- package/bundled-test-harness/assets/clip-BLfuHi8g.js +2 -0
- package/bundled-test-harness/assets/{clip-C_pXjVvY.js → clip-q1QE5f73.js} +1 -1
- package/bundled-test-harness/assets/{externals-6ZWftYIb.js → externals-DCnB4XSS.js} +11 -11
- package/bundled-test-harness/assets/film-B68PjRlr.js +2 -0
- package/bundled-test-harness/assets/{film-D7vtJO5q.js → film-CeUpnHN_.js} +6 -6
- package/bundled-test-harness/assets/{film-DN0A8JHx.js → film-DBZqyqW4.js} +6 -6
- package/bundled-test-harness/assets/{glimmer-motion-and-choreo-in-cards-test-BHte2t9G.js → glimmer-motion-and-choreo-in-cards-test-HA-INN3d.js} +14 -14
- package/bundled-test-harness/assets/{glimmer-motion-and-choreo-test-BPNVeIio.js → glimmer-motion-and-choreo-test-BZ0ZuuAw.js} +3 -3
- package/bundled-test-harness/assets/{index-query-engine-test-Dz7Q4Xmk.js → index-query-engine-test-CY2tAkot.js} +1 -1
- package/bundled-test-harness/assets/{instance-filter-matcher-test-BoLU3bVg.js → instance-filter-matcher-test-CMBTh8xn.js} +1 -1
- package/bundled-test-harness/assets/{main-Dlgp8c7v.js → main-BOZbZVem.js} +1 -1
- package/bundled-test-harness/assets/{operation-lowering-test-B0KpI1xu.js → operation-lowering-test-CHnjKSJb.js} +1 -1
- package/bundled-test-harness/assets/{overlays-BnOM360u.js → overlays-BOzLbVDK.js} +1 -1
- package/bundled-test-harness/assets/{overlays-kBVfa4i8.js → overlays-C_PuGDGh.js} +1 -1
- package/bundled-test-harness/assets/{plate-CFvCDv2t.js → plate-BL7UtyKE.js} +1 -1
- package/bundled-test-harness/assets/plate-CqG3igCJ.js +2 -0
- package/bundled-test-harness/assets/player-BJfsgdSI.js +2 -0
- package/bundled-test-harness/assets/{player-DzuYjrTU.js → player-Da_CIsp_.js} +1 -1
- package/bundled-test-harness/assets/{run-BMyvn_UL.js → run-D4n4LPcK.js} +96 -6
- package/bundled-test-harness/assets/{searchable-option-test-BBr5BPow.js → searchable-option-test-Ctf8r3HZ.js} +1 -1
- package/bundled-test-harness/assets/{src-Df148w_b.js → src-B_DEhPze.js} +4 -4
- package/bundled-test-harness/assets/{src-Cf2wv-Le.js → src-BoTgwqUA.js} +2 -2
- package/bundled-test-harness/assets/{test-support-rNHuieEc.js → test-support-FXDPpIl3.js} +1 -1
- package/bundled-test-harness/assets/{test-support-C6N_2X-l.js → test-support-VX6ukQNR.js} +1 -1
- package/bundled-test-harness/assets/{tests-CmsQ-Z_3.js → tests-DoTEpvcF.js} +43 -43
- package/bundled-test-harness/assets/{titles-B1pTaIfP.js → titles-DFJj5O0E.js} +1 -1
- package/bundled-test-harness/assets/titles-xGlgu7ys.js +2 -0
- package/bundled-test-harness/index.html +4 -4
- package/bundled-test-harness/tests/index.html +4 -4
- package/bundled-types/choreo/beacons.ts +16 -4
- package/bundled-types/choreo/changeset.ts +25 -5
- package/bundled-types/choreo/choreo.gts +245 -3
- package/bundled-types/choreo/far.ts +39 -0
- package/bundled-types/choreo/index.ts +2 -0
- package/bundled-types/choreo/run.ts +104 -1
- package/package.json +1 -1
- package/bundled-test-harness/assets/choreo-B3Z9QhDH.js +0 -2
- package/bundled-test-harness/assets/clip-BjcXuTwN.js +0 -2
- package/bundled-test-harness/assets/film-DMDPP7ma.js +0 -2
- package/bundled-test-harness/assets/plate-66qnQ-M9.js +0 -2
- package/bundled-test-harness/assets/player-pygg1PwA.js +0 -2
- package/bundled-test-harness/assets/titles-Ccpcl-jq.js +0 -2
|
@@ -97,7 +97,7 @@ import { t as getUniqueValidToolDefinitions } from "./tool-definitions-Bhcf5vKh.
|
|
|
97
97
|
import { n as monaco_test_waiter_exports, t as createMonacoWaiterManager } from "./monaco-test-waiter-lvFEYpFj.js";
|
|
98
98
|
import { r as shimBundledBase } from "./bundled-base-3cXf7vDf.js";
|
|
99
99
|
import "./dist-BOAdzfkP.js";
|
|
100
|
-
import { a as microwait, i as allSettled$1, n as task, o as rAF, r as afterRender, t as shimExternals } from "./externals-
|
|
100
|
+
import { a as microwait, i as allSettled$1, n as task, o as rAF, r as afterRender, t as shimExternals } from "./externals-DCnB4XSS.js";
|
|
101
101
|
import { t as file_name_exports } from "./file-name-BBWa-sfG.js";
|
|
102
102
|
import { n as write_text_file_exports } from "./write-text-file-BA4nc7Oc.js";
|
|
103
103
|
import { n as add_field_to_card_definition_exports } from "./add-field-to-card-definition-DICeZA-y.js";
|
|
@@ -15,7 +15,7 @@ import "./src-Ds_gxjJo.js";
|
|
|
15
15
|
import { i as snapshotOnRender } from "./layout-group-BNMtOT8O.js";
|
|
16
16
|
import { n as closestMotionConfig } from "./motion-config-BbHByW3a.js";
|
|
17
17
|
import { t as motionSpeed } from "./speed-bIo0tyrM.js";
|
|
18
|
-
import { C as
|
|
18
|
+
import { C as boundsOf, _ as GESTURE, b as measureBeacons, c as leave, d as setBeforeMeasure, f as setPassScheduler, g as sameScore, h as fadeOn, m as continuation, n as execute, o as setChoreoHost, p as compile, s as join, w as measure, y as trackGestures } from "./run-D4n4LPcK.js";
|
|
19
19
|
import { C as collect, S as Wait, _ as SlowZoom, a as Crossing, b as Tether, c as Gate, d as Pan, f as Parallel, g as Sequence, h as Scroll, i as Camera3D, l as Hold, m as Raise, n as Attach, o as Follow, p as Perform, r as Camera, s as Frame, t as Aim, u as Move, v as Spring, x as Tween } from "./steps-D0xobKkB.js";
|
|
20
20
|
//#region ../choreo/src/changeset.ts
|
|
21
21
|
/**
|
|
@@ -61,16 +61,29 @@ var Changeset = class {
|
|
|
61
61
|
measureZoom;
|
|
62
62
|
/** the frame's own size in local pixels, from the same final layout */
|
|
63
63
|
frame;
|
|
64
|
-
/** what the page shows behind this region — see ChangesetLike.ground
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
/** what the page shows behind this region — see ChangesetLike.ground.
|
|
65
|
+
* Read on first use: finding it walks the region's ancestors' computed
|
|
66
|
+
* styles, and most passes never crossfade a skin that needs it. */
|
|
67
|
+
get ground() {
|
|
68
|
+
if (typeof this.groundSource === "function") this.groundSource = this.groundSource();
|
|
69
|
+
return this.groundSource;
|
|
70
|
+
}
|
|
71
|
+
groundSource;
|
|
72
|
+
constructor(inserted, removed, kept, beacons = /* @__PURE__ */ new Map(), measureZoom = 1, frame, ground, measureBeacon) {
|
|
67
73
|
this.inserted = inserted;
|
|
68
74
|
this.removed = removed;
|
|
69
75
|
this.kept = kept;
|
|
70
|
-
this.beacon = (name) =>
|
|
76
|
+
this.beacon = (name) => {
|
|
77
|
+
if (!beacons.has(name) && measureBeacon) {
|
|
78
|
+
const bounds = measureBeacon(name);
|
|
79
|
+
if (bounds) beacons.set(name, bounds);
|
|
80
|
+
return bounds;
|
|
81
|
+
}
|
|
82
|
+
return beacons.get(name) ?? null;
|
|
83
|
+
};
|
|
71
84
|
this.measureZoom = measureZoom;
|
|
72
85
|
this.frame = frame;
|
|
73
|
-
this.
|
|
86
|
+
this.groundSource = ground;
|
|
74
87
|
}
|
|
75
88
|
get all() {
|
|
76
89
|
return [
|
|
@@ -273,6 +286,19 @@ function reducesMotion(root) {
|
|
|
273
286
|
if (policy !== "user") return policy === "always";
|
|
274
287
|
return typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
275
288
|
}
|
|
289
|
+
/** whether an element scrolls its content on either axis */
|
|
290
|
+
function scrolls(el) {
|
|
291
|
+
const { overflowX, overflowY } = getComputedStyle(el);
|
|
292
|
+
return [overflowX, overflowY].some((o) => o === "auto" || o === "scroll" || o === "overlay");
|
|
293
|
+
}
|
|
294
|
+
/** the nearest ancestor that scrolls vertically: what `@inView` calls the view */
|
|
295
|
+
function scrollerOf(el) {
|
|
296
|
+
for (let p = el.parentElement; p; p = p.parentElement) {
|
|
297
|
+
const overflow = getComputedStyle(p).overflowY;
|
|
298
|
+
if (overflow === "auto" || overflow === "scroll" || overflow === "overlay") return p;
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
276
302
|
/**
|
|
277
303
|
* The barrier books one post-render callback for every region taking part in a
|
|
278
304
|
* pass. `joinPass(this)` is where the region's PassHost contract (measurePass /
|
|
@@ -321,6 +347,9 @@ var Choreo = class extends Component {
|
|
|
321
347
|
arrived = /* @__PURE__ */ new Set();
|
|
322
348
|
/** destroyed before the pass that removed them has been processed */
|
|
323
349
|
claimed = /* @__PURE__ */ new Set();
|
|
350
|
+
/** every beacon name this region's score has read, so a pass measures
|
|
351
|
+
* those beacons and not the whole page's */
|
|
352
|
+
beaconNames = /* @__PURE__ */ new Set();
|
|
324
353
|
/** removed participants this region is keeping alive in its orphan layer */
|
|
325
354
|
orphans = /* @__PURE__ */ new Set();
|
|
326
355
|
/** participants whose Presence is letting them go: removed once, not on every pass while they leave */
|
|
@@ -348,6 +377,7 @@ var Choreo = class extends Component {
|
|
|
348
377
|
this.run?.cancel();
|
|
349
378
|
this.run = void 0;
|
|
350
379
|
this.unquiet();
|
|
380
|
+
this.viewObserver?.disconnect();
|
|
351
381
|
for (const node of [...this.orphans, ...this.claimed]) this.drop(node);
|
|
352
382
|
});
|
|
353
383
|
}
|
|
@@ -372,6 +402,7 @@ var Choreo = class extends Component {
|
|
|
372
402
|
register(node) {
|
|
373
403
|
this.participants.add(node);
|
|
374
404
|
this.arrived.add(node);
|
|
405
|
+
this.watchView(node);
|
|
375
406
|
if (this.args.debug && node.element) {
|
|
376
407
|
node.element.style.outline = "1px dotted #16a34a";
|
|
377
408
|
if (node.ownAnimation) console.warn(`choreo: participant '${node.id ?? node.role}' carries its own animate/exit/initial — a second scheduler beside the timeline`);
|
|
@@ -380,6 +411,90 @@ var Choreo = class extends Component {
|
|
|
380
411
|
return () => {
|
|
381
412
|
this.participants.delete(node);
|
|
382
413
|
this.arrived.delete(node);
|
|
414
|
+
this.unwatchView(node);
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
/** sat out a pass since the last one it watched (`@idle`) */
|
|
418
|
+
slept = false;
|
|
419
|
+
/** participants inside the view or its margin, as the observer last saw them */
|
|
420
|
+
nearView = /* @__PURE__ */ new Set();
|
|
421
|
+
/** what the last pass animated: kept wired until a pass lets it go, so a
|
|
422
|
+
* block that leaves the margin mid-flight is not cut loose halfway */
|
|
423
|
+
flying = /* @__PURE__ */ new Set();
|
|
424
|
+
viewNodes = /* @__PURE__ */ new WeakMap();
|
|
425
|
+
viewObserver;
|
|
426
|
+
viewRoot = null;
|
|
427
|
+
/** the `@inViewMargin` the current observer was made with */
|
|
428
|
+
viewMarginUsed;
|
|
429
|
+
get viewMargin() {
|
|
430
|
+
return this.args.inViewMargin ?? 1;
|
|
431
|
+
}
|
|
432
|
+
watchView(node) {
|
|
433
|
+
const el = node.element;
|
|
434
|
+
if (!this.args.inView || !el) return;
|
|
435
|
+
if (!this.viewObserver) {
|
|
436
|
+
this.viewRoot = this.element ? scrollerOf(this.element) : null;
|
|
437
|
+
this.viewMarginUsed = this.viewMargin;
|
|
438
|
+
this.viewObserver = new IntersectionObserver((entries) => {
|
|
439
|
+
for (const entry of entries) {
|
|
440
|
+
const seen = this.viewNodes.get(entry.target);
|
|
441
|
+
if (!seen) continue;
|
|
442
|
+
if (entry.isIntersecting) this.nearView.add(seen);
|
|
443
|
+
else this.nearView.delete(seen);
|
|
444
|
+
}
|
|
445
|
+
}, {
|
|
446
|
+
root: this.viewRoot,
|
|
447
|
+
rootMargin: `${this.viewMargin * 100}% 0px`
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
this.viewNodes.set(el, node);
|
|
451
|
+
this.viewObserver.observe(el);
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* `@inView` and `@inViewMargin` can change after participants registered:
|
|
455
|
+
* switched on (or given a new margin), the region observes every current
|
|
456
|
+
* participant and wires the ones already near the view now (the observer
|
|
457
|
+
* reports only after the next frame); switched off, it lets the observer
|
|
458
|
+
* go and wires everything again.
|
|
459
|
+
*/
|
|
460
|
+
syncViewWatch() {
|
|
461
|
+
if (this.args.inView && this.viewObserver && this.viewMarginUsed !== this.viewMargin) {
|
|
462
|
+
this.viewObserver.disconnect();
|
|
463
|
+
this.viewObserver = void 0;
|
|
464
|
+
this.nearView.clear();
|
|
465
|
+
}
|
|
466
|
+
if (this.args.inView && !this.viewObserver) {
|
|
467
|
+
for (const node of this.participants) this.watchView(node);
|
|
468
|
+
if (this.viewObserver) {
|
|
469
|
+
const near = this.nearViewBand();
|
|
470
|
+
for (const node of this.participants) {
|
|
471
|
+
const r = node.element?.getBoundingClientRect();
|
|
472
|
+
if (r && r.bottom >= near.top && r.top <= near.bottom) this.nearView.add(node);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
} else if (!this.args.inView && this.viewObserver) {
|
|
476
|
+
this.viewObserver.disconnect();
|
|
477
|
+
this.viewObserver = void 0;
|
|
478
|
+
this.viewRoot = null;
|
|
479
|
+
this.nearView.clear();
|
|
480
|
+
this.flying.clear();
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
unwatchView(node) {
|
|
484
|
+
this.nearView.delete(node);
|
|
485
|
+
if (node.element) this.viewObserver?.unobserve(node.element);
|
|
486
|
+
}
|
|
487
|
+
/** the view and its margin, in viewport px; read once per pass */
|
|
488
|
+
nearViewBand() {
|
|
489
|
+
const r = this.viewRoot ? this.viewRoot.getBoundingClientRect() : {
|
|
490
|
+
bottom: window.innerHeight,
|
|
491
|
+
top: 0
|
|
492
|
+
};
|
|
493
|
+
const margin = (r.bottom - r.top) * this.viewMargin;
|
|
494
|
+
return {
|
|
495
|
+
bottom: r.bottom + margin,
|
|
496
|
+
margin,
|
|
497
|
+
top: r.top - margin
|
|
383
498
|
};
|
|
384
499
|
}
|
|
385
500
|
claim(node) {
|
|
@@ -393,8 +508,17 @@ var Choreo = class extends Component {
|
|
|
393
508
|
get renderDetector() {
|
|
394
509
|
consumeTag(VOLATILE_TAG);
|
|
395
510
|
snapshotOnRender();
|
|
511
|
+
if (this.args.idle) {
|
|
512
|
+
this.slept = true;
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
if (this.slept) {
|
|
516
|
+
this.slept = false;
|
|
517
|
+
this.arrived.clear();
|
|
518
|
+
}
|
|
396
519
|
if (!this.passPending) {
|
|
397
520
|
this.passPending = true;
|
|
521
|
+
this.syncViewWatch();
|
|
398
522
|
this.snapshot();
|
|
399
523
|
join(this);
|
|
400
524
|
}
|
|
@@ -402,9 +526,10 @@ var Choreo = class extends Component {
|
|
|
402
526
|
snapshot() {
|
|
403
527
|
this.snapshots.clear();
|
|
404
528
|
this.rootSnapshot = this.element?.getBoundingClientRect();
|
|
529
|
+
const wired = this.args.inView ? this.nearView : void 0;
|
|
405
530
|
for (const node of this.participants) {
|
|
406
531
|
const el = node.element;
|
|
407
|
-
if (el?.isConnected && !this.orphans.has(node)) this.snapshots.set(node, measure(el));
|
|
532
|
+
if (el?.isConnected && !this.orphans.has(node) && (!wired || wired.has(node) || this.flying.has(node))) this.snapshots.set(node, measure(el));
|
|
408
533
|
}
|
|
409
534
|
}
|
|
410
535
|
/** phase 1: what changed this pass, measured — nothing is played yet */
|
|
@@ -439,6 +564,7 @@ var Choreo = class extends Component {
|
|
|
439
564
|
role: node.role,
|
|
440
565
|
type
|
|
441
566
|
});
|
|
567
|
+
const near = this.args.inView ? this.nearViewBand() : void 0;
|
|
442
568
|
const candidates = new Set([
|
|
443
569
|
...this.participants,
|
|
444
570
|
...this.claimed,
|
|
@@ -451,8 +577,14 @@ var Choreo = class extends Component {
|
|
|
451
577
|
if (this.orphans.has(node)) {
|
|
452
578
|
const prior = this.orphanBounds.get(node);
|
|
453
579
|
removed.push(sprite(node, "removed", prior));
|
|
454
|
-
} else if (this.arrived.has(node))
|
|
455
|
-
|
|
580
|
+
} else if (this.arrived.has(node)) {
|
|
581
|
+
if (near) {
|
|
582
|
+
const r = el.getBoundingClientRect();
|
|
583
|
+
if (r.bottom < near.top || r.top > near.bottom) continue;
|
|
584
|
+
this.nearView.add(node);
|
|
585
|
+
}
|
|
586
|
+
inserted.push(sprite(node, "inserted", void 0, boundsOf(measure(el), after)));
|
|
587
|
+
} else if (!el.isConnected || this.claimed.has(node)) {
|
|
456
588
|
if (this.leaving.has(node)) {
|
|
457
589
|
this.leaving.delete(node);
|
|
458
590
|
this.drop(node);
|
|
@@ -484,6 +616,13 @@ var Choreo = class extends Component {
|
|
|
484
616
|
};
|
|
485
617
|
}
|
|
486
618
|
}
|
|
619
|
+
if (near && kept.some((s) => Math.abs(s.delta?.y ?? 0) > near.margin)) {
|
|
620
|
+
for (const s of removed) this.drop(s.node);
|
|
621
|
+
inserted.length = 0;
|
|
622
|
+
kept.length = 0;
|
|
623
|
+
removed.length = 0;
|
|
624
|
+
}
|
|
625
|
+
if (near) this.flying = new Set([...inserted, ...kept.filter((s) => s.delta && (s.delta.x || s.delta.y))].map((s) => s.node));
|
|
487
626
|
this.arrived.clear();
|
|
488
627
|
this.snapshots.clear();
|
|
489
628
|
const claimed = [...this.claimed];
|
|
@@ -507,10 +646,13 @@ var Choreo = class extends Component {
|
|
|
507
646
|
const shadow = this.run?.camera.zoom ?? this.restingCamera.zoom;
|
|
508
647
|
const painted = layoutWidth > 0 ? after.width / layoutWidth : 0;
|
|
509
648
|
const measureZoom = !painted || Math.abs(painted - shadow) < .004 ? shadow : painted;
|
|
510
|
-
const changeset = new Changeset(inserted.filter((s) => s.type === "inserted"), removed, [...kept, ...inserted.filter((s) => s.type === "kept")], measureBeacons(after), measureZoom, {
|
|
649
|
+
const changeset = new Changeset(inserted.filter((s) => s.type === "inserted"), removed, [...kept, ...inserted.filter((s) => s.type === "kept")], measureBeacons(after, this.beaconNames), measureZoom, {
|
|
511
650
|
height: after.height / measureZoom,
|
|
512
651
|
width: after.width / measureZoom
|
|
513
|
-
}, groundOf(root))
|
|
652
|
+
}, () => groundOf(root), (name) => {
|
|
653
|
+
this.beaconNames.add(name);
|
|
654
|
+
return measureBeacons(after, [name]).get(name) ?? null;
|
|
655
|
+
});
|
|
514
656
|
this.changeset = changeset;
|
|
515
657
|
const firstRender = !this.rendered;
|
|
516
658
|
this.rendered = true;
|
|
@@ -556,7 +698,7 @@ var Choreo = class extends Component {
|
|
|
556
698
|
return;
|
|
557
699
|
}
|
|
558
700
|
const print = treePrint(tree);
|
|
559
|
-
const nothingNew = !inserted.length && pass.removed.every((s) => this.orphans.has(s.node)) && (this.orphans.size > 0 || !changeset.sprites({ type: "moved" }).length) && print === this.scorePrint;
|
|
701
|
+
const nothingNew = !inserted.length && pass.removed.every((s) => this.orphans.has(s.node)) && (this.orphans.size > 0 || !changeset.sprites({ type: "moved" }).length) && this.layoutOf() === this.layoutPrint && print === this.scorePrint;
|
|
560
702
|
if (this.run && !this.run.isDone() && nothingNew) {
|
|
561
703
|
for (const node of claimed) this.drop(node);
|
|
562
704
|
this.run.reassert();
|
|
@@ -615,7 +757,8 @@ var Choreo = class extends Component {
|
|
|
615
757
|
onPerformReset: this.args.onPerformReset,
|
|
616
758
|
onSpriteDone: (s) => this.finish(s),
|
|
617
759
|
removed: removed.filter((s) => named.has(s)),
|
|
618
|
-
doomed: !kept.length && !inserted.length && removed.length > 0
|
|
760
|
+
doomed: !kept.length && !inserted.length && removed.length > 0,
|
|
761
|
+
maxFrameStep: this.args.maxFrameStep
|
|
619
762
|
});
|
|
620
763
|
if (this.args.quiet) {
|
|
621
764
|
const run = this.run;
|
|
@@ -672,6 +815,14 @@ var Choreo = class extends Component {
|
|
|
672
815
|
}
|
|
673
816
|
parts.push(`${node.id ?? node.role ?? ""}@${x},${y},${el.offsetWidth},${el.offsetHeight}`);
|
|
674
817
|
}
|
|
818
|
+
let sx = 0;
|
|
819
|
+
let sy = 0;
|
|
820
|
+
for (let a = root?.parentElement; a; a = a.parentElement) {
|
|
821
|
+
sx += a.scrollLeft;
|
|
822
|
+
sy += a.scrollTop;
|
|
823
|
+
if (a !== document.documentElement && scrolls(a)) break;
|
|
824
|
+
}
|
|
825
|
+
parts.push(`scroll@${Math.round(sx)},${Math.round(sy)}`);
|
|
675
826
|
return parts.join("|");
|
|
676
827
|
}
|
|
677
828
|
/**
|
|
@@ -4,9 +4,9 @@ import { M as waitUntil, a as find } from "./dist-BOAdzfkP.js";
|
|
|
4
4
|
import { t as require_qunit } from "./qunit-C-Foo4Nd.js";
|
|
5
5
|
import { F as setupLocalIndexing, M as setupCardLogs, P as setupIntegrationTestRealm, lt as setupRenderingTest, t as setupMockMatrix } from "./mock-matrix-rxYRI9xw.js";
|
|
6
6
|
import { r as getService } from "./dist-CPfIHBla.js";
|
|
7
|
-
import { o as setupChoreo } from "./test-support-
|
|
7
|
+
import { o as setupChoreo } from "./test-support-VX6ukQNR.js";
|
|
8
8
|
import { vt as setupBaseRealm } from "./base-realm-B17zVqh6.js";
|
|
9
|
-
import { t as choreoGalleryContents } from "./choreo-gallery-
|
|
9
|
+
import { t as choreoGalleryContents } from "./choreo-gallery-BxA9cyzF.js";
|
|
10
10
|
import { t as renderCard } from "./render-component-B15Z0e2v.js";
|
|
11
11
|
//#region tests/integration/choreo-feature-reel-test.gts
|
|
12
12
|
var import_qunit = /* @__PURE__ */ __toESM(require_qunit());
|