@vezham/react 0.4.0-alpha.0 → 0.4.0-alpha.1
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/dist/heroui/v2/index.js +222 -222
- package/dist/heroui/v3/index.js +4413 -2999
- package/dist/{index-DAwpAMvM.js → index-CSOJ2ofh.js} +3436 -3034
- package/dist/{index-BugRMAMg.js → index-Cf7hlY2t.js} +157 -157
- package/dist/index-Huf04vlk.js +5 -0
- package/dist/{chunk-Z6XE2VH2-zmwNjh3V.js → index-h7wykpsc.js} +4591 -4983
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -296
- package/dist/src-UW24ZMRV-BQlHhwSw.js +5 -0
- package/package.json +8 -3
- package/dist/index-Dh5zhvE4.js +0 -5
- package/dist/src-UW24ZMRV-BCMtC06j.js +0 -5
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { useContext as at, Component as
|
|
5
|
-
function
|
|
6
|
-
return t === "x" || t === "y" ?
|
|
7
|
-
|
|
8
|
-
}) :
|
|
9
|
-
|
|
1
|
+
import { i as R, a as ue, b as tt, c as ce, m as v, f as E, e as S, g as fe, h as Ft, p as de, j as O, s as me, k as pe, l as J, n as Nt, o as y, q as U, r as ge, t as ye, u as ve, v as et, w as Wt, x as z, y as xe, F as Gt, z as j, A as zt, B as st, C as Pe, L as Te, S as De, D as Ee, E as $t, G as Se, H as Ht, I as Xt, J as Yt, K as qt, M as Ae, N as it, O as be, P as Re, Q as $, R as C, T as F, U as N, V as nt, W as Le, X as Ve, Y as Ce, Z as B, _ as H, $ as ot, a0 as Be, d as je } from "./index-h7wykpsc.js";
|
|
2
|
+
import { a1 as Ys, aL as qs, b0 as _s, ap as Ks, aM as Zs, b1 as Js, a2 as Qs, a3 as ti, a4 as ei, am as si, an as ii, af as ni, bH as oi, aN as ai, aO as ri, ao as li, ak as hi, ae as ui, bc as ci, bV as fi, bO as di, ag as mi, a6 as pi, aw as gi, bd as yi, ax as vi, ay as xi, az as Pi, ai as Ti, aY as Di, aA as Ei, aB as Si, bI as Ai, b5 as bi, a_ as Ri, bf as Li, aC as Vi, b7 as Ci, aV as Bi, b3 as ji, bk as Mi, bR as wi, bY as ki, bP as Ii, aD as Oi, aE as Ui, aF as Fi, aK as Ni, b4 as Wi, b6 as Gi, a8 as zi, bQ as $i, c2 as Hi, b2 as Xi, be as Yi, c1 as qi, bS as _i, bw as Ki, c3 as Zi, aP as Ji, bJ as Qi, bh as tn, bK as en, bL as sn, aU as nn, br as on, bB as an, aI as rn, a9 as ln, aR as hn, aS as un, bg as cn, aJ as fn, a$ as dn, bs as mn, bj as pn, ar as gn, ah as yn, as as vn, aW as xn, a5 as Pn, aT as Tn, a7 as Dn, b8 as En, aZ as Sn, at as An, aG as bn, bt as Rn, bx as Ln, bu as Vn, by as Cn, bA as Bn, bv as jn, bz as Mn, bC as wn, bW as kn, bT as In, al as On, aQ as Un, bl as Fn, bo as Nn, bi as Wn, bZ as Gn, bm as zn, bD as $n, aH as Hn, bM as Xn, bN as Yn, bX as qn, bn as _n, aX as Kn, ba as Zn, b9 as Jn, bb as Qn, bE as to, bF as eo, bG as so, c0 as io, bp as no, bq as oo, bU as ao, aa as ro, ab as lo, ac as ho, ad as uo, au as co, b_ as fo, aj as mo, b$ as po, av as go, aq as yo } from "./index-h7wykpsc.js";
|
|
3
|
+
import { jsx as Me } from "react/jsx-runtime";
|
|
4
|
+
import { useContext as at, Component as we } from "react";
|
|
5
|
+
function ke(t) {
|
|
6
|
+
return t === "x" || t === "y" ? R[t] ? null : (R[t] = !0, () => {
|
|
7
|
+
R[t] = !1;
|
|
8
|
+
}) : R.x || R.y ? null : (R.x = R.y = !0, () => {
|
|
9
|
+
R.x = R.y = !1;
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function _t(t) {
|
|
13
13
|
return ue(t) && "ownerSVGElement" in t;
|
|
14
14
|
}
|
|
15
15
|
function Ie(t) {
|
|
16
|
-
return
|
|
16
|
+
return _t(t) && t.tagName === "svg";
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function w(t, e, i, n) {
|
|
19
19
|
return tt(t, e, ce(i), n);
|
|
20
20
|
}
|
|
21
21
|
const Kt = 1e-4, Oe = 1 - Kt, Ue = 1 + Kt, Zt = 0.01, Fe = 0 - Zt, Ne = 0 + Zt;
|
|
@@ -28,7 +28,7 @@ function We(t, e, i) {
|
|
|
28
28
|
function rt(t, e, i, n = 0.5) {
|
|
29
29
|
t.origin = n, t.originPoint = v(e.min, e.max, t.origin), t.scale = D(i) / D(e), t.translate = v(i.min, i.max, t.origin) - t.originPoint, (t.scale >= Oe && t.scale <= Ue || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Fe && t.translate <= Ne || isNaN(t.translate)) && (t.translate = 0);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function k(t, e, i, n) {
|
|
32
32
|
rt(t.x, e.x, i.x, n ? n.originX : void 0), rt(t.y, e.y, i.y, n ? n.originY : void 0);
|
|
33
33
|
}
|
|
34
34
|
function lt(t, e, i) {
|
|
@@ -43,7 +43,7 @@ function ht(t, e, i) {
|
|
|
43
43
|
function I(t, e, i) {
|
|
44
44
|
ht(t.x, e.x, i.x), ht(t.y, e.y, i.y);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function b(t) {
|
|
47
47
|
return [t("x"), t("y")];
|
|
48
48
|
}
|
|
49
49
|
const Jt = ({ current: t }) => t ? t.ownerDocument.defaultView : null, ut = (t, e) => Math.abs(t - e);
|
|
@@ -78,7 +78,7 @@ class Qt {
|
|
|
78
78
|
const o = Ft(e), a = X(o, this.transformPagePoint), { point: l } = a, { timestamp: h } = E;
|
|
79
79
|
this.history = [{ ...l, timestamp: h }];
|
|
80
80
|
const { onSessionStart: c } = i;
|
|
81
|
-
c && c(e, Y(a, this.history)), this.removeListeners = de(
|
|
81
|
+
c && c(e, Y(a, this.history)), this.removeListeners = de(w(this.contextWindow, "pointermove", this.handlePointerMove), w(this.contextWindow, "pointerup", this.handlePointerUp), w(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
82
82
|
}
|
|
83
83
|
updateHandlers(e) {
|
|
84
84
|
this.handlers = e;
|
|
@@ -144,13 +144,13 @@ function dt(t, e) {
|
|
|
144
144
|
let i = e.min - t.min, n = e.max - t.max;
|
|
145
145
|
return e.max - e.min < t.max - t.min && ([i, n] = [n, i]), { min: i, max: n };
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function qe(t, e) {
|
|
148
148
|
return {
|
|
149
149
|
x: dt(t.x, e.x),
|
|
150
150
|
y: dt(t.y, e.y)
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function _e(t, e) {
|
|
154
154
|
let i = 0.5;
|
|
155
155
|
const n = D(t), r = D(e);
|
|
156
156
|
return r > n ? i = J(e.min, e.max - n, t.min) : n > r && (i = J(t.min, t.max - r, e.min)), Nt(0, 1, i);
|
|
@@ -189,15 +189,15 @@ class Qe {
|
|
|
189
189
|
f ? this.pauseAnimation() : this.stopAnimation(), i && this.snapToCursor(Ft(c).point);
|
|
190
190
|
}, s = (c, f) => {
|
|
191
191
|
const { drag: d, dragPropagation: m, onDragStart: x } = this.getProps();
|
|
192
|
-
if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock =
|
|
192
|
+
if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = ke(d), !this.openDragLock))
|
|
193
193
|
return;
|
|
194
|
-
this.latestPointerEvent = c, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
194
|
+
this.latestPointerEvent = c, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), b((p) => {
|
|
195
195
|
let P = this.getAxisMotionValue(p).get() || 0;
|
|
196
196
|
if (z.test(P)) {
|
|
197
197
|
const { projection: T } = this.visualElement;
|
|
198
198
|
if (T && T.layout) {
|
|
199
|
-
const
|
|
200
|
-
|
|
199
|
+
const L = T.layout.layoutBox[p];
|
|
200
|
+
L && (P = D(L) * (parseFloat(P) / 100));
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
this.originPoint[p] = P;
|
|
@@ -217,7 +217,7 @@ class Qe {
|
|
|
217
217
|
this.updateAxis("x", f.point, p), this.updateAxis("y", f.point, p), this.visualElement.render(), g && g(c, f);
|
|
218
218
|
}, a = (c, f) => {
|
|
219
219
|
this.latestPointerEvent = c, this.latestPanInfo = f, this.stop(c, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
220
|
-
}, l = () =>
|
|
220
|
+
}, l = () => b((c) => this.getAnimationState(c) === "paused" && this.getAxisMotionValue(c).animation?.play()), { dragSnapToOrigin: h } = this.getProps();
|
|
221
221
|
this.panSession = new Qt(e, {
|
|
222
222
|
onSessionStart: u,
|
|
223
223
|
onStart: s,
|
|
@@ -263,7 +263,7 @@ class Qe {
|
|
|
263
263
|
}
|
|
264
264
|
resolveConstraints() {
|
|
265
265
|
const { dragConstraints: e, dragElastic: i } = this.getProps(), n = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, r = this.constraints;
|
|
266
|
-
e && U(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && n ? this.constraints = Ye(n.layoutBox, e) : this.constraints = !1, this.elastic = Ze(i), r !== this.constraints && n && this.constraints && !this.hasMutatedConstraints &&
|
|
266
|
+
e && U(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && n ? this.constraints = Ye(n.layoutBox, e) : this.constraints = !1, this.elastic = Ze(i), r !== this.constraints && n && this.constraints && !this.hasMutatedConstraints && b((u) => {
|
|
267
267
|
this.constraints !== !1 && this.getAxisMotionValue(u) && (this.constraints[u] = Ke(n.layoutBox[u], this.constraints[u]));
|
|
268
268
|
});
|
|
269
269
|
}
|
|
@@ -277,7 +277,7 @@ class Qe {
|
|
|
277
277
|
if (!r || !r.layout)
|
|
278
278
|
return !1;
|
|
279
279
|
const u = ge(n, r.root, this.visualElement.getTransformPagePoint());
|
|
280
|
-
let s =
|
|
280
|
+
let s = qe(r.layout.layoutBox, u);
|
|
281
281
|
if (i) {
|
|
282
282
|
const o = i(ye(s));
|
|
283
283
|
this.hasMutatedConstraints = !!o, o && (s = ve(o));
|
|
@@ -285,7 +285,7 @@ class Qe {
|
|
|
285
285
|
return s;
|
|
286
286
|
}
|
|
287
287
|
startAnimation(e) {
|
|
288
|
-
const { drag: i, dragMomentum: n, dragElastic: r, dragTransition: u, dragSnapToOrigin: s, onDragTransitionEnd: o } = this.getProps(), a = this.constraints || {}, l =
|
|
288
|
+
const { drag: i, dragMomentum: n, dragElastic: r, dragTransition: u, dragSnapToOrigin: s, onDragTransitionEnd: o } = this.getProps(), a = this.constraints || {}, l = b((h) => {
|
|
289
289
|
if (!W(h, i, this.currentDirection))
|
|
290
290
|
return;
|
|
291
291
|
let c = a && a[h] || {};
|
|
@@ -310,10 +310,10 @@ class Qe {
|
|
|
310
310
|
return et(this.visualElement, e), n.start(Wt(e, n, 0, i, this.visualElement, !1));
|
|
311
311
|
}
|
|
312
312
|
stopAnimation() {
|
|
313
|
-
|
|
313
|
+
b((e) => this.getAxisMotionValue(e).stop());
|
|
314
314
|
}
|
|
315
315
|
pauseAnimation() {
|
|
316
|
-
|
|
316
|
+
b((e) => this.getAxisMotionValue(e).animation?.pause());
|
|
317
317
|
}
|
|
318
318
|
getAnimationState(e) {
|
|
319
319
|
return this.getAxisMotionValue(e).animation?.state;
|
|
@@ -329,7 +329,7 @@ class Qe {
|
|
|
329
329
|
return r || this.visualElement.getValue(e, (n.initial ? n.initial[e] : void 0) || 0);
|
|
330
330
|
}
|
|
331
331
|
snapToCursor(e) {
|
|
332
|
-
|
|
332
|
+
b((i) => {
|
|
333
333
|
const { drag: n } = this.getProps();
|
|
334
334
|
if (!W(i, n, this.currentDirection))
|
|
335
335
|
return;
|
|
@@ -353,15 +353,15 @@ class Qe {
|
|
|
353
353
|
return;
|
|
354
354
|
this.stopAnimation();
|
|
355
355
|
const r = { x: 0, y: 0 };
|
|
356
|
-
|
|
356
|
+
b((s) => {
|
|
357
357
|
const o = this.getAxisMotionValue(s);
|
|
358
358
|
if (o && this.constraints !== !1) {
|
|
359
359
|
const a = o.get();
|
|
360
|
-
r[s] =
|
|
360
|
+
r[s] = _e({ min: a, max: a }, this.constraints[s]);
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
363
|
const { transformTemplate: u } = this.visualElement.getProps();
|
|
364
|
-
this.visualElement.current.style.transform = u ? u({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.resolveConstraints(),
|
|
364
|
+
this.visualElement.current.style.transform = u ? u({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.resolveConstraints(), b((s) => {
|
|
365
365
|
if (!W(s, e, null))
|
|
366
366
|
return;
|
|
367
367
|
const o = this.getAxisMotionValue(s), { min: a, max: l } = this.constraints[s];
|
|
@@ -372,7 +372,7 @@ class Qe {
|
|
|
372
372
|
if (!this.visualElement.current)
|
|
373
373
|
return;
|
|
374
374
|
Je.set(this.visualElement, this);
|
|
375
|
-
const e = this.visualElement.current, i =
|
|
375
|
+
const e = this.visualElement.current, i = w(e, "pointerdown", (a) => {
|
|
376
376
|
const { drag: l, dragListener: h = !0 } = this.getProps();
|
|
377
377
|
l && h && this.start(a);
|
|
378
378
|
}), n = () => {
|
|
@@ -381,7 +381,7 @@ class Qe {
|
|
|
381
381
|
}, { projection: r } = this.visualElement, u = r.addEventListener("measure", n);
|
|
382
382
|
r && !r.layout && (r.root && r.root.updateScroll(), r.updateLayout()), S.read(n);
|
|
383
383
|
const s = tt(window, "resize", () => this.scalePositionWithinConstraints()), o = r.addEventListener("didUpdate", (({ delta: a, hasLayoutChanged: l }) => {
|
|
384
|
-
this.isDragging && l && (
|
|
384
|
+
this.isDragging && l && (b((h) => {
|
|
385
385
|
const c = this.getAxisMotionValue(h);
|
|
386
386
|
c && (this.originPoint[h] += a[h].translate, c.set(c.get() + a[h].translate));
|
|
387
387
|
}), this.visualElement.render());
|
|
@@ -412,11 +412,11 @@ function ts(t, e = 10) {
|
|
|
412
412
|
}
|
|
413
413
|
class es extends Gt {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(e), this.removeGroupControls =
|
|
415
|
+
super(e), this.removeGroupControls = j, this.removeListeners = j, this.controls = new Qe(e);
|
|
416
416
|
}
|
|
417
417
|
mount() {
|
|
418
418
|
const { dragControls: e } = this.node.getProps();
|
|
419
|
-
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
419
|
+
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || j;
|
|
420
420
|
}
|
|
421
421
|
unmount() {
|
|
422
422
|
this.removeGroupControls(), this.removeListeners();
|
|
@@ -427,7 +427,7 @@ const gt = (t) => (e, i) => {
|
|
|
427
427
|
};
|
|
428
428
|
class ss extends Gt {
|
|
429
429
|
constructor() {
|
|
430
|
-
super(...arguments), this.removePointerDownListener =
|
|
430
|
+
super(...arguments), this.removePointerDownListener = j;
|
|
431
431
|
}
|
|
432
432
|
onPointerDown(e) {
|
|
433
433
|
this.session = new Qt(e, this.createPanHandlers(), {
|
|
@@ -447,7 +447,7 @@ class ss extends Gt {
|
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
449
|
mount() {
|
|
450
|
-
this.removePointerDownListener =
|
|
450
|
+
this.removePointerDownListener = w(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
|
|
451
451
|
}
|
|
452
452
|
update() {
|
|
453
453
|
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
@@ -471,7 +471,7 @@ const G = {
|
|
|
471
471
|
function yt(t, e) {
|
|
472
472
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const M = {
|
|
475
475
|
correct: (t, e) => {
|
|
476
476
|
if (!e.target)
|
|
477
477
|
return t;
|
|
@@ -494,8 +494,8 @@ const w = {
|
|
|
494
494
|
return typeof r[2 + s] == "number" && (r[2 + s] /= l), typeof r[3 + s] == "number" && (r[3 + s] /= l), u(r);
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
|
-
let
|
|
498
|
-
class ns extends
|
|
497
|
+
let q = !1;
|
|
498
|
+
class ns extends we {
|
|
499
499
|
/**
|
|
500
500
|
* This only mounts projection nodes for components that
|
|
501
501
|
* need measuring, we might want to do it for all components
|
|
@@ -503,7 +503,7 @@ class ns extends ke {
|
|
|
503
503
|
*/
|
|
504
504
|
componentDidMount() {
|
|
505
505
|
const { visualElement: e, layoutGroup: i, switchLayoutGroup: n, layoutId: r } = this.props, { projection: u } = e;
|
|
506
|
-
Ee(os), u && (i.group && i.group.add(u), n && n.register && r && n.register(u),
|
|
506
|
+
Ee(os), u && (i.group && i.group.add(u), n && n.register && r && n.register(u), q && u.root.didUpdate(), u.addEventListener("animationComplete", () => {
|
|
507
507
|
this.safeToRemove();
|
|
508
508
|
}), u.setOptions({
|
|
509
509
|
...u.options,
|
|
@@ -512,7 +512,7 @@ class ns extends ke {
|
|
|
512
512
|
}
|
|
513
513
|
getSnapshotBeforeUpdate(e) {
|
|
514
514
|
const { layoutDependency: i, visualElement: n, drag: r, isPresent: u } = this.props, { projection: s } = n;
|
|
515
|
-
return s && (s.isPresent = u,
|
|
515
|
+
return s && (s.isPresent = u, q = !0, r || e.layoutDependency !== i || i === void 0 || e.isPresent !== u ? s.willUpdate() : this.safeToRemove(), e.isPresent !== u && (u ? s.promote() : s.relegate() || S.postRender(() => {
|
|
516
516
|
const o = s.getStack();
|
|
517
517
|
(!o || !o.members.length) && this.safeToRemove();
|
|
518
518
|
}))), null;
|
|
@@ -525,7 +525,7 @@ class ns extends ke {
|
|
|
525
525
|
}
|
|
526
526
|
componentWillUnmount() {
|
|
527
527
|
const { visualElement: e, layoutGroup: i, switchLayoutGroup: n } = this.props, { projection: r } = e;
|
|
528
|
-
|
|
528
|
+
q = !0, r && (r.scheduleCheckAfterUnmount(), i && i.group && i.group.remove(r), n && n.deregister && n.deregister(r));
|
|
529
529
|
}
|
|
530
530
|
safeToRemove() {
|
|
531
531
|
const { safeToRemove: e } = this.props;
|
|
@@ -537,11 +537,11 @@ class ns extends ke {
|
|
|
537
537
|
}
|
|
538
538
|
function ee(t) {
|
|
539
539
|
const [e, i] = Pe(), n = at(Te);
|
|
540
|
-
return
|
|
540
|
+
return Me(ns, { ...t, layoutGroup: n, switchLayoutGroup: at(De), isPresent: e, safeToRemove: i });
|
|
541
541
|
}
|
|
542
542
|
const os = {
|
|
543
543
|
borderRadius: {
|
|
544
|
-
...
|
|
544
|
+
...M,
|
|
545
545
|
applyTo: [
|
|
546
546
|
"borderTopLeftRadius",
|
|
547
547
|
"borderTopRightRadius",
|
|
@@ -549,10 +549,10 @@ const os = {
|
|
|
549
549
|
"borderBottomRightRadius"
|
|
550
550
|
]
|
|
551
551
|
},
|
|
552
|
-
borderTopLeftRadius:
|
|
553
|
-
borderTopRightRadius:
|
|
554
|
-
borderBottomLeftRadius:
|
|
555
|
-
borderBottomRightRadius:
|
|
552
|
+
borderTopLeftRadius: M,
|
|
553
|
+
borderTopRightRadius: M,
|
|
554
|
+
borderBottomLeftRadius: M,
|
|
555
|
+
borderBottomRightRadius: M,
|
|
556
556
|
boxShadow: is
|
|
557
557
|
};
|
|
558
558
|
function as(t, e, i) {
|
|
@@ -575,7 +575,7 @@ class ls {
|
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
function hs(t, e) {
|
|
578
|
-
const i =
|
|
578
|
+
const i = qt.now(), n = ({ timestamp: r }) => {
|
|
579
579
|
const u = r - i;
|
|
580
580
|
u >= e && (O(n), t(u - e));
|
|
581
581
|
};
|
|
@@ -596,7 +596,7 @@ function cs(t, e, i, n, r, u) {
|
|
|
596
596
|
function Pt(t, e) {
|
|
597
597
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
598
598
|
}
|
|
599
|
-
const fs = /* @__PURE__ */ ie(0, 0.5, Ae), ds = /* @__PURE__ */ ie(0.5, 0.95,
|
|
599
|
+
const fs = /* @__PURE__ */ ie(0, 0.5, Ae), ds = /* @__PURE__ */ ie(0.5, 0.95, j);
|
|
600
600
|
function ie(t, e, i) {
|
|
601
601
|
return (n) => n < t ? 0 : n > e ? 1 : i(J(t, e, n));
|
|
602
602
|
}
|
|
@@ -625,28 +625,28 @@ const ps = ["x", "scaleX", "originX"], gs = ["y", "scaleY", "originY"];
|
|
|
625
625
|
function At(t, e, i, n) {
|
|
626
626
|
St(t.x, e, ps, i ? i.x : void 0, n ? n.x : void 0), St(t.y, e, gs, i ? i.y : void 0, n ? n.y : void 0);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function bt(t) {
|
|
629
629
|
return t.translate === 0 && t.scale === 1;
|
|
630
630
|
}
|
|
631
631
|
function ne(t) {
|
|
632
|
-
return
|
|
632
|
+
return bt(t.x) && bt(t.y);
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Rt(t, e) {
|
|
635
635
|
return t.min === e.min && t.max === e.max;
|
|
636
636
|
}
|
|
637
637
|
function ys(t, e) {
|
|
638
|
-
return
|
|
638
|
+
return Rt(t.x, e.x) && Rt(t.y, e.y);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Lt(t, e) {
|
|
641
641
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
642
642
|
}
|
|
643
643
|
function oe(t, e) {
|
|
644
|
-
return
|
|
644
|
+
return Lt(t.x, e.x) && Lt(t.y, e.y);
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Vt(t) {
|
|
647
647
|
return D(t.x) / D(t.y);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function Ct(t, e) {
|
|
650
650
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
651
651
|
}
|
|
652
652
|
class vs {
|
|
@@ -713,7 +713,7 @@ function xs(t, e, i) {
|
|
|
713
713
|
const o = t.x.scale * e.x, a = t.y.scale * e.y;
|
|
714
714
|
return (o !== 1 || a !== 1) && (n += `scale(${o}, ${a})`), n || "none";
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const _ = ["", "X", "Y", "Z"], Ps = 1e3;
|
|
717
717
|
let Ts = 0;
|
|
718
718
|
function K(t, e, i, n) {
|
|
719
719
|
const { latestValues: r } = e;
|
|
@@ -725,7 +725,7 @@ function ae(t) {
|
|
|
725
725
|
const { visualElement: e } = t.options;
|
|
726
726
|
if (!e)
|
|
727
727
|
return;
|
|
728
|
-
const i =
|
|
728
|
+
const i = Be(e);
|
|
729
729
|
if (window.MotionHasOptimisedAnimation(i, "transform")) {
|
|
730
730
|
const { layout: r, layoutId: u } = t.options;
|
|
731
731
|
window.MotionCancelOptimisedAnimation(i, "transform", S, !(r || u));
|
|
@@ -739,14 +739,14 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
739
739
|
this.id = Ts++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
740
740
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
741
741
|
}, this.updateProjection = () => {
|
|
742
|
-
this.projectionUpdateScheduled = !1, this.nodes.forEach(Ss), this.nodes.forEach(
|
|
742
|
+
this.projectionUpdateScheduled = !1, this.nodes.forEach(Ss), this.nodes.forEach(Ls), this.nodes.forEach(Vs), this.nodes.forEach(As);
|
|
743
743
|
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = s, this.root = o ? o.root || o : this, this.path = o ? [...o.path, o] : [], this.parent = o, this.depth = o ? o.depth + 1 : 0;
|
|
744
744
|
for (let a = 0; a < this.path.length; a++)
|
|
745
745
|
this.path[a].shouldResetTransform = !0;
|
|
746
746
|
this.root === this && (this.nodes = new ls());
|
|
747
747
|
}
|
|
748
748
|
addEventListener(s, o) {
|
|
749
|
-
return this.eventHandlers.has(s) || this.eventHandlers.set(s, new
|
|
749
|
+
return this.eventHandlers.has(s) || this.eventHandlers.set(s, new be()), this.eventHandlers.get(s).add(o);
|
|
750
750
|
}
|
|
751
751
|
notifyListeners(s, ...o) {
|
|
752
752
|
const a = this.eventHandlers.get(s);
|
|
@@ -761,7 +761,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
761
761
|
mount(s) {
|
|
762
762
|
if (this.instance)
|
|
763
763
|
return;
|
|
764
|
-
this.isSVG =
|
|
764
|
+
this.isSVG = _t(s) && !Ie(s), this.instance = s;
|
|
765
765
|
const { layoutId: o, layout: a, visualElement: l } = this.options;
|
|
766
766
|
if (l && !l.current && l.mount(s), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (a || o) && (this.isLayoutDirty = !0), t) {
|
|
767
767
|
let h, c = 0;
|
|
@@ -770,7 +770,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
770
770
|
c = window.innerWidth;
|
|
771
771
|
}), t(s, () => {
|
|
772
772
|
const d = window.innerWidth;
|
|
773
|
-
d !== c && (c = d, this.root.updateBlockedByResize = !0, h && h(), h = hs(f, 250), G.hasAnimatedSinceResize && (G.hasAnimatedSinceResize = !1, this.nodes.forEach(
|
|
773
|
+
d !== c && (c = d, this.root.updateBlockedByResize = !0, h && h(), h = hs(f, 250), G.hasAnimatedSinceResize && (G.hasAnimatedSinceResize = !1, this.nodes.forEach(Mt)));
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
776
|
o && this.root.registerSharedNode(o, this), this.options.animate !== !1 && l && (o || a) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: c, hasRelativeLayoutChanged: f, layout: d }) => {
|
|
@@ -778,17 +778,17 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
778
778
|
this.target = void 0, this.relativeTarget = void 0;
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
|
-
const m = this.options.transition || l.getDefaultTransition() ||
|
|
781
|
+
const m = this.options.transition || l.getDefaultTransition() || ws, { onLayoutAnimationStart: x, onLayoutAnimationComplete: g } = l.getProps(), p = !this.targetLayout || !oe(this.targetLayout, d), P = !c && f;
|
|
782
782
|
if (this.options.layoutRoot || this.resumeFrom || P || c && (p || !this.currentAnimation)) {
|
|
783
783
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
784
784
|
const T = {
|
|
785
|
-
...
|
|
785
|
+
...Re(m, "layout"),
|
|
786
786
|
onPlay: x,
|
|
787
787
|
onComplete: g
|
|
788
788
|
};
|
|
789
789
|
(l.shouldReduceMotion || this.options.layoutRoot) && (T.delay = 0, T.type = !1), this.startAnimation(T), this.setAnimationOrigin(h, P);
|
|
790
790
|
} else
|
|
791
|
-
c ||
|
|
791
|
+
c || Mt(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
792
792
|
this.targetLayout = d;
|
|
793
793
|
});
|
|
794
794
|
}
|
|
@@ -812,7 +812,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
812
812
|
}
|
|
813
813
|
// Note: currently only running on root node
|
|
814
814
|
startUpdate() {
|
|
815
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
815
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Cs), this.animationId++);
|
|
816
816
|
}
|
|
817
817
|
getTransformTemplate() {
|
|
818
818
|
const { visualElement: s } = this.options;
|
|
@@ -838,22 +838,22 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
838
838
|
}
|
|
839
839
|
update() {
|
|
840
840
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
841
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
841
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Bt);
|
|
842
842
|
return;
|
|
843
843
|
}
|
|
844
844
|
if (this.animationId <= this.animationCommitId) {
|
|
845
|
-
this.nodes.forEach(
|
|
845
|
+
this.nodes.forEach(jt);
|
|
846
846
|
return;
|
|
847
847
|
}
|
|
848
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(
|
|
849
|
-
const o =
|
|
848
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Rs), this.nodes.forEach(Ds), this.nodes.forEach(Es)) : this.nodes.forEach(jt), this.clearAllSnapshots();
|
|
849
|
+
const o = qt.now();
|
|
850
850
|
E.delta = Nt(0, 1e3 / 60, o - E.timestamp), E.timestamp = o, E.isProcessing = !0, $.update.process(E), $.preRender.process(E), $.render.process(E), E.isProcessing = !1;
|
|
851
851
|
}
|
|
852
852
|
didUpdate() {
|
|
853
853
|
this.updateScheduled || (this.updateScheduled = !0, $t.read(this.scheduleUpdate));
|
|
854
854
|
}
|
|
855
855
|
clearAllSnapshots() {
|
|
856
|
-
this.nodes.forEach(
|
|
856
|
+
this.nodes.forEach(bs), this.sharedNodes.forEach(Bs);
|
|
857
857
|
}
|
|
858
858
|
scheduleUpdateProjection() {
|
|
859
859
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, S.preRender(this.updateProjection, !1, !0));
|
|
@@ -897,12 +897,12 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
897
897
|
if (!r)
|
|
898
898
|
return;
|
|
899
899
|
const s = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, o = this.projectionDelta && !ne(this.projectionDelta), a = this.getTransformTemplate(), l = a ? a(this.latestValues, "") : void 0, h = l !== this.prevTransformTemplateValue;
|
|
900
|
-
s && this.instance && (o ||
|
|
900
|
+
s && this.instance && (o || C(this.latestValues) || h) && (r(this.instance, l), this.shouldResetTransform = !1, this.scheduleRender());
|
|
901
901
|
}
|
|
902
902
|
measure(s = !0) {
|
|
903
903
|
const o = this.measurePageBox();
|
|
904
904
|
let a = this.removeElementScroll(o);
|
|
905
|
-
return s && (a = this.removeTransform(a)),
|
|
905
|
+
return s && (a = this.removeTransform(a)), ks(a), {
|
|
906
906
|
animationId: this.root.animationId,
|
|
907
907
|
measuredBox: o,
|
|
908
908
|
layoutBox: a,
|
|
@@ -939,22 +939,22 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
939
939
|
!o && h.options.layoutScroll && h.scroll && h !== h.root && N(a, {
|
|
940
940
|
x: -h.scroll.offset.x,
|
|
941
941
|
y: -h.scroll.offset.y
|
|
942
|
-
}),
|
|
942
|
+
}), C(h.latestValues) && N(a, h.latestValues);
|
|
943
943
|
}
|
|
944
|
-
return
|
|
944
|
+
return C(this.latestValues) && N(a, this.latestValues), a;
|
|
945
945
|
}
|
|
946
946
|
removeTransform(s) {
|
|
947
947
|
const o = y();
|
|
948
948
|
A(o, s);
|
|
949
949
|
for (let a = 0; a < this.path.length; a++) {
|
|
950
950
|
const l = this.path[a];
|
|
951
|
-
if (!l.instance || !
|
|
951
|
+
if (!l.instance || !C(l.latestValues))
|
|
952
952
|
continue;
|
|
953
953
|
nt(l.latestValues) && l.updateSnapshot();
|
|
954
954
|
const h = y(), c = l.measurePageBox();
|
|
955
955
|
A(h, c), At(o, l.latestValues, l.snapshot ? l.snapshot.layoutBox : void 0, h);
|
|
956
956
|
}
|
|
957
|
-
return
|
|
957
|
+
return C(this.latestValues) && At(o, this.latestValues), o;
|
|
958
958
|
}
|
|
959
959
|
setTargetDelta(s) {
|
|
960
960
|
this.targetDelta = s, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -984,7 +984,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
984
984
|
const f = this.getClosestProjectingParent();
|
|
985
985
|
f && f.layout && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = y(), this.relativeTargetOrigin = y(), I(this.relativeTargetOrigin, this.layout.layoutBox, f.layout.layoutBox), A(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
986
986
|
}
|
|
987
|
-
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = y(), this.targetWithTransforms = y()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Ge(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : A(this.target, this.layout.layoutBox),
|
|
987
|
+
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = y(), this.targetWithTransforms = y()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Ge(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : A(this.target, this.layout.layoutBox), Le(this.target, this.targetDelta)) : A(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget)) {
|
|
988
988
|
this.attemptToResolveRelativeTarget = !1;
|
|
989
989
|
const f = this.getClosestProjectingParent();
|
|
990
990
|
f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = y(), this.relativeTargetOrigin = y(), I(this.relativeTargetOrigin, this.target, f.target), A(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -992,7 +992,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
getClosestProjectingParent() {
|
|
995
|
-
if (!(!this.parent || nt(this.parent.latestValues) ||
|
|
995
|
+
if (!(!this.parent || nt(this.parent.latestValues) || Ve(this.parent.latestValues)))
|
|
996
996
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
997
997
|
}
|
|
998
998
|
isProjecting() {
|
|
@@ -1008,13 +1008,13 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
1008
1008
|
return;
|
|
1009
1009
|
A(this.layoutCorrected, this.layout.layoutBox);
|
|
1010
1010
|
const c = this.treeScale.x, f = this.treeScale.y;
|
|
1011
|
-
|
|
1011
|
+
Ce(this.layoutCorrected, this.treeScale, this.path, o), s.layout && !s.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (s.target = s.layout.layoutBox, s.targetWithTransforms = y());
|
|
1012
1012
|
const { target: d } = s;
|
|
1013
1013
|
if (!d) {
|
|
1014
1014
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
1015
1015
|
return;
|
|
1016
1016
|
}
|
|
1017
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Dt(this.prevProjectionDelta.x, this.projectionDelta.x), Dt(this.prevProjectionDelta.y, this.projectionDelta.y)),
|
|
1017
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Dt(this.prevProjectionDelta.x, this.projectionDelta.x), Dt(this.prevProjectionDelta.y, this.projectionDelta.y)), k(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== c || this.treeScale.y !== f || !Ct(this.projectionDelta.x, this.prevProjectionDelta.x) || !Ct(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
|
|
1018
1018
|
}
|
|
1019
1019
|
hide() {
|
|
1020
1020
|
this.isVisible = !1;
|
|
@@ -1030,17 +1030,17 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
1030
1030
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
1031
1031
|
}
|
|
1032
1032
|
createProjectionDeltas() {
|
|
1033
|
-
this.prevProjectionDelta =
|
|
1033
|
+
this.prevProjectionDelta = B(), this.projectionDelta = B(), this.projectionDeltaWithTransform = B();
|
|
1034
1034
|
}
|
|
1035
1035
|
setAnimationOrigin(s, o = !1) {
|
|
1036
|
-
const a = this.snapshot, l = a ? a.latestValues : {}, h = { ...this.latestValues }, c =
|
|
1036
|
+
const a = this.snapshot, l = a ? a.latestValues : {}, h = { ...this.latestValues }, c = B();
|
|
1037
1037
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !o;
|
|
1038
|
-
const f = y(), d = a ? a.source : void 0, m = this.layout ? this.layout.source : void 0, x = d !== m, g = this.getStack(), p = !g || g.members.length <= 1, P = !!(x && !p && this.options.crossfade === !0 && !this.path.some(
|
|
1038
|
+
const f = y(), d = a ? a.source : void 0, m = this.layout ? this.layout.source : void 0, x = d !== m, g = this.getStack(), p = !g || g.members.length <= 1, P = !!(x && !p && this.options.crossfade === !0 && !this.path.some(Ms));
|
|
1039
1039
|
this.animationProgress = 0;
|
|
1040
1040
|
let T;
|
|
1041
|
-
this.mixTargetDelta = (
|
|
1042
|
-
const
|
|
1043
|
-
|
|
1041
|
+
this.mixTargetDelta = (L) => {
|
|
1042
|
+
const V = L / 1e3;
|
|
1043
|
+
wt(c.x, s.x, V), wt(c.y, s.y, V), this.setTargetDelta(c), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (I(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), js(this.relativeTarget, this.relativeTargetOrigin, f, V), T && ys(this.relativeTarget, T) && (this.isProjectionDirty = !1), T || (T = y()), A(T, this.relativeTarget)), x && (this.animationValues = h, cs(h, l, this.latestValues, V, P, p)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = V;
|
|
1044
1044
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
1045
1045
|
}
|
|
1046
1046
|
startAnimation(s) {
|
|
@@ -1079,7 +1079,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
1079
1079
|
const f = D(this.layout.layoutBox.y);
|
|
1080
1080
|
a.y.min = s.target.y.min, a.y.max = a.y.min + f;
|
|
1081
1081
|
}
|
|
1082
|
-
A(o, a), N(o, h),
|
|
1082
|
+
A(o, a), N(o, h), k(this.projectionDeltaWithTransform, this.layoutCorrected, o, h);
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
1085
|
registerSharedNode(s, o) {
|
|
@@ -1125,8 +1125,8 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
1125
1125
|
return;
|
|
1126
1126
|
const l = {};
|
|
1127
1127
|
a.z && K("z", s, l, this.animationValues);
|
|
1128
|
-
for (let h = 0; h <
|
|
1129
|
-
K(`rotate${
|
|
1128
|
+
for (let h = 0; h < _.length; h++)
|
|
1129
|
+
K(`rotate${_[h]}`, s, l, this.animationValues), K(`skew${_[h]}`, s, l, this.animationValues);
|
|
1130
1130
|
s.render();
|
|
1131
1131
|
for (const h in l)
|
|
1132
1132
|
s.setStaticValue(h, l[h]), this.animationValues && (this.animationValues[h] = l[h]);
|
|
@@ -1146,7 +1146,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
1146
1146
|
}
|
|
1147
1147
|
const l = this.getLead();
|
|
1148
1148
|
if (!this.projectionDelta || !this.layout || !l.target) {
|
|
1149
|
-
this.options.layoutId && (s.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, s.pointerEvents = H(o?.pointerEvents) || ""), this.hasProjected && !
|
|
1149
|
+
this.options.layoutId && (s.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, s.pointerEvents = H(o?.pointerEvents) || ""), this.hasProjected && !C(this.latestValues) && (s.transform = a ? a({}, "") : "none", this.hasProjected = !1);
|
|
1150
1150
|
return;
|
|
1151
1151
|
}
|
|
1152
1152
|
s.visibility = "";
|
|
@@ -1162,8 +1162,8 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
1162
1162
|
const { correct: x, applyTo: g, isCSSVariable: p } = ot[m], P = c === "none" ? h[m] : x(h[m], l);
|
|
1163
1163
|
if (g) {
|
|
1164
1164
|
const T = g.length;
|
|
1165
|
-
for (let
|
|
1166
|
-
s[g[
|
|
1165
|
+
for (let L = 0; L < T; L++)
|
|
1166
|
+
s[g[L]] = P;
|
|
1167
1167
|
} else
|
|
1168
1168
|
p ? this.options.visualElement.renderState.vars[m] = P : s[m] = P;
|
|
1169
1169
|
}
|
|
@@ -1174,7 +1174,7 @@ function re({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
1174
1174
|
}
|
|
1175
1175
|
// Only run on root
|
|
1176
1176
|
resetTree() {
|
|
1177
|
-
this.root.nodes.forEach((s) => s.currentAnimation?.stop()), this.root.nodes.forEach(
|
|
1177
|
+
this.root.nodes.forEach((s) => s.currentAnimation?.stop()), this.root.nodes.forEach(Bt), this.root.sharedNodes.clear();
|
|
1178
1178
|
}
|
|
1179
1179
|
};
|
|
1180
1180
|
}
|
|
@@ -1185,17 +1185,17 @@ function Es(t) {
|
|
|
1185
1185
|
const e = t.resumeFrom?.snapshot || t.snapshot;
|
|
1186
1186
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
1187
1187
|
const { layoutBox: i, measuredBox: n } = t.layout, { animationType: r } = t.options, u = e.source !== t.layout.source;
|
|
1188
|
-
r === "size" ?
|
|
1188
|
+
r === "size" ? b((h) => {
|
|
1189
1189
|
const c = u ? e.measuredBox[h] : e.layoutBox[h], f = D(c);
|
|
1190
1190
|
c.min = i[h].min, c.max = c.min + f;
|
|
1191
|
-
}) : le(r, e.layoutBox, i) &&
|
|
1191
|
+
}) : le(r, e.layoutBox, i) && b((h) => {
|
|
1192
1192
|
const c = u ? e.measuredBox[h] : e.layoutBox[h], f = D(i[h]);
|
|
1193
1193
|
c.max = c.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + f);
|
|
1194
1194
|
});
|
|
1195
|
-
const s =
|
|
1196
|
-
|
|
1197
|
-
const o =
|
|
1198
|
-
u ?
|
|
1195
|
+
const s = B();
|
|
1196
|
+
k(s, i, e.layoutBox);
|
|
1197
|
+
const o = B();
|
|
1198
|
+
u ? k(o, t.applyTransform(n, !0), e.measuredBox) : k(o, i, e.layoutBox);
|
|
1199
1199
|
const a = !ne(s);
|
|
1200
1200
|
let l = !1;
|
|
1201
1201
|
if (!t.resumeFrom) {
|
|
@@ -1230,58 +1230,58 @@ function Ss(t) {
|
|
|
1230
1230
|
function As(t) {
|
|
1231
1231
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1233
|
+
function bs(t) {
|
|
1234
1234
|
t.clearSnapshot();
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1236
|
+
function Bt(t) {
|
|
1237
1237
|
t.clearMeasurements();
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function jt(t) {
|
|
1240
1240
|
t.isLayoutDirty = !1;
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function Rs(t) {
|
|
1243
1243
|
const { visualElement: e } = t.options;
|
|
1244
1244
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Mt(t) {
|
|
1247
1247
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1249
|
+
function Ls(t) {
|
|
1250
1250
|
t.resolveTargetDelta();
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function Vs(t) {
|
|
1253
1253
|
t.calcProjection();
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Cs(t) {
|
|
1256
1256
|
t.resetSkewAndRotation();
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function Bs(t) {
|
|
1259
1259
|
t.removeLeadSnapshot();
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function wt(t, e, i) {
|
|
1262
1262
|
t.translate = v(e.translate, 0, i), t.scale = v(e.scale, 1, i), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function kt(t, e, i, n) {
|
|
1265
1265
|
t.min = v(e.min, i.min, n), t.max = v(e.max, i.max, n);
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1268
|
-
|
|
1267
|
+
function js(t, e, i, n) {
|
|
1268
|
+
kt(t.x, e.x, i.x, n), kt(t.y, e.y, i.y, n);
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function Ms(t) {
|
|
1271
1271
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1273
|
+
const ws = {
|
|
1274
1274
|
duration: 0.45,
|
|
1275
1275
|
ease: [0.4, 0, 0.1, 1]
|
|
1276
|
-
}, It = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ot = It("applewebkit/") && !It("chrome/") ? Math.round :
|
|
1276
|
+
}, It = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ot = It("applewebkit/") && !It("chrome/") ? Math.round : j;
|
|
1277
1277
|
function Ut(t) {
|
|
1278
1278
|
t.min = Ot(t.min), t.max = Ot(t.max);
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function ks(t) {
|
|
1281
1281
|
Ut(t.x), Ut(t.y);
|
|
1282
1282
|
}
|
|
1283
1283
|
function le(t, e, i) {
|
|
1284
|
-
return t === "position" || t === "preserve-aspect" && !We(
|
|
1284
|
+
return t === "position" || t === "preserve-aspect" && !We(Vt(e), Vt(i), 0.2);
|
|
1285
1285
|
}
|
|
1286
1286
|
function Is(t) {
|
|
1287
1287
|
return t !== t.root && t.scroll?.wasRoot;
|
|
@@ -1326,14 +1326,14 @@ const Os = re({
|
|
|
1326
1326
|
MeasureLayout: ee
|
|
1327
1327
|
}
|
|
1328
1328
|
}, $s = {
|
|
1329
|
-
...
|
|
1329
|
+
...je,
|
|
1330
1330
|
...Us,
|
|
1331
1331
|
...Fs
|
|
1332
1332
|
};
|
|
1333
1333
|
export {
|
|
1334
1334
|
Ys as AnimatePresence,
|
|
1335
|
-
|
|
1336
|
-
|
|
1335
|
+
qs as AsyncMotionValueAnimation,
|
|
1336
|
+
_s as DOMKeyframesResolver,
|
|
1337
1337
|
Ks as DeprecatedLayoutGroupContext,
|
|
1338
1338
|
Zs as JSAnimation,
|
|
1339
1339
|
Js as KeyframeResolver,
|
|
@@ -1348,12 +1348,12 @@ export {
|
|
|
1348
1348
|
ai as NativeAnimation,
|
|
1349
1349
|
ri as NativeAnimationExtended,
|
|
1350
1350
|
li as PresenceContext,
|
|
1351
|
-
|
|
1351
|
+
be as SubscriptionManager,
|
|
1352
1352
|
De as SwitchLayoutGroupContext,
|
|
1353
1353
|
hi as VisualElement,
|
|
1354
1354
|
ui as WillChangeMotionValue,
|
|
1355
1355
|
ci as acceleratedValues,
|
|
1356
|
-
|
|
1356
|
+
w as addPointerEvent,
|
|
1357
1357
|
ce as addPointerInfo,
|
|
1358
1358
|
Ee as addScaleCorrector,
|
|
1359
1359
|
Xt as addUniqueItem,
|
|
@@ -1376,22 +1376,22 @@ export {
|
|
|
1376
1376
|
Nt as clamp,
|
|
1377
1377
|
Ai as color,
|
|
1378
1378
|
st as complex,
|
|
1379
|
-
|
|
1379
|
+
bi as convertOffsetToTimes,
|
|
1380
1380
|
y as createBox,
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1381
|
+
Ri as createGeneratorEasing,
|
|
1382
|
+
Li as createRenderBatcher,
|
|
1383
|
+
Vi as cubicBezier,
|
|
1384
|
+
Ci as cubicBezierAsString,
|
|
1385
|
+
Bi as defaultEasing,
|
|
1386
|
+
ji as defaultOffset,
|
|
1387
|
+
Mi as defaultTransformValue,
|
|
1388
|
+
wi as defaultValueTypes,
|
|
1389
|
+
ki as degrees,
|
|
1390
1390
|
hs as delay,
|
|
1391
1391
|
Ii as dimensionValueTypes,
|
|
1392
1392
|
ut as distance,
|
|
1393
1393
|
ze as distance2D,
|
|
1394
|
-
|
|
1394
|
+
je as domAnimation,
|
|
1395
1395
|
$s as domMax,
|
|
1396
1396
|
Oi as easeIn,
|
|
1397
1397
|
Ui as easeInOut,
|
|
@@ -1407,11 +1407,11 @@ export {
|
|
|
1407
1407
|
E as frameData,
|
|
1408
1408
|
$ as frameSteps,
|
|
1409
1409
|
Yi as generateLinearEasing,
|
|
1410
|
-
|
|
1411
|
-
|
|
1410
|
+
qi as getAnimatableNone,
|
|
1411
|
+
_i as getDefaultValueType,
|
|
1412
1412
|
Ki as getMixer,
|
|
1413
1413
|
Zi as getValueAsType,
|
|
1414
|
-
|
|
1414
|
+
Re as getValueTransition,
|
|
1415
1415
|
Ji as getVariableValue,
|
|
1416
1416
|
Qi as hex,
|
|
1417
1417
|
tn as hover,
|
|
@@ -1426,7 +1426,7 @@ export {
|
|
|
1426
1426
|
hn as isCSSVariableName,
|
|
1427
1427
|
un as isCSSVariableToken,
|
|
1428
1428
|
cn as isDragActive,
|
|
1429
|
-
|
|
1429
|
+
R as isDragging,
|
|
1430
1430
|
fn as isEasingArray,
|
|
1431
1431
|
dn as isGenerator,
|
|
1432
1432
|
mn as isHTMLElement,
|
|
@@ -1435,7 +1435,7 @@ export {
|
|
|
1435
1435
|
gn as isNumericalString,
|
|
1436
1436
|
ue as isObject,
|
|
1437
1437
|
fe as isPrimaryPointer,
|
|
1438
|
-
|
|
1438
|
+
_t as isSVGElement,
|
|
1439
1439
|
Ie as isSVGSVGElement,
|
|
1440
1440
|
yn as isValidMotionProp,
|
|
1441
1441
|
vn as isZeroValueString,
|
|
@@ -1448,19 +1448,19 @@ export {
|
|
|
1448
1448
|
An as memo,
|
|
1449
1449
|
$t as microtask,
|
|
1450
1450
|
pe as millisecondsToSeconds,
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1451
|
+
bn as mirrorEasing,
|
|
1452
|
+
Rn as mix,
|
|
1453
|
+
Ln as mixArray,
|
|
1454
|
+
Vn as mixColor,
|
|
1455
|
+
Cn as mixComplex,
|
|
1456
|
+
Bn as mixImmediate,
|
|
1457
|
+
jn as mixLinearColor,
|
|
1458
1458
|
v as mixNumber,
|
|
1459
|
-
|
|
1460
|
-
|
|
1459
|
+
Mn as mixObject,
|
|
1460
|
+
wn as mixVisibility,
|
|
1461
1461
|
Ht as motionValue,
|
|
1462
|
-
|
|
1463
|
-
|
|
1462
|
+
j as noop,
|
|
1463
|
+
kn as number,
|
|
1464
1464
|
In as numberValueTypes,
|
|
1465
1465
|
On as optimizedAppearDataAttribute,
|
|
1466
1466
|
Un as parseCSSVariable,
|
|
@@ -1479,10 +1479,10 @@ export {
|
|
|
1479
1479
|
Hn as reverseEasing,
|
|
1480
1480
|
Xn as rgbUnit,
|
|
1481
1481
|
Yn as rgba,
|
|
1482
|
-
|
|
1482
|
+
qn as scale,
|
|
1483
1483
|
me as secondsToMilliseconds,
|
|
1484
|
-
|
|
1485
|
-
|
|
1484
|
+
ke as setDragLock,
|
|
1485
|
+
_n as setStyle,
|
|
1486
1486
|
Kn as spring,
|
|
1487
1487
|
Zn as startWaapiAnimation,
|
|
1488
1488
|
Jn as supportedWaapiEasing,
|
|
@@ -1491,7 +1491,7 @@ export {
|
|
|
1491
1491
|
eo as supportsLinearEasing,
|
|
1492
1492
|
so as supportsScrollTimeline,
|
|
1493
1493
|
io as testValueType,
|
|
1494
|
-
|
|
1494
|
+
qt as time,
|
|
1495
1495
|
no as transformPropOrder,
|
|
1496
1496
|
oo as transformProps,
|
|
1497
1497
|
ao as transformValueTypes,
|