@ssgoi/core 2.5.1 → 2.5.3
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 +275 -266
- 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/view-transitions/index.cjs +9 -9
- 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 +543 -412
- 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/package.json +13 -14
- 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/{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 = (T) => {
|
|
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 b = Math.min(T, 0.033), v = -2 * b * c * p * u, A = b * p * p * (e - h);
|
|
87
|
+
u += v + A, h += b * u;
|
|
88
|
+
const E = Math.abs(e - h), C = Math.abs(u);
|
|
89
|
+
if (E < g && C < w) {
|
|
90
|
+
if (f += b, 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, T, b;
|
|
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 C;
|
|
740
|
+
e = null, (C = c.onEnd) == null || C.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
|
+
(b = (T = f.config).prepare) == null || b.call(T, 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, (
|
|
767
|
+
var v, A;
|
|
768
|
+
e = null, (A = (v = f.config) == null ? void 0 : v.onEnd) == null || A.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, T, b;
|
|
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 C, x;
|
|
793
|
+
(C = c.onEnd) == null || C.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
|
+
(b = (T = w.config).prepare) == null || b.call(T, 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,83 @@ function W(n, t) {
|
|
|
818
818
|
onStart: w.config.onStart,
|
|
819
819
|
onUpdate: w.config.tick,
|
|
820
820
|
onComplete: () => {
|
|
821
|
-
var
|
|
822
|
-
(
|
|
821
|
+
var v, A, E;
|
|
822
|
+
(A = (v = w.config) == null ? void 0 : v.onEnd) == null || A.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
|
|
832
|
+
return o = a.parentElement, r = a.nextElementSibling, l(a), () => {
|
|
833
833
|
const p = a.cloneNode(!0);
|
|
834
834
|
h(p);
|
|
835
835
|
};
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
const
|
|
838
|
+
const Y = 3, X = (n) => {
|
|
839
839
|
if (!n) return null;
|
|
840
840
|
const t = n.split(`
|
|
841
841
|
`).map((e) => e.trim());
|
|
842
|
-
for (let e =
|
|
843
|
-
const i = t[e],
|
|
844
|
-
if (!
|
|
842
|
+
for (let e = Y; e < Math.min(t.length, 6); e++) {
|
|
843
|
+
const i = t[e], o = i == null ? void 0 : i.match(/\(?([^):]+):(\d+):(\d+)\)?$/);
|
|
844
|
+
if (!o)
|
|
845
845
|
continue;
|
|
846
|
-
const
|
|
847
|
-
return { file:
|
|
846
|
+
const r = o[1] ?? "", s = o[2] ?? "0", d = o[3] ?? "0";
|
|
847
|
+
return { file: r.split(/[\\/]/).pop() || r, line: s, column: d };
|
|
848
848
|
}
|
|
849
849
|
return null;
|
|
850
|
-
},
|
|
851
|
-
function
|
|
852
|
-
|
|
853
|
-
let i =
|
|
850
|
+
}, M = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
|
|
851
|
+
function B(n, t, e) {
|
|
852
|
+
M.set(n, t);
|
|
853
|
+
let i = R.get(n);
|
|
854
854
|
return i || (i = W(
|
|
855
855
|
() => {
|
|
856
|
-
const
|
|
857
|
-
return
|
|
856
|
+
const o = M.get(n);
|
|
857
|
+
return o || (console.warn(`Transition "${String(n)}" not found`), {});
|
|
858
858
|
},
|
|
859
859
|
{
|
|
860
860
|
strategy: e,
|
|
861
861
|
onCleanupEnd: () => D(n)
|
|
862
862
|
}
|
|
863
|
-
),
|
|
863
|
+
), R.set(n, i), i);
|
|
864
864
|
}
|
|
865
865
|
function D(n) {
|
|
866
|
-
|
|
866
|
+
M.delete(n), R.delete(n);
|
|
867
867
|
}
|
|
868
|
-
function
|
|
869
|
-
const n =
|
|
868
|
+
function K() {
|
|
869
|
+
const n = X(new Error().stack);
|
|
870
870
|
return n ? `auto_${n.file}_${n.line}_${n.column}` : Symbol(`ssgoi_auto_${Date.now()}`);
|
|
871
871
|
}
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
}
|
|
872
|
+
const L = globalThis.FinalizationRegistry, U = L ? (
|
|
873
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
874
|
+
new L((n) => {
|
|
875
|
+
try {
|
|
876
|
+
D(n);
|
|
877
|
+
} catch {
|
|
878
|
+
}
|
|
879
|
+
})
|
|
880
|
+
) : void 0;
|
|
878
881
|
function nt(n) {
|
|
879
|
-
const t = n.key ??
|
|
880
|
-
if (n.ref &&
|
|
882
|
+
const t = n.key ?? K();
|
|
883
|
+
if (n.ref && U)
|
|
881
884
|
try {
|
|
882
|
-
|
|
885
|
+
U.register(n.ref, t);
|
|
883
886
|
} catch {
|
|
884
887
|
}
|
|
885
|
-
return
|
|
888
|
+
return B(
|
|
886
889
|
t,
|
|
887
890
|
{
|
|
888
891
|
in: n.in,
|
|
889
892
|
out: n.out
|
|
890
893
|
},
|
|
891
|
-
n[
|
|
894
|
+
n[z]
|
|
892
895
|
);
|
|
893
896
|
}
|
|
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) {
|
|
897
|
+
function q(n) {
|
|
914
898
|
const t = n.filter((e) => e.symmetric).map((e) => ({
|
|
915
899
|
from: e.to,
|
|
916
900
|
to: e.from,
|
|
@@ -918,32 +902,57 @@ function J(n) {
|
|
|
918
902
|
}));
|
|
919
903
|
return [...n, ...t];
|
|
920
904
|
}
|
|
921
|
-
function
|
|
922
|
-
let t = !1, e = !1;
|
|
923
|
-
const
|
|
905
|
+
function G(n) {
|
|
906
|
+
let t = !1, e = 0, i = 0, o = !1;
|
|
907
|
+
const r = 50, s = 50, d = (c) => {
|
|
924
908
|
if (!n) return;
|
|
925
|
-
const
|
|
926
|
-
|
|
927
|
-
},
|
|
928
|
-
n
|
|
909
|
+
const g = c.touches[0];
|
|
910
|
+
g && (o = g.clientX < s, o && (e = g.clientX, i = g.clientY));
|
|
911
|
+
}, l = (c) => {
|
|
912
|
+
if (!n || !o || t) return;
|
|
913
|
+
const g = c.touches[0];
|
|
914
|
+
if (!g) return;
|
|
915
|
+
const w = g.clientX - e, f = g.clientY - i;
|
|
916
|
+
w > r && Math.abs(w) > Math.abs(f) && (t = !0, setTimeout(() => {
|
|
929
917
|
t = !1;
|
|
930
|
-
}, 500))
|
|
918
|
+
}, 500));
|
|
919
|
+
}, h = () => {
|
|
920
|
+
n && (o = !1, e = 0, i = 0);
|
|
931
921
|
};
|
|
932
922
|
return {
|
|
933
923
|
initialize: () => {
|
|
934
|
-
typeof window > "u" || n && (window.addEventListener("touchstart",
|
|
924
|
+
typeof window > "u" || n && (window.addEventListener("touchstart", d, { passive: !0 }), window.addEventListener("touchmove", l, { passive: !0 }), window.addEventListener("touchend", h, { passive: !0 }));
|
|
935
925
|
},
|
|
936
926
|
cleanup: () => {
|
|
937
|
-
typeof window > "u" || (window.removeEventListener("touchstart",
|
|
927
|
+
typeof window > "u" || (window.removeEventListener("touchstart", d), window.removeEventListener("touchmove", l), window.removeEventListener("touchend", h));
|
|
938
928
|
},
|
|
939
929
|
isSwipePending: () => t
|
|
940
930
|
};
|
|
941
931
|
}
|
|
932
|
+
const J = (n) => {
|
|
933
|
+
let t = n.parentElement;
|
|
934
|
+
for (; t && t !== document.body; ) {
|
|
935
|
+
const e = window.getComputedStyle(t), i = e.overflow + e.overflowY + e.overflowX;
|
|
936
|
+
if (i.includes("auto") || i.includes("scroll") || t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth)
|
|
937
|
+
return t;
|
|
938
|
+
t = t.parentElement;
|
|
939
|
+
}
|
|
940
|
+
return document.documentElement;
|
|
941
|
+
}, Q = (n) => {
|
|
942
|
+
let t = n.parentElement;
|
|
943
|
+
for (; t && t !== document.body; ) {
|
|
944
|
+
const e = window.getComputedStyle(t).position;
|
|
945
|
+
if (e === "relative" || e === "absolute" || e === "fixed" || e === "sticky")
|
|
946
|
+
return t;
|
|
947
|
+
t = t.parentElement;
|
|
948
|
+
}
|
|
949
|
+
return document.body;
|
|
950
|
+
};
|
|
942
951
|
function Z() {
|
|
943
952
|
let n = null, t = null;
|
|
944
953
|
const e = /* @__PURE__ */ new Map();
|
|
945
954
|
let i = null;
|
|
946
|
-
const
|
|
955
|
+
const o = () => {
|
|
947
956
|
n && i && e.set(i, {
|
|
948
957
|
x: n.scrollLeft,
|
|
949
958
|
y: n.scrollTop
|
|
@@ -951,7 +960,7 @@ function Z() {
|
|
|
951
960
|
};
|
|
952
961
|
return {
|
|
953
962
|
initializeContext: (u, a) => {
|
|
954
|
-
t = u, n || (n =
|
|
963
|
+
t = u, n || (n = J(u), (n === document.documentElement ? window : n).addEventListener("scroll", o, {
|
|
955
964
|
passive: !0
|
|
956
965
|
})), i = a;
|
|
957
966
|
},
|
|
@@ -963,53 +972,71 @@ function Z() {
|
|
|
963
972
|
};
|
|
964
973
|
},
|
|
965
974
|
getScrollContainer: () => n,
|
|
966
|
-
getPositionedParentElement: () => t ?
|
|
975
|
+
getPositionedParentElement: () => t ? Q(t) : document.body,
|
|
967
976
|
getScrollPosition: (u) => u && e.has(u) ? e.get(u) : { x: 0, y: 0 }
|
|
968
977
|
};
|
|
969
978
|
}
|
|
979
|
+
function P(n, t) {
|
|
980
|
+
if (t === "*")
|
|
981
|
+
return !0;
|
|
982
|
+
if (t.endsWith("/*")) {
|
|
983
|
+
const e = t.slice(0, -2);
|
|
984
|
+
return n === e || n.startsWith(e + "/");
|
|
985
|
+
}
|
|
986
|
+
return n === t;
|
|
987
|
+
}
|
|
988
|
+
function tt(n, t, e) {
|
|
989
|
+
for (const i of e)
|
|
990
|
+
if (P(n, i.from) && P(t, i.to))
|
|
991
|
+
return i.transition;
|
|
992
|
+
for (const i of e)
|
|
993
|
+
if ((i.from === "*" || P(n, i.from)) && (i.to === "*" || P(t, i.to)))
|
|
994
|
+
return i.transition;
|
|
995
|
+
return null;
|
|
996
|
+
}
|
|
970
997
|
function ot(n) {
|
|
971
998
|
const {
|
|
972
999
|
transitions: t = [],
|
|
973
1000
|
defaultTransition: e,
|
|
974
|
-
middleware: i = (f,
|
|
1001
|
+
middleware: i = (f, y) => ({ from: f, to: y }),
|
|
975
1002
|
// Identity function as default
|
|
976
|
-
skipOnIosSwipe:
|
|
1003
|
+
skipOnIosSwipe: o = !0
|
|
977
1004
|
// Default to true - skip animations on iOS swipe
|
|
978
1005
|
} = n;
|
|
979
|
-
let
|
|
980
|
-
const s =
|
|
981
|
-
initializeContext:
|
|
1006
|
+
let r = null;
|
|
1007
|
+
const s = q(t), {
|
|
1008
|
+
initializeContext: d,
|
|
982
1009
|
calculateScrollOffset: l,
|
|
983
1010
|
getScrollContainer: h,
|
|
984
1011
|
getPositionedParentElement: u,
|
|
985
1012
|
getScrollPosition: a
|
|
986
|
-
} = Z(), p =
|
|
1013
|
+
} = Z(), p = G(o);
|
|
987
1014
|
p.initialize();
|
|
988
1015
|
function c() {
|
|
989
|
-
if (
|
|
990
|
-
const { from: f, to:
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
),
|
|
1016
|
+
if (r != null && r.from && (r != null && r.to)) {
|
|
1017
|
+
const { from: f, to: y } = i(
|
|
1018
|
+
r.from,
|
|
1019
|
+
r.to
|
|
1020
|
+
), T = tt(
|
|
994
1021
|
f,
|
|
995
|
-
|
|
1022
|
+
y,
|
|
996
1023
|
s
|
|
997
|
-
) || e,
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
),
|
|
1001
|
-
scrollOffset:
|
|
1002
|
-
scroll: a(
|
|
1024
|
+
) || e, b = l(
|
|
1025
|
+
r.from,
|
|
1026
|
+
r.to
|
|
1027
|
+
), v = {
|
|
1028
|
+
scrollOffset: b,
|
|
1029
|
+
scroll: a(r.from),
|
|
1003
1030
|
get scrollingElement() {
|
|
1004
1031
|
return h() || document.documentElement;
|
|
1005
1032
|
},
|
|
1006
1033
|
get positionedParent() {
|
|
1007
1034
|
return u();
|
|
1008
1035
|
}
|
|
1009
|
-
},
|
|
1010
|
-
scrollOffset:
|
|
1036
|
+
}, A = {
|
|
1037
|
+
scrollOffset: b,
|
|
1011
1038
|
get scroll() {
|
|
1012
|
-
return
|
|
1039
|
+
return r ? a(r.to) : { x: 0, y: 0 };
|
|
1013
1040
|
},
|
|
1014
1041
|
get scrollingElement() {
|
|
1015
1042
|
return h() || document.documentElement;
|
|
@@ -1018,51 +1045,33 @@ function ot(n) {
|
|
|
1018
1045
|
return u();
|
|
1019
1046
|
}
|
|
1020
1047
|
};
|
|
1021
|
-
|
|
1022
|
-
(E) =>
|
|
1023
|
-
),
|
|
1024
|
-
(E) =>
|
|
1025
|
-
)),
|
|
1048
|
+
T && (T.out && r.outResolve && r.outResolve(
|
|
1049
|
+
(E) => T.out(E, v)
|
|
1050
|
+
), T.in && r.inResolve && r.inResolve(
|
|
1051
|
+
(E) => T.in(E, A)
|
|
1052
|
+
)), r = null;
|
|
1026
1053
|
}
|
|
1027
1054
|
}
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
})) : (
|
|
1031
|
-
|
|
1055
|
+
const g = async (f, y) => p.isSwipePending() ? () => ({}) : y === "in" && (!r || !r.from) ? () => ({}) : (r || (r = {}), y === "out" ? (r.from = f, new Promise((S) => {
|
|
1056
|
+
r.outResolve = S, c();
|
|
1057
|
+
})) : (r.to = f, new Promise((S) => {
|
|
1058
|
+
r.inResolve = S, c();
|
|
1032
1059
|
})));
|
|
1033
1060
|
return (f) => ({
|
|
1034
1061
|
key: f,
|
|
1035
|
-
in: async (
|
|
1036
|
-
out: async (
|
|
1062
|
+
in: async (y) => (d(y, f), (await g(f, "in"))(y)),
|
|
1063
|
+
out: async (y) => (await g(f, "out"))(y),
|
|
1037
1064
|
// Add page transition strategy for page-level transitions
|
|
1038
|
-
[
|
|
1065
|
+
[z]: N
|
|
1039
1066
|
});
|
|
1040
1067
|
}
|
|
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
1068
|
export {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1069
|
+
z as TRANSITION_STRATEGY,
|
|
1070
|
+
F as createDefaultStrategy,
|
|
1071
|
+
N as createPageTransitionStrategy,
|
|
1063
1072
|
ot as createSggoiTransitionContext,
|
|
1064
|
-
|
|
1065
|
-
|
|
1073
|
+
K as generateAutoKey,
|
|
1074
|
+
V as isMultiSpring,
|
|
1066
1075
|
at as isSingleSpring,
|
|
1067
1076
|
lt as jaeminInternal,
|
|
1068
1077
|
nt as transition
|