@ssgoi/core 3.2.1 → 3.3.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/README.md +10 -9
- package/dist/index.cjs +1 -2
- package/dist/index.js +155 -176
- package/dist/transition/create-transition-callback.d.ts.map +1 -1
- package/dist/transition/transition.d.ts +20 -13
- package/dist/transition/transition.d.ts.map +1 -1
- package/dist/transitions/blur.d.ts +2 -18
- package/dist/transitions/blur.d.ts.map +1 -1
- package/dist/transitions/bounce.d.ts +2 -18
- package/dist/transitions/bounce.d.ts.map +1 -1
- package/dist/transitions/fade.d.ts +2 -18
- package/dist/transitions/fade.d.ts.map +1 -1
- package/dist/transitions/fly.d.ts +2 -18
- package/dist/transitions/fly.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.js +188 -172
- package/dist/transitions/mask.d.ts +2 -18
- package/dist/transitions/mask.d.ts.map +1 -1
- package/dist/transitions/none.d.ts +2 -18
- package/dist/transitions/none.d.ts.map +1 -1
- package/dist/transitions/rotate.d.ts +2 -18
- package/dist/transitions/rotate.d.ts.map +1 -1
- package/dist/transitions/scale.d.ts +2 -18
- package/dist/transitions/scale.d.ts.map +1 -1
- package/dist/transitions/slide.d.ts +2 -18
- package/dist/transitions/slide.d.ts.map +1 -1
- package/dist/types.d.ts +12 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- 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 +129 -99
- package/dist/view-transitions/rotate.d.ts +3 -0
- package/dist/view-transitions/rotate.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/utils/parse-caller-location.d.ts +0 -6
- package/dist/utils/parse-caller-location.d.ts.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { p as x, g as b } from "../jaemin-BWkrXq0V.js";
|
|
2
|
-
import { a as
|
|
3
|
-
const
|
|
2
|
+
import { a as Ht } from "../jaemin-BWkrXq0V.js";
|
|
3
|
+
const F = (t) => new Promise((n) => setTimeout(n, t));
|
|
4
4
|
function T() {
|
|
5
5
|
let t, n;
|
|
6
6
|
return { promise: new Promise((d, r) => {
|
|
7
7
|
t = d, n = r;
|
|
8
8
|
}), resolve: t, reject: n };
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const N = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, q = 300, j = 10, K = "horizontal", Z = "#000000", It = (t = {}) => {
|
|
11
11
|
const {
|
|
12
|
-
inSpring: n =
|
|
13
|
-
outSpring: s =
|
|
12
|
+
inSpring: n = G,
|
|
13
|
+
outSpring: s = N,
|
|
14
14
|
transitionDelay: d = q,
|
|
15
|
-
blindCount: r =
|
|
16
|
-
direction: a =
|
|
17
|
-
blindColor: l =
|
|
15
|
+
blindCount: r = j,
|
|
16
|
+
direction: a = K,
|
|
17
|
+
blindColor: l = Z
|
|
18
18
|
} = t;
|
|
19
19
|
let i, c = null;
|
|
20
20
|
const o = (e, p, y = "left") => {
|
|
@@ -126,7 +126,7 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
126
126
|
onStart: () => {
|
|
127
127
|
},
|
|
128
128
|
wait: async () => {
|
|
129
|
-
i && await i, await
|
|
129
|
+
i && await i, await F(d);
|
|
130
130
|
},
|
|
131
131
|
onEnd: () => {
|
|
132
132
|
e && e.container && e.container.remove();
|
|
@@ -134,15 +134,15 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
},
|
|
137
|
+
}, J = {
|
|
138
138
|
stiffness: 150,
|
|
139
139
|
damping: 20
|
|
140
|
-
},
|
|
140
|
+
}, Q = {
|
|
141
141
|
stiffness: 100,
|
|
142
142
|
damping: 20
|
|
143
|
-
},
|
|
143
|
+
}, Ot = (t = {}) => {
|
|
144
144
|
var a, l;
|
|
145
|
-
const { opacity: n = !1, direction: s = "enter" } = t, d = s === "enter" ?
|
|
145
|
+
const { opacity: n = !1, direction: s = "enter" } = t, d = s === "enter" ? J : Q, r = {
|
|
146
146
|
stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? d.stiffness,
|
|
147
147
|
damping: ((l = t.spring) == null ? void 0 : l.damping) ?? d.damping
|
|
148
148
|
};
|
|
@@ -203,11 +203,11 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
203
203
|
}
|
|
204
204
|
})
|
|
205
205
|
};
|
|
206
|
-
},
|
|
206
|
+
}, R = { stiffness: 120, damping: 15 }, tt = { stiffness: 100, damping: 20 }, nt = 0, Dt = (t = {}) => {
|
|
207
207
|
const {
|
|
208
|
-
inSpring: n =
|
|
209
|
-
outSpring: s =
|
|
210
|
-
transitionDelay: d =
|
|
208
|
+
inSpring: n = tt,
|
|
209
|
+
outSpring: s = R,
|
|
210
|
+
transitionDelay: d = nt
|
|
211
211
|
} = t;
|
|
212
212
|
let { promise: r, resolve: a } = T();
|
|
213
213
|
return {
|
|
@@ -220,7 +220,7 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
220
220
|
if (r) {
|
|
221
221
|
await r;
|
|
222
222
|
const i = T();
|
|
223
|
-
r = i.promise, a = i.resolve, await
|
|
223
|
+
r = i.promise, a = i.resolve, await F(d);
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
css: (i) => ({
|
|
@@ -243,7 +243,7 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
243
243
|
}
|
|
244
244
|
})
|
|
245
245
|
};
|
|
246
|
-
},
|
|
246
|
+
}, et = {
|
|
247
247
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
248
248
|
// Soft start for cinematic scale
|
|
249
249
|
translate: { stiffness: 15, damping: 7 },
|
|
@@ -257,12 +257,12 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
257
257
|
// Start when scaleDown is 25% complete
|
|
258
258
|
scaleUp: 0.8
|
|
259
259
|
// Start when translate is 70% complete
|
|
260
|
-
},
|
|
260
|
+
}, it = 0.8, st = "white", Pt = (t) => {
|
|
261
261
|
var r;
|
|
262
|
-
const n =
|
|
262
|
+
const n = et, s = it, d = ((r = t == null ? void 0 : t.border) == null ? void 0 : r.color) ?? st;
|
|
263
263
|
return {
|
|
264
264
|
out: async (a, l) => {
|
|
265
|
-
const i = k(l), c = b(document.body, l.positionedParent), o =
|
|
265
|
+
const i = k(l), c = b(document.body, l.positionedParent), o = rt(d, {
|
|
266
266
|
...i,
|
|
267
267
|
top: c.top
|
|
268
268
|
}), e = {
|
|
@@ -271,7 +271,7 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
271
271
|
}, p = () => {
|
|
272
272
|
a.style.transform = `translateY(${e.translateY}px) scale(${e.scale})`;
|
|
273
273
|
const y = (i.width - i.width * e.scale) / 2, h = (i.height - i.height * e.scale) / 2;
|
|
274
|
-
|
|
274
|
+
at(o, y, h);
|
|
275
275
|
};
|
|
276
276
|
return {
|
|
277
277
|
springs: [
|
|
@@ -305,7 +305,7 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
305
305
|
],
|
|
306
306
|
schedule: "stagger",
|
|
307
307
|
prepare: () => {
|
|
308
|
-
x(a), S(a, i), _(a, i),
|
|
308
|
+
x(a), S(a, i), _(a, i), lt(a, i);
|
|
309
309
|
for (const y of o)
|
|
310
310
|
l.positionedParent.appendChild(y);
|
|
311
311
|
},
|
|
@@ -362,11 +362,11 @@ const H = { stiffness: 80, damping: 25 }, N = { stiffness: 75, damping: 25 }, q
|
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
364
|
};
|
|
365
|
-
function
|
|
365
|
+
function at(t, n, s) {
|
|
366
366
|
const d = n * 0.7, r = s * 0.7;
|
|
367
367
|
t.topLeft.style.transform = `translate(${d}px, ${r}px)`, t.topRight.style.transform = `translate(${-d}px, ${r}px)`, t.bottomLeft.style.transform = `translate(${d}px, ${-r}px)`, t.bottomRight.style.transform = `translate(${-d}px, ${-r}px)`;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function rt(t = "white", n) {
|
|
370
370
|
const r = document.createElement("div");
|
|
371
371
|
r.style.position = "fixed", r.style.pointerEvents = "none", r.style.zIndex = "9999", r.style.top = `${n.top - 1}px`, r.style.left = `${n.left - 1}px`, r.style.width = "15px", r.style.height = "15px";
|
|
372
372
|
const a = document.createElement("div");
|
|
@@ -421,13 +421,13 @@ function _(t, n) {
|
|
|
421
421
|
${n.left}px ${n.top + n.height}px
|
|
422
422
|
)`;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function lt(t, n) {
|
|
425
425
|
t.style.transform = `translateY(${-n.top}px)`;
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function ot(t, n) {
|
|
428
428
|
return t.querySelector(`[data-hero-key="${n}"]`);
|
|
429
429
|
}
|
|
430
|
-
const
|
|
430
|
+
const vt = (t = {}) => {
|
|
431
431
|
var l, i;
|
|
432
432
|
const n = {
|
|
433
433
|
stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? 300,
|
|
@@ -458,20 +458,20 @@ const Pt = (t = {}) => {
|
|
|
458
458
|
const h = p.map((g) => {
|
|
459
459
|
const u = g.getAttribute("data-hero-key");
|
|
460
460
|
if (!u) return null;
|
|
461
|
-
const m =
|
|
461
|
+
const m = ot(r, u);
|
|
462
462
|
if (!m) return null;
|
|
463
|
-
const f = g, w = b(r, m), $ = b(e, f),
|
|
463
|
+
const f = g, w = b(r, m), $ = b(e, f), Y = w.left - $.left - o.scrollOffset.x, U = w.top - $.top - o.scrollOffset.y, V = w.width / $.width, W = w.height / $.height, z = f.style.transform, X = f.style.position, M = f.style.transformOrigin, B = f.style.zIndex, H = f.style.willChange;
|
|
464
464
|
return {
|
|
465
465
|
toEl: f,
|
|
466
|
-
dx:
|
|
467
|
-
dy:
|
|
468
|
-
dw:
|
|
469
|
-
dh:
|
|
470
|
-
originalTransform:
|
|
471
|
-
originalPosition:
|
|
472
|
-
originalTransformOrigin:
|
|
473
|
-
originalZIndex:
|
|
474
|
-
originalWillChange:
|
|
466
|
+
dx: Y,
|
|
467
|
+
dy: U,
|
|
468
|
+
dw: V,
|
|
469
|
+
dh: W,
|
|
470
|
+
originalTransform: z,
|
|
471
|
+
originalPosition: X,
|
|
472
|
+
originalTransformOrigin: M,
|
|
473
|
+
originalZIndex: B,
|
|
474
|
+
originalWillChange: H
|
|
475
475
|
};
|
|
476
476
|
}).filter(
|
|
477
477
|
(g) => g !== null && Math.abs(g.dy) <= d
|
|
@@ -523,7 +523,7 @@ const Pt = (t = {}) => {
|
|
|
523
523
|
})
|
|
524
524
|
};
|
|
525
525
|
};
|
|
526
|
-
function
|
|
526
|
+
function ct({
|
|
527
527
|
detailRect: t,
|
|
528
528
|
galleryRect: n,
|
|
529
529
|
pageRect: s,
|
|
@@ -541,7 +541,7 @@ function ot({
|
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function dt({
|
|
545
545
|
detailRect: t,
|
|
546
546
|
galleryRect: n,
|
|
547
547
|
pageRect: s,
|
|
@@ -559,7 +559,7 @@ function ct({
|
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function ht(t, n, s) {
|
|
563
563
|
const d = t.querySelector(
|
|
564
564
|
"[data-instagram-detail-key]"
|
|
565
565
|
), r = n.querySelector(
|
|
@@ -587,7 +587,7 @@ function dt(t, n, s) {
|
|
|
587
587
|
return null;
|
|
588
588
|
const c = b(i ? t : n, a), o = b(i ? n : t, l);
|
|
589
589
|
if (i) {
|
|
590
|
-
const e =
|
|
590
|
+
const e = ct({
|
|
591
591
|
detailRect: o,
|
|
592
592
|
galleryRect: c,
|
|
593
593
|
pageRect: n.getBoundingClientRect(),
|
|
@@ -599,7 +599,7 @@ function dt(t, n, s) {
|
|
|
599
599
|
// No outAnimation - gallery stays visible
|
|
600
600
|
};
|
|
601
601
|
} else {
|
|
602
|
-
const e =
|
|
602
|
+
const e = dt({
|
|
603
603
|
detailRect: o,
|
|
604
604
|
galleryRect: c,
|
|
605
605
|
pageRect: t.getBoundingClientRect(),
|
|
@@ -612,7 +612,7 @@ function dt(t, n, s) {
|
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
const
|
|
615
|
+
const Ft = (t = {}) => {
|
|
616
616
|
var i, c;
|
|
617
617
|
const n = {
|
|
618
618
|
stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 150,
|
|
@@ -629,7 +629,7 @@ const vt = (t = {}) => {
|
|
|
629
629
|
}) || !d ? (l == null || l(), l = null, d = null, {
|
|
630
630
|
spring: n,
|
|
631
631
|
css: () => ({})
|
|
632
|
-
}) : (a =
|
|
632
|
+
}) : (a = ht(d, p, e), l == null || l(), l = null, a ? (d = null, {
|
|
633
633
|
spring: n,
|
|
634
634
|
css: (h) => a != null && a.inAnimation ? a.inAnimation(h) : {}
|
|
635
635
|
}) : (d = null, {
|
|
@@ -654,7 +654,7 @@ const vt = (t = {}) => {
|
|
|
654
654
|
}
|
|
655
655
|
};
|
|
656
656
|
};
|
|
657
|
-
function
|
|
657
|
+
function pt({
|
|
658
658
|
detailRect: t,
|
|
659
659
|
galleryRect: n,
|
|
660
660
|
pageRect: s,
|
|
@@ -672,7 +672,7 @@ function ht({
|
|
|
672
672
|
}
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function yt({
|
|
676
676
|
galleryRect: t,
|
|
677
677
|
detailRect: n,
|
|
678
678
|
scrollOffset: s
|
|
@@ -689,7 +689,7 @@ function pt({
|
|
|
689
689
|
}
|
|
690
690
|
};
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function gt({
|
|
693
693
|
galleryRect: t,
|
|
694
694
|
detailRect: n,
|
|
695
695
|
scrollOffset: s
|
|
@@ -706,7 +706,7 @@ function yt({
|
|
|
706
706
|
}
|
|
707
707
|
};
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function ut({
|
|
710
710
|
detailRect: t,
|
|
711
711
|
galleryRect: n,
|
|
712
712
|
pageRect: s,
|
|
@@ -724,7 +724,7 @@ function gt({
|
|
|
724
724
|
}
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function ft(t, n, s) {
|
|
728
728
|
const d = t.querySelector(
|
|
729
729
|
"[data-pinterest-detail-key]"
|
|
730
730
|
), r = n.querySelector(
|
|
@@ -752,12 +752,12 @@ function ut(t, n, s) {
|
|
|
752
752
|
return null;
|
|
753
753
|
const c = b(i ? t : n, a), o = b(i ? n : t, l);
|
|
754
754
|
if (i) {
|
|
755
|
-
const e =
|
|
755
|
+
const e = pt({
|
|
756
756
|
detailRect: o,
|
|
757
757
|
galleryRect: c,
|
|
758
758
|
pageRect: n.getBoundingClientRect(),
|
|
759
759
|
scrollOffset: s
|
|
760
|
-
}), p =
|
|
760
|
+
}), p = yt({
|
|
761
761
|
galleryRect: c,
|
|
762
762
|
detailRect: o,
|
|
763
763
|
scrollOffset: s
|
|
@@ -767,11 +767,11 @@ function ut(t, n, s) {
|
|
|
767
767
|
outAnimation: p.animate
|
|
768
768
|
};
|
|
769
769
|
} else {
|
|
770
|
-
const e =
|
|
770
|
+
const e = gt({
|
|
771
771
|
galleryRect: c,
|
|
772
772
|
detailRect: o,
|
|
773
773
|
scrollOffset: s
|
|
774
|
-
}), p =
|
|
774
|
+
}), p = ut({
|
|
775
775
|
detailRect: o,
|
|
776
776
|
galleryRect: c,
|
|
777
777
|
pageRect: t.getBoundingClientRect(),
|
|
@@ -783,7 +783,7 @@ function ut(t, n, s) {
|
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
const
|
|
786
|
+
const Yt = (t = {}) => {
|
|
787
787
|
var i, c;
|
|
788
788
|
const n = {
|
|
789
789
|
stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 30,
|
|
@@ -800,7 +800,7 @@ const Ft = (t = {}) => {
|
|
|
800
800
|
}) || !d ? (l == null || l(), l = null, d = null, {
|
|
801
801
|
spring: n,
|
|
802
802
|
css: () => ({})
|
|
803
|
-
}) : (a =
|
|
803
|
+
}) : (a = ft(d, p, e), l == null || l(), l = null, a ? (d = null, {
|
|
804
804
|
spring: n,
|
|
805
805
|
css: (h) => a ? a.inAnimation(h) : {}
|
|
806
806
|
}) : (d = null, {
|
|
@@ -824,14 +824,43 @@ const Ft = (t = {}) => {
|
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
|
-
}, I = {
|
|
827
|
+
}, I = { stiffness: 100, damping: 30 }, Ut = () => ({
|
|
828
|
+
in: (t) => ({
|
|
829
|
+
spring: I,
|
|
830
|
+
prepare: () => {
|
|
831
|
+
t.style.opacity = "0", t.style.transform = "rotate(-180deg)", t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
|
|
832
|
+
},
|
|
833
|
+
css: (n) => ({
|
|
834
|
+
// -180deg → 0deg, show after 90deg (progress > 0.5)
|
|
835
|
+
transform: `rotate(${(n - 1) * 180}deg)`,
|
|
836
|
+
opacity: n > 0.5 ? 1 : 0
|
|
837
|
+
}),
|
|
838
|
+
onEnd: () => {
|
|
839
|
+
t.style.willChange = "auto", t.style.transform = "", t.style.transformOrigin = "", t.style.opacity = "";
|
|
840
|
+
}
|
|
841
|
+
}),
|
|
842
|
+
out: (t, n) => ({
|
|
843
|
+
spring: I,
|
|
844
|
+
prepare: () => {
|
|
845
|
+
x(t, n), t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
|
|
846
|
+
},
|
|
847
|
+
css: (s) => ({
|
|
848
|
+
// 0deg → 180deg, hide after 90deg (progress < 0.5)
|
|
849
|
+
transform: `rotate(${(1 - s) * 180}deg)`,
|
|
850
|
+
opacity: s > 0.5 ? 1 : 0
|
|
851
|
+
}),
|
|
852
|
+
onEnd: () => {
|
|
853
|
+
t.style.willChange = "auto";
|
|
854
|
+
}
|
|
855
|
+
})
|
|
856
|
+
}), O = {
|
|
828
857
|
stiffness: 5,
|
|
829
858
|
damping: 4
|
|
830
|
-
},
|
|
859
|
+
}, Vt = (t = {}) => {
|
|
831
860
|
var c, o;
|
|
832
861
|
const n = t.direction ?? "up", s = {
|
|
833
|
-
stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ??
|
|
834
|
-
damping: ((o = t.spring) == null ? void 0 : o.damping) ??
|
|
862
|
+
stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? O.stiffness,
|
|
863
|
+
damping: ((o = t.spring) == null ? void 0 : o.damping) ?? O.damping
|
|
835
864
|
}, d = n === "up";
|
|
836
865
|
let r = null, a = null, l = null;
|
|
837
866
|
const i = () => {
|
|
@@ -870,14 +899,14 @@ const Ft = (t = {}) => {
|
|
|
870
899
|
}
|
|
871
900
|
})
|
|
872
901
|
};
|
|
873
|
-
},
|
|
902
|
+
}, D = {
|
|
874
903
|
stiffness: 15,
|
|
875
904
|
damping: 7
|
|
876
|
-
},
|
|
905
|
+
}, Wt = (t = {}) => {
|
|
877
906
|
var r, a;
|
|
878
907
|
const n = t.direction ?? "left", s = {
|
|
879
|
-
stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ??
|
|
880
|
-
damping: ((a = t.spring) == null ? void 0 : a.damping) ??
|
|
908
|
+
stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? D.stiffness,
|
|
909
|
+
damping: ((a = t.spring) == null ? void 0 : a.damping) ?? D.damping
|
|
881
910
|
}, d = n === "left";
|
|
882
911
|
return {
|
|
883
912
|
in: (l) => ({
|
|
@@ -902,11 +931,11 @@ const Ft = (t = {}) => {
|
|
|
902
931
|
}
|
|
903
932
|
})
|
|
904
933
|
};
|
|
905
|
-
},
|
|
934
|
+
}, P = { stiffness: 17, damping: 6 }, L = 20, C = 800, zt = () => {
|
|
906
935
|
let t, n = null;
|
|
907
936
|
return {
|
|
908
937
|
in: (s) => ({
|
|
909
|
-
spring:
|
|
938
|
+
spring: P,
|
|
910
939
|
prepare: () => {
|
|
911
940
|
s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transform = `perspective(${C}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`;
|
|
912
941
|
},
|
|
@@ -926,7 +955,7 @@ const Ft = (t = {}) => {
|
|
|
926
955
|
out: (s, d) => (t = new Promise((r) => {
|
|
927
956
|
n = r;
|
|
928
957
|
}), {
|
|
929
|
-
spring:
|
|
958
|
+
spring: P,
|
|
930
959
|
prepare: (r) => {
|
|
931
960
|
x(r, d), r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none", r.style.transform = `perspective(${C}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
932
961
|
},
|
|
@@ -941,7 +970,7 @@ const Ft = (t = {}) => {
|
|
|
941
970
|
}
|
|
942
971
|
})
|
|
943
972
|
};
|
|
944
|
-
},
|
|
973
|
+
}, $t = { stiffness: 1, damping: 1 }, mt = { stiffness: 20, damping: 25 }, wt = "#000000", xt = "circle", v = "CURTAIN_REVEAL_OVERLAY_ID", bt = {
|
|
945
974
|
position: "fixed",
|
|
946
975
|
inset: "0",
|
|
947
976
|
width: "100vw",
|
|
@@ -951,17 +980,17 @@ const Ft = (t = {}) => {
|
|
|
951
980
|
alignItems: "center",
|
|
952
981
|
justifyContent: "center",
|
|
953
982
|
overflow: "hidden"
|
|
954
|
-
},
|
|
983
|
+
}, Et = {
|
|
955
984
|
position: "relative",
|
|
956
985
|
display: "inline-block",
|
|
957
986
|
height: "5.5rem",
|
|
958
987
|
overflow: "hidden"
|
|
959
|
-
},
|
|
988
|
+
}, Ct = {
|
|
960
989
|
display: "flex",
|
|
961
990
|
height: "100%",
|
|
962
991
|
willChange: "transform",
|
|
963
992
|
transition: "transform 0.3s ease"
|
|
964
|
-
},
|
|
993
|
+
}, At = {
|
|
965
994
|
display: "inline-flex",
|
|
966
995
|
alignItems: "center",
|
|
967
996
|
justifyContent: "center",
|
|
@@ -970,8 +999,8 @@ const Ft = (t = {}) => {
|
|
|
970
999
|
fontWeight: "900",
|
|
971
1000
|
letterSpacing: "0.02em",
|
|
972
1001
|
color: "#FFFFFF"
|
|
973
|
-
},
|
|
974
|
-
function
|
|
1002
|
+
}, Lt = 0.4, A = 0.5, Tt = 0.2;
|
|
1003
|
+
function kt(t, n) {
|
|
975
1004
|
switch (t) {
|
|
976
1005
|
case "circle":
|
|
977
1006
|
return `circle(${n * 100}% at 50% 50%)`;
|
|
@@ -983,13 +1012,13 @@ function Tt(t, n) {
|
|
|
983
1012
|
}
|
|
984
1013
|
}
|
|
985
1014
|
}
|
|
986
|
-
const
|
|
1015
|
+
const St = (t) => t.reduce((n, s) => n + s, 0), Xt = (t = {}) => {
|
|
987
1016
|
const {
|
|
988
|
-
background: n =
|
|
1017
|
+
background: n = wt,
|
|
989
1018
|
texts: s = [],
|
|
990
|
-
shape: d =
|
|
991
|
-
inSpring: r =
|
|
992
|
-
outSpring: a =
|
|
1019
|
+
shape: d = xt,
|
|
1020
|
+
inSpring: r = mt,
|
|
1021
|
+
outSpring: a = $t,
|
|
993
1022
|
textStyle: l = {}
|
|
994
1023
|
} = t;
|
|
995
1024
|
return {
|
|
@@ -1003,7 +1032,7 @@ const kt = (t) => t.reduce((n, s) => n + s, 0), Wt = (t = {}) => {
|
|
|
1003
1032
|
x(e, c), e.style.opacity = "1";
|
|
1004
1033
|
},
|
|
1005
1034
|
tick: (e) => {
|
|
1006
|
-
const p = Math.max(0, e -
|
|
1035
|
+
const p = Math.max(0, e - Lt);
|
|
1007
1036
|
i.style.opacity = String(p);
|
|
1008
1037
|
},
|
|
1009
1038
|
onEnd: () => {
|
|
@@ -1014,13 +1043,13 @@ const kt = (t) => t.reduce((n, s) => n + s, 0), Wt = (t = {}) => {
|
|
|
1014
1043
|
in: (i) => {
|
|
1015
1044
|
let c = null, o = null, e = null;
|
|
1016
1045
|
const p = document.body.style.overflow, y = document.getElementById(
|
|
1017
|
-
|
|
1046
|
+
v
|
|
1018
1047
|
);
|
|
1019
1048
|
let h = [];
|
|
1020
1049
|
const g = () => {
|
|
1021
|
-
c = document.createElement("div"), c.id =
|
|
1050
|
+
c = document.createElement("div"), c.id = v, Object.assign(c.style, bt, { background: n }), document.body.appendChild(c), o = document.createElement("div"), Object.assign(o.style, Et), c.appendChild(o), e = document.createElement("div"), Object.assign(e.style, Ct), o.appendChild(e), s.forEach((u) => {
|
|
1022
1051
|
const m = document.createElement("div");
|
|
1023
|
-
m.textContent = u, Object.assign(m.style,
|
|
1052
|
+
m.textContent = u, Object.assign(m.style, At, l), e.appendChild(m);
|
|
1024
1053
|
}), h = Array.from(e.children).map(
|
|
1025
1054
|
(u) => u.getBoundingClientRect().width
|
|
1026
1055
|
);
|
|
@@ -1038,15 +1067,15 @@ const kt = (t) => t.reduce((n, s) => n + s, 0), Wt = (t = {}) => {
|
|
|
1038
1067
|
const m = u / A, f = Math.min(
|
|
1039
1068
|
Math.floor(m * s.length),
|
|
1040
1069
|
s.length - 1
|
|
1041
|
-
), w = h[f] ?? 0, $ =
|
|
1070
|
+
), w = h[f] ?? 0, $ = St(h.slice(0, f));
|
|
1042
1071
|
o.style.width = `${w}px`, e.style.transform = `translateX(-${$}px)`;
|
|
1043
1072
|
}
|
|
1044
1073
|
if (u > A) {
|
|
1045
1074
|
const f = 1 - Math.max(
|
|
1046
1075
|
0,
|
|
1047
|
-
Math.min(1, (u - A) /
|
|
1076
|
+
Math.min(1, (u - A) / Tt)
|
|
1048
1077
|
);
|
|
1049
|
-
c.style.clipPath =
|
|
1078
|
+
c.style.clipPath = kt(d, f), o.style.transform = `scale(${f})`;
|
|
1050
1079
|
}
|
|
1051
1080
|
}
|
|
1052
1081
|
},
|
|
@@ -1058,16 +1087,17 @@ const kt = (t) => t.reduce((n, s) => n + s, 0), Wt = (t = {}) => {
|
|
|
1058
1087
|
};
|
|
1059
1088
|
};
|
|
1060
1089
|
export {
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1090
|
+
It as blind,
|
|
1091
|
+
Xt as curtainReveal,
|
|
1092
|
+
Ot as drill,
|
|
1093
|
+
Dt as fade,
|
|
1094
|
+
Pt as film,
|
|
1095
|
+
vt as hero,
|
|
1096
|
+
Ft as instagram,
|
|
1097
|
+
Ht as jaemin,
|
|
1098
|
+
Yt as pinterest,
|
|
1099
|
+
Ut as rotate,
|
|
1100
|
+
Vt as scroll,
|
|
1101
|
+
Wt as slide,
|
|
1102
|
+
zt as strip
|
|
1073
1103
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/rotate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAK7D,eAAO,MAAM,MAAM,QAAO,eA2CzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-caller-location.d.ts","sourceRoot":"","sources":["../../src/lib/utils/parse-caller-location.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,MAAM,KACb;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IA+BnD,CAAC"}
|