@ssgoi/core 2.4.0 → 2.5.0
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/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +284 -258
- package/dist/jaemin-BAi8PTrj.js +130 -0
- package/dist/jaemin-DL1-g_B5.cjs +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts +1 -0
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +19 -19
- package/dist/view-transitions/index.d.ts +2 -1
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +484 -522
- package/dist/view-transitions/jaemin.d.ts +4 -0
- package/dist/view-transitions/jaemin.d.ts.map +1 -1
- package/dist/view-transitions/strip.d.ts +3 -0
- package/dist/view-transitions/strip.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,108 +1,109 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { animate as
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var _ = (e, t, n) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => _(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { animate as x } from "popmotion";
|
|
5
|
+
import { j as nt } from "./jaemin-BAi8PTrj.js";
|
|
5
6
|
class A {
|
|
6
7
|
constructor(t) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
v(this, "options");
|
|
9
|
+
v(this, "currentValue");
|
|
10
|
+
v(this, "velocity");
|
|
11
|
+
v(this, "isAnimating", !1);
|
|
12
|
+
v(this, "controls", null);
|
|
12
13
|
// For object animations
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
v(this, "animationMap", null);
|
|
15
|
+
v(this, "activeAnimations", /* @__PURE__ */ new Set());
|
|
16
|
+
v(this, "completedAnimations", /* @__PURE__ */ new Set());
|
|
17
|
+
v(this, "updatedProperties", /* @__PURE__ */ new Set());
|
|
18
|
+
v(this, "animate", (t = !1) => {
|
|
18
19
|
!this.isAnimating && this.options.onStart && this.options.onStart(), this.isAnimating = !0;
|
|
19
20
|
const n = t ? this.options.from : this.options.to;
|
|
20
21
|
if (typeof this.currentValue == "object" && this.currentValue !== null) {
|
|
21
22
|
this.animateObject(n);
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
24
|
-
let
|
|
25
|
-
const
|
|
25
|
+
let o = this.currentValue, s = performance.now();
|
|
26
|
+
const i = {
|
|
26
27
|
from: this.currentValue,
|
|
27
28
|
to: n,
|
|
28
29
|
stiffness: this.options.spring.stiffness,
|
|
29
30
|
damping: this.options.spring.damping,
|
|
30
31
|
mass: 1
|
|
31
32
|
};
|
|
32
|
-
typeof this.velocity == "number" && (
|
|
33
|
-
...
|
|
34
|
-
onUpdate: (
|
|
35
|
-
const
|
|
33
|
+
typeof this.velocity == "number" && (i.velocity = this.velocity * 1e3), this.controls = x({
|
|
34
|
+
...i,
|
|
35
|
+
onUpdate: (u) => {
|
|
36
|
+
const d = performance.now(), a = (d - s) / 1e3;
|
|
36
37
|
if (a > 0) {
|
|
37
|
-
if (typeof
|
|
38
|
-
const
|
|
39
|
-
this.velocity =
|
|
40
|
-
} else if (typeof
|
|
41
|
-
const
|
|
42
|
-
Object.keys(
|
|
43
|
-
const
|
|
44
|
-
if (typeof
|
|
45
|
-
const
|
|
46
|
-
|
|
38
|
+
if (typeof u == "number" && typeof o == "number") {
|
|
39
|
+
const m = (u - o) / a;
|
|
40
|
+
this.velocity = m / 1e3;
|
|
41
|
+
} else if (typeof u == "object" && u !== null) {
|
|
42
|
+
const m = {};
|
|
43
|
+
Object.keys(u).forEach((l) => {
|
|
44
|
+
const r = u[l], f = o[l];
|
|
45
|
+
if (typeof r == "number" && typeof f == "number") {
|
|
46
|
+
const g = (r - f) / a;
|
|
47
|
+
m[l] = g / 1e3;
|
|
47
48
|
}
|
|
48
|
-
}), this.velocity =
|
|
49
|
+
}), this.velocity = m;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
o = u, s = d;
|
|
51
52
|
}
|
|
52
|
-
this.currentValue =
|
|
53
|
+
this.currentValue = u, this.options.onUpdate(u);
|
|
53
54
|
},
|
|
54
55
|
onComplete: () => {
|
|
55
|
-
this.currentValue = n, this.isAnimating = !1, this.controls = null, typeof this.velocity == "object" && this.velocity !== null ? Object.keys(this.velocity).forEach((
|
|
56
|
-
this.velocity[
|
|
56
|
+
this.currentValue = n, this.isAnimating = !1, this.controls = null, typeof this.velocity == "object" && this.velocity !== null ? Object.keys(this.velocity).forEach((u) => {
|
|
57
|
+
this.velocity[u] = 0;
|
|
57
58
|
}) : this.velocity = 0, this.options.onComplete();
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
-
const n = this.currentValue,
|
|
62
|
+
v(this, "animateObject", (t) => {
|
|
63
|
+
const n = this.currentValue, o = Object.keys(n);
|
|
63
64
|
this.animationMap = /* @__PURE__ */ new Map(), this.activeAnimations.clear(), this.completedAnimations.clear(), this.updatedProperties.clear();
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
const
|
|
67
|
-
const a =
|
|
65
|
+
const s = { ...n }, i = {};
|
|
66
|
+
let u = !1;
|
|
67
|
+
const d = () => {
|
|
68
|
+
const a = o.filter((l) => !this.completedAnimations.has(l));
|
|
68
69
|
if (a.every(
|
|
69
|
-
(
|
|
70
|
+
(l) => this.updatedProperties.has(l)
|
|
70
71
|
) && a.length > 0) {
|
|
71
72
|
if (typeof this.velocity == "object" && this.velocity) {
|
|
72
|
-
const
|
|
73
|
-
Object.keys(
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
76
|
-
typeof
|
|
73
|
+
const l = performance.now();
|
|
74
|
+
Object.keys(s).forEach((r) => {
|
|
75
|
+
if (i[r]) {
|
|
76
|
+
const f = (l - i[r]) / 1e3, g = this.currentValue[r], c = s[r];
|
|
77
|
+
typeof g == "number" && typeof c == "number" && f > 0 && (this.velocity[r] = (c - g) / f / 1e3);
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
+
i[r] = l;
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
this.currentValue = { ...
|
|
82
|
+
this.currentValue = { ...s }, this.options.onUpdate(this.currentValue), this.updatedProperties.clear(), !u && this.options.onStart && (u = !0, this.options.onStart());
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
|
-
|
|
85
|
+
o.forEach((a) => {
|
|
85
86
|
this.activeAnimations.add(a);
|
|
86
|
-
const
|
|
87
|
+
const m = {
|
|
87
88
|
from: n[a],
|
|
88
89
|
to: t[a],
|
|
89
90
|
stiffness: this.options.spring.stiffness,
|
|
90
91
|
damping: this.options.spring.damping,
|
|
91
92
|
mass: 1
|
|
92
93
|
};
|
|
93
|
-
typeof this.velocity == "object" && this.velocity && a in this.velocity && (
|
|
94
|
-
const
|
|
95
|
-
...
|
|
96
|
-
onUpdate: (
|
|
97
|
-
|
|
94
|
+
typeof this.velocity == "object" && this.velocity && a in this.velocity && (m.velocity = this.velocity[a] * 1e3);
|
|
95
|
+
const l = x({
|
|
96
|
+
...m,
|
|
97
|
+
onUpdate: (r) => {
|
|
98
|
+
s[a] = r, this.updatedProperties.add(a), d();
|
|
98
99
|
},
|
|
99
100
|
onComplete: () => {
|
|
100
|
-
this.completedAnimations.add(a), this.updatedProperties.delete(a), this.completedAnimations.size ===
|
|
101
|
-
this.velocity[
|
|
101
|
+
this.completedAnimations.add(a), this.updatedProperties.delete(a), this.completedAnimations.size === o.length && (this.currentValue = t, this.isAnimating = !1, this.animationMap = null, typeof this.velocity == "object" && this.velocity && Object.keys(this.velocity).forEach((r) => {
|
|
102
|
+
this.velocity[r] = 0;
|
|
102
103
|
}), this.options.onComplete());
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
|
-
this.animationMap.set(a,
|
|
106
|
+
this.animationMap.set(a, l);
|
|
106
107
|
});
|
|
107
108
|
});
|
|
108
109
|
if (this.options = {
|
|
@@ -116,8 +117,8 @@ class A {
|
|
|
116
117
|
onStart: t.onStart
|
|
117
118
|
}, this.currentValue = this.options.from, typeof this.options.from == "object" && this.options.from !== null) {
|
|
118
119
|
const n = {};
|
|
119
|
-
Object.keys(this.options.from).forEach((
|
|
120
|
-
n[
|
|
120
|
+
Object.keys(this.options.from).forEach((o) => {
|
|
121
|
+
n[o] = 0;
|
|
121
122
|
}), this.velocity = n;
|
|
122
123
|
} else
|
|
123
124
|
this.velocity = 0;
|
|
@@ -178,31 +179,31 @@ class A {
|
|
|
178
179
|
}
|
|
179
180
|
// Static factory method
|
|
180
181
|
static fromState(t, n) {
|
|
181
|
-
const
|
|
182
|
-
return
|
|
182
|
+
const o = new A(n);
|
|
183
|
+
return o.setValue(t.position), o.setVelocity(t.velocity), o;
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
|
-
const
|
|
186
|
+
const j = Symbol.for("TRANSITION_STRATEGY"), D = (e) => ({
|
|
186
187
|
runIn: async (t) => {
|
|
187
|
-
const { currentAnimation: n } =
|
|
188
|
+
const { currentAnimation: n } = e;
|
|
188
189
|
if (n && n.direction === "out") {
|
|
189
|
-
const
|
|
190
|
+
const u = n.animator.getCurrentState();
|
|
190
191
|
if (n.animator.stop(), t.out) {
|
|
191
|
-
const
|
|
192
|
+
const d = await t.out, { from: a = 1, to: m = 0 } = d;
|
|
192
193
|
return {
|
|
193
|
-
config:
|
|
194
|
-
state:
|
|
194
|
+
config: d,
|
|
195
|
+
state: u,
|
|
195
196
|
from: a,
|
|
196
197
|
// OUT animation's from
|
|
197
|
-
to:
|
|
198
|
+
to: m,
|
|
198
199
|
// OUT animation's to
|
|
199
200
|
direction: "backward"
|
|
200
201
|
// Will actually go 0→1
|
|
201
202
|
};
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
|
-
const
|
|
205
|
-
if (!
|
|
205
|
+
const o = await t.in;
|
|
206
|
+
if (!o)
|
|
206
207
|
return {
|
|
207
208
|
state: {
|
|
208
209
|
position: 0,
|
|
@@ -212,41 +213,41 @@ const O = Symbol.for("TRANSITION_STRATEGY"), _ = (o) => ({
|
|
|
212
213
|
to: 1,
|
|
213
214
|
direction: "forward"
|
|
214
215
|
};
|
|
215
|
-
const { from:
|
|
216
|
+
const { from: s = 0, to: i = 1 } = o;
|
|
216
217
|
return {
|
|
217
|
-
config:
|
|
218
|
+
config: o,
|
|
218
219
|
state: {
|
|
219
|
-
position:
|
|
220
|
+
position: s,
|
|
220
221
|
velocity: 0
|
|
221
222
|
},
|
|
222
|
-
from:
|
|
223
|
-
to:
|
|
223
|
+
from: s,
|
|
224
|
+
to: i,
|
|
224
225
|
direction: "forward"
|
|
225
226
|
};
|
|
226
227
|
},
|
|
227
228
|
runOut: async (t) => {
|
|
228
|
-
const { currentAnimation: n } =
|
|
229
|
+
const { currentAnimation: n } = e;
|
|
229
230
|
if (n && n.direction === "in") {
|
|
230
|
-
const
|
|
231
|
+
const u = n.animator.getCurrentState();
|
|
231
232
|
if (n.animator.stop(), t.in) {
|
|
232
|
-
const
|
|
233
|
+
const d = await t.in, { from: a = 0, to: m = 1 } = d;
|
|
233
234
|
return {
|
|
234
|
-
config:
|
|
235
|
+
config: d,
|
|
235
236
|
state: {
|
|
236
|
-
position:
|
|
237
|
-
velocity:
|
|
237
|
+
position: u.position,
|
|
238
|
+
velocity: u.velocity
|
|
238
239
|
},
|
|
239
240
|
from: a,
|
|
240
241
|
// IN animation's from
|
|
241
|
-
to:
|
|
242
|
+
to: m,
|
|
242
243
|
// IN animation's to
|
|
243
244
|
direction: "backward"
|
|
244
245
|
// Will actually go 1→0
|
|
245
246
|
};
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
249
|
+
const o = await t.out;
|
|
250
|
+
if (!o)
|
|
250
251
|
return {
|
|
251
252
|
state: {
|
|
252
253
|
position: 1,
|
|
@@ -256,21 +257,21 @@ const O = Symbol.for("TRANSITION_STRATEGY"), _ = (o) => ({
|
|
|
256
257
|
to: 0,
|
|
257
258
|
direction: "forward"
|
|
258
259
|
};
|
|
259
|
-
const { from:
|
|
260
|
+
const { from: s = 1, to: i = 0 } = o;
|
|
260
261
|
return {
|
|
261
|
-
config:
|
|
262
|
+
config: o,
|
|
262
263
|
state: {
|
|
263
|
-
position:
|
|
264
|
+
position: s,
|
|
264
265
|
velocity: 0
|
|
265
266
|
},
|
|
266
|
-
from:
|
|
267
|
-
to:
|
|
267
|
+
from: s,
|
|
268
|
+
to: i,
|
|
268
269
|
direction: "forward"
|
|
269
270
|
};
|
|
270
271
|
}
|
|
271
|
-
}),
|
|
272
|
-
runIn: async (
|
|
273
|
-
const t = await
|
|
272
|
+
}), z = () => ({
|
|
273
|
+
runIn: async (e) => {
|
|
274
|
+
const t = await e.in;
|
|
274
275
|
if (!t)
|
|
275
276
|
return {
|
|
276
277
|
state: {
|
|
@@ -281,7 +282,7 @@ const O = Symbol.for("TRANSITION_STRATEGY"), _ = (o) => ({
|
|
|
281
282
|
to: 1,
|
|
282
283
|
direction: "forward"
|
|
283
284
|
};
|
|
284
|
-
const { from: n = 0, to:
|
|
285
|
+
const { from: n = 0, to: o = 1 } = t;
|
|
285
286
|
return {
|
|
286
287
|
config: t,
|
|
287
288
|
state: {
|
|
@@ -289,12 +290,12 @@ const O = Symbol.for("TRANSITION_STRATEGY"), _ = (o) => ({
|
|
|
289
290
|
velocity: 0
|
|
290
291
|
},
|
|
291
292
|
from: n,
|
|
292
|
-
to:
|
|
293
|
+
to: o,
|
|
293
294
|
direction: "forward"
|
|
294
295
|
};
|
|
295
296
|
},
|
|
296
|
-
runOut: async (
|
|
297
|
-
const t = await
|
|
297
|
+
runOut: async (e) => {
|
|
298
|
+
const t = await e.out;
|
|
298
299
|
if (!t)
|
|
299
300
|
return {
|
|
300
301
|
state: {
|
|
@@ -305,7 +306,7 @@ const O = Symbol.for("TRANSITION_STRATEGY"), _ = (o) => ({
|
|
|
305
306
|
to: 0,
|
|
306
307
|
direction: "forward"
|
|
307
308
|
};
|
|
308
|
-
const { from: n = 1, to:
|
|
309
|
+
const { from: n = 1, to: o = 0 } = t;
|
|
309
310
|
return {
|
|
310
311
|
config: t,
|
|
311
312
|
state: {
|
|
@@ -313,141 +314,141 @@ const O = Symbol.for("TRANSITION_STRATEGY"), _ = (o) => ({
|
|
|
313
314
|
velocity: 0
|
|
314
315
|
},
|
|
315
316
|
from: n,
|
|
316
|
-
to:
|
|
317
|
+
to: o,
|
|
317
318
|
direction: "forward"
|
|
318
319
|
};
|
|
319
320
|
}
|
|
320
321
|
});
|
|
321
|
-
function N(
|
|
322
|
-
var
|
|
323
|
-
let n = null,
|
|
324
|
-
const
|
|
322
|
+
function N(e, t) {
|
|
323
|
+
var l;
|
|
324
|
+
let n = null, o = null, s = null, i = null;
|
|
325
|
+
const u = {
|
|
325
326
|
get currentAnimation() {
|
|
326
327
|
return n;
|
|
327
328
|
}
|
|
328
|
-
},
|
|
329
|
-
var
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
in:
|
|
333
|
-
out:
|
|
334
|
-
},
|
|
335
|
-
if (!
|
|
329
|
+
}, d = ((l = t == null ? void 0 : t.strategy) == null ? void 0 : l.call(t, u)) || D(u), a = async (r) => {
|
|
330
|
+
var p, h;
|
|
331
|
+
o && (o.remove(), o = null);
|
|
332
|
+
const f = e(), g = {
|
|
333
|
+
in: f.in && Promise.resolve(f.in(r)),
|
|
334
|
+
out: f.out && Promise.resolve(f.out(r))
|
|
335
|
+
}, c = await d.runIn(g);
|
|
336
|
+
if (!c.config)
|
|
336
337
|
return;
|
|
337
|
-
(
|
|
338
|
-
const
|
|
339
|
-
from:
|
|
340
|
-
to:
|
|
341
|
-
spring:
|
|
342
|
-
onStart:
|
|
343
|
-
onUpdate:
|
|
338
|
+
(h = (p = c.config).prepare) == null || h.call(p, r), c.config.wait && await c.config.wait();
|
|
339
|
+
const S = A.fromState(c.state, {
|
|
340
|
+
from: c.from,
|
|
341
|
+
to: c.to,
|
|
342
|
+
spring: c.config.spring,
|
|
343
|
+
onStart: c.config.onStart,
|
|
344
|
+
onUpdate: c.config.tick,
|
|
344
345
|
onComplete: () => {
|
|
345
|
-
var
|
|
346
|
-
n = null, (
|
|
346
|
+
var y, w;
|
|
347
|
+
n = null, (w = (y = c.config) == null ? void 0 : y.onEnd) == null || w.call(y);
|
|
347
348
|
}
|
|
348
349
|
});
|
|
349
|
-
n = { animator:
|
|
350
|
-
},
|
|
351
|
-
var
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
in:
|
|
355
|
-
out:
|
|
356
|
-
},
|
|
357
|
-
if (!
|
|
350
|
+
n = { animator: S, direction: "in" }, c.direction === "forward" ? S.forward() : S.backward();
|
|
351
|
+
}, m = async (r) => {
|
|
352
|
+
var h, y;
|
|
353
|
+
o = r;
|
|
354
|
+
const f = e(), g = {
|
|
355
|
+
in: f.in && Promise.resolve(f.in(r)),
|
|
356
|
+
out: f.out && Promise.resolve(f.out(r))
|
|
357
|
+
}, c = await d.runOut(g);
|
|
358
|
+
if (!c.config)
|
|
358
359
|
return;
|
|
359
|
-
(
|
|
360
|
-
const
|
|
361
|
-
from:
|
|
362
|
-
to:
|
|
363
|
-
spring:
|
|
364
|
-
onStart:
|
|
365
|
-
onUpdate:
|
|
360
|
+
(y = (h = c.config).prepare) == null || y.call(h, r), p(), c.config.wait && await c.config.wait();
|
|
361
|
+
const S = A.fromState(c.state, {
|
|
362
|
+
from: c.from,
|
|
363
|
+
to: c.to,
|
|
364
|
+
spring: c.config.spring,
|
|
365
|
+
onStart: c.config.onStart,
|
|
366
|
+
onUpdate: c.config.tick,
|
|
366
367
|
onComplete: () => {
|
|
367
|
-
var
|
|
368
|
-
(
|
|
368
|
+
var w, b, C;
|
|
369
|
+
(b = (w = c.config) == null ? void 0 : w.onEnd) == null || b.call(w), o && (o.remove(), o = null), n = null, (C = t == null ? void 0 : t.onCleanupEnd) == null || C.call(t);
|
|
369
370
|
}
|
|
370
371
|
});
|
|
371
|
-
n = { animator:
|
|
372
|
-
function
|
|
373
|
-
!
|
|
372
|
+
n = { animator: S, direction: "out" }, c.direction === "forward" ? S.forward() : S.backward();
|
|
373
|
+
function p() {
|
|
374
|
+
!s || !o || (i && s.contains(i) ? s.insertBefore(o, i) : s.appendChild(o));
|
|
374
375
|
}
|
|
375
376
|
};
|
|
376
|
-
return (
|
|
377
|
-
if (
|
|
378
|
-
return
|
|
379
|
-
const
|
|
380
|
-
|
|
377
|
+
return (r) => {
|
|
378
|
+
if (r)
|
|
379
|
+
return s = r.parentElement, i = r.nextElementSibling, a(r), () => {
|
|
380
|
+
const f = r.cloneNode(!0);
|
|
381
|
+
m(f);
|
|
381
382
|
};
|
|
382
383
|
};
|
|
383
384
|
}
|
|
384
|
-
const
|
|
385
|
-
if (!
|
|
386
|
-
const t =
|
|
385
|
+
const L = 3, $ = (e) => {
|
|
386
|
+
if (!e) return null;
|
|
387
|
+
const t = e.split(`
|
|
387
388
|
`).map((n) => n.trim());
|
|
388
|
-
for (let n =
|
|
389
|
-
const
|
|
390
|
-
if (!
|
|
389
|
+
for (let n = L; n < Math.min(t.length, 6); n++) {
|
|
390
|
+
const o = t[n], s = o == null ? void 0 : o.match(/\(?([^):]+):(\d+):(\d+)\)?$/);
|
|
391
|
+
if (!s)
|
|
391
392
|
continue;
|
|
392
|
-
const
|
|
393
|
-
return { file:
|
|
393
|
+
const i = s[1] ?? "", u = s[2] ?? "0", d = s[3] ?? "0";
|
|
394
|
+
return { file: i.split(/[\\/]/).pop() || i, line: u, column: d };
|
|
394
395
|
}
|
|
395
396
|
return null;
|
|
396
|
-
}, V = /* @__PURE__ */ new Map(),
|
|
397
|
-
function
|
|
398
|
-
V.set(
|
|
399
|
-
let
|
|
400
|
-
return
|
|
397
|
+
}, V = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map();
|
|
398
|
+
function k(e, t, n) {
|
|
399
|
+
V.set(e, t);
|
|
400
|
+
let o = T.get(e);
|
|
401
|
+
return o || (o = N(
|
|
401
402
|
() => {
|
|
402
|
-
const
|
|
403
|
-
return
|
|
403
|
+
const s = V.get(e);
|
|
404
|
+
return s || (console.warn(`Transition "${String(e)}" not found`), {});
|
|
404
405
|
},
|
|
405
406
|
{
|
|
406
407
|
strategy: n,
|
|
407
|
-
onCleanupEnd: () =>
|
|
408
|
+
onCleanupEnd: () => M(e)
|
|
408
409
|
}
|
|
409
|
-
),
|
|
410
|
+
), T.set(e, o), o);
|
|
410
411
|
}
|
|
411
|
-
function
|
|
412
|
-
V.delete(
|
|
412
|
+
function M(e) {
|
|
413
|
+
V.delete(e), T.delete(e);
|
|
413
414
|
}
|
|
414
415
|
function F() {
|
|
415
|
-
const
|
|
416
|
-
return
|
|
416
|
+
const e = $(new Error().stack);
|
|
417
|
+
return e ? `auto_${e.file}_${e.line}_${e.column}` : Symbol(`ssgoi_auto_${Date.now()}`);
|
|
417
418
|
}
|
|
418
|
-
const
|
|
419
|
+
const O = globalThis.FinalizationRegistry, R = O ? new O((e) => {
|
|
419
420
|
try {
|
|
420
|
-
|
|
421
|
+
M(e);
|
|
421
422
|
} catch {
|
|
422
423
|
}
|
|
423
424
|
}) : void 0;
|
|
424
|
-
function
|
|
425
|
-
const t =
|
|
426
|
-
if (
|
|
425
|
+
function J(e) {
|
|
426
|
+
const t = e.key ?? F();
|
|
427
|
+
if (e.ref && R)
|
|
427
428
|
try {
|
|
428
|
-
R.register(
|
|
429
|
+
R.register(e.ref, t);
|
|
429
430
|
} catch {
|
|
430
431
|
}
|
|
431
|
-
return
|
|
432
|
+
return k(
|
|
432
433
|
t,
|
|
433
434
|
{
|
|
434
|
-
in:
|
|
435
|
-
out:
|
|
435
|
+
in: e.in,
|
|
436
|
+
out: e.out
|
|
436
437
|
},
|
|
437
|
-
|
|
438
|
+
e[j]
|
|
438
439
|
);
|
|
439
440
|
}
|
|
440
|
-
const K = (
|
|
441
|
-
let t =
|
|
441
|
+
const K = (e) => {
|
|
442
|
+
let t = e.parentElement;
|
|
442
443
|
for (; t && t !== document.body; ) {
|
|
443
|
-
const n = window.getComputedStyle(t),
|
|
444
|
-
if (
|
|
444
|
+
const n = window.getComputedStyle(t), o = n.overflow + n.overflowY + n.overflowX;
|
|
445
|
+
if (o.includes("auto") || o.includes("scroll") || t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth)
|
|
445
446
|
return t;
|
|
446
447
|
t = t.parentElement;
|
|
447
448
|
}
|
|
448
449
|
return document.documentElement;
|
|
449
|
-
}, W = (
|
|
450
|
-
let t =
|
|
450
|
+
}, W = (e) => {
|
|
451
|
+
let t = e.parentElement;
|
|
451
452
|
for (; t && t !== document.body; ) {
|
|
452
453
|
const n = window.getComputedStyle(t).position;
|
|
453
454
|
if (n === "relative" || n === "absolute" || n === "fixed" || n === "sticky")
|
|
@@ -456,133 +457,158 @@ const K = (o) => {
|
|
|
456
457
|
}
|
|
457
458
|
return document.body;
|
|
458
459
|
};
|
|
459
|
-
function
|
|
460
|
-
const t =
|
|
460
|
+
function X(e) {
|
|
461
|
+
const t = e.filter((n) => n.symmetric).map((n) => ({
|
|
461
462
|
from: n.to,
|
|
462
463
|
to: n.from,
|
|
463
464
|
transition: n.transition
|
|
464
465
|
}));
|
|
465
|
-
return [...
|
|
466
|
+
return [...e, ...t];
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
-
let
|
|
468
|
+
function Y(e) {
|
|
469
|
+
let t = !1, n = !1;
|
|
470
|
+
const o = (a) => {
|
|
471
|
+
if (!e) return;
|
|
472
|
+
const m = a.touches[0];
|
|
473
|
+
m && (n = m.clientX < 50);
|
|
474
|
+
}, s = () => {
|
|
475
|
+
e && (n && (t = !0, setTimeout(() => {
|
|
476
|
+
t = !1;
|
|
477
|
+
}, 500)), n = !1);
|
|
478
|
+
};
|
|
479
|
+
return {
|
|
480
|
+
initialize: () => {
|
|
481
|
+
typeof window > "u" || e && (window.addEventListener("touchstart", o, { passive: !0 }), window.addEventListener("touchend", s, { passive: !0 }));
|
|
482
|
+
},
|
|
483
|
+
cleanup: () => {
|
|
484
|
+
typeof window > "u" || (window.removeEventListener("touchstart", o), window.removeEventListener("touchend", s));
|
|
485
|
+
},
|
|
486
|
+
isSwipePending: () => t
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function G() {
|
|
490
|
+
let e = null, t = null;
|
|
469
491
|
const n = /* @__PURE__ */ new Map();
|
|
470
|
-
let
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
x:
|
|
474
|
-
y:
|
|
492
|
+
let o = null;
|
|
493
|
+
const s = () => {
|
|
494
|
+
e && o && n.set(o, {
|
|
495
|
+
x: e.scrollLeft,
|
|
496
|
+
y: e.scrollTop
|
|
475
497
|
});
|
|
476
498
|
};
|
|
477
499
|
return {
|
|
478
|
-
initializeContext: (
|
|
479
|
-
t =
|
|
500
|
+
initializeContext: (l, r) => {
|
|
501
|
+
t = l, e || (e = K(l), (e === document.documentElement ? window : e).addEventListener("scroll", s, {
|
|
480
502
|
passive: !0
|
|
481
|
-
})),
|
|
503
|
+
})), o = r;
|
|
482
504
|
},
|
|
483
|
-
calculateScrollOffset: (
|
|
484
|
-
const
|
|
505
|
+
calculateScrollOffset: (l, r) => {
|
|
506
|
+
const f = l && n.has(l) ? n.get(l) : { x: 0, y: 0 }, g = r && n.has(r) ? n.get(r) : { x: 0, y: 0 };
|
|
485
507
|
return {
|
|
486
|
-
x: -
|
|
487
|
-
y: -
|
|
508
|
+
x: -g.x + f.x,
|
|
509
|
+
y: -g.y + f.y
|
|
488
510
|
};
|
|
489
511
|
},
|
|
490
|
-
getScrollContainer: () =>
|
|
512
|
+
getScrollContainer: () => e,
|
|
491
513
|
getPositionedParentElement: () => t ? W(t) : document.body,
|
|
492
|
-
getScrollPosition: (
|
|
514
|
+
getScrollPosition: (l) => l && n.has(l) ? n.get(l) : { x: 0, y: 0 }
|
|
493
515
|
};
|
|
494
516
|
}
|
|
495
|
-
function
|
|
517
|
+
function Q(e) {
|
|
496
518
|
const {
|
|
497
519
|
transitions: t = [],
|
|
498
520
|
defaultTransition: n,
|
|
499
|
-
middleware:
|
|
521
|
+
middleware: o = (p, h) => ({ from: p, to: h }),
|
|
500
522
|
// Identity function as default
|
|
501
|
-
|
|
523
|
+
skipOnIosSwipe: s = !0
|
|
524
|
+
// Default to true - skip animations on iOS swipe
|
|
525
|
+
} = e;
|
|
502
526
|
let i = null;
|
|
503
|
-
const
|
|
504
|
-
initializeContext:
|
|
505
|
-
calculateScrollOffset:
|
|
506
|
-
getScrollContainer:
|
|
507
|
-
getPositionedParentElement:
|
|
508
|
-
getScrollPosition:
|
|
509
|
-
} =
|
|
510
|
-
|
|
527
|
+
const u = X(t), {
|
|
528
|
+
initializeContext: d,
|
|
529
|
+
calculateScrollOffset: a,
|
|
530
|
+
getScrollContainer: m,
|
|
531
|
+
getPositionedParentElement: l,
|
|
532
|
+
getScrollPosition: r
|
|
533
|
+
} = G(), f = Y(s);
|
|
534
|
+
f.initialize();
|
|
535
|
+
function g() {
|
|
511
536
|
if (i != null && i.from && (i != null && i.to)) {
|
|
512
|
-
const { from:
|
|
537
|
+
const { from: p, to: h } = o(
|
|
513
538
|
i.from,
|
|
514
539
|
i.to
|
|
515
|
-
),
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
) || n,
|
|
540
|
+
), w = H(
|
|
541
|
+
p,
|
|
542
|
+
h,
|
|
543
|
+
u
|
|
544
|
+
) || n, b = a(
|
|
520
545
|
i.from,
|
|
521
546
|
i.to
|
|
522
|
-
),
|
|
523
|
-
scrollOffset:
|
|
524
|
-
scroll:
|
|
547
|
+
), C = {
|
|
548
|
+
scrollOffset: b,
|
|
549
|
+
scroll: r(i.from),
|
|
525
550
|
get scrollingElement() {
|
|
526
|
-
return
|
|
551
|
+
return m() || document.documentElement;
|
|
527
552
|
},
|
|
528
553
|
get positionedParent() {
|
|
529
|
-
return
|
|
554
|
+
return l();
|
|
530
555
|
}
|
|
531
|
-
},
|
|
532
|
-
scrollOffset:
|
|
556
|
+
}, U = {
|
|
557
|
+
scrollOffset: b,
|
|
533
558
|
get scroll() {
|
|
534
|
-
return i ?
|
|
559
|
+
return i ? r(i.to) : { x: 0, y: 0 };
|
|
535
560
|
},
|
|
536
561
|
get scrollingElement() {
|
|
537
|
-
return
|
|
562
|
+
return m() || document.documentElement;
|
|
538
563
|
},
|
|
539
564
|
get positionedParent() {
|
|
540
|
-
return
|
|
565
|
+
return l();
|
|
541
566
|
}
|
|
542
567
|
};
|
|
543
|
-
|
|
544
|
-
(
|
|
545
|
-
),
|
|
546
|
-
(
|
|
568
|
+
w && (w.out && i.outResolve && i.outResolve(
|
|
569
|
+
(P) => w.out(P, C)
|
|
570
|
+
), w.in && i.inResolve && i.inResolve(
|
|
571
|
+
(P) => w.in(P, U)
|
|
547
572
|
)), i = null;
|
|
548
573
|
}
|
|
549
574
|
}
|
|
550
|
-
const
|
|
551
|
-
i.outResolve = y,
|
|
552
|
-
})) : (i.to =
|
|
553
|
-
i.inResolve = y,
|
|
575
|
+
const c = async (p, h) => f.isSwipePending() ? () => ({}) : h === "in" && (!i || !i.from) ? () => ({}) : (i || (i = {}), h === "out" ? (i.from = p, new Promise((y) => {
|
|
576
|
+
i.outResolve = y, g();
|
|
577
|
+
})) : (i.to = p, new Promise((y) => {
|
|
578
|
+
i.inResolve = y, g();
|
|
554
579
|
})));
|
|
555
|
-
return (
|
|
556
|
-
key:
|
|
557
|
-
in: async (
|
|
558
|
-
out: async (
|
|
580
|
+
return (p) => ({
|
|
581
|
+
key: p,
|
|
582
|
+
in: async (h) => (d(h, p), (await c(p, "in"))(h)),
|
|
583
|
+
out: async (h) => (await c(p, "out"))(h),
|
|
559
584
|
// Add page transition strategy for page-level transitions
|
|
560
|
-
[
|
|
585
|
+
[j]: z
|
|
561
586
|
});
|
|
562
587
|
}
|
|
563
|
-
function
|
|
564
|
-
for (const
|
|
565
|
-
if (E(
|
|
566
|
-
return
|
|
567
|
-
for (const
|
|
568
|
-
if ((
|
|
569
|
-
return
|
|
588
|
+
function H(e, t, n) {
|
|
589
|
+
for (const o of n)
|
|
590
|
+
if (E(e, o.from) && E(t, o.to))
|
|
591
|
+
return o.transition;
|
|
592
|
+
for (const o of n)
|
|
593
|
+
if ((o.from === "*" || E(e, o.from)) && (o.to === "*" || E(t, o.to)))
|
|
594
|
+
return o.transition;
|
|
570
595
|
return null;
|
|
571
596
|
}
|
|
572
|
-
function E(
|
|
597
|
+
function E(e, t) {
|
|
573
598
|
if (t === "*")
|
|
574
599
|
return !0;
|
|
575
600
|
if (t.endsWith("/*")) {
|
|
576
601
|
const n = t.slice(0, -2);
|
|
577
|
-
return
|
|
602
|
+
return e === n || e.startsWith(n + "/");
|
|
578
603
|
}
|
|
579
|
-
return
|
|
604
|
+
return e === t;
|
|
580
605
|
}
|
|
581
606
|
export {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
607
|
+
j as TRANSITION_STRATEGY,
|
|
608
|
+
D as createDefaultStrategy,
|
|
609
|
+
z as createPageTransitionStrategy,
|
|
610
|
+
Q as createSggoiTransitionContext,
|
|
586
611
|
F as generateAutoKey,
|
|
587
|
-
|
|
612
|
+
nt as jaeminInternal,
|
|
613
|
+
J as transition
|
|
588
614
|
};
|