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