@ssgoi/core 2.5.2 → 2.5.4
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/animator/animate.d.ts.map +1 -0
- package/dist/{animation-scheduler.d.ts → animator/animation-scheduler.d.ts} +1 -1
- package/dist/animator/animation-scheduler.d.ts.map +1 -0
- package/dist/{animator.d.ts → animator/index.d.ts} +2 -2
- package/dist/animator/index.d.ts.map +1 -0
- package/dist/animator/ticker.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +279 -267
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.js +2 -2
- package/dist/ssgoi-transition/create-context-manager.d.ts +18 -0
- package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +46 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -0
- package/dist/ssgoi-transition/create-swipe-detector.d.ts +10 -0
- package/dist/ssgoi-transition/create-swipe-detector.d.ts.map +1 -0
- package/dist/ssgoi-transition/find-matching-transition.d.ts +24 -0
- package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -0
- package/dist/ssgoi-transition/process-symmetric-transitions.d.ts +7 -0
- package/dist/ssgoi-transition/process-symmetric-transitions.d.ts.map +1 -0
- package/dist/ssgoi-transition/types.d.ts +8 -0
- package/dist/ssgoi-transition/types.d.ts.map +1 -0
- package/dist/{create-transition-callback.d.ts → transition/create-transition-callback.d.ts} +1 -1
- package/dist/transition/create-transition-callback.d.ts.map +1 -0
- package/dist/{transition-strategy.d.ts → transition/transition-strategy.d.ts} +1 -1
- package/dist/transition/transition-strategy.d.ts.map +1 -0
- package/dist/{transition.d.ts → transition/transition.d.ts} +1 -1
- package/dist/transition/transition.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/number.d.ts +46 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/fade.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +15 -15
- package/dist/view-transitions/index.d.ts +1 -0
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +646 -480
- package/dist/view-transitions/instagram.d.ts +8 -0
- package/dist/view-transitions/instagram.d.ts.map +1 -0
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/strip.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/animate.d.ts.map +0 -1
- package/dist/animation-scheduler.d.ts.map +0 -1
- package/dist/animator.d.ts.map +0 -1
- package/dist/create-ssgoi-transition-context.d.ts +0 -15
- package/dist/create-ssgoi-transition-context.d.ts.map +0 -1
- package/dist/create-transition-callback.d.ts.map +0 -1
- package/dist/ticker.d.ts.map +0 -1
- package/dist/transition-strategy.d.ts.map +0 -1
- package/dist/transition.d.ts.map +0 -1
- package/dist/utils.d.ts +0 -17
- package/dist/utils.d.ts.map +0 -1
- /package/dist/{animate.d.ts → animator/animate.d.ts} +0 -0
- /package/dist/{ticker.d.ts → animator/ticker.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
var _ = Object.defineProperty;
|
|
2
2
|
var $ = (n, t, e) => t in n ? _(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
-
var
|
|
4
|
-
import { isMultiSpring as
|
|
3
|
+
var m = (n, t, e) => $(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { isMultiSpring as V } from "./types.js";
|
|
5
5
|
import { isSingleSpring as at } from "./types.js";
|
|
6
6
|
import { j as lt } from "./jaemin-BAi8PTrj.js";
|
|
7
|
-
class
|
|
7
|
+
class H {
|
|
8
8
|
constructor() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
m(this, "listeners", /* @__PURE__ */ new Set());
|
|
10
|
+
m(this, "rafId", null);
|
|
11
|
+
m(this, "isRunning", !1);
|
|
12
12
|
// Timing
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
m(this, "startTime", Date.now());
|
|
14
|
+
m(this, "lastUpdate", this.startTime);
|
|
15
|
+
m(this, "elapsed", 0);
|
|
16
16
|
// Lag smoothing (mobile optimization)
|
|
17
|
-
|
|
17
|
+
m(this, "lagThreshold", 500);
|
|
18
18
|
// ms - detect tab switches, backgrounding
|
|
19
|
-
|
|
19
|
+
m(this, "adjustedLag", 33);
|
|
20
20
|
// ms - max time jump to prevent animation skip
|
|
21
21
|
// FPS throttling
|
|
22
|
-
|
|
22
|
+
m(this, "gap", 1e3 / 240);
|
|
23
23
|
// max 240fps
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
m(this, "nextTime", this.gap);
|
|
25
|
+
m(this, "tick", () => {
|
|
26
26
|
const t = Date.now();
|
|
27
27
|
let e = t - this.lastUpdate;
|
|
28
28
|
(e > this.lagThreshold || e < 0) && (this.startTime += e - this.adjustedLag, e = this.adjustedLag), this.lastUpdate = t;
|
|
29
|
-
const i = t - this.startTime,
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
this.elapsed = i / 1e3, this.nextTime +=
|
|
33
|
-
s(
|
|
29
|
+
const i = t - this.startTime, o = i - this.nextTime;
|
|
30
|
+
if (o > 0) {
|
|
31
|
+
const r = e / 1e3;
|
|
32
|
+
this.elapsed = i / 1e3, this.nextTime += o + (o >= this.gap ? 4 : this.gap - o), this.listeners.forEach((s) => {
|
|
33
|
+
s(r, this.elapsed);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
this.listeners.size > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.isRunning = !1, this.rafId = null);
|
|
@@ -66,72 +66,72 @@ class F {
|
|
|
66
66
|
return this.elapsed;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
const I = new
|
|
69
|
+
const I = new H();
|
|
70
70
|
function k(n) {
|
|
71
71
|
const {
|
|
72
72
|
from: t,
|
|
73
73
|
to: e,
|
|
74
74
|
stiffness: i,
|
|
75
|
-
damping:
|
|
76
|
-
mass:
|
|
75
|
+
damping: o,
|
|
76
|
+
mass: r,
|
|
77
77
|
velocity: s = 0,
|
|
78
|
-
onUpdate:
|
|
78
|
+
onUpdate: d,
|
|
79
79
|
onComplete: l
|
|
80
80
|
} = n;
|
|
81
81
|
let h = t, u = s, a = !0;
|
|
82
|
-
const p = Math.sqrt(i /
|
|
82
|
+
const p = Math.sqrt(i / r), c = o / (2 * Math.sqrt(i * r)), g = 0.01, w = 0.01;
|
|
83
83
|
let f = 0;
|
|
84
|
-
const
|
|
84
|
+
const y = 0.05, S = (C) => {
|
|
85
85
|
if (!a) return;
|
|
86
|
-
const
|
|
87
|
-
u +=
|
|
88
|
-
const E = Math.abs(e - h),
|
|
89
|
-
if (E <
|
|
90
|
-
if (f +=
|
|
91
|
-
h = e, u = 0, a = !1,
|
|
86
|
+
const T = Math.min(C, 0.033), v = -2 * T * c * p * u, b = T * p * p * (e - h);
|
|
87
|
+
u += v + b, h += T * u;
|
|
88
|
+
const E = Math.abs(e - h), A = Math.abs(u);
|
|
89
|
+
if (E < g && A < w) {
|
|
90
|
+
if (f += T, f >= y) {
|
|
91
|
+
h = e, u = 0, a = !1, d(h), I.unsubscribe(S), l();
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
} else
|
|
95
95
|
f = 0;
|
|
96
|
-
|
|
96
|
+
d(h);
|
|
97
97
|
};
|
|
98
|
-
return I.subscribe(
|
|
98
|
+
return I.subscribe(S), {
|
|
99
99
|
stop: () => {
|
|
100
|
-
a && (a = !1, I.unsubscribe(
|
|
100
|
+
a && (a = !1, I.unsubscribe(S));
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
class O {
|
|
105
105
|
constructor(t) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
m(this, "options");
|
|
107
|
+
m(this, "currentValue");
|
|
108
|
+
m(this, "velocity");
|
|
109
|
+
m(this, "isAnimating", !1);
|
|
110
|
+
m(this, "controls", null);
|
|
111
111
|
// For object animations
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
m(this, "animationMap", null);
|
|
113
|
+
m(this, "activeAnimations", /* @__PURE__ */ new Set());
|
|
114
|
+
m(this, "completedAnimations", /* @__PURE__ */ new Set());
|
|
115
|
+
m(this, "updatedProperties", /* @__PURE__ */ new Set());
|
|
116
|
+
m(this, "animate", (t = !1) => {
|
|
117
117
|
!this.isAnimating && this.options.onStart && this.options.onStart(), this.isAnimating = !0;
|
|
118
118
|
const e = t ? this.options.from : this.options.to;
|
|
119
119
|
if (typeof this.currentValue == "object" && this.currentValue !== null) {
|
|
120
120
|
this.animateObject(e);
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
let i = this.currentValue,
|
|
124
|
-
const
|
|
123
|
+
let i = this.currentValue, o = performance.now();
|
|
124
|
+
const r = {
|
|
125
125
|
from: this.currentValue,
|
|
126
126
|
to: e,
|
|
127
127
|
stiffness: this.options.spring.stiffness,
|
|
128
128
|
damping: this.options.spring.damping,
|
|
129
129
|
mass: 1
|
|
130
130
|
};
|
|
131
|
-
typeof this.velocity == "number" && (
|
|
132
|
-
...
|
|
131
|
+
typeof this.velocity == "number" && (r.velocity = this.velocity * 1e3), this.controls = k({
|
|
132
|
+
...r,
|
|
133
133
|
onUpdate: (s) => {
|
|
134
|
-
const
|
|
134
|
+
const d = performance.now(), l = (d - o) / 1e3;
|
|
135
135
|
if (l > 0) {
|
|
136
136
|
if (typeof s == "number" && typeof i == "number") {
|
|
137
137
|
const h = (s - i) / l;
|
|
@@ -146,7 +146,7 @@ class O {
|
|
|
146
146
|
}
|
|
147
147
|
}), this.velocity = h;
|
|
148
148
|
}
|
|
149
|
-
i = s,
|
|
149
|
+
i = s, o = d;
|
|
150
150
|
}
|
|
151
151
|
this.currentValue = s, this.options.onUpdate(s);
|
|
152
152
|
},
|
|
@@ -157,27 +157,27 @@ class O {
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
});
|
|
160
|
-
|
|
160
|
+
m(this, "animateObject", (t) => {
|
|
161
161
|
const e = this.currentValue, i = Object.keys(e);
|
|
162
162
|
this.animationMap = /* @__PURE__ */ new Map(), this.activeAnimations.clear(), this.completedAnimations.clear(), this.updatedProperties.clear();
|
|
163
|
-
const
|
|
163
|
+
const o = { ...e }, r = {};
|
|
164
164
|
let s = !1;
|
|
165
|
-
const
|
|
165
|
+
const d = () => {
|
|
166
166
|
const l = i.filter((u) => !this.completedAnimations.has(u));
|
|
167
167
|
if (l.every(
|
|
168
168
|
(u) => this.updatedProperties.has(u)
|
|
169
169
|
) && l.length > 0) {
|
|
170
170
|
if (typeof this.velocity == "object" && this.velocity) {
|
|
171
171
|
const u = performance.now();
|
|
172
|
-
Object.keys(
|
|
173
|
-
if (
|
|
174
|
-
const p = (u -
|
|
175
|
-
typeof c == "number" && typeof
|
|
172
|
+
Object.keys(o).forEach((a) => {
|
|
173
|
+
if (r[a]) {
|
|
174
|
+
const p = (u - r[a]) / 1e3, c = this.currentValue[a], g = o[a];
|
|
175
|
+
typeof c == "number" && typeof g == "number" && p > 0 && (this.velocity[a] = (g - c) / p / 1e3);
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
r[a] = u;
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
this.currentValue = { ...
|
|
180
|
+
this.currentValue = { ...o }, this.options.onUpdate(this.currentValue), this.updatedProperties.clear(), !s && this.options.onStart && (s = !0, this.options.onStart());
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
i.forEach((l) => {
|
|
@@ -193,7 +193,7 @@ class O {
|
|
|
193
193
|
const u = k({
|
|
194
194
|
...h,
|
|
195
195
|
onUpdate: (a) => {
|
|
196
|
-
|
|
196
|
+
o[l] = a, this.updatedProperties.add(l), d();
|
|
197
197
|
},
|
|
198
198
|
onComplete: () => {
|
|
199
199
|
this.completedAnimations.add(l), this.updatedProperties.delete(l), this.completedAnimations.size === i.length && (this.currentValue = t, this.isAnimating = !1, this.animationMap = null, typeof this.velocity == "object" && this.velocity && Object.keys(this.velocity).forEach((a) => {
|
|
@@ -284,14 +284,14 @@ class O {
|
|
|
284
284
|
}
|
|
285
285
|
class j {
|
|
286
286
|
constructor(t) {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
287
|
+
m(this, "config");
|
|
288
|
+
m(this, "animators", /* @__PURE__ */ new Map());
|
|
289
|
+
m(this, "springOrder", []);
|
|
290
|
+
m(this, "completedCount", 0);
|
|
291
|
+
m(this, "completedAnimators", /* @__PURE__ */ new Set());
|
|
292
|
+
m(this, "direction", "forward");
|
|
293
|
+
m(this, "idCounter", 0);
|
|
294
|
+
m(this, "timeoutIds", []);
|
|
295
295
|
this.config = t, this.initializeAnimators();
|
|
296
296
|
}
|
|
297
297
|
generateId() {
|
|
@@ -323,9 +323,9 @@ class j {
|
|
|
323
323
|
*/
|
|
324
324
|
normalizeSchedule(t) {
|
|
325
325
|
const e = this.config.schedule ?? "overlap";
|
|
326
|
-
return this.springOrder.map((i,
|
|
327
|
-
const
|
|
328
|
-
if (!
|
|
326
|
+
return this.springOrder.map((i, o) => {
|
|
327
|
+
const r = this.animators.get(i);
|
|
328
|
+
if (!r)
|
|
329
329
|
throw new Error(
|
|
330
330
|
`AnimationScheduler: animator with id "${i}" not found during normalization`
|
|
331
331
|
);
|
|
@@ -336,11 +336,11 @@ class j {
|
|
|
336
336
|
delay: 0
|
|
337
337
|
};
|
|
338
338
|
if (e === "wait")
|
|
339
|
-
return t === "forward" &&
|
|
339
|
+
return t === "forward" && o === 0 ? {
|
|
340
340
|
type: "offset",
|
|
341
341
|
id: i,
|
|
342
342
|
delay: 0
|
|
343
|
-
} : t === "backward" &&
|
|
343
|
+
} : t === "backward" && o === this.springOrder.length - 1 ? {
|
|
344
344
|
type: "offset",
|
|
345
345
|
id: i,
|
|
346
346
|
delay: 0
|
|
@@ -348,14 +348,14 @@ class j {
|
|
|
348
348
|
type: "wait",
|
|
349
349
|
id: i
|
|
350
350
|
};
|
|
351
|
-
const s =
|
|
351
|
+
const s = r.item.offset ?? 0;
|
|
352
352
|
if (t === "forward")
|
|
353
353
|
return {
|
|
354
354
|
type: "offset",
|
|
355
355
|
id: i,
|
|
356
356
|
delay: s
|
|
357
357
|
};
|
|
358
|
-
const
|
|
358
|
+
const d = this.animators.size === 0 ? 0 : Math.max(
|
|
359
359
|
...Array.from(this.animators.values()).map(
|
|
360
360
|
(l) => l.item.offset ?? 0
|
|
361
361
|
)
|
|
@@ -363,12 +363,12 @@ class j {
|
|
|
363
363
|
return {
|
|
364
364
|
type: "offset",
|
|
365
365
|
id: i,
|
|
366
|
-
delay:
|
|
366
|
+
delay: d - s
|
|
367
367
|
};
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
onAnimatorComplete(t) {
|
|
371
|
-
var i,
|
|
371
|
+
var i, o, r, s, d, l;
|
|
372
372
|
const e = this.animators.get(t);
|
|
373
373
|
if (!e) {
|
|
374
374
|
console.warn(
|
|
@@ -376,7 +376,7 @@ class j {
|
|
|
376
376
|
);
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
|
-
this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (
|
|
379
|
+
this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (o = (i = e.item).onComplete) == null || o.call(i), (s = (r = this.config).onProgress) == null || s.call(r, this.completedCount, this.config.springs.length), this.handleWaitModeChaining(t), this.completedCount === this.config.springs.length && ((l = (d = this.config).onEnd) == null || l.call(d)));
|
|
380
380
|
}
|
|
381
381
|
/**
|
|
382
382
|
* Handle wait mode chaining: start next/previous spring after completion
|
|
@@ -386,18 +386,18 @@ class j {
|
|
|
386
386
|
return;
|
|
387
387
|
const e = this.springOrder.indexOf(t);
|
|
388
388
|
if (this.direction === "forward") {
|
|
389
|
-
const
|
|
390
|
-
if (!
|
|
389
|
+
const r = this.springOrder[e + 1];
|
|
390
|
+
if (!r)
|
|
391
391
|
return;
|
|
392
|
-
const s = this.animators.get(
|
|
393
|
-
s && s.startTime === null && this.startAnimator(
|
|
392
|
+
const s = this.animators.get(r);
|
|
393
|
+
s && s.startTime === null && this.startAnimator(r);
|
|
394
394
|
return;
|
|
395
395
|
}
|
|
396
396
|
const i = this.springOrder[e - 1];
|
|
397
397
|
if (!i)
|
|
398
398
|
return;
|
|
399
|
-
const
|
|
400
|
-
|
|
399
|
+
const o = this.animators.get(i);
|
|
400
|
+
o && o.startTime === null && this.startBackwardAnimator(i);
|
|
401
401
|
}
|
|
402
402
|
startAnimator(t) {
|
|
403
403
|
const e = this.animators.get(t);
|
|
@@ -433,34 +433,34 @@ class j {
|
|
|
433
433
|
}
|
|
434
434
|
forward() {
|
|
435
435
|
var e, i;
|
|
436
|
-
this.stop(), this.direction = "forward", this.completedCount = 0, this.completedAnimators.clear(), (i = (e = this.config).onStart) == null || i.call(e), this.normalizeSchedule("forward").forEach((
|
|
437
|
-
if (
|
|
436
|
+
this.stop(), this.direction = "forward", this.completedCount = 0, this.completedAnimators.clear(), (i = (e = this.config).onStart) == null || i.call(e), this.normalizeSchedule("forward").forEach((o) => {
|
|
437
|
+
if (o.type === "wait")
|
|
438
438
|
return;
|
|
439
|
-
if (
|
|
440
|
-
this.startAnimator(
|
|
439
|
+
if (o.delay === 0) {
|
|
440
|
+
this.startAnimator(o.id);
|
|
441
441
|
return;
|
|
442
442
|
}
|
|
443
|
-
const
|
|
444
|
-
() => this.startAnimator(
|
|
445
|
-
|
|
443
|
+
const r = window.setTimeout(
|
|
444
|
+
() => this.startAnimator(o.id),
|
|
445
|
+
o.delay
|
|
446
446
|
);
|
|
447
|
-
this.timeoutIds.push(
|
|
447
|
+
this.timeoutIds.push(r);
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
450
|
backward() {
|
|
451
451
|
var e, i;
|
|
452
|
-
this.stop(), this.direction = "backward", this.completedCount = 0, this.completedAnimators.clear(), (i = (e = this.config).onStart) == null || i.call(e), this.normalizeSchedule("backward").forEach((
|
|
453
|
-
if (
|
|
452
|
+
this.stop(), this.direction = "backward", this.completedCount = 0, this.completedAnimators.clear(), (i = (e = this.config).onStart) == null || i.call(e), this.normalizeSchedule("backward").forEach((o) => {
|
|
453
|
+
if (o.type === "wait")
|
|
454
454
|
return;
|
|
455
|
-
if (
|
|
456
|
-
this.startBackwardAnimator(
|
|
455
|
+
if (o.delay === 0) {
|
|
456
|
+
this.startBackwardAnimator(o.id);
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
const
|
|
460
|
-
() => this.startBackwardAnimator(
|
|
461
|
-
|
|
459
|
+
const r = window.setTimeout(
|
|
460
|
+
() => this.startBackwardAnimator(o.id),
|
|
461
|
+
o.delay
|
|
462
462
|
);
|
|
463
|
-
this.timeoutIds.push(
|
|
463
|
+
this.timeoutIds.push(r);
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
466
|
stop() {
|
|
@@ -474,10 +474,10 @@ class j {
|
|
|
474
474
|
), this.direction = this.direction === "forward" ? "backward" : "forward", this.animators.forEach((i) => {
|
|
475
475
|
if (i.startTime === null)
|
|
476
476
|
return;
|
|
477
|
-
const
|
|
478
|
-
if (
|
|
477
|
+
const o = i.animator.getCurrentState();
|
|
478
|
+
if (o.type !== "single")
|
|
479
479
|
return;
|
|
480
|
-
if (
|
|
480
|
+
if (o.position === o.to) {
|
|
481
481
|
const s = O.fromState(
|
|
482
482
|
{
|
|
483
483
|
position: 1,
|
|
@@ -507,7 +507,7 @@ class j {
|
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const z = Symbol.for("TRANSITION_STRATEGY"), F = (n) => ({
|
|
511
511
|
runIn: async (t) => {
|
|
512
512
|
const { currentAnimation: e } = n;
|
|
513
513
|
if (e && e.direction === "out") {
|
|
@@ -523,9 +523,9 @@ const L = Symbol.for("TRANSITION_STRATEGY"), N = (n) => ({
|
|
|
523
523
|
direction: "forward"
|
|
524
524
|
};
|
|
525
525
|
if (t.out) {
|
|
526
|
-
const
|
|
526
|
+
const d = await t.out, { from: l = 1, to: h = 0 } = d;
|
|
527
527
|
return {
|
|
528
|
-
config:
|
|
528
|
+
config: d,
|
|
529
529
|
state: {
|
|
530
530
|
position: s.position,
|
|
531
531
|
velocity: s.velocity
|
|
@@ -561,15 +561,15 @@ const L = Symbol.for("TRANSITION_STRATEGY"), N = (n) => ({
|
|
|
561
561
|
to: 1,
|
|
562
562
|
direction: "forward"
|
|
563
563
|
};
|
|
564
|
-
const { from:
|
|
564
|
+
const { from: o = 0, to: r = 1 } = i;
|
|
565
565
|
return {
|
|
566
566
|
config: i,
|
|
567
567
|
state: {
|
|
568
|
-
position:
|
|
568
|
+
position: o,
|
|
569
569
|
velocity: 0
|
|
570
570
|
},
|
|
571
|
-
from:
|
|
572
|
-
to:
|
|
571
|
+
from: o,
|
|
572
|
+
to: r,
|
|
573
573
|
direction: "forward"
|
|
574
574
|
};
|
|
575
575
|
},
|
|
@@ -588,9 +588,9 @@ const L = Symbol.for("TRANSITION_STRATEGY"), N = (n) => ({
|
|
|
588
588
|
direction: "forward"
|
|
589
589
|
};
|
|
590
590
|
if (t.in) {
|
|
591
|
-
const
|
|
591
|
+
const d = await t.in, { from: l = 0, to: h = 1 } = d;
|
|
592
592
|
return {
|
|
593
|
-
config:
|
|
593
|
+
config: d,
|
|
594
594
|
state: {
|
|
595
595
|
position: s.position,
|
|
596
596
|
velocity: s.velocity
|
|
@@ -626,19 +626,19 @@ const L = Symbol.for("TRANSITION_STRATEGY"), N = (n) => ({
|
|
|
626
626
|
to: 0,
|
|
627
627
|
direction: "forward"
|
|
628
628
|
};
|
|
629
|
-
const { from:
|
|
629
|
+
const { from: o = 1, to: r = 0 } = i;
|
|
630
630
|
return {
|
|
631
631
|
config: i,
|
|
632
632
|
state: {
|
|
633
|
-
position:
|
|
633
|
+
position: o,
|
|
634
634
|
velocity: 0
|
|
635
635
|
},
|
|
636
|
-
from:
|
|
637
|
-
to:
|
|
636
|
+
from: o,
|
|
637
|
+
to: r,
|
|
638
638
|
direction: "forward"
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
|
-
}),
|
|
641
|
+
}), N = () => ({
|
|
642
642
|
runIn: async (n) => {
|
|
643
643
|
const t = await n.in;
|
|
644
644
|
if (!t)
|
|
@@ -712,32 +712,32 @@ const L = Symbol.for("TRANSITION_STRATEGY"), N = (n) => ({
|
|
|
712
712
|
});
|
|
713
713
|
function W(n, t) {
|
|
714
714
|
var u;
|
|
715
|
-
let e = null, i = null,
|
|
715
|
+
let e = null, i = null, o = null, r = null;
|
|
716
716
|
const s = {
|
|
717
717
|
get currentAnimation() {
|
|
718
718
|
return e;
|
|
719
719
|
}
|
|
720
|
-
},
|
|
721
|
-
var
|
|
720
|
+
}, d = ((u = t == null ? void 0 : t.strategy) == null ? void 0 : u.call(t, s)) || F(s), l = async (a) => {
|
|
721
|
+
var S, C, T;
|
|
722
722
|
i && (i.remove(), i = null);
|
|
723
|
-
const p = n(), c = p.in && await p.in(a),
|
|
723
|
+
const p = n(), c = p.in && await p.in(a), g = !(t != null && t.strategy) && p.out ? p.out(a) : void 0;
|
|
724
724
|
if (!c)
|
|
725
725
|
return;
|
|
726
|
-
if (
|
|
727
|
-
const
|
|
726
|
+
if (V(c)) {
|
|
727
|
+
const v = {
|
|
728
728
|
in: Promise.resolve(c),
|
|
729
|
-
out:
|
|
729
|
+
out: g && Promise.resolve(g)
|
|
730
730
|
};
|
|
731
|
-
if (!(await
|
|
731
|
+
if (!(await d.runIn(v)).config) {
|
|
732
732
|
e && (e.direction = "in");
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
|
-
(
|
|
735
|
+
(S = c.prepare) == null || S.call(c, a), c.wait && await c.wait();
|
|
736
736
|
const E = new j({
|
|
737
737
|
...c,
|
|
738
738
|
onEnd: () => {
|
|
739
|
-
var
|
|
740
|
-
e = null, (
|
|
739
|
+
var A;
|
|
740
|
+
e = null, (A = c.onEnd) == null || A.call(c);
|
|
741
741
|
}
|
|
742
742
|
});
|
|
743
743
|
e = {
|
|
@@ -748,49 +748,49 @@ function W(n, t) {
|
|
|
748
748
|
}
|
|
749
749
|
const w = {
|
|
750
750
|
in: Promise.resolve(c),
|
|
751
|
-
out:
|
|
752
|
-
}, f = await
|
|
751
|
+
out: g && Promise.resolve(g)
|
|
752
|
+
}, f = await d.runIn(w);
|
|
753
753
|
if (!f.config)
|
|
754
754
|
return;
|
|
755
755
|
if ("springs" in f.config) {
|
|
756
756
|
console.error("Unexpected MultiSpringConfig in single-spring path");
|
|
757
757
|
return;
|
|
758
758
|
}
|
|
759
|
-
(
|
|
760
|
-
const
|
|
759
|
+
(T = (C = f.config).prepare) == null || T.call(C, a), f.config.wait && await f.config.wait();
|
|
760
|
+
const y = O.fromState(f.state, {
|
|
761
761
|
from: f.from,
|
|
762
762
|
to: f.to,
|
|
763
763
|
spring: f.config.spring,
|
|
764
764
|
onStart: f.config.onStart,
|
|
765
765
|
onUpdate: f.config.tick,
|
|
766
766
|
onComplete: () => {
|
|
767
|
-
var
|
|
768
|
-
e = null, (b = (
|
|
767
|
+
var v, b;
|
|
768
|
+
e = null, (b = (v = f.config) == null ? void 0 : v.onEnd) == null || b.call(v);
|
|
769
769
|
}
|
|
770
770
|
});
|
|
771
|
-
e = { controller:
|
|
771
|
+
e = { controller: y, direction: "in" }, f.direction === "forward" ? y.forward() : y.backward();
|
|
772
772
|
}, h = async (a) => {
|
|
773
|
-
var
|
|
773
|
+
var S, C, T;
|
|
774
774
|
i = a;
|
|
775
775
|
const p = n(), c = p.out && await p.out(a);
|
|
776
776
|
if (!c)
|
|
777
777
|
return;
|
|
778
|
-
if (
|
|
779
|
-
const
|
|
778
|
+
if (V(c)) {
|
|
779
|
+
const v = {
|
|
780
780
|
in: void 0,
|
|
781
781
|
// Don't fetch IN config for exit transitions
|
|
782
782
|
out: Promise.resolve(c)
|
|
783
783
|
};
|
|
784
|
-
if (!(await
|
|
784
|
+
if (!(await d.runOut(v)).config) {
|
|
785
785
|
e && (e.direction = "out"), i && (i.remove(), i = null);
|
|
786
786
|
return;
|
|
787
787
|
}
|
|
788
|
-
(
|
|
788
|
+
(S = c.prepare) == null || S.call(c, a), y(), c.wait && await c.wait();
|
|
789
789
|
const E = new j({
|
|
790
790
|
...c,
|
|
791
791
|
onEnd: () => {
|
|
792
|
-
var
|
|
793
|
-
(
|
|
792
|
+
var A, x;
|
|
793
|
+
(A = c.onEnd) == null || A.call(c), i && (i.remove(), i = null), e = null, (x = t == null ? void 0 : t.onCleanupEnd) == null || x.call(t);
|
|
794
794
|
}
|
|
795
795
|
});
|
|
796
796
|
e = {
|
|
@@ -799,18 +799,18 @@ function W(n, t) {
|
|
|
799
799
|
}, E.forward();
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
const
|
|
802
|
+
const g = {
|
|
803
803
|
in: void 0,
|
|
804
804
|
// Don't fetch IN config for exit transitions
|
|
805
805
|
out: Promise.resolve(c)
|
|
806
|
-
}, w = await
|
|
806
|
+
}, w = await d.runOut(g);
|
|
807
807
|
if (!w.config)
|
|
808
808
|
return;
|
|
809
809
|
if ("springs" in w.config) {
|
|
810
810
|
console.error("Unexpected MultiSpringConfig in single-spring path");
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
|
-
(
|
|
813
|
+
(T = (C = w.config).prepare) == null || T.call(C, a), y(), w.config.wait && await w.config.wait();
|
|
814
814
|
const f = O.fromState(w.state, {
|
|
815
815
|
from: w.from,
|
|
816
816
|
to: w.to,
|
|
@@ -818,99 +818,86 @@ function W(n, t) {
|
|
|
818
818
|
onStart: w.config.onStart,
|
|
819
819
|
onUpdate: w.config.tick,
|
|
820
820
|
onComplete: () => {
|
|
821
|
-
var
|
|
822
|
-
(b = (
|
|
821
|
+
var v, b, E;
|
|
822
|
+
(b = (v = w.config) == null ? void 0 : v.onEnd) == null || b.call(v), i && (i.remove(), i = null), e = null, (E = t == null ? void 0 : t.onCleanupEnd) == null || E.call(t);
|
|
823
823
|
}
|
|
824
824
|
});
|
|
825
825
|
e = { controller: f, direction: "out" }, w.direction === "forward" ? f.forward() : f.backward();
|
|
826
|
-
function
|
|
827
|
-
!
|
|
826
|
+
function y() {
|
|
827
|
+
!o || !i || (r && o.contains(r) ? o.insertBefore(i, r) : o.appendChild(i));
|
|
828
828
|
}
|
|
829
829
|
};
|
|
830
830
|
return (a) => {
|
|
831
831
|
if (a)
|
|
832
|
-
return
|
|
833
|
-
|
|
834
|
-
|
|
832
|
+
return o = a.parentElement, r = a.nextElementSibling, l(a), () => {
|
|
833
|
+
if (a.isConnected) {
|
|
834
|
+
const p = a.cloneNode(!0);
|
|
835
|
+
h(p);
|
|
836
|
+
} else
|
|
837
|
+
h(a);
|
|
835
838
|
};
|
|
836
839
|
};
|
|
837
840
|
}
|
|
838
|
-
const
|
|
841
|
+
const Y = 3, X = (n) => {
|
|
839
842
|
if (!n) return null;
|
|
840
843
|
const t = n.split(`
|
|
841
844
|
`).map((e) => e.trim());
|
|
842
|
-
for (let e =
|
|
843
|
-
const i = t[e],
|
|
844
|
-
if (!
|
|
845
|
+
for (let e = Y; e < Math.min(t.length, 6); e++) {
|
|
846
|
+
const i = t[e], o = i == null ? void 0 : i.match(/\(?([^):]+):(\d+):(\d+)\)?$/);
|
|
847
|
+
if (!o)
|
|
845
848
|
continue;
|
|
846
|
-
const
|
|
847
|
-
return { file:
|
|
849
|
+
const r = o[1] ?? "", s = o[2] ?? "0", d = o[3] ?? "0";
|
|
850
|
+
return { file: r.split(/[\\/]/).pop() || r, line: s, column: d };
|
|
848
851
|
}
|
|
849
852
|
return null;
|
|
850
|
-
},
|
|
851
|
-
function
|
|
852
|
-
|
|
853
|
-
let i =
|
|
853
|
+
}, M = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
|
|
854
|
+
function B(n, t, e) {
|
|
855
|
+
M.set(n, t);
|
|
856
|
+
let i = R.get(n);
|
|
854
857
|
return i || (i = W(
|
|
855
858
|
() => {
|
|
856
|
-
const
|
|
857
|
-
return
|
|
859
|
+
const o = M.get(n);
|
|
860
|
+
return o || (console.warn(`Transition "${String(n)}" not found`), {});
|
|
858
861
|
},
|
|
859
862
|
{
|
|
860
863
|
strategy: e,
|
|
861
864
|
onCleanupEnd: () => D(n)
|
|
862
865
|
}
|
|
863
|
-
),
|
|
866
|
+
), R.set(n, i), i);
|
|
864
867
|
}
|
|
865
868
|
function D(n) {
|
|
866
|
-
|
|
869
|
+
M.delete(n), R.delete(n);
|
|
867
870
|
}
|
|
868
|
-
function
|
|
869
|
-
const n =
|
|
871
|
+
function K() {
|
|
872
|
+
const n = X(new Error().stack);
|
|
870
873
|
return n ? `auto_${n.file}_${n.line}_${n.column}` : Symbol(`ssgoi_auto_${Date.now()}`);
|
|
871
874
|
}
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
}
|
|
875
|
+
const L = globalThis.FinalizationRegistry, U = L ? (
|
|
876
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
877
|
+
new L((n) => {
|
|
878
|
+
try {
|
|
879
|
+
D(n);
|
|
880
|
+
} catch {
|
|
881
|
+
}
|
|
882
|
+
})
|
|
883
|
+
) : void 0;
|
|
878
884
|
function nt(n) {
|
|
879
|
-
const t = n.key ??
|
|
880
|
-
if (n.ref &&
|
|
885
|
+
const t = n.key ?? K();
|
|
886
|
+
if (n.ref && U)
|
|
881
887
|
try {
|
|
882
|
-
|
|
888
|
+
U.register(n.ref, t);
|
|
883
889
|
} catch {
|
|
884
890
|
}
|
|
885
|
-
return
|
|
891
|
+
return B(
|
|
886
892
|
t,
|
|
887
893
|
{
|
|
888
894
|
in: n.in,
|
|
889
895
|
out: n.out
|
|
890
896
|
},
|
|
891
|
-
n[
|
|
897
|
+
n[z]
|
|
892
898
|
);
|
|
893
899
|
}
|
|
894
|
-
|
|
895
|
-
let t = n.parentElement;
|
|
896
|
-
for (; t && t !== document.body; ) {
|
|
897
|
-
const e = window.getComputedStyle(t), i = e.overflow + e.overflowY + e.overflowX;
|
|
898
|
-
if (i.includes("auto") || i.includes("scroll") || t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth)
|
|
899
|
-
return t;
|
|
900
|
-
t = t.parentElement;
|
|
901
|
-
}
|
|
902
|
-
return document.documentElement;
|
|
903
|
-
}, G = (n) => {
|
|
904
|
-
let t = n.parentElement;
|
|
905
|
-
for (; t && t !== document.body; ) {
|
|
906
|
-
const e = window.getComputedStyle(t).position;
|
|
907
|
-
if (e === "relative" || e === "absolute" || e === "fixed" || e === "sticky")
|
|
908
|
-
return t;
|
|
909
|
-
t = t.parentElement;
|
|
910
|
-
}
|
|
911
|
-
return document.body;
|
|
912
|
-
};
|
|
913
|
-
function J(n) {
|
|
900
|
+
function q(n) {
|
|
914
901
|
const t = n.filter((e) => e.symmetric).map((e) => ({
|
|
915
902
|
from: e.to,
|
|
916
903
|
to: e.from,
|
|
@@ -918,32 +905,57 @@ function J(n) {
|
|
|
918
905
|
}));
|
|
919
906
|
return [...n, ...t];
|
|
920
907
|
}
|
|
921
|
-
function
|
|
922
|
-
let t = !1, e = !1;
|
|
923
|
-
const
|
|
908
|
+
function G(n) {
|
|
909
|
+
let t = !1, e = 0, i = 0, o = !1;
|
|
910
|
+
const r = 50, s = 50, d = (c) => {
|
|
924
911
|
if (!n) return;
|
|
925
|
-
const
|
|
926
|
-
|
|
927
|
-
},
|
|
928
|
-
n
|
|
912
|
+
const g = c.touches[0];
|
|
913
|
+
g && (o = g.clientX < s, o && (e = g.clientX, i = g.clientY));
|
|
914
|
+
}, l = (c) => {
|
|
915
|
+
if (!n || !o || t) return;
|
|
916
|
+
const g = c.touches[0];
|
|
917
|
+
if (!g) return;
|
|
918
|
+
const w = g.clientX - e, f = g.clientY - i;
|
|
919
|
+
w > r && Math.abs(w) > Math.abs(f) && (t = !0, setTimeout(() => {
|
|
929
920
|
t = !1;
|
|
930
|
-
}, 500))
|
|
921
|
+
}, 500));
|
|
922
|
+
}, h = () => {
|
|
923
|
+
n && (o = !1, e = 0, i = 0);
|
|
931
924
|
};
|
|
932
925
|
return {
|
|
933
926
|
initialize: () => {
|
|
934
|
-
typeof window > "u" || n && (window.addEventListener("touchstart",
|
|
927
|
+
typeof window > "u" || n && (window.addEventListener("touchstart", d, { passive: !0 }), window.addEventListener("touchmove", l, { passive: !0 }), window.addEventListener("touchend", h, { passive: !0 }));
|
|
935
928
|
},
|
|
936
929
|
cleanup: () => {
|
|
937
|
-
typeof window > "u" || (window.removeEventListener("touchstart",
|
|
930
|
+
typeof window > "u" || (window.removeEventListener("touchstart", d), window.removeEventListener("touchmove", l), window.removeEventListener("touchend", h));
|
|
938
931
|
},
|
|
939
932
|
isSwipePending: () => t
|
|
940
933
|
};
|
|
941
934
|
}
|
|
935
|
+
const J = (n) => {
|
|
936
|
+
let t = n.parentElement;
|
|
937
|
+
for (; t && t !== document.body; ) {
|
|
938
|
+
const e = window.getComputedStyle(t), i = e.overflow + e.overflowY + e.overflowX;
|
|
939
|
+
if (i.includes("auto") || i.includes("scroll") || t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth)
|
|
940
|
+
return t;
|
|
941
|
+
t = t.parentElement;
|
|
942
|
+
}
|
|
943
|
+
return document.documentElement;
|
|
944
|
+
}, Q = (n) => {
|
|
945
|
+
let t = n.parentElement;
|
|
946
|
+
for (; t && t !== document.body; ) {
|
|
947
|
+
const e = window.getComputedStyle(t).position;
|
|
948
|
+
if (e === "relative" || e === "absolute" || e === "fixed" || e === "sticky")
|
|
949
|
+
return t;
|
|
950
|
+
t = t.parentElement;
|
|
951
|
+
}
|
|
952
|
+
return document.body;
|
|
953
|
+
};
|
|
942
954
|
function Z() {
|
|
943
955
|
let n = null, t = null;
|
|
944
956
|
const e = /* @__PURE__ */ new Map();
|
|
945
957
|
let i = null;
|
|
946
|
-
const
|
|
958
|
+
const o = () => {
|
|
947
959
|
n && i && e.set(i, {
|
|
948
960
|
x: n.scrollLeft,
|
|
949
961
|
y: n.scrollTop
|
|
@@ -951,7 +963,7 @@ function Z() {
|
|
|
951
963
|
};
|
|
952
964
|
return {
|
|
953
965
|
initializeContext: (u, a) => {
|
|
954
|
-
t = u, n || (n =
|
|
966
|
+
t = u, n || (n = J(u), (n === document.documentElement ? window : n).addEventListener("scroll", o, {
|
|
955
967
|
passive: !0
|
|
956
968
|
})), i = a;
|
|
957
969
|
},
|
|
@@ -963,43 +975,61 @@ function Z() {
|
|
|
963
975
|
};
|
|
964
976
|
},
|
|
965
977
|
getScrollContainer: () => n,
|
|
966
|
-
getPositionedParentElement: () => t ?
|
|
978
|
+
getPositionedParentElement: () => t ? Q(t) : document.body,
|
|
967
979
|
getScrollPosition: (u) => u && e.has(u) ? e.get(u) : { x: 0, y: 0 }
|
|
968
980
|
};
|
|
969
981
|
}
|
|
982
|
+
function P(n, t) {
|
|
983
|
+
if (t === "*")
|
|
984
|
+
return !0;
|
|
985
|
+
if (t.endsWith("/*")) {
|
|
986
|
+
const e = t.slice(0, -2);
|
|
987
|
+
return n === e || n.startsWith(e + "/");
|
|
988
|
+
}
|
|
989
|
+
return n === t;
|
|
990
|
+
}
|
|
991
|
+
function tt(n, t, e) {
|
|
992
|
+
for (const i of e)
|
|
993
|
+
if (P(n, i.from) && P(t, i.to))
|
|
994
|
+
return i.transition;
|
|
995
|
+
for (const i of e)
|
|
996
|
+
if ((i.from === "*" || P(n, i.from)) && (i.to === "*" || P(t, i.to)))
|
|
997
|
+
return i.transition;
|
|
998
|
+
return null;
|
|
999
|
+
}
|
|
970
1000
|
function ot(n) {
|
|
971
1001
|
const {
|
|
972
1002
|
transitions: t = [],
|
|
973
1003
|
defaultTransition: e,
|
|
974
|
-
middleware: i = (f,
|
|
1004
|
+
middleware: i = (f, y) => ({ from: f, to: y }),
|
|
975
1005
|
// Identity function as default
|
|
976
|
-
skipOnIosSwipe:
|
|
1006
|
+
skipOnIosSwipe: o = !0
|
|
977
1007
|
// Default to true - skip animations on iOS swipe
|
|
978
1008
|
} = n;
|
|
979
|
-
let
|
|
980
|
-
const s =
|
|
981
|
-
initializeContext:
|
|
1009
|
+
let r = null;
|
|
1010
|
+
const s = q(t), {
|
|
1011
|
+
initializeContext: d,
|
|
982
1012
|
calculateScrollOffset: l,
|
|
983
1013
|
getScrollContainer: h,
|
|
984
1014
|
getPositionedParentElement: u,
|
|
985
1015
|
getScrollPosition: a
|
|
986
|
-
} = Z(), p =
|
|
1016
|
+
} = Z(), p = G(o);
|
|
987
1017
|
p.initialize();
|
|
988
1018
|
function c() {
|
|
989
|
-
if (
|
|
990
|
-
const { from: f, to:
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
),
|
|
1019
|
+
if (r != null && r.from && (r != null && r.to)) {
|
|
1020
|
+
const { from: f, to: y } = i(
|
|
1021
|
+
r.from,
|
|
1022
|
+
r.to
|
|
1023
|
+
), C = tt(
|
|
994
1024
|
f,
|
|
995
|
-
|
|
1025
|
+
y,
|
|
996
1026
|
s
|
|
997
|
-
) || e,
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
),
|
|
1001
|
-
scrollOffset:
|
|
1002
|
-
scroll: a(
|
|
1027
|
+
) || e, T = l(
|
|
1028
|
+
r.from,
|
|
1029
|
+
r.to
|
|
1030
|
+
), v = {
|
|
1031
|
+
scrollOffset: T,
|
|
1032
|
+
scroll: a(r.from),
|
|
1003
1033
|
get scrollingElement() {
|
|
1004
1034
|
return h() || document.documentElement;
|
|
1005
1035
|
},
|
|
@@ -1007,9 +1037,9 @@ function ot(n) {
|
|
|
1007
1037
|
return u();
|
|
1008
1038
|
}
|
|
1009
1039
|
}, b = {
|
|
1010
|
-
scrollOffset:
|
|
1040
|
+
scrollOffset: T,
|
|
1011
1041
|
get scroll() {
|
|
1012
|
-
return
|
|
1042
|
+
return r ? a(r.to) : { x: 0, y: 0 };
|
|
1013
1043
|
},
|
|
1014
1044
|
get scrollingElement() {
|
|
1015
1045
|
return h() || document.documentElement;
|
|
@@ -1018,51 +1048,33 @@ function ot(n) {
|
|
|
1018
1048
|
return u();
|
|
1019
1049
|
}
|
|
1020
1050
|
};
|
|
1021
|
-
|
|
1022
|
-
(E) =>
|
|
1023
|
-
),
|
|
1024
|
-
(E) =>
|
|
1025
|
-
)),
|
|
1051
|
+
C && (C.out && r.outResolve && r.outResolve(
|
|
1052
|
+
(E) => C.out(E, v)
|
|
1053
|
+
), C.in && r.inResolve && r.inResolve(
|
|
1054
|
+
(E) => C.in(E, b)
|
|
1055
|
+
)), r = null;
|
|
1026
1056
|
}
|
|
1027
1057
|
}
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
})) : (
|
|
1031
|
-
|
|
1058
|
+
const g = async (f, y) => p.isSwipePending() ? () => ({}) : y === "in" && (!r || !r.from) ? () => ({}) : (r || (r = {}), y === "out" ? (r.from = f, new Promise((S) => {
|
|
1059
|
+
r.outResolve = S, c();
|
|
1060
|
+
})) : (r.to = f, new Promise((S) => {
|
|
1061
|
+
r.inResolve = S, c();
|
|
1032
1062
|
})));
|
|
1033
1063
|
return (f) => ({
|
|
1034
1064
|
key: f,
|
|
1035
|
-
in: async (
|
|
1036
|
-
out: async (
|
|
1065
|
+
in: async (y) => (d(y, f), (await g(f, "in"))(y)),
|
|
1066
|
+
out: async (y) => (await g(f, "out"))(y),
|
|
1037
1067
|
// Add page transition strategy for page-level transitions
|
|
1038
|
-
[
|
|
1068
|
+
[z]: N
|
|
1039
1069
|
});
|
|
1040
1070
|
}
|
|
1041
|
-
function tt(n, t, e) {
|
|
1042
|
-
for (const i of e)
|
|
1043
|
-
if (P(n, i.from) && P(t, i.to))
|
|
1044
|
-
return i.transition;
|
|
1045
|
-
for (const i of e)
|
|
1046
|
-
if ((i.from === "*" || P(n, i.from)) && (i.to === "*" || P(t, i.to)))
|
|
1047
|
-
return i.transition;
|
|
1048
|
-
return null;
|
|
1049
|
-
}
|
|
1050
|
-
function P(n, t) {
|
|
1051
|
-
if (t === "*")
|
|
1052
|
-
return !0;
|
|
1053
|
-
if (t.endsWith("/*")) {
|
|
1054
|
-
const e = t.slice(0, -2);
|
|
1055
|
-
return n === e || n.startsWith(e + "/");
|
|
1056
|
-
}
|
|
1057
|
-
return n === t;
|
|
1058
|
-
}
|
|
1059
1071
|
export {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1072
|
+
z as TRANSITION_STRATEGY,
|
|
1073
|
+
F as createDefaultStrategy,
|
|
1074
|
+
N as createPageTransitionStrategy,
|
|
1063
1075
|
ot as createSggoiTransitionContext,
|
|
1064
|
-
|
|
1065
|
-
|
|
1076
|
+
K as generateAutoKey,
|
|
1077
|
+
V as isMultiSpring,
|
|
1066
1078
|
at as isSingleSpring,
|
|
1067
1079
|
lt as jaeminInternal,
|
|
1068
1080
|
nt as transition
|