@ssgoi/core 3.2.2 → 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.
Files changed (42) hide show
  1. package/README.md +10 -9
  2. package/dist/index.cjs +1 -2
  3. package/dist/index.js +172 -202
  4. package/dist/transition/create-transition-callback.d.ts.map +1 -1
  5. package/dist/transition/transition.d.ts +1 -2
  6. package/dist/transition/transition.d.ts.map +1 -1
  7. package/dist/transitions/blur.d.ts +2 -18
  8. package/dist/transitions/blur.d.ts.map +1 -1
  9. package/dist/transitions/bounce.d.ts +2 -18
  10. package/dist/transitions/bounce.d.ts.map +1 -1
  11. package/dist/transitions/fade.d.ts +2 -18
  12. package/dist/transitions/fade.d.ts.map +1 -1
  13. package/dist/transitions/fly.d.ts +2 -18
  14. package/dist/transitions/fly.d.ts.map +1 -1
  15. package/dist/transitions/index.cjs +1 -1
  16. package/dist/transitions/index.js +188 -172
  17. package/dist/transitions/mask.d.ts +2 -18
  18. package/dist/transitions/mask.d.ts.map +1 -1
  19. package/dist/transitions/none.d.ts +2 -18
  20. package/dist/transitions/none.d.ts.map +1 -1
  21. package/dist/transitions/rotate.d.ts +2 -18
  22. package/dist/transitions/rotate.d.ts.map +1 -1
  23. package/dist/transitions/scale.d.ts +2 -18
  24. package/dist/transitions/scale.d.ts.map +1 -1
  25. package/dist/transitions/slide.d.ts +2 -18
  26. package/dist/transitions/slide.d.ts.map +1 -1
  27. package/dist/types.d.ts +1 -2
  28. package/dist/types.d.ts.map +1 -1
  29. package/dist/utils/index.d.ts +1 -1
  30. package/dist/utils/index.d.ts.map +1 -1
  31. package/dist/utils/with-resolvers.d.ts +7 -0
  32. package/dist/utils/with-resolvers.d.ts.map +1 -0
  33. package/dist/view-transitions/fade.d.ts.map +1 -1
  34. package/dist/view-transitions/index.cjs +7 -7
  35. package/dist/view-transitions/index.d.ts +1 -0
  36. package/dist/view-transitions/index.d.ts.map +1 -1
  37. package/dist/view-transitions/index.js +256 -217
  38. package/dist/view-transitions/rotate.d.ts +3 -0
  39. package/dist/view-transitions/rotate.d.ts.map +1 -0
  40. package/package.json +1 -1
  41. package/dist/utils/parse-caller-location.d.ts +0 -6
  42. package/dist/utils/parse-caller-location.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
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 I, normalizeMultiSpringSchedule as q } from "./types.js";
5
- import { isCssAnimation as Ht, isMultiSpring as qt, isSingleSpring as Yt, isTickAnimation as Ut, validateAnimationMode as Wt, validateSpringItem as Xt } from "./types.js";
6
- import { j as jt } from "./jaemin-BWkrXq0V.js";
7
- class ot {
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 {
8
8
  constructor() {
9
9
  m(this, "listeners", /* @__PURE__ */ new Set());
10
10
  m(this, "rafId", null);
@@ -30,9 +30,9 @@ class ot {
30
30
  n > this.lagThreshold || n < 0 ? (this.startTime += n - this.adjustedLag, n = this.adjustedLag) : n > this.maxDeltaTime && (n = this.maxDeltaTime), this.lastUpdate = e;
31
31
  const r = e - this.startTime, s = r - this.nextTime;
32
32
  if (s > 0) {
33
- const c = n / 1e3;
33
+ const a = n / 1e3;
34
34
  this.elapsed = r / 1e3, this.nextTime += s + (s >= this.gap ? 4 : this.gap - s), this.listeners.forEach((o) => {
35
- o(c, this.elapsed);
35
+ o(a, this.elapsed);
36
36
  });
37
37
  }
38
38
  this.listeners.size > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.isRunning = !1, this.rafId = null);
@@ -68,69 +68,69 @@ class ot {
68
68
  return this.elapsed;
69
69
  }
70
70
  }
71
- const z = new ot();
72
- function X(i) {
71
+ const z = new et();
72
+ function U(i) {
73
73
  const e = i.stiffness, t = i.damping, n = 1, r = Math.sqrt(e / n), s = t / (2 * Math.sqrt(e * n));
74
74
  return { omega: r, zeta: s };
75
75
  }
76
- function $(i, e, t, n) {
77
- const { omega: r, zeta: s } = t, { position: c, velocity: o } = i, a = Math.min(n, 0.033), u = -2 * a * s * r * o, f = a * r * r * (e - c), h = o + u + f;
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;
78
78
  return {
79
- position: c + a * h,
79
+ position: a + c * h,
80
80
  velocity: h
81
81
  };
82
82
  }
83
- const rt = 0.01, st = 0.01, j = 0.05;
84
- function K(i, e) {
83
+ const nt = 0.01, it = 0.01, X = 0.05;
84
+ function j(i, e) {
85
85
  const t = Math.abs(e - i.position), n = Math.abs(i.velocity);
86
- return t < rt && n < st;
86
+ return t < nt && n < it;
87
87
  }
88
- function ct(i) {
88
+ function ot(i) {
89
89
  const {
90
90
  from: e,
91
91
  to: t,
92
92
  spring: n,
93
93
  velocity: r = 0,
94
94
  onUpdate: s,
95
- onComplete: c,
95
+ onComplete: a,
96
96
  onStart: o
97
97
  } = i;
98
- let a = { position: e, velocity: r }, u = !0, f = 0, h = !1;
99
- const y = X(n), v = (l) => {
98
+ let c = { position: e, velocity: r }, u = !0, f = 0, h = !1;
99
+ const y = U(n), v = (l) => {
100
100
  if (u) {
101
- if (h || (h = !0, o == null || o()), a = $(a, t, y, l), K(a, t)) {
102
- if (f += Math.min(l, 0.033), f >= j) {
103
- a = { position: t, velocity: 0 }, u = !1, s(a.position), z.unsubscribe(v), c();
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();
104
104
  return;
105
105
  }
106
106
  } else
107
107
  f = 0;
108
- s(a.position);
108
+ s(c.position);
109
109
  }
110
110
  };
111
111
  return z.subscribe(v), {
112
112
  stop: () => {
113
113
  u && (u = !1, z.unsubscribe(v));
114
114
  },
115
- getPosition: () => a.position,
116
- getVelocity: () => a.velocity,
115
+ getPosition: () => c.position,
116
+ getVelocity: () => c.velocity,
117
117
  isRunning: () => u
118
118
  };
119
119
  }
120
120
  const M = 1e3 / 60;
121
- function at(i, e, t, n = 0) {
122
- const r = X(t), s = 600;
123
- let c = { position: i, velocity: n }, o = 0;
124
- const a = [];
121
+ function rt(i, e, t, n = 0) {
122
+ const r = U(t), s = 600;
123
+ let a = { position: i, velocity: n }, o = 0;
124
+ const c = [];
125
125
  for (let u = 0; u < s; u++) {
126
126
  const f = u * M;
127
- if (a.push({
127
+ if (c.push({
128
128
  time: f,
129
- position: c.position,
130
- velocity: c.velocity
131
- }), c = $(c, e, r, M / 1e3), K(c, e)) {
132
- if (o += M / 1e3, o >= j) {
133
- a.push({
129
+ position: a.position,
130
+ velocity: a.velocity
131
+ }), a = W(a, e, r, M / 1e3), j(a, e)) {
132
+ if (o += M / 1e3, o >= X) {
133
+ c.push({
134
134
  time: (u + 1) * M,
135
135
  position: e,
136
136
  velocity: 0
@@ -140,7 +140,7 @@ function at(i, e, t, n = 0) {
140
140
  } else
141
141
  o = 0;
142
142
  }
143
- return a;
143
+ return c;
144
144
  }
145
145
  function Y(i, e) {
146
146
  if (i.length === 0)
@@ -155,35 +155,35 @@ function Y(i, e) {
155
155
  const u = Math.floor((r + s) / 2);
156
156
  i[u].time <= e ? r = u : s = u;
157
157
  }
158
- const c = i[r], o = i[s], a = (e - c.time) / (o.time - c.time);
158
+ const a = i[r], o = i[s], c = (e - a.time) / (o.time - a.time);
159
159
  return {
160
- position: c.position + (o.position - c.position) * a,
161
- velocity: c.velocity + (o.velocity - c.velocity) * a
160
+ position: a.position + (o.position - a.position) * c,
161
+ velocity: a.velocity + (o.velocity - a.velocity) * c
162
162
  };
163
163
  }
164
- function lt(i, e) {
164
+ function st(i, e) {
165
165
  return i.map((t) => e(t.position));
166
166
  }
167
- function ut(i) {
167
+ function ct(i) {
168
168
  const {
169
169
  element: e,
170
170
  from: t,
171
171
  to: n,
172
172
  spring: r,
173
173
  velocity: s = 0,
174
- style: c,
174
+ style: a,
175
175
  onComplete: o,
176
- onStart: a
177
- } = i, u = at(t, n, r, s);
176
+ onStart: c
177
+ } = i, u = rt(t, n, r, s);
178
178
  if (u.length === 0)
179
- return a == null || a(), o(), {
179
+ return c == null || c(), o(), {
180
180
  stop: () => {
181
181
  },
182
182
  getPosition: () => n,
183
183
  getVelocity: () => 0,
184
184
  isRunning: () => !1
185
185
  };
186
- const f = lt(u, c), h = u[u.length - 1], y = h.time, v = e.animate(f, {
186
+ const f = st(u, a), h = u[u.length - 1], y = h.time, v = e.animate(f, {
187
187
  duration: y,
188
188
  fill: "forwards",
189
189
  easing: "linear"
@@ -191,7 +191,7 @@ function ut(i) {
191
191
  });
192
192
  let l = !0;
193
193
  const d = performance.now();
194
- return a == null || a(), v.onfinish = () => {
194
+ return c == null || c(), v.onfinish = () => {
195
195
  l && (l = !1, o());
196
196
  }, {
197
197
  stop: () => {
@@ -212,33 +212,33 @@ function ut(i) {
212
212
  isRunning: () => l
213
213
  };
214
214
  }
215
- function ft(i) {
216
- const { from: e, to: t, spring: n, velocity: r, onComplete: s, onStart: c, tick: o, css: a } = i;
217
- if (o && a)
215
+ function at(i) {
216
+ const { from: e, to: t, spring: n, velocity: r, onComplete: s, onStart: a, tick: o, css: c } = i;
217
+ if (o && c)
218
218
  throw new Error("Cannot use both 'tick' and 'css' options together");
219
- return !o && !a ? (c == null || c(), s(), {
219
+ return !o && !c ? (a == null || a(), s(), {
220
220
  stop: () => {
221
221
  },
222
222
  getPosition: () => t,
223
223
  getVelocity: () => 0,
224
224
  isRunning: () => !1
225
- }) : a ? ut({
226
- element: a.element,
225
+ }) : c ? ct({
226
+ element: c.element,
227
227
  from: e,
228
228
  to: t,
229
229
  spring: n,
230
230
  velocity: r,
231
- style: a.style,
231
+ style: c.style,
232
232
  onComplete: s,
233
- onStart: c
234
- }) : ct({
233
+ onStart: a
234
+ }) : ot({
235
235
  from: e,
236
236
  to: t,
237
237
  spring: n,
238
238
  velocity: r,
239
239
  onUpdate: o,
240
240
  onComplete: s,
241
- onStart: c
241
+ onStart: a
242
242
  });
243
243
  }
244
244
  class G {
@@ -265,7 +265,7 @@ class F extends G {
265
265
  }, this.currentValue = this.options.from;
266
266
  }
267
267
  runAnimation(t) {
268
- this.isAnimating = !0, this.controls = ft({
268
+ this.isAnimating = !0, this.controls = at({
269
269
  from: this.currentValue,
270
270
  to: t,
271
271
  spring: this.options.spring,
@@ -378,9 +378,9 @@ class L extends G {
378
378
  return this.direction === "forward" ? this.springOrder : [...this.springOrder].reverse();
379
379
  }
380
380
  onAnimatorComplete(t) {
381
- var r, s, c, o, a, u;
381
+ var r, s, a, o, c, u;
382
382
  const n = this.animators.get(t);
383
- !n || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (s = (r = n.item).onComplete) == null || s.call(r), (o = (c = this.config).onProgress) == null || o.call(c, this.completedCount, this.config.springs.length), this.completedCount === this.config.springs.length && (this.stopScheduler(), (u = (a = this.config).onEnd) == null || u.call(a)));
383
+ !n || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (s = (r = n.item).onComplete) == null || s.call(r), (o = (a = this.config).onProgress) == null || o.call(a, this.completedCount, this.config.springs.length), this.completedCount === this.config.springs.length && (this.stopScheduler(), (u = (c = this.config).onEnd) == null || u.call(c)));
384
384
  }
385
385
  /**
386
386
  * Check and start springs based on previous spring's progress
@@ -395,10 +395,10 @@ class L extends G {
395
395
  this.startAnimator(r);
396
396
  continue;
397
397
  }
398
- const c = t[n - 1], o = this.animators.get(c);
398
+ const a = t[n - 1], o = this.animators.get(a);
399
399
  if (!o || !o.started) continue;
400
- const a = this.getAnimatorProgress(o), u = s.item.normalizedOffset;
401
- a >= u && this.startAnimator(r);
400
+ const c = this.getAnimatorProgress(o), u = s.item.normalizedOffset;
401
+ c >= u && this.startAnimator(r);
402
402
  }
403
403
  }
404
404
  startAnimator(t) {
@@ -520,7 +520,7 @@ class L extends G {
520
520
  return r.setValue(t.position), r.setVelocity(t.velocity), r;
521
521
  }
522
522
  }
523
- const B = Symbol.for("TRANSITION_STRATEGY"), dt = (i) => ({
523
+ const $ = Symbol.for("TRANSITION_STRATEGY"), lt = (i) => ({
524
524
  runIn: async (e) => {
525
525
  const { currentAnimation: t } = i;
526
526
  if (t && t.direction === "out") {
@@ -587,7 +587,7 @@ const B = Symbol.for("TRANSITION_STRATEGY"), dt = (i) => ({
587
587
  direction: "forward"
588
588
  };
589
589
  }
590
- }), mt = () => ({
590
+ }), ut = () => ({
591
591
  runIn: async (i) => i.in ? {
592
592
  config: await i.in,
593
593
  state: {
@@ -624,48 +624,48 @@ const B = Symbol.for("TRANSITION_STRATEGY"), dt = (i) => ({
624
624
  to: 0,
625
625
  direction: "forward"
626
626
  }
627
- }), J = "data-ssgoi-scope", Q = "data-ssgoi-scope-ready";
628
- function Mt() {
627
+ }), B = "data-ssgoi-scope", K = "data-ssgoi-scope-ready";
628
+ function kt() {
629
629
  return (i) => {
630
630
  if (i)
631
- return i.setAttribute(J, ""), queueMicrotask(() => {
631
+ return i.setAttribute(B, ""), queueMicrotask(() => {
632
632
  queueMicrotask(() => {
633
- i.setAttribute(Q, "true");
633
+ i.setAttribute(K, "true");
634
634
  });
635
635
  }), () => {
636
636
  };
637
637
  };
638
638
  }
639
- function ht(i) {
640
- return i.hasAttribute(Q);
639
+ function ft(i) {
640
+ return i.hasAttribute(K);
641
641
  }
642
- function gt(i) {
643
- return i.closest(`[${J}]`);
642
+ function dt(i) {
643
+ return i.closest(`[${B}]`);
644
644
  }
645
- function pt(i, e) {
645
+ function mt(i, e) {
646
646
  var v;
647
647
  let t = null, n = null, r = null, s = null;
648
- const c = {
648
+ const a = {
649
649
  get currentAnimation() {
650
650
  return t;
651
651
  }
652
- }, o = ((v = e == null ? void 0 : e.strategy) == null ? void 0 : v.call(e, c)) || dt(c), a = async (l) => {
652
+ }, o = ((v = e == null ? void 0 : e.strategy) == null ? void 0 : v.call(e, a)) || lt(a), c = async (l) => {
653
653
  var E;
654
654
  n && (n.remove(), n = null);
655
655
  const d = i(), A = d.in && d.in(l), k = !(e != null && e.strategy) && d.out ? d.out(l) : void 0;
656
656
  if (!A)
657
657
  return;
658
- const V = {
658
+ const R = {
659
659
  in: I(A),
660
660
  out: k ? I(k) : void 0
661
- }, S = await o.runIn(V);
661
+ }, S = await o.runIn(R);
662
662
  if (!S.config) {
663
663
  t && (t.direction = "in");
664
664
  return;
665
665
  }
666
666
  const p = S.config;
667
667
  (E = p.prepare) == null || E.call(p, l), p.wait && await p.wait();
668
- const w = q(
668
+ const w = _(
669
669
  {
670
670
  ...p,
671
671
  onEnd: () => {
@@ -686,22 +686,22 @@ function pt(i, e) {
686
686
  const d = i(), A = !(e != null && e.strategy) && d.in ? d.in(l) : void 0, k = d.out && d.out(l);
687
687
  if (!k)
688
688
  return;
689
- const V = {
689
+ const R = {
690
690
  in: A ? I(A) : void 0,
691
691
  out: I(k)
692
- }, S = await o.runOut(V);
692
+ }, S = await o.runOut(R);
693
693
  if (!S.config) {
694
694
  t && (t.direction = "out"), n && (n.remove(), n = null);
695
695
  return;
696
696
  }
697
697
  const p = S.config;
698
698
  (C = p.prepare) == null || C.call(p, l), E(), p.wait && await p.wait();
699
- const w = q(
699
+ const w = _(
700
700
  {
701
701
  ...p,
702
702
  onEnd: () => {
703
- var R, P;
704
- (R = p.onEnd) == null || R.call(p), n && (n.remove(), n = null), t = null, (P = e == null ? void 0 : e.onCleanupEnd) == null || P.call(e);
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);
705
705
  }
706
706
  },
707
707
  l
@@ -726,26 +726,16 @@ function pt(i, e) {
726
726
  };
727
727
  return (l) => {
728
728
  if (l)
729
- return r = l.parentElement, s = l.nextElementSibling, h = !1, (e == null ? void 0 : e.scope) === "local" ? queueMicrotask(() => {
730
- f = gt(l), !(f && !ht(f)) && a(l);
731
- }) : a(l), y(l);
729
+ return requestAnimationFrame(() => {
730
+ r = l.parentElement, s = l.nextElementSibling;
731
+ }), h = !1, (e == null ? void 0 : e.scope) === "local" ? queueMicrotask(() => {
732
+ f = dt(l), !(f && !ft(f)) && c(l);
733
+ }) : c(l), y(l);
732
734
  };
733
735
  }
734
- const wt = 3, yt = (i) => {
735
- if (!i) return null;
736
- const e = i.split(`
737
- `).map((t) => t.trim());
738
- for (let t = wt; t < Math.min(e.length, 6); t++) {
739
- const n = e[t], r = n == null ? void 0 : n.match(/\(?([^):]+):(\d+):(\d+)\)?$/);
740
- if (!r)
741
- continue;
742
- const s = r[1] ?? "", c = r[2] ?? "0", o = r[3] ?? "0";
743
- return { file: s.split(/[\\/]/).pop() || s, line: c, column: o };
744
- }
745
- return null;
746
- }, b = /* @__PURE__ */ new Map();
747
- let T = null, _ = !1;
748
- function Z(i) {
736
+ const b = /* @__PURE__ */ new Map();
737
+ let T = null, q = !1;
738
+ function J(i) {
749
739
  if (i instanceof HTMLElement && b.has(i)) {
750
740
  const t = b.get(i);
751
741
  b.delete(i), queueMicrotask(() => {
@@ -755,16 +745,16 @@ function Z(i) {
755
745
  const e = i.childNodes;
756
746
  for (let t = 0; t < e.length; t++) {
757
747
  const n = e[t];
758
- n && Z(n);
748
+ n && J(n);
759
749
  }
760
750
  }
761
- function vt() {
762
- _ || typeof document > "u" || (_ = !0, T = new MutationObserver((i) => {
751
+ function ht() {
752
+ q || typeof document > "u" || (q = !0, T = new MutationObserver((i) => {
763
753
  for (const e of i) {
764
754
  const t = e.removedNodes;
765
755
  for (let n = 0; n < t.length; n++) {
766
756
  const r = t[n];
767
- r && Z(r);
757
+ r && J(r);
768
758
  }
769
759
  }
770
760
  }), document.body ? T.observe(document.body, {
@@ -781,30 +771,30 @@ function vt() {
781
771
  { once: !0 }
782
772
  ));
783
773
  }
784
- function St(i, e) {
785
- vt(), b.set(i, e);
774
+ function gt(i, e) {
775
+ ht(), b.set(i, e);
786
776
  }
787
- function xt(i) {
777
+ function Vt(i) {
788
778
  return b.has(i);
789
779
  }
790
- function Ot() {
780
+ function Rt() {
791
781
  return b.size;
792
782
  }
793
- function Ft(i) {
783
+ function Pt(i) {
794
784
  const e = b.get(i);
795
785
  return e ? (b.delete(i), e(), !0) : !1;
796
786
  }
797
- function Lt() {
798
- b.clear(), T == null || T.disconnect(), T = null, _ = !1;
787
+ function It() {
788
+ b.clear(), T == null || T.disconnect(), T = null, q = !1;
799
789
  }
800
- const O = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map();
801
- function Ct(i, e, t) {
790
+ const O = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
791
+ function pt(i, e, t) {
802
792
  O.set(i, e);
803
- let n = N.get(i);
793
+ let n = H.get(i);
804
794
  if (n)
805
795
  return n;
806
796
  const r = e;
807
- return n = pt(
797
+ return n = mt(
808
798
  () => {
809
799
  const s = O.get(i);
810
800
  return s || (console.warn(`Transition "${String(i)}" not found`), {});
@@ -813,56 +803,37 @@ function Ct(i, e, t) {
813
803
  strategy: t == null ? void 0 : t.strategy,
814
804
  scope: t == null ? void 0 : t.scope,
815
805
  onCleanupEnd: () => {
816
- O.get(i) === r && tt(i);
806
+ O.get(i) === r && wt(i);
817
807
  }
818
808
  }
819
- ), N.set(i, n), n;
809
+ ), H.set(i, n), n;
820
810
  }
821
- function tt(i) {
822
- O.delete(i), N.delete(i), H.delete(i);
823
- }
824
- function At() {
825
- const i = yt(new Error().stack);
826
- return i ? `auto_${i.file}_${i.line}_${i.column}` : Symbol(`ssgoi_auto_${Date.now()}`);
811
+ function wt(i) {
812
+ O.delete(i), H.delete(i), N.delete(i);
827
813
  }
828
- const U = globalThis.FinalizationRegistry, W = U ? (
829
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
830
- new U((i) => {
831
- try {
832
- tt(i);
833
- } catch {
834
- }
835
- })
836
- ) : void 0;
837
- function Dt(i, e = "manual") {
838
- const t = i.key ?? At();
839
- if (i.ref && W)
840
- try {
841
- W.register(i.ref, t);
842
- } catch {
843
- }
844
- const n = Ct(
845
- t,
814
+ function Mt(i, e = "manual") {
815
+ const t = pt(
816
+ i.key,
846
817
  {
847
818
  in: i.in,
848
819
  out: i.out
849
820
  },
850
821
  {
851
- strategy: i[B],
822
+ strategy: i[$],
852
823
  scope: i.scope
853
824
  }
854
825
  );
855
826
  if (e === "manual")
856
- return n;
857
- let r = H.get(t);
858
- return r || (r = (s) => {
859
- if (s) {
860
- const c = n(s);
861
- c && St(s, c);
827
+ return t;
828
+ let n = N.get(i.key);
829
+ return n || (n = (r) => {
830
+ if (r) {
831
+ const s = t(r);
832
+ s && gt(r, s);
862
833
  }
863
- }, H.set(t, r), r);
834
+ }, N.set(i.key, n), n);
864
835
  }
865
- function Et(i) {
836
+ function yt(i) {
866
837
  const e = i.filter((t) => t.symmetric).map((t) => ({
867
838
  from: t.to,
868
839
  to: t.from,
@@ -870,9 +841,9 @@ function Et(i) {
870
841
  }));
871
842
  return [...i, ...e];
872
843
  }
873
- function Tt(i) {
844
+ function vt(i) {
874
845
  let e = !1, t = 0, n = 0, r = !1;
875
- const s = 50, c = (l) => {
846
+ const s = 50, a = (l) => {
876
847
  if (!i) return;
877
848
  const d = l.touches[0];
878
849
  d && (r = d.clientX < s, r && (t = d.clientX, n = d.clientY));
@@ -882,12 +853,12 @@ function Tt(i) {
882
853
  if (!d) return;
883
854
  const A = d.clientX - t, k = d.clientY - n;
884
855
  A > window.outerWidth / 2 - 5 && Math.abs(A) > Math.abs(k) ? e = !0 : e = !1;
885
- }, a = () => {
856
+ }, c = () => {
886
857
  i && (r = !1, t = 0, n = 0);
887
858
  }, u = () => e, f = () => {
888
- typeof window > "u" || i && (window.addEventListener("touchstart", c, { passive: !0 }), window.addEventListener("touchmove", o, { passive: !0 }), window.addEventListener("touchend", a, { passive: !0 }));
859
+ typeof window > "u" || i && (window.addEventListener("touchstart", a, { passive: !0 }), window.addEventListener("touchmove", o, { passive: !0 }), window.addEventListener("touchend", c, { passive: !0 }));
889
860
  }, h = () => {
890
- typeof window > "u" || (window.removeEventListener("touchstart", c), window.removeEventListener("touchmove", o), window.removeEventListener("touchend", a));
861
+ typeof window > "u" || (window.removeEventListener("touchstart", a), window.removeEventListener("touchmove", o), window.removeEventListener("touchend", c));
891
862
  };
892
863
  let y = 0;
893
864
  return {
@@ -899,7 +870,7 @@ function Tt(i) {
899
870
  }
900
871
  };
901
872
  }
902
- const bt = (i) => {
873
+ const St = (i) => {
903
874
  let e = i.parentElement;
904
875
  for (; e && e !== document.body; ) {
905
876
  const t = window.getComputedStyle(e), n = t.overflow + t.overflowY + t.overflowX;
@@ -908,7 +879,7 @@ const bt = (i) => {
908
879
  e = e.parentElement;
909
880
  }
910
881
  return document.documentElement;
911
- }, kt = (i) => {
882
+ }, Ct = (i) => {
912
883
  let e = i.parentElement;
913
884
  for (; e && e !== document.body; ) {
914
885
  const t = window.getComputedStyle(e).position;
@@ -918,7 +889,7 @@ const bt = (i) => {
918
889
  }
919
890
  return document.body;
920
891
  };
921
- function Rt() {
892
+ function At() {
922
893
  let i = null, e = null;
923
894
  const t = /* @__PURE__ */ new Map();
924
895
  let n = null;
@@ -930,7 +901,7 @@ function Rt() {
930
901
  };
931
902
  return {
932
903
  initializeContext: (f, h) => {
933
- e = f, i || (i = bt(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
904
+ e = f, i || (i = St(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
934
905
  passive: !0
935
906
  })), n = h;
936
907
  },
@@ -942,7 +913,7 @@ function Rt() {
942
913
  };
943
914
  },
944
915
  getScrollContainer: () => i,
945
- getPositionedParentElement: () => e ? kt(e) : document.body,
916
+ getPositionedParentElement: () => e ? Ct(e) : document.body,
946
917
  getScrollPosition: (f) => f && t.has(f) ? t.get(f) : { x: 0, y: 0 }
947
918
  };
948
919
  }
@@ -955,7 +926,7 @@ function x(i, e) {
955
926
  }
956
927
  return i === e;
957
928
  }
958
- function Vt(i, e, t) {
929
+ function Et(i, e, t) {
959
930
  for (const n of t)
960
931
  if (x(i, n.from) && x(e, n.to))
961
932
  return n.transition;
@@ -964,7 +935,7 @@ function Vt(i, e, t) {
964
935
  return n.transition;
965
936
  return null;
966
937
  }
967
- function zt(i, e) {
938
+ function xt(i, e) {
968
939
  const {
969
940
  transitions: t = [],
970
941
  defaultTransition: n,
@@ -972,30 +943,30 @@ function zt(i, e) {
972
943
  // Identity function as default
973
944
  skipOnIosSwipe: s = !0
974
945
  // Default to true - skip animations on iOS swipe
975
- } = i, { outFirst: c = !0 } = e || {};
946
+ } = i, { outFirst: a = !0 } = e || {};
976
947
  let o = null;
977
- const a = Et(t), {
948
+ const c = yt(t), {
978
949
  initializeContext: u,
979
950
  calculateScrollOffset: f,
980
951
  getScrollContainer: h,
981
952
  getPositionedParentElement: y,
982
953
  getScrollPosition: v
983
- } = Rt(), l = Tt(s);
954
+ } = At(), l = vt(s);
984
955
  l.initialize();
985
956
  function d() {
986
957
  if (o != null && o.from && (o != null && o.to)) {
987
958
  const { from: w, to: g } = r(
988
959
  o.from,
989
960
  o.to
990
- ), C = Vt(
961
+ ), C = Et(
991
962
  w,
992
963
  g,
993
- a
994
- ) || n, R = f(
964
+ c
965
+ ) || n, V = f(
995
966
  o.from,
996
967
  o.to
997
968
  ), P = {
998
- scrollOffset: R,
969
+ scrollOffset: V,
999
970
  scroll: v(o.from),
1000
971
  get scrollingElement() {
1001
972
  return h() || document.documentElement;
@@ -1003,8 +974,8 @@ function zt(i, e) {
1003
974
  get positionedParent() {
1004
975
  return y();
1005
976
  }
1006
- }, et = {
1007
- scrollOffset: R,
977
+ }, Q = {
978
+ scrollOffset: V,
1008
979
  get scroll() {
1009
980
  return o ? v(o.to) : { x: 0, y: 0 };
1010
981
  },
@@ -1018,14 +989,14 @@ function zt(i, e) {
1018
989
  C && (C.out && o.outResolve && o.outResolve(
1019
990
  (D) => C.out(D, P)
1020
991
  ), C.in && o.inResolve && o.inResolve(
1021
- (D) => C.in(D, et)
992
+ (D) => C.in(D, Q)
1022
993
  )), o = null;
1023
994
  }
1024
995
  }
1025
996
  function A() {
1026
997
  o && (o.inResolve && o.inResolve(() => ({})), o.outResolve && o.outResolve(() => ({})), o = null);
1027
998
  }
1028
- const S = c ? async (w, g) => l.isSwipePending() ? (l.resetSwipeDetection(), () => ({})) : g === "in" && (!o || !o.from) ? () => ({}) : (o || (o = {}), g === "out" ? (o.from = w, new Promise((E) => {
999
+ const S = a ? async (w, g) => l.isSwipePending() ? (l.resetSwipeDetection(), () => ({})) : g === "in" && (!o || !o.from) ? () => ({}) : (o || (o = {}), g === "out" ? (o.from = w, new Promise((E) => {
1029
1000
  o.outResolve = E, d();
1030
1001
  })) : (o.to = w, new Promise((E) => {
1031
1002
  o.inResolve = E, d();
@@ -1039,33 +1010,32 @@ function zt(i, e) {
1039
1010
  in: async (g) => (u(g, w), (await S(w, "in"))(g)),
1040
1011
  out: async (g) => (await S(w, "out"))(g),
1041
1012
  // Add page transition strategy for page-level transitions
1042
- [B]: mt
1013
+ [$]: ut
1043
1014
  });
1044
1015
  }
1045
1016
  export {
1046
- J as SCOPE_ATTR,
1047
- Q as SCOPE_READY_ATTR,
1048
- B as TRANSITION_STRATEGY,
1049
- dt as createDefaultStrategy,
1050
- mt as createPageTransitionStrategy,
1051
- zt as createSggoiTransitionContext,
1052
- Mt as createTransitionScope,
1053
- gt as findScope,
1054
- At as generateAutoKey,
1055
- Ot as getWatchedCount,
1056
- Ht as isCssAnimation,
1057
- qt as isMultiSpring,
1058
- ht as isScopeReady,
1059
- Yt as isSingleSpring,
1060
- Ut as isTickAnimation,
1061
- xt as isWatched,
1062
- jt as jaeminInternal,
1063
- q as normalizeMultiSpringSchedule,
1017
+ B as SCOPE_ATTR,
1018
+ K as SCOPE_READY_ATTR,
1019
+ $ as TRANSITION_STRATEGY,
1020
+ lt as createDefaultStrategy,
1021
+ ut as createPageTransitionStrategy,
1022
+ xt as createSggoiTransitionContext,
1023
+ kt as createTransitionScope,
1024
+ dt as findScope,
1025
+ Rt as getWatchedCount,
1026
+ Lt as isCssAnimation,
1027
+ Dt as isMultiSpring,
1028
+ ft as isScopeReady,
1029
+ zt as isSingleSpring,
1030
+ qt as isTickAnimation,
1031
+ Vt as isWatched,
1032
+ Yt as jaeminInternal,
1033
+ _ as normalizeMultiSpringSchedule,
1064
1034
  I as normalizeToMultiSpring,
1065
- Lt as resetObserver,
1066
- Dt as transition,
1067
- Ft as triggerUnmount,
1068
- Wt as validateAnimationMode,
1069
- Xt as validateSpringItem,
1070
- St as watchUnmount
1035
+ It as resetObserver,
1036
+ Mt as transition,
1037
+ Pt as triggerUnmount,
1038
+ Ht as validateAnimationMode,
1039
+ Nt as validateSpringItem,
1040
+ gt as watchUnmount
1071
1041
  };