@ssgoi/core 3.3.0 → 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.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
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
+ import { j as Ut } from "./jaemin-BWkrXq0V.js";
7
+ class ot {
8
8
  constructor() {
9
9
  m(this, "listeners", /* @__PURE__ */ new Set());
10
10
  m(this, "rafId", null);
@@ -68,24 +68,69 @@ class et {
68
68
  return this.elapsed;
69
69
  }
70
70
  }
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 };
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;
79
+ }
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 };
75
83
  }
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;
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: a + c * h,
80
- velocity: h
120
+ position: o.position,
121
+ velocity: o.velocity
81
122
  };
82
123
  }
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;
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 ot(i) {
133
+ function rt(i) {
89
134
  const {
90
135
  from: e,
91
136
  to: t,
@@ -96,11 +141,11 @@ function ot(i) {
96
141
  onStart: o
97
142
  } = i;
98
143
  let c = { position: e, velocity: r }, u = !0, f = 0, h = !1;
99
- const y = U(n), v = (l) => {
144
+ const y = j(n), v = (l) => {
100
145
  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();
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
@@ -108,30 +153,30 @@ function ot(i) {
108
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
160
  getPosition: () => c.position,
116
161
  getVelocity: () => c.velocity,
117
162
  isRunning: () => u
118
163
  };
119
164
  }
120
- const M = 1e3 / 60;
121
- function rt(i, e, t, n = 0) {
122
- const r = U(t), s = 600;
165
+ const I = 1e3 / 60;
166
+ function st(i, e, t, n = 0) {
167
+ const r = j(t), s = 600;
123
168
  let a = { position: i, velocity: n }, o = 0;
124
169
  const c = [];
125
170
  for (let u = 0; u < s; u++) {
126
- const f = u * M;
171
+ const f = u * I;
127
172
  if (c.push({
128
173
  time: f,
129
174
  position: a.position,
130
175
  velocity: a.velocity
131
- }), a = W(a, e, r, M / 1e3), j(a, e)) {
132
- if (o += M / 1e3, o >= X) {
176
+ }), a = G(a, e, r, I / 1e3), B(a, e)) {
177
+ if (o += I / 1e3, o >= $) {
133
178
  c.push({
134
- time: (u + 1) * M,
179
+ time: (u + 1) * I,
135
180
  position: e,
136
181
  velocity: 0
137
182
  });
@@ -142,7 +187,7 @@ function rt(i, e, t, n = 0) {
142
187
  }
143
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];
@@ -161,10 +206,10 @@ function Y(i, e) {
161
206
  velocity: a.velocity + (o.velocity - a.velocity) * c
162
207
  };
163
208
  }
164
- function st(i, e) {
209
+ function ct(i, e) {
165
210
  return i.map((t) => e(t.position));
166
211
  }
167
- function ct(i) {
212
+ function at(i) {
168
213
  const {
169
214
  element: e,
170
215
  from: t,
@@ -174,7 +219,7 @@ function ct(i) {
174
219
  style: a,
175
220
  onComplete: o,
176
221
  onStart: c
177
- } = i, u = rt(t, n, r, s);
222
+ } = i, u = st(t, n, r, s);
178
223
  if (u.length === 0)
179
224
  return c == null || c(), o(), {
180
225
  stop: () => {
@@ -183,11 +228,10 @@ function ct(i) {
183
228
  getVelocity: () => 0,
184
229
  isRunning: () => !1
185
230
  };
186
- const f = st(u, a), 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();
@@ -201,18 +245,18 @@ function ct(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 at(i) {
259
+ function lt(i) {
216
260
  const { from: e, to: t, spring: n, velocity: r, onComplete: s, onStart: a, tick: o, css: c } = i;
217
261
  if (o && c)
218
262
  throw new Error("Cannot use both 'tick' and 'css' options together");
@@ -222,7 +266,7 @@ function at(i) {
222
266
  getPosition: () => t,
223
267
  getVelocity: () => 0,
224
268
  isRunning: () => !1
225
- }) : c ? ct({
269
+ }) : c ? at({
226
270
  element: c.element,
227
271
  from: e,
228
272
  to: t,
@@ -231,7 +275,7 @@ function at(i) {
231
275
  style: c.style,
232
276
  onComplete: s,
233
277
  onStart: a
234
- }) : ot({
278
+ }) : rt({
235
279
  from: e,
236
280
  to: t,
237
281
  spring: n,
@@ -241,9 +285,9 @@ function at(i) {
241
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 = at({
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");
@@ -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 $ = Symbol.for("TRANSITION_STRATEGY"), lt = (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 $ = Symbol.for("TRANSITION_STRATEGY"), lt = (i) => ({
587
631
  direction: "forward"
588
632
  };
589
633
  }
590
- }), ut = () => ({
634
+ }), ft = () => ({
591
635
  runIn: async (i) => i.in ? {
592
636
  config: await i.in,
593
637
  state: {
@@ -624,48 +668,48 @@ const $ = Symbol.for("TRANSITION_STRATEGY"), lt = (i) => ({
624
668
  to: 0,
625
669
  direction: "forward"
626
670
  }
627
- }), B = "data-ssgoi-scope", K = "data-ssgoi-scope-ready";
628
- function kt() {
671
+ }), J = "data-ssgoi-scope", Q = "data-ssgoi-scope-ready";
672
+ function Vt() {
629
673
  return (i) => {
630
674
  if (i)
631
- return i.setAttribute(B, ""), queueMicrotask(() => {
675
+ return i.setAttribute(J, ""), queueMicrotask(() => {
632
676
  queueMicrotask(() => {
633
- i.setAttribute(K, "true");
677
+ i.setAttribute(Q, "true");
634
678
  });
635
679
  }), () => {
636
680
  };
637
681
  };
638
682
  }
639
- function ft(i) {
640
- return i.hasAttribute(K);
641
- }
642
683
  function dt(i) {
643
- return i.closest(`[${B}]`);
684
+ return i.hasAttribute(Q);
644
685
  }
645
- function mt(i, e) {
686
+ function mt(i) {
687
+ return i.closest(`[${J}]`);
688
+ }
689
+ function ht(i, e) {
646
690
  var v;
647
691
  let t = null, n = null, r = null, s = null;
648
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, a)) || lt(a), c = 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 R = {
659
- in: I(A),
660
- out: k ? I(k) : void 0
661
- }, S = await o.runIn(R);
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 = _(
712
+ const w = Y(
669
713
  {
670
714
  ...p,
671
715
  onEnd: () => {
@@ -686,22 +730,22 @@ function mt(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 R = {
690
- in: A ? I(A) : void 0,
691
- out: I(k)
692
- }, S = await o.runOut(R);
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 = _(
743
+ const w = Y(
700
744
  {
701
745
  ...p,
702
746
  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);
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
@@ -729,13 +773,13 @@ function mt(i, e) {
729
773
  return requestAnimationFrame(() => {
730
774
  r = l.parentElement, s = l.nextElementSibling;
731
775
  }), h = !1, (e == null ? void 0 : e.scope) === "local" ? queueMicrotask(() => {
732
- f = dt(l), !(f && !ft(f)) && c(l);
776
+ f = mt(l), !(f && !dt(f)) && c(l);
733
777
  }) : c(l), y(l);
734
778
  };
735
779
  }
736
780
  const b = /* @__PURE__ */ new Map();
737
781
  let T = null, q = !1;
738
- function J(i) {
782
+ function tt(i) {
739
783
  if (i instanceof HTMLElement && b.has(i)) {
740
784
  const t = b.get(i);
741
785
  b.delete(i), queueMicrotask(() => {
@@ -745,16 +789,16 @@ function J(i) {
745
789
  const e = i.childNodes;
746
790
  for (let t = 0; t < e.length; t++) {
747
791
  const n = e[t];
748
- n && J(n);
792
+ n && tt(n);
749
793
  }
750
794
  }
751
- function ht() {
795
+ function gt() {
752
796
  q || typeof document > "u" || (q = !0, T = new MutationObserver((i) => {
753
797
  for (const e of i) {
754
798
  const t = e.removedNodes;
755
799
  for (let n = 0; n < t.length; n++) {
756
800
  const r = t[n];
757
- r && J(r);
801
+ r && tt(r);
758
802
  }
759
803
  }
760
804
  }), document.body ? T.observe(document.body, {
@@ -771,10 +815,10 @@ function ht() {
771
815
  { once: !0 }
772
816
  ));
773
817
  }
774
- function gt(i, e) {
775
- ht(), b.set(i, e);
818
+ function pt(i, e) {
819
+ gt(), b.set(i, e);
776
820
  }
777
- function Vt(i) {
821
+ function Mt(i) {
778
822
  return b.has(i);
779
823
  }
780
824
  function Rt() {
@@ -788,13 +832,13 @@ function It() {
788
832
  b.clear(), T == null || T.disconnect(), T = null, q = !1;
789
833
  }
790
834
  const O = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map();
791
- function pt(i, e, t) {
835
+ function wt(i, e, t) {
792
836
  O.set(i, e);
793
837
  let n = H.get(i);
794
838
  if (n)
795
839
  return n;
796
840
  const r = e;
797
- return n = mt(
841
+ return n = ht(
798
842
  () => {
799
843
  const s = O.get(i);
800
844
  return s || (console.warn(`Transition "${String(i)}" not found`), {});
@@ -803,23 +847,23 @@ function pt(i, e, t) {
803
847
  strategy: t == null ? void 0 : t.strategy,
804
848
  scope: t == null ? void 0 : t.scope,
805
849
  onCleanupEnd: () => {
806
- O.get(i) === r && wt(i);
850
+ O.get(i) === r && yt(i);
807
851
  }
808
852
  }
809
853
  ), H.set(i, n), n;
810
854
  }
811
- function wt(i) {
855
+ function yt(i) {
812
856
  O.delete(i), H.delete(i), N.delete(i);
813
857
  }
814
- function Mt(i, e = "manual") {
815
- const t = pt(
858
+ function xt(i, e = "manual") {
859
+ const t = wt(
816
860
  i.key,
817
861
  {
818
862
  in: i.in,
819
863
  out: i.out
820
864
  },
821
865
  {
822
- strategy: i[$],
866
+ strategy: i[Z],
823
867
  scope: i.scope
824
868
  }
825
869
  );
@@ -829,11 +873,11 @@ function Mt(i, e = "manual") {
829
873
  return n || (n = (r) => {
830
874
  if (r) {
831
875
  const s = t(r);
832
- s && gt(r, s);
876
+ s && pt(r, s);
833
877
  }
834
878
  }, N.set(i.key, n), n);
835
879
  }
836
- function yt(i) {
880
+ function vt(i) {
837
881
  const e = i.filter((t) => t.symmetric).map((t) => ({
838
882
  from: t.to,
839
883
  to: t.from,
@@ -841,7 +885,7 @@ function yt(i) {
841
885
  }));
842
886
  return [...i, ...e];
843
887
  }
844
- function vt(i) {
888
+ function St(i) {
845
889
  let e = !1, t = 0, n = 0, r = !1;
846
890
  const s = 50, a = (l) => {
847
891
  if (!i) return;
@@ -870,7 +914,7 @@ function vt(i) {
870
914
  }
871
915
  };
872
916
  }
873
- const St = (i) => {
917
+ const Ct = (i) => {
874
918
  let e = i.parentElement;
875
919
  for (; e && e !== document.body; ) {
876
920
  const t = window.getComputedStyle(e), n = t.overflow + t.overflowY + t.overflowX;
@@ -879,7 +923,7 @@ const St = (i) => {
879
923
  e = e.parentElement;
880
924
  }
881
925
  return document.documentElement;
882
- }, Ct = (i) => {
926
+ }, At = (i) => {
883
927
  let e = i.parentElement;
884
928
  for (; e && e !== document.body; ) {
885
929
  const t = window.getComputedStyle(e).position;
@@ -889,7 +933,7 @@ const St = (i) => {
889
933
  }
890
934
  return document.body;
891
935
  };
892
- function At() {
936
+ function Et() {
893
937
  let i = null, e = null;
894
938
  const t = /* @__PURE__ */ new Map();
895
939
  let n = null;
@@ -901,7 +945,7 @@ function At() {
901
945
  };
902
946
  return {
903
947
  initializeContext: (f, h) => {
904
- e = f, i || (i = St(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
948
+ e = f, i || (i = Ct(f), (i === document.documentElement ? window : i).addEventListener("scroll", r, {
905
949
  passive: !0
906
950
  })), n = h;
907
951
  },
@@ -913,7 +957,7 @@ function At() {
913
957
  };
914
958
  },
915
959
  getScrollContainer: () => i,
916
- getPositionedParentElement: () => e ? Ct(e) : document.body,
960
+ getPositionedParentElement: () => e ? At(e) : document.body,
917
961
  getScrollPosition: (f) => f && t.has(f) ? t.get(f) : { x: 0, y: 0 }
918
962
  };
919
963
  }
@@ -926,7 +970,7 @@ function x(i, e) {
926
970
  }
927
971
  return i === e;
928
972
  }
929
- function Et(i, e, t) {
973
+ function Tt(i, e, t) {
930
974
  for (const n of t)
931
975
  if (x(i, n.from) && x(e, n.to))
932
976
  return n.transition;
@@ -935,7 +979,7 @@ function Et(i, e, t) {
935
979
  return n.transition;
936
980
  return null;
937
981
  }
938
- function xt(i, e) {
982
+ function Ot(i, e) {
939
983
  const {
940
984
  transitions: t = [],
941
985
  defaultTransition: n,
@@ -945,27 +989,27 @@ function xt(i, e) {
945
989
  // Default to true - skip animations on iOS swipe
946
990
  } = i, { outFirst: a = !0 } = e || {};
947
991
  let o = null;
948
- const c = yt(t), {
992
+ const c = vt(t), {
949
993
  initializeContext: u,
950
994
  calculateScrollOffset: f,
951
995
  getScrollContainer: h,
952
996
  getPositionedParentElement: y,
953
997
  getScrollPosition: v
954
- } = At(), l = vt(s);
998
+ } = Et(), l = St(s);
955
999
  l.initialize();
956
1000
  function d() {
957
1001
  if (o != null && o.from && (o != null && o.to)) {
958
1002
  const { from: w, to: g } = r(
959
1003
  o.from,
960
1004
  o.to
961
- ), C = Et(
1005
+ ), C = Tt(
962
1006
  w,
963
1007
  g,
964
1008
  c
965
1009
  ) || n, V = f(
966
1010
  o.from,
967
1011
  o.to
968
- ), P = {
1012
+ ), R = {
969
1013
  scrollOffset: V,
970
1014
  scroll: v(o.from),
971
1015
  get scrollingElement() {
@@ -974,7 +1018,7 @@ function xt(i, e) {
974
1018
  get positionedParent() {
975
1019
  return y();
976
1020
  }
977
- }, Q = {
1021
+ }, et = {
978
1022
  scrollOffset: V,
979
1023
  get scroll() {
980
1024
  return o ? v(o.to) : { x: 0, y: 0 };
@@ -987,9 +1031,9 @@ function xt(i, e) {
987
1031
  }
988
1032
  };
989
1033
  C && (C.out && o.outResolve && o.outResolve(
990
- (D) => C.out(D, P)
1034
+ (z) => C.out(z, R)
991
1035
  ), C.in && o.inResolve && o.inResolve(
992
- (D) => C.in(D, Q)
1036
+ (z) => C.in(z, et)
993
1037
  )), o = null;
994
1038
  }
995
1039
  }
@@ -1010,32 +1054,32 @@ function xt(i, e) {
1010
1054
  in: async (g) => (u(g, w), (await S(w, "in"))(g)),
1011
1055
  out: async (g) => (await S(w, "out"))(g),
1012
1056
  // Add page transition strategy for page-level transitions
1013
- [$]: ut
1057
+ [Z]: ft
1014
1058
  });
1015
1059
  }
1016
1060
  export {
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,
1061
+ J as SCOPE_ATTR,
1062
+ Q as SCOPE_READY_ATTR,
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,
1025
1069
  Rt as getWatchedCount,
1026
- Lt as isCssAnimation,
1070
+ zt as isCssAnimation,
1027
1071
  Dt as isMultiSpring,
1028
- ft as isScopeReady,
1029
- zt as isSingleSpring,
1072
+ dt as isScopeReady,
1073
+ _t as isSingleSpring,
1030
1074
  qt as isTickAnimation,
1031
- Vt as isWatched,
1032
- Yt as jaeminInternal,
1033
- _ as normalizeMultiSpringSchedule,
1034
- I as normalizeToMultiSpring,
1075
+ Mt as isWatched,
1076
+ Ut as jaeminInternal,
1077
+ Y as normalizeMultiSpringSchedule,
1078
+ P as normalizeToMultiSpring,
1035
1079
  It as resetObserver,
1036
- Mt as transition,
1080
+ xt as transition,
1037
1081
  Pt as triggerUnmount,
1038
1082
  Ht as validateAnimationMode,
1039
1083
  Nt as validateSpringItem,
1040
- gt as watchUnmount
1084
+ pt as watchUnmount
1041
1085
  };
package/dist/types.d.ts CHANGED
@@ -2,6 +2,20 @@ export type TransitionKey = string | symbol;
2
2
  export type SpringConfig = {
3
3
  stiffness: number;
4
4
  damping: number;
5
+ /**
6
+ * Enable double spring for ease-in-out effect (Chained/Lagged Spring)
7
+ *
8
+ * - true: same stiffness for both springs
9
+ * - number (0-1): follower stiffness ratio (smaller = stronger ease-in)
10
+ * - 1.0: same as true
11
+ * - 0.5: follower has half stiffness → stronger ease-in
12
+ * - 0.3: even stronger ease-in
13
+ *
14
+ * Creates a two-spring system:
15
+ * - Leader spring: tracks the target directly
16
+ * - Follower spring: tracks the leader's position (this is the output)
17
+ */
18
+ doubleSpring?: boolean | number;
5
19
  };
6
20
  /**
7
21
  * CSS style object type