@ssgoi/core 3.3.0 → 3.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.
Files changed (48) hide show
  1. package/dist/animator/spring-core.d.ts +23 -4
  2. package/dist/animator/spring-core.d.ts.map +1 -1
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +0 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +169 -127
  7. package/dist/transitions/blur.d.ts +2 -5
  8. package/dist/transitions/blur.d.ts.map +1 -1
  9. package/dist/transitions/bounce.d.ts +2 -5
  10. package/dist/transitions/bounce.d.ts.map +1 -1
  11. package/dist/transitions/fade.d.ts +2 -5
  12. package/dist/transitions/fade.d.ts.map +1 -1
  13. package/dist/transitions/fly.d.ts +2 -5
  14. package/dist/transitions/fly.d.ts.map +1 -1
  15. package/dist/transitions/index.cjs +1 -1
  16. package/dist/transitions/index.js +181 -172
  17. package/dist/transitions/mask.d.ts +2 -5
  18. package/dist/transitions/mask.d.ts.map +1 -1
  19. package/dist/transitions/none.d.ts +2 -5
  20. package/dist/transitions/none.d.ts.map +1 -1
  21. package/dist/transitions/rotate.d.ts +2 -5
  22. package/dist/transitions/rotate.d.ts.map +1 -1
  23. package/dist/transitions/scale.d.ts +2 -5
  24. package/dist/transitions/scale.d.ts.map +1 -1
  25. package/dist/transitions/slide.d.ts +2 -5
  26. package/dist/transitions/slide.d.ts.map +1 -1
  27. package/dist/types.d.ts +14 -0
  28. package/dist/types.d.ts.map +1 -1
  29. package/dist/view-transitions/depth.d.ts +19 -0
  30. package/dist/view-transitions/depth.d.ts.map +1 -0
  31. package/dist/view-transitions/drill.d.ts.map +1 -1
  32. package/dist/view-transitions/fade.d.ts.map +1 -1
  33. package/dist/view-transitions/index.cjs +15 -15
  34. package/dist/view-transitions/index.d.ts +5 -2
  35. package/dist/view-transitions/index.d.ts.map +1 -1
  36. package/dist/view-transitions/index.js +992 -599
  37. package/dist/view-transitions/instagram.d.ts.map +1 -1
  38. package/dist/view-transitions/jaemin.d.ts +0 -4
  39. package/dist/view-transitions/jaemin.d.ts.map +1 -1
  40. package/dist/view-transitions/pinterest.d.ts.map +1 -1
  41. package/dist/view-transitions/sheet.d.ts +19 -0
  42. package/dist/view-transitions/sheet.d.ts.map +1 -0
  43. package/dist/view-transitions/slide.d.ts.map +1 -1
  44. package/dist/view-transitions/swap.d.ts +13 -0
  45. package/dist/view-transitions/swap.d.ts.map +1 -0
  46. package/package.json +1 -1
  47. package/dist/jaemin-BG8HRXG1.cjs +0 -1
  48. package/dist/jaemin-BWkrXq0V.js +0 -131
package/dist/index.js CHANGED
@@ -1,10 +1,9 @@
1
- var Z = Object.defineProperty;
2
- var tt = (i, e, t) => e in i ? Z(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var m = (i, e, t) => tt(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { normalizeToMultiSpring as I, normalizeMultiSpringSchedule as _ } from "./types.js";
5
- import { isCssAnimation as Lt, isMultiSpring as Dt, isSingleSpring as zt, isTickAnimation as qt, validateAnimationMode as Ht, validateSpringItem as Nt } from "./types.js";
6
- import { j as Yt } from "./jaemin-BWkrXq0V.js";
7
- class et {
1
+ var nt = Object.defineProperty;
2
+ var it = (i, e, t) => e in i ? nt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var m = (i, e, t) => it(i, typeof e != "symbol" ? e + "" : e, t);
4
+ import { normalizeToMultiSpring as P, normalizeMultiSpringSchedule as Y } from "./types.js";
5
+ import { isCssAnimation as zt, isMultiSpring as Dt, isSingleSpring as _t, isTickAnimation as qt, validateAnimationMode as Ht, validateSpringItem as Nt } from "./types.js";
6
+ class ot {
8
7
  constructor() {
9
8
  m(this, "listeners", /* @__PURE__ */ new Set());
10
9
  m(this, "rafId", null);
@@ -68,24 +67,69 @@ class et {
68
67
  return this.elapsed;
69
68
  }
70
69
  }
71
- const z = new et();
72
- function U(i) {
73
- const e = i.stiffness, t = i.damping, n = 1, r = Math.sqrt(e / n), s = t / (2 * Math.sqrt(e * n));
74
- return { omega: r, zeta: s };
70
+ const D = new ot();
71
+ function j(i) {
72
+ const e = i.stiffness, t = i.damping, n = 1, r = Math.sqrt(e / n), s = t / (2 * Math.sqrt(e * n)), a = { omega: r, zeta: s };
73
+ if (i.doubleSpring) {
74
+ const o = typeof i.doubleSpring == "number" ? i.doubleSpring : 1, c = e * o, u = Math.sqrt(c / n), f = t / (2 * Math.sqrt(c * n));
75
+ a.follower = { omega: u, zeta: f };
76
+ }
77
+ return a;
78
+ }
79
+ function _(i, e, t, n, r, s) {
80
+ const a = -2 * s * r * n * e, o = s * n * n * (t - i), c = e + a + o;
81
+ return { position: i + s * c, velocity: c };
75
82
  }
76
- function W(i, e, t, n) {
77
- const { omega: r, zeta: s } = t, { position: a, velocity: o } = i, c = Math.min(n, 0.033), u = -2 * c * s * r * o, f = c * r * r * (e - a), h = o + u + f;
83
+ function G(i, e, t, n) {
84
+ const r = Math.min(n, 0.033);
85
+ if (t.follower) {
86
+ const u = i._leader ?? {
87
+ position: i.position,
88
+ velocity: i.velocity
89
+ }, f = _(
90
+ u.position,
91
+ u.velocity,
92
+ e,
93
+ t.omega,
94
+ t.zeta,
95
+ r
96
+ ), h = _(
97
+ i.position,
98
+ i.velocity,
99
+ f.position,
100
+ t.follower.omega,
101
+ t.follower.zeta,
102
+ r
103
+ );
104
+ return {
105
+ position: h.position,
106
+ velocity: h.velocity,
107
+ _leader: f
108
+ };
109
+ }
110
+ const { omega: s, zeta: a } = t, o = _(
111
+ i.position,
112
+ i.velocity,
113
+ e,
114
+ s,
115
+ a,
116
+ r
117
+ );
78
118
  return {
79
- position: a + c * h,
80
- velocity: h
119
+ position: o.position,
120
+ velocity: o.velocity
81
121
  };
82
122
  }
83
- const nt = 0.01, it = 0.01, X = 0.05;
84
- function j(i, e) {
85
- const t = Math.abs(e - i.position), n = Math.abs(i.velocity);
86
- return t < nt && n < it;
123
+ const U = 0.01, W = 0.01, $ = 0.05;
124
+ function B(i, e) {
125
+ const t = Math.abs(e - i.position), n = Math.abs(i.velocity), r = t < U && n < W, s = i;
126
+ if (s._leader) {
127
+ const a = Math.abs(e - s._leader.position), o = Math.abs(s._leader.velocity);
128
+ return a < U && o < W && r;
129
+ }
130
+ return r;
87
131
  }
88
- function ot(i) {
132
+ function rt(i) {
89
133
  const {
90
134
  from: e,
91
135
  to: t,
@@ -96,11 +140,11 @@ function ot(i) {
96
140
  onStart: o
97
141
  } = i;
98
142
  let c = { position: e, velocity: r }, u = !0, f = 0, h = !1;
99
- const y = U(n), v = (l) => {
143
+ const y = j(n), v = (l) => {
100
144
  if (u) {
101
- if (h || (h = !0, o == null || o()), c = W(c, t, y, l), j(c, t)) {
102
- if (f += Math.min(l, 0.033), f >= X) {
103
- c = { position: t, velocity: 0 }, u = !1, s(c.position), z.unsubscribe(v), a();
145
+ if (h || (h = !0, o == null || o()), c = G(c, t, y, l), B(c, t)) {
146
+ if (f += Math.min(l, 0.033), f >= $) {
147
+ c = { position: t, velocity: 0 }, u = !1, s(c.position), D.unsubscribe(v), a();
104
148
  return;
105
149
  }
106
150
  } else
@@ -108,30 +152,30 @@ function ot(i) {
108
152
  s(c.position);
109
153
  }
110
154
  };
111
- return z.subscribe(v), {
155
+ return D.subscribe(v), {
112
156
  stop: () => {
113
- u && (u = !1, z.unsubscribe(v));
157
+ u && (u = !1, D.unsubscribe(v));
114
158
  },
115
159
  getPosition: () => c.position,
116
160
  getVelocity: () => c.velocity,
117
161
  isRunning: () => u
118
162
  };
119
163
  }
120
- const M = 1e3 / 60;
121
- function rt(i, e, t, n = 0) {
122
- const r = U(t), s = 600;
164
+ const I = 1e3 / 60;
165
+ function st(i, e, t, n = 0) {
166
+ const r = j(t), s = 600;
123
167
  let a = { position: i, velocity: n }, o = 0;
124
168
  const c = [];
125
169
  for (let u = 0; u < s; u++) {
126
- const f = u * M;
170
+ const f = u * I;
127
171
  if (c.push({
128
172
  time: f,
129
173
  position: a.position,
130
174
  velocity: a.velocity
131
- }), a = W(a, e, r, M / 1e3), j(a, e)) {
132
- if (o += M / 1e3, o >= X) {
175
+ }), a = G(a, e, r, I / 1e3), B(a, e)) {
176
+ if (o += I / 1e3, o >= $) {
133
177
  c.push({
134
- time: (u + 1) * M,
178
+ time: (u + 1) * I,
135
179
  position: e,
136
180
  velocity: 0
137
181
  });
@@ -142,7 +186,7 @@ function rt(i, e, t, n = 0) {
142
186
  }
143
187
  return c;
144
188
  }
145
- function Y(i, e) {
189
+ function X(i, e) {
146
190
  if (i.length === 0)
147
191
  return { position: 0, velocity: 0 };
148
192
  const t = i[0], n = i[i.length - 1];
@@ -161,10 +205,10 @@ function Y(i, e) {
161
205
  velocity: a.velocity + (o.velocity - a.velocity) * c
162
206
  };
163
207
  }
164
- function st(i, e) {
208
+ function ct(i, e) {
165
209
  return i.map((t) => e(t.position));
166
210
  }
167
- function ct(i) {
211
+ function at(i) {
168
212
  const {
169
213
  element: e,
170
214
  from: t,
@@ -174,7 +218,7 @@ function ct(i) {
174
218
  style: a,
175
219
  onComplete: o,
176
220
  onStart: c
177
- } = i, u = rt(t, n, r, s);
221
+ } = i, u = st(t, n, r, s);
178
222
  if (u.length === 0)
179
223
  return c == null || c(), o(), {
180
224
  stop: () => {
@@ -183,11 +227,10 @@ function ct(i) {
183
227
  getVelocity: () => 0,
184
228
  isRunning: () => !1
185
229
  };
186
- const f = st(u, a), h = u[u.length - 1], y = h.time, v = e.animate(f, {
230
+ const f = ct(u, a), h = u[u.length - 1], y = h.time, v = e.animate(f, {
187
231
  duration: y,
188
232
  fill: "forwards",
189
233
  easing: "linear"
190
- // Spring physics already applied in keyframes
191
234
  });
192
235
  let l = !0;
193
236
  const d = performance.now();
@@ -201,18 +244,18 @@ function ct(i) {
201
244
  if (!l)
202
245
  return h.position;
203
246
  const A = performance.now() - d;
204
- return Y(u, A).position;
247
+ return X(u, A).position;
205
248
  },
206
249
  getVelocity: () => {
207
250
  if (!l)
208
251
  return 0;
209
252
  const A = performance.now() - d;
210
- return Y(u, A).velocity;
253
+ return X(u, A).velocity;
211
254
  },
212
255
  isRunning: () => l
213
256
  };
214
257
  }
215
- function at(i) {
258
+ function lt(i) {
216
259
  const { from: e, to: t, spring: n, velocity: r, onComplete: s, onStart: a, tick: o, css: c } = i;
217
260
  if (o && c)
218
261
  throw new Error("Cannot use both 'tick' and 'css' options together");
@@ -222,7 +265,7 @@ function at(i) {
222
265
  getPosition: () => t,
223
266
  getVelocity: () => 0,
224
267
  isRunning: () => !1
225
- }) : c ? ct({
268
+ }) : c ? at({
226
269
  element: c.element,
227
270
  from: e,
228
271
  to: t,
@@ -231,7 +274,7 @@ function at(i) {
231
274
  style: c.style,
232
275
  onComplete: s,
233
276
  onStart: a
234
- }) : ot({
277
+ }) : rt({
235
278
  from: e,
236
279
  to: t,
237
280
  spring: n,
@@ -241,9 +284,9 @@ function at(i) {
241
284
  onStart: a
242
285
  });
243
286
  }
244
- class G {
287
+ class K {
245
288
  }
246
- class F extends G {
289
+ class F extends K {
247
290
  constructor(t) {
248
291
  super();
249
292
  m(this, "options");
@@ -265,7 +308,7 @@ class F extends G {
265
308
  }, this.currentValue = this.options.from;
266
309
  }
267
310
  runAnimation(t) {
268
- this.isAnimating = !0, this.controls = at({
311
+ this.isAnimating = !0, this.controls = lt({
269
312
  from: this.currentValue,
270
313
  to: t,
271
314
  spring: this.options.spring,
@@ -324,7 +367,7 @@ class F extends G {
324
367
  return r.setValue(t.position), r.setVelocity(t.velocity), r;
325
368
  }
326
369
  }
327
- class L extends G {
370
+ class L extends K {
328
371
  constructor(t) {
329
372
  super();
330
373
  m(this, "config");
@@ -520,7 +563,7 @@ class L extends G {
520
563
  return r.setValue(t.position), r.setVelocity(t.velocity), r;
521
564
  }
522
565
  }
523
- const $ = Symbol.for("TRANSITION_STRATEGY"), lt = (i) => ({
566
+ const Z = Symbol.for("TRANSITION_STRATEGY"), ut = (i) => ({
524
567
  runIn: async (e) => {
525
568
  const { currentAnimation: t } = i;
526
569
  if (t && t.direction === "out") {
@@ -587,7 +630,7 @@ const $ = Symbol.for("TRANSITION_STRATEGY"), lt = (i) => ({
587
630
  direction: "forward"
588
631
  };
589
632
  }
590
- }), ut = () => ({
633
+ }), ft = () => ({
591
634
  runIn: async (i) => i.in ? {
592
635
  config: await i.in,
593
636
  state: {
@@ -624,48 +667,48 @@ const $ = Symbol.for("TRANSITION_STRATEGY"), lt = (i) => ({
624
667
  to: 0,
625
668
  direction: "forward"
626
669
  }
627
- }), B = "data-ssgoi-scope", K = "data-ssgoi-scope-ready";
628
- function kt() {
670
+ }), J = "data-ssgoi-scope", Q = "data-ssgoi-scope-ready";
671
+ function Vt() {
629
672
  return (i) => {
630
673
  if (i)
631
- return i.setAttribute(B, ""), queueMicrotask(() => {
674
+ return i.setAttribute(J, ""), queueMicrotask(() => {
632
675
  queueMicrotask(() => {
633
- i.setAttribute(K, "true");
676
+ i.setAttribute(Q, "true");
634
677
  });
635
678
  }), () => {
636
679
  };
637
680
  };
638
681
  }
639
- function ft(i) {
640
- return i.hasAttribute(K);
641
- }
642
682
  function dt(i) {
643
- return i.closest(`[${B}]`);
683
+ return i.hasAttribute(Q);
644
684
  }
645
- function mt(i, e) {
685
+ function mt(i) {
686
+ return i.closest(`[${J}]`);
687
+ }
688
+ function ht(i, e) {
646
689
  var v;
647
690
  let t = null, n = null, r = null, s = null;
648
691
  const a = {
649
692
  get currentAnimation() {
650
693
  return t;
651
694
  }
652
- }, o = ((v = e == null ? void 0 : e.strategy) == null ? void 0 : v.call(e, a)) || lt(a), c = async (l) => {
695
+ }, o = ((v = e == null ? void 0 : e.strategy) == null ? void 0 : v.call(e, a)) || ut(a), c = async (l) => {
653
696
  var E;
654
697
  n && (n.remove(), n = null);
655
698
  const d = i(), A = d.in && d.in(l), k = !(e != null && e.strategy) && d.out ? d.out(l) : void 0;
656
699
  if (!A)
657
700
  return;
658
- const R = {
659
- in: I(A),
660
- out: k ? I(k) : void 0
661
- }, S = await o.runIn(R);
701
+ const M = {
702
+ in: P(A),
703
+ out: k ? P(k) : void 0
704
+ }, S = await o.runIn(M);
662
705
  if (!S.config) {
663
706
  t && (t.direction = "in");
664
707
  return;
665
708
  }
666
709
  const p = S.config;
667
710
  (E = p.prepare) == null || E.call(p, l), p.wait && await p.wait();
668
- const w = _(
711
+ const w = Y(
669
712
  {
670
713
  ...p,
671
714
  onEnd: () => {
@@ -686,22 +729,22 @@ function mt(i, e) {
686
729
  const d = i(), A = !(e != null && e.strategy) && d.in ? d.in(l) : void 0, k = d.out && d.out(l);
687
730
  if (!k)
688
731
  return;
689
- const R = {
690
- in: A ? I(A) : void 0,
691
- out: I(k)
692
- }, S = await o.runOut(R);
732
+ const M = {
733
+ in: A ? P(A) : void 0,
734
+ out: P(k)
735
+ }, S = await o.runOut(M);
693
736
  if (!S.config) {
694
737
  t && (t.direction = "out"), n && (n.remove(), n = null);
695
738
  return;
696
739
  }
697
740
  const p = S.config;
698
741
  (C = p.prepare) == null || C.call(p, l), E(), p.wait && await p.wait();
699
- const w = _(
742
+ const w = Y(
700
743
  {
701
744
  ...p,
702
745
  onEnd: () => {
703
- var V, P;
704
- (V = p.onEnd) == null || V.call(p), n && (n.remove(), n = null), t = null, (P = e == null ? void 0 : e.onCleanupEnd) == null || P.call(e);
746
+ var V, R;
747
+ (V = p.onEnd) == null || V.call(p), n && (n.remove(), n = null), t = null, (R = e == null ? void 0 : e.onCleanupEnd) == null || R.call(e);
705
748
  }
706
749
  },
707
750
  l
@@ -729,13 +772,13 @@ function mt(i, e) {
729
772
  return requestAnimationFrame(() => {
730
773
  r = l.parentElement, s = l.nextElementSibling;
731
774
  }), h = !1, (e == null ? void 0 : e.scope) === "local" ? queueMicrotask(() => {
732
- f = dt(l), !(f && !ft(f)) && c(l);
775
+ f = mt(l), !(f && !dt(f)) && c(l);
733
776
  }) : c(l), y(l);
734
777
  };
735
778
  }
736
779
  const b = /* @__PURE__ */ new Map();
737
780
  let T = null, q = !1;
738
- function J(i) {
781
+ function tt(i) {
739
782
  if (i instanceof HTMLElement && b.has(i)) {
740
783
  const t = b.get(i);
741
784
  b.delete(i), queueMicrotask(() => {
@@ -745,16 +788,16 @@ function J(i) {
745
788
  const e = i.childNodes;
746
789
  for (let t = 0; t < e.length; t++) {
747
790
  const n = e[t];
748
- n && J(n);
791
+ n && tt(n);
749
792
  }
750
793
  }
751
- function ht() {
794
+ function gt() {
752
795
  q || typeof document > "u" || (q = !0, T = new MutationObserver((i) => {
753
796
  for (const e of i) {
754
797
  const t = e.removedNodes;
755
798
  for (let n = 0; n < t.length; n++) {
756
799
  const r = t[n];
757
- r && J(r);
800
+ r && tt(r);
758
801
  }
759
802
  }
760
803
  }), document.body ? T.observe(document.body, {
@@ -771,10 +814,10 @@ function ht() {
771
814
  { once: !0 }
772
815
  ));
773
816
  }
774
- function gt(i, e) {
775
- ht(), b.set(i, e);
817
+ function pt(i, e) {
818
+ gt(), b.set(i, e);
776
819
  }
777
- function Vt(i) {
820
+ function Mt(i) {
778
821
  return b.has(i);
779
822
  }
780
823
  function Rt() {
@@ -787,39 +830,39 @@ function Pt(i) {
787
830
  function It() {
788
831
  b.clear(), T == null || T.disconnect(), T = null, q = !1;
789
832
  }
790
- const O = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
791
- function pt(i, e, t) {
792
- O.set(i, e);
833
+ const x = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
834
+ function wt(i, e, t) {
835
+ x.set(i, e);
793
836
  let n = H.get(i);
794
837
  if (n)
795
838
  return n;
796
839
  const r = e;
797
- return n = mt(
840
+ return n = ht(
798
841
  () => {
799
- const s = O.get(i);
842
+ const s = x.get(i);
800
843
  return s || (console.warn(`Transition "${String(i)}" not found`), {});
801
844
  },
802
845
  {
803
846
  strategy: t == null ? void 0 : t.strategy,
804
847
  scope: t == null ? void 0 : t.scope,
805
848
  onCleanupEnd: () => {
806
- O.get(i) === r && wt(i);
849
+ x.get(i) === r && yt(i);
807
850
  }
808
851
  }
809
852
  ), H.set(i, n), n;
810
853
  }
811
- function wt(i) {
812
- O.delete(i), H.delete(i), N.delete(i);
854
+ function yt(i) {
855
+ x.delete(i), H.delete(i), N.delete(i);
813
856
  }
814
- function Mt(i, e = "manual") {
815
- const t = pt(
857
+ function Ot(i, e = "manual") {
858
+ const t = wt(
816
859
  i.key,
817
860
  {
818
861
  in: i.in,
819
862
  out: i.out
820
863
  },
821
864
  {
822
- strategy: i[$],
865
+ strategy: i[Z],
823
866
  scope: i.scope
824
867
  }
825
868
  );
@@ -829,11 +872,11 @@ function Mt(i, e = "manual") {
829
872
  return n || (n = (r) => {
830
873
  if (r) {
831
874
  const s = t(r);
832
- s && gt(r, s);
875
+ s && pt(r, s);
833
876
  }
834
877
  }, N.set(i.key, n), n);
835
878
  }
836
- function yt(i) {
879
+ function vt(i) {
837
880
  const e = i.filter((t) => t.symmetric).map((t) => ({
838
881
  from: t.to,
839
882
  to: t.from,
@@ -841,7 +884,7 @@ function yt(i) {
841
884
  }));
842
885
  return [...i, ...e];
843
886
  }
844
- function vt(i) {
887
+ function St(i) {
845
888
  let e = !1, t = 0, n = 0, r = !1;
846
889
  const s = 50, a = (l) => {
847
890
  if (!i) return;
@@ -870,7 +913,7 @@ function vt(i) {
870
913
  }
871
914
  };
872
915
  }
873
- const St = (i) => {
916
+ const Ct = (i) => {
874
917
  let e = i.parentElement;
875
918
  for (; e && e !== document.body; ) {
876
919
  const t = window.getComputedStyle(e), n = t.overflow + t.overflowY + t.overflowX;
@@ -879,7 +922,7 @@ const St = (i) => {
879
922
  e = e.parentElement;
880
923
  }
881
924
  return document.documentElement;
882
- }, Ct = (i) => {
925
+ }, At = (i) => {
883
926
  let e = i.parentElement;
884
927
  for (; e && e !== document.body; ) {
885
928
  const t = window.getComputedStyle(e).position;
@@ -889,7 +932,7 @@ const St = (i) => {
889
932
  }
890
933
  return document.body;
891
934
  };
892
- function At() {
935
+ function Et() {
893
936
  let i = null, e = null;
894
937
  const t = /* @__PURE__ */ new Map();
895
938
  let n = null;
@@ -901,7 +944,7 @@ function At() {
901
944
  };
902
945
  return {
903
946
  initializeContext: (f, h) => {
904
- e = f, i || (i = St(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
947
+ e = f, i || (i = Ct(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
905
948
  passive: !0
906
949
  })), n = h;
907
950
  },
@@ -913,11 +956,11 @@ function At() {
913
956
  };
914
957
  },
915
958
  getScrollContainer: () => i,
916
- getPositionedParentElement: () => e ? Ct(e) : document.body,
959
+ getPositionedParentElement: () => e ? At(e) : document.body,
917
960
  getScrollPosition: (f) => f && t.has(f) ? t.get(f) : { x: 0, y: 0 }
918
961
  };
919
962
  }
920
- function x(i, e) {
963
+ function O(i, e) {
921
964
  if (e === "*")
922
965
  return !0;
923
966
  if (e.endsWith("/*")) {
@@ -926,12 +969,12 @@ function x(i, e) {
926
969
  }
927
970
  return i === e;
928
971
  }
929
- function Et(i, e, t) {
972
+ function Tt(i, e, t) {
930
973
  for (const n of t)
931
- if (x(i, n.from) && x(e, n.to))
974
+ if (O(i, n.from) && O(e, n.to))
932
975
  return n.transition;
933
976
  for (const n of t)
934
- if ((n.from === "*" || x(i, n.from)) && (n.to === "*" || x(e, n.to)))
977
+ if ((n.from === "*" || O(i, n.from)) && (n.to === "*" || O(e, n.to)))
935
978
  return n.transition;
936
979
  return null;
937
980
  }
@@ -945,27 +988,27 @@ function xt(i, e) {
945
988
  // Default to true - skip animations on iOS swipe
946
989
  } = i, { outFirst: a = !0 } = e || {};
947
990
  let o = null;
948
- const c = yt(t), {
991
+ const c = vt(t), {
949
992
  initializeContext: u,
950
993
  calculateScrollOffset: f,
951
994
  getScrollContainer: h,
952
995
  getPositionedParentElement: y,
953
996
  getScrollPosition: v
954
- } = At(), l = vt(s);
997
+ } = Et(), l = St(s);
955
998
  l.initialize();
956
999
  function d() {
957
1000
  if (o != null && o.from && (o != null && o.to)) {
958
1001
  const { from: w, to: g } = r(
959
1002
  o.from,
960
1003
  o.to
961
- ), C = Et(
1004
+ ), C = Tt(
962
1005
  w,
963
1006
  g,
964
1007
  c
965
1008
  ) || n, V = f(
966
1009
  o.from,
967
1010
  o.to
968
- ), P = {
1011
+ ), R = {
969
1012
  scrollOffset: V,
970
1013
  scroll: v(o.from),
971
1014
  get scrollingElement() {
@@ -974,7 +1017,7 @@ function xt(i, e) {
974
1017
  get positionedParent() {
975
1018
  return y();
976
1019
  }
977
- }, Q = {
1020
+ }, et = {
978
1021
  scrollOffset: V,
979
1022
  get scroll() {
980
1023
  return o ? v(o.to) : { x: 0, y: 0 };
@@ -987,9 +1030,9 @@ function xt(i, e) {
987
1030
  }
988
1031
  };
989
1032
  C && (C.out && o.outResolve && o.outResolve(
990
- (D) => C.out(D, P)
1033
+ (z) => C.out(z, R)
991
1034
  ), C.in && o.inResolve && o.inResolve(
992
- (D) => C.in(D, Q)
1035
+ (z) => C.in(z, et)
993
1036
  )), o = null;
994
1037
  }
995
1038
  }
@@ -1010,32 +1053,31 @@ function xt(i, e) {
1010
1053
  in: async (g) => (u(g, w), (await S(w, "in"))(g)),
1011
1054
  out: async (g) => (await S(w, "out"))(g),
1012
1055
  // Add page transition strategy for page-level transitions
1013
- [$]: ut
1056
+ [Z]: ft
1014
1057
  });
1015
1058
  }
1016
1059
  export {
1017
- B as SCOPE_ATTR,
1018
- K as SCOPE_READY_ATTR,
1019
- $ as TRANSITION_STRATEGY,
1020
- lt as createDefaultStrategy,
1021
- ut as createPageTransitionStrategy,
1060
+ J as SCOPE_ATTR,
1061
+ Q as SCOPE_READY_ATTR,
1062
+ Z as TRANSITION_STRATEGY,
1063
+ ut as createDefaultStrategy,
1064
+ ft as createPageTransitionStrategy,
1022
1065
  xt as createSggoiTransitionContext,
1023
- kt as createTransitionScope,
1024
- dt as findScope,
1066
+ Vt as createTransitionScope,
1067
+ mt as findScope,
1025
1068
  Rt as getWatchedCount,
1026
- Lt as isCssAnimation,
1069
+ zt as isCssAnimation,
1027
1070
  Dt as isMultiSpring,
1028
- ft as isScopeReady,
1029
- zt as isSingleSpring,
1071
+ dt as isScopeReady,
1072
+ _t as isSingleSpring,
1030
1073
  qt as isTickAnimation,
1031
- Vt as isWatched,
1032
- Yt as jaeminInternal,
1033
- _ as normalizeMultiSpringSchedule,
1034
- I as normalizeToMultiSpring,
1074
+ Mt as isWatched,
1075
+ Y as normalizeMultiSpringSchedule,
1076
+ P as normalizeToMultiSpring,
1035
1077
  It as resetObserver,
1036
- Mt as transition,
1078
+ Ot as transition,
1037
1079
  Pt as triggerUnmount,
1038
1080
  Ht as validateAnimationMode,
1039
1081
  Nt as validateSpringItem,
1040
- gt as watchUnmount
1082
+ pt as watchUnmount
1041
1083
  };
@@ -1,13 +1,10 @@
1
- import { Transition, TransitionKey } from '../types';
1
+ import { SpringConfig, Transition, TransitionKey } from '../types';
2
2
  interface BlurOptions {
3
3
  amount?: number | string;
4
4
  opacity?: number;
5
5
  scale?: boolean;
6
6
  fade?: boolean;
7
- spring?: {
8
- stiffness?: number;
9
- damping?: number;
10
- };
7
+ spring?: Partial<SpringConfig>;
11
8
  key?: TransitionKey;
12
9
  }
13
10
  export declare const blur: (options?: BlurOptions) => Transition;
@@ -1 +1 @@
1
- {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/blur.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvE,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,UA+ChD,CAAC"}
1
+ {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/blur.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,UAAU,EACV,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,UAgDhD,CAAC"}