@ssgoi/core 5.2.1 → 6.0.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 (240) hide show
  1. package/dist/animation/animation.d.ts +50 -0
  2. package/dist/animation/animation.d.ts.map +1 -0
  3. package/dist/animation/host-animation.d.ts +43 -0
  4. package/dist/animation/host-animation.d.ts.map +1 -0
  5. package/dist/animation/index.d.ts +6 -0
  6. package/dist/animation/index.d.ts.map +1 -0
  7. package/dist/animation/integrator/double-spring-integrator.d.ts.map +1 -0
  8. package/dist/{animator → animation}/integrator/index.d.ts +1 -0
  9. package/dist/animation/integrator/index.d.ts.map +1 -0
  10. package/dist/animation/integrator/inertia-integrator.d.ts.map +1 -0
  11. package/dist/animation/integrator/linear-integrator.d.ts +23 -0
  12. package/dist/animation/integrator/linear-integrator.d.ts.map +1 -0
  13. package/dist/{animator → animation}/integrator/provider.d.ts +1 -1
  14. package/dist/animation/integrator/provider.d.ts.map +1 -0
  15. package/dist/animation/integrator/spring-integrator.d.ts.map +1 -0
  16. package/dist/animation/integrator/types.d.ts.map +1 -0
  17. package/dist/animation/multi-animation.d.ts +39 -0
  18. package/dist/animation/multi-animation.d.ts.map +1 -0
  19. package/dist/animation/web-animation.d.ts +63 -0
  20. package/dist/animation/web-animation.d.ts.map +1 -0
  21. package/dist/index.cjs +35 -1
  22. package/dist/index.d.ts +4 -7
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +1271 -1192
  25. package/dist/internal.cjs +1 -0
  26. package/dist/internal.d.ts +4 -0
  27. package/dist/internal.d.ts.map +1 -0
  28. package/dist/internal.js +504 -0
  29. package/dist/multi-animation-B_Hl1HEU.cjs +1 -0
  30. package/dist/multi-animation-CST6aZ8y.js +276 -0
  31. package/dist/ssgoi-transition/create-context-manager.d.ts +1 -1
  32. package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -1
  33. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +18 -31
  34. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  35. package/dist/ssgoi-transition/find-matching-transition.d.ts +4 -4
  36. package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -1
  37. package/dist/ssgoi-transition/navigation-detector-strategy.d.ts +5 -15
  38. package/dist/ssgoi-transition/navigation-detector-strategy.d.ts.map +1 -1
  39. package/dist/ssgoi-transition/process-symmetric-transitions.d.ts +2 -2
  40. package/dist/ssgoi-transition/process-symmetric-transitions.d.ts.map +1 -1
  41. package/dist/ssgoi-transition/unmount-observer.d.ts +17 -0
  42. package/dist/ssgoi-transition/unmount-observer.d.ts.map +1 -0
  43. package/dist/transitions/blind/index.d.ts +6 -0
  44. package/dist/transitions/blind/index.d.ts.map +1 -0
  45. package/dist/transitions/blind/transition.d.ts +16 -0
  46. package/dist/transitions/blind/transition.d.ts.map +1 -0
  47. package/dist/transitions/drill/index.d.ts +9 -0
  48. package/dist/transitions/drill/index.d.ts.map +1 -0
  49. package/dist/transitions/drill/provider/crossfade.d.ts +3 -0
  50. package/dist/transitions/drill/provider/crossfade.d.ts.map +1 -0
  51. package/dist/transitions/drill/provider/index.d.ts +3 -0
  52. package/dist/transitions/drill/provider/index.d.ts.map +1 -0
  53. package/dist/transitions/drill/provider/parallax.d.ts +3 -0
  54. package/dist/transitions/drill/provider/parallax.d.ts.map +1 -0
  55. package/dist/transitions/drill/transition.d.ts +5 -0
  56. package/dist/transitions/drill/transition.d.ts.map +1 -0
  57. package/dist/transitions/drill/types.d.ts +23 -0
  58. package/dist/transitions/drill/types.d.ts.map +1 -0
  59. package/dist/transitions/fade/index.d.ts +6 -0
  60. package/dist/transitions/fade/index.d.ts.map +1 -0
  61. package/dist/transitions/fade/transition.d.ts +6 -0
  62. package/dist/transitions/fade/transition.d.ts.map +1 -0
  63. package/dist/transitions/film/index.d.ts +6 -0
  64. package/dist/transitions/film/index.d.ts.map +1 -0
  65. package/dist/transitions/film/transition.d.ts +27 -0
  66. package/dist/transitions/film/transition.d.ts.map +1 -0
  67. package/dist/transitions/hero/index.d.ts +6 -0
  68. package/dist/transitions/hero/index.d.ts.map +1 -0
  69. package/dist/transitions/hero/transition.d.ts +7 -0
  70. package/dist/transitions/hero/transition.d.ts.map +1 -0
  71. package/dist/transitions/index.d.ts +10 -12
  72. package/dist/transitions/index.d.ts.map +1 -1
  73. package/dist/transitions/jaemin/index.d.ts +6 -0
  74. package/dist/transitions/jaemin/index.d.ts.map +1 -0
  75. package/dist/transitions/jaemin/transition.d.ts +18 -0
  76. package/dist/transitions/jaemin/transition.d.ts.map +1 -0
  77. package/dist/transitions/rotate/index.d.ts +6 -0
  78. package/dist/transitions/rotate/index.d.ts.map +1 -0
  79. package/dist/transitions/rotate/transition.d.ts +6 -0
  80. package/dist/transitions/rotate/transition.d.ts.map +1 -0
  81. package/dist/transitions/scroll/index.d.ts +15 -0
  82. package/dist/transitions/scroll/index.d.ts.map +1 -0
  83. package/dist/transitions/scroll/transition.d.ts +7 -0
  84. package/dist/transitions/scroll/transition.d.ts.map +1 -0
  85. package/dist/transitions/sheet/index.d.ts +9 -0
  86. package/dist/transitions/sheet/index.d.ts.map +1 -0
  87. package/dist/transitions/sheet/provider/background-scale.d.ts +3 -0
  88. package/dist/transitions/sheet/provider/background-scale.d.ts.map +1 -0
  89. package/dist/transitions/sheet/provider/index.d.ts +3 -0
  90. package/dist/transitions/sheet/provider/index.d.ts.map +1 -0
  91. package/dist/transitions/sheet/provider/static.d.ts +3 -0
  92. package/dist/transitions/sheet/provider/static.d.ts.map +1 -0
  93. package/dist/transitions/sheet/transition.d.ts +5 -0
  94. package/dist/transitions/sheet/transition.d.ts.map +1 -0
  95. package/dist/transitions/sheet/types.d.ts +19 -0
  96. package/dist/transitions/sheet/types.d.ts.map +1 -0
  97. package/dist/transitions/slide/index.d.ts +6 -0
  98. package/dist/transitions/slide/index.d.ts.map +1 -0
  99. package/dist/transitions/slide/transition.d.ts +7 -0
  100. package/dist/transitions/slide/transition.d.ts.map +1 -0
  101. package/dist/transitions/strip/index.d.ts +6 -0
  102. package/dist/transitions/strip/index.d.ts.map +1 -0
  103. package/dist/transitions/strip/transition.d.ts +6 -0
  104. package/dist/transitions/strip/transition.d.ts.map +1 -0
  105. package/dist/transitions/utils.d.ts +11 -7
  106. package/dist/transitions/utils.d.ts.map +1 -1
  107. package/dist/transitions/zoom/index.d.ts +8 -0
  108. package/dist/transitions/zoom/index.d.ts.map +1 -0
  109. package/dist/transitions/zoom/provider/expand.d.ts +5 -0
  110. package/dist/transitions/zoom/provider/expand.d.ts.map +1 -0
  111. package/dist/transitions/zoom/provider/index.d.ts +3 -0
  112. package/dist/transitions/zoom/provider/index.d.ts.map +1 -0
  113. package/dist/transitions/zoom/provider/static.d.ts +5 -0
  114. package/dist/transitions/zoom/provider/static.d.ts.map +1 -0
  115. package/dist/transitions/zoom/transition.d.ts +5 -0
  116. package/dist/transitions/zoom/transition.d.ts.map +1 -0
  117. package/dist/transitions/zoom/types.d.ts +34 -0
  118. package/dist/transitions/zoom/types.d.ts.map +1 -0
  119. package/dist/transitions/zoom/zoom-element.d.ts +4 -0
  120. package/dist/transitions/zoom/zoom-element.d.ts.map +1 -0
  121. package/dist/types/index.d.ts +175 -0
  122. package/dist/types/index.d.ts.map +1 -0
  123. package/dist/types.cjs +1 -1
  124. package/dist/types.d.ts +2 -504
  125. package/dist/types.js +3 -77
  126. package/dist/utils/get-scrolling-element.d.ts.map +1 -1
  127. package/dist/utils/get-viewport-rect.d.ts +17 -0
  128. package/dist/utils/get-viewport-rect.d.ts.map +1 -0
  129. package/dist/utils/index.d.ts +2 -0
  130. package/dist/utils/index.d.ts.map +1 -1
  131. package/dist/utils/prepare-outgoing.d.ts +2 -2
  132. package/dist/utils/prepare-outgoing.d.ts.map +1 -1
  133. package/dist/utils/promise-all.d.ts +18 -0
  134. package/dist/utils/promise-all.d.ts.map +1 -0
  135. package/package.json +7 -19
  136. package/dist/animator/integrator/double-spring-integrator.d.ts.map +0 -1
  137. package/dist/animator/integrator/index.d.ts.map +0 -1
  138. package/dist/animator/integrator/inertia-integrator.d.ts.map +0 -1
  139. package/dist/animator/integrator/provider.d.ts.map +0 -1
  140. package/dist/animator/integrator/spring-integrator.d.ts.map +0 -1
  141. package/dist/animator/integrator/types.d.ts.map +0 -1
  142. package/dist/animator/multi-animator.d.ts +0 -101
  143. package/dist/animator/multi-animator.d.ts.map +0 -1
  144. package/dist/animator/runner/css-runner.d.ts +0 -17
  145. package/dist/animator/runner/css-runner.d.ts.map +0 -1
  146. package/dist/animator/runner/keyframes-runner.d.ts +0 -14
  147. package/dist/animator/runner/keyframes-runner.d.ts.map +0 -1
  148. package/dist/animator/runner/provider.d.ts +0 -44
  149. package/dist/animator/runner/provider.d.ts.map +0 -1
  150. package/dist/animator/runner/tick-runner.d.ts +0 -16
  151. package/dist/animator/runner/tick-runner.d.ts.map +0 -1
  152. package/dist/animator/runner/ticker.d.ts +0 -38
  153. package/dist/animator/runner/ticker.d.ts.map +0 -1
  154. package/dist/animator/runner/types.d.ts +0 -34
  155. package/dist/animator/runner/types.d.ts.map +0 -1
  156. package/dist/animator/single-animator.d.ts +0 -65
  157. package/dist/animator/single-animator.d.ts.map +0 -1
  158. package/dist/animator/types.d.ts +0 -57
  159. package/dist/animator/types.d.ts.map +0 -1
  160. package/dist/presets/index.cjs +0 -1
  161. package/dist/presets/index.d.ts +0 -22
  162. package/dist/presets/index.d.ts.map +0 -1
  163. package/dist/presets/index.js +0 -50
  164. package/dist/provider-B2B8CK6H.js +0 -142
  165. package/dist/provider-BKaONTeg.cjs +0 -1
  166. package/dist/spring-integrator-95Mh7mdw.cjs +0 -1
  167. package/dist/spring-integrator-BM4a-82c.js +0 -33
  168. package/dist/transition/create-transition-callback.d.ts +0 -8
  169. package/dist/transition/create-transition-callback.d.ts.map +0 -1
  170. package/dist/transition/transition-scope.d.ts +0 -36
  171. package/dist/transition/transition-scope.d.ts.map +0 -1
  172. package/dist/transition/transition-strategy.d.ts +0 -75
  173. package/dist/transition/transition-strategy.d.ts.map +0 -1
  174. package/dist/transition/transition.d.ts +0 -51
  175. package/dist/transition/transition.d.ts.map +0 -1
  176. package/dist/transition/unmount-observer.d.ts +0 -43
  177. package/dist/transition/unmount-observer.d.ts.map +0 -1
  178. package/dist/transitions/blur.d.ts +0 -12
  179. package/dist/transitions/blur.d.ts.map +0 -1
  180. package/dist/transitions/bounce.d.ts +0 -13
  181. package/dist/transitions/bounce.d.ts.map +0 -1
  182. package/dist/transitions/fade.d.ts +0 -10
  183. package/dist/transitions/fade.d.ts.map +0 -1
  184. package/dist/transitions/fly.d.ts +0 -11
  185. package/dist/transitions/fly.d.ts.map +0 -1
  186. package/dist/transitions/index.cjs +0 -1
  187. package/dist/transitions/index.js +0 -285
  188. package/dist/transitions/mask.d.ts +0 -12
  189. package/dist/transitions/mask.d.ts.map +0 -1
  190. package/dist/transitions/none.d.ts +0 -8
  191. package/dist/transitions/none.d.ts.map +0 -1
  192. package/dist/transitions/rotate.d.ts +0 -15
  193. package/dist/transitions/rotate.d.ts.map +0 -1
  194. package/dist/transitions/scale.d.ts +0 -11
  195. package/dist/transitions/scale.d.ts.map +0 -1
  196. package/dist/transitions/slide.d.ts +0 -13
  197. package/dist/transitions/slide.d.ts.map +0 -1
  198. package/dist/types.d.ts.map +0 -1
  199. package/dist/view-transitions/blind.d.ts +0 -11
  200. package/dist/view-transitions/blind.d.ts.map +0 -1
  201. package/dist/view-transitions/curtain-reveal.d.ts +0 -18
  202. package/dist/view-transitions/curtain-reveal.d.ts.map +0 -1
  203. package/dist/view-transitions/depth.d.ts +0 -21
  204. package/dist/view-transitions/depth.d.ts.map +0 -1
  205. package/dist/view-transitions/drill.d.ts +0 -9
  206. package/dist/view-transitions/drill.d.ts.map +0 -1
  207. package/dist/view-transitions/fade.d.ts +0 -8
  208. package/dist/view-transitions/fade.d.ts.map +0 -1
  209. package/dist/view-transitions/film.d.ts +0 -10
  210. package/dist/view-transitions/film.d.ts.map +0 -1
  211. package/dist/view-transitions/hero.d.ts +0 -9
  212. package/dist/view-transitions/hero.d.ts.map +0 -1
  213. package/dist/view-transitions/index.cjs +0 -35
  214. package/dist/view-transitions/index.d.ts +0 -18
  215. package/dist/view-transitions/index.d.ts.map +0 -1
  216. package/dist/view-transitions/index.js +0 -1614
  217. package/dist/view-transitions/instagram.d.ts +0 -8
  218. package/dist/view-transitions/instagram.d.ts.map +0 -1
  219. package/dist/view-transitions/jaemin.d.ts +0 -21
  220. package/dist/view-transitions/jaemin.d.ts.map +0 -1
  221. package/dist/view-transitions/pinterest.d.ts +0 -8
  222. package/dist/view-transitions/pinterest.d.ts.map +0 -1
  223. package/dist/view-transitions/rotate.d.ts +0 -6
  224. package/dist/view-transitions/rotate.d.ts.map +0 -1
  225. package/dist/view-transitions/scroll.d.ts +0 -8
  226. package/dist/view-transitions/scroll.d.ts.map +0 -1
  227. package/dist/view-transitions/sheet.d.ts +0 -21
  228. package/dist/view-transitions/sheet.d.ts.map +0 -1
  229. package/dist/view-transitions/slide.d.ts +0 -8
  230. package/dist/view-transitions/slide.d.ts.map +0 -1
  231. package/dist/view-transitions/snap.d.ts +0 -16
  232. package/dist/view-transitions/snap.d.ts.map +0 -1
  233. package/dist/view-transitions/strip.d.ts +0 -7
  234. package/dist/view-transitions/strip.d.ts.map +0 -1
  235. package/dist/view-transitions/swap.d.ts +0 -15
  236. package/dist/view-transitions/swap.d.ts.map +0 -1
  237. /package/dist/{animator → animation}/integrator/double-spring-integrator.d.ts +0 -0
  238. /package/dist/{animator → animation}/integrator/inertia-integrator.d.ts +0 -0
  239. /package/dist/{animator → animation}/integrator/spring-integrator.d.ts +0 -0
  240. /package/dist/{animator → animation}/integrator/types.d.ts +0 -0
@@ -0,0 +1,276 @@
1
+ var d = Object.defineProperty;
2
+ var f = (r, l, e) => l in r ? d(r, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[l] = e;
3
+ var s = (r, l, e) => f(r, typeof l != "symbol" ? l + "" : l, e);
4
+ class p {
5
+ constructor() {
6
+ /** Current playback rate (1 = realtime, 0 = paused, negative = backwards) */
7
+ s(this, "_playbackRate", 1);
8
+ /** Fired every frame with the most recent value. Optional. */
9
+ s(this, "onUpdate");
10
+ /** Fired once when the animation settles. */
11
+ s(this, "onComplete");
12
+ }
13
+ get playbackRate() {
14
+ return this._playbackRate;
15
+ }
16
+ set playbackRate(l) {
17
+ this._playbackRate = l;
18
+ }
19
+ }
20
+ const R = 0.01, C = 0.01, y = 0.05, c = 1e3 / 60;
21
+ class b extends p {
22
+ constructor(e) {
23
+ super();
24
+ s(this, "element");
25
+ s(this, "integrator");
26
+ s(this, "styleFn");
27
+ s(this, "lowerBound");
28
+ s(this, "upperBound");
29
+ s(this, "currentValue");
30
+ s(this, "currentVelocity", 0);
31
+ s(this, "frames", []);
32
+ s(this, "waapi", null);
33
+ s(this, "startTime", 0);
34
+ s(this, "running", !1);
35
+ s(this, "paused", !1);
36
+ s(this, "settled", !1);
37
+ s(this, "reversing", !1);
38
+ this.element = e.element, this.integrator = e.integrator, this.styleFn = e.style, this.lowerBound = e.lowerBound ?? 0, this.upperBound = e.upperBound ?? 1, this.currentValue = this.lowerBound, this.onUpdate = e.onUpdate, this.onComplete = e.onComplete;
39
+ }
40
+ play() {
41
+ if (this.reversing = !1, this.paused && this.waapi) {
42
+ this.paused = !1, this.running = !0, this.waapi.play();
43
+ return;
44
+ }
45
+ this.runToward(this.upperBound);
46
+ }
47
+ reverse() {
48
+ this.reversing = !0, this.runToward(this.lowerBound);
49
+ }
50
+ pause() {
51
+ var e;
52
+ this.running && (this.captureLiveState(), (e = this.waapi) == null || e.pause(), this.running = !1, this.paused = !0);
53
+ }
54
+ complete() {
55
+ var e;
56
+ this.clearWaapi(), this.running = !1, this.paused = !1, this.currentValue = this.upperBound, this.currentVelocity = 0, this.applyStyleAt(this.currentValue), this.settled = !0, (e = this.onComplete) == null || e.call(this);
57
+ }
58
+ get isAnimating() {
59
+ return this.running;
60
+ }
61
+ get isPaused() {
62
+ return this.paused;
63
+ }
64
+ get isComplete() {
65
+ return this.settled;
66
+ }
67
+ get isReversing() {
68
+ return this.reversing;
69
+ }
70
+ get playbackRate() {
71
+ return super.playbackRate;
72
+ }
73
+ set playbackRate(e) {
74
+ super.playbackRate = e, this.waapi && (this.waapi.playbackRate = e);
75
+ }
76
+ getPose() {
77
+ return this.running && this.captureLiveState(), [
78
+ {
79
+ element: this.element,
80
+ value: this.currentValue,
81
+ velocity: this.currentVelocity
82
+ }
83
+ ];
84
+ }
85
+ getTimeline() {
86
+ const e = this.frames.map((t) => {
87
+ const i = t.position, n = this.lowerBound + this.upperBound - i;
88
+ return {
89
+ time: t.time,
90
+ value: t.position,
91
+ velocity: t.velocity,
92
+ style: this.styleFn(i, n)
93
+ };
94
+ });
95
+ return [{ element: this.element, frames: e }];
96
+ }
97
+ matchInto(e) {
98
+ const t = e.find((i) => i.element === this.element);
99
+ t && (this.currentValue = t.value, this.currentVelocity = t.velocity);
100
+ }
101
+ /* ───────────────────────────────────────────────────────── private */
102
+ runToward(e) {
103
+ var h;
104
+ if (this.running && this.captureLiveState(), this.clearWaapi(), this.running = !1, this.paused = !1, this.settled = !1, this.frames = g(
105
+ this.integrator,
106
+ this.currentValue,
107
+ e,
108
+ this.currentVelocity
109
+ ), this.frames.length === 0) {
110
+ this.currentValue = e, this.currentVelocity = 0, this.applyStyleAt(e), this.settled = !0, (h = this.onComplete) == null || h.call(this);
111
+ return;
112
+ }
113
+ const t = this.frames.map((o) => {
114
+ const u = o.position, m = this.lowerBound + this.upperBound - u;
115
+ return this.styleFn(u, m);
116
+ }), i = t[0];
117
+ if (i)
118
+ for (const o of Object.keys(i))
119
+ this.element.style[o] = "";
120
+ const n = this.frames[this.frames.length - 1], a = n.time;
121
+ this.waapi = this.element.animate(t, {
122
+ duration: a,
123
+ fill: "forwards",
124
+ easing: "linear",
125
+ composite: "replace"
126
+ }), this.waapi.playbackRate = this.playbackRate, this.startTime = performance.now(), this.running = !0, this.waapi.onfinish = () => {
127
+ var o;
128
+ this.running && (this.running = !1, this.settled = !0, this.currentValue = n.position, this.currentVelocity = 0, (o = this.onComplete) == null || o.call(this));
129
+ };
130
+ }
131
+ clearWaapi() {
132
+ var e;
133
+ (e = this.waapi) == null || e.cancel(), this.waapi = null;
134
+ }
135
+ captureLiveState() {
136
+ if (this.frames.length === 0) return;
137
+ const e = performance.now() - this.startTime, { position: t, velocity: i } = v(this.frames, e);
138
+ this.currentValue = t, this.currentVelocity = i;
139
+ }
140
+ applyStyleAt(e) {
141
+ const t = this.lowerBound + this.upperBound - e, i = this.styleFn(e, t);
142
+ for (const [n, a] of Object.entries(i))
143
+ this.element.style[n] = typeof a == "number" ? String(a) : a;
144
+ }
145
+ }
146
+ function g(r, l, e, t) {
147
+ if (l === e && t === 0) return [];
148
+ const i = 600;
149
+ let n = { position: l, velocity: t }, a = 0;
150
+ const h = [];
151
+ for (let o = 0; o < i; o++) {
152
+ const u = o * c;
153
+ if (h.push({ time: u, position: n.position, velocity: n.velocity }), n = r.step(n, e, c / 1e3), r.isSettled(n, e)) {
154
+ if (a += c / 1e3, a >= y) {
155
+ h.push({
156
+ time: (o + 1) * c,
157
+ position: e,
158
+ velocity: 0
159
+ });
160
+ break;
161
+ }
162
+ } else
163
+ a = 0;
164
+ }
165
+ return h;
166
+ }
167
+ function v(r, l) {
168
+ if (r.length === 0) return { position: 0, velocity: 0 };
169
+ const e = r[0], t = r[r.length - 1];
170
+ if (l <= 0)
171
+ return { position: e.position, velocity: e.velocity };
172
+ if (l >= t.time)
173
+ return { position: t.position, velocity: t.velocity };
174
+ let i = 0, n = r.length - 1;
175
+ for (; i < n - 1; ) {
176
+ const u = i + n >> 1;
177
+ r[u].time <= l ? i = u : n = u;
178
+ }
179
+ const a = r[i], h = r[n], o = (l - a.time) / (h.time - a.time);
180
+ return {
181
+ position: a.position + (h.position - a.position) * o,
182
+ velocity: a.velocity + (h.velocity - a.velocity) * o
183
+ };
184
+ }
185
+ class k extends p {
186
+ constructor(e, t = {}) {
187
+ super();
188
+ s(this, "children");
189
+ s(this, "mode");
190
+ s(this, "pendingComplete", 0);
191
+ s(this, "running", !1);
192
+ this.children = e, this.mode = t.mode ?? "parallel";
193
+ }
194
+ play() {
195
+ this.running && this.pause(), this.running = !0, this.mode === "parallel" ? this.startParallel("play") : this.startSequence("play", 0);
196
+ }
197
+ reverse() {
198
+ this.running && this.pause(), this.running = !0, this.mode === "parallel" ? this.startParallel("reverse") : this.startSequence("reverse", 0);
199
+ }
200
+ pause() {
201
+ this.running = !1;
202
+ for (const e of this.children) e.pause();
203
+ }
204
+ complete() {
205
+ var e;
206
+ this.running = !1;
207
+ for (const t of this.children) t.complete();
208
+ (e = this.onComplete) == null || e.call(this);
209
+ }
210
+ getPose() {
211
+ return this.children.flatMap((e) => e.getPose());
212
+ }
213
+ getTimeline() {
214
+ return this.children.flatMap((e) => e.getTimeline());
215
+ }
216
+ matchInto(e) {
217
+ }
218
+ get isAnimating() {
219
+ return this.children.some((e) => e.isAnimating);
220
+ }
221
+ get isPaused() {
222
+ return this.children.some((e) => e.isPaused) && this.children.every((e) => e.isPaused || e.isComplete);
223
+ }
224
+ get isComplete() {
225
+ return this.children.every((e) => e.isComplete);
226
+ }
227
+ get isReversing() {
228
+ return this.children.some((e) => e.isReversing);
229
+ }
230
+ get playbackRate() {
231
+ return super.playbackRate;
232
+ }
233
+ set playbackRate(e) {
234
+ super.playbackRate = e;
235
+ for (const t of this.children) t.playbackRate = e;
236
+ }
237
+ /* ───────────────────────────────────────────────────────── private */
238
+ startParallel(e) {
239
+ if (this.pendingComplete = this.children.length, this.pendingComplete === 0) {
240
+ this.handleFinished();
241
+ return;
242
+ }
243
+ for (const t of this.children) {
244
+ const i = t.onComplete;
245
+ t.onComplete = () => {
246
+ i == null || i(), this.handleChildComplete();
247
+ }, t[e]();
248
+ }
249
+ }
250
+ startSequence(e, t) {
251
+ if (!this.running) return;
252
+ if (t >= this.children.length) {
253
+ this.handleFinished();
254
+ return;
255
+ }
256
+ const i = this.children[t], n = i.onComplete;
257
+ i.onComplete = () => {
258
+ n == null || n(), this.startSequence(e, t + 1);
259
+ }, i[e]();
260
+ }
261
+ handleChildComplete() {
262
+ this.pendingComplete--, this.pendingComplete <= 0 && this.handleFinished();
263
+ }
264
+ handleFinished() {
265
+ var e;
266
+ this.running = !1, (e = this.onComplete) == null || e.call(this);
267
+ }
268
+ }
269
+ export {
270
+ p as A,
271
+ k as M,
272
+ R as P,
273
+ y as S,
274
+ C as V,
275
+ b as W
276
+ };
@@ -1,4 +1,4 @@
1
- import { PreserveScrollOption } from '../types';
1
+ import { PreserveScrollOption } from '../types/index.ts';
2
2
  export type ContextManagerOptions = {
3
3
  /**
4
4
  * Scroll preservation policy. See SsgoiConfig.preserveScroll for full semantics.
@@ -1 +1 @@
1
- {"version":3,"file":"create-context-manager.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-context-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,UAAU,CAAC;AAWvE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;CACvC,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B;iCA0GlC,WAAW,QAAQ,MAAM;mCAwDpD,MAAM,OACR,MAAM,KACV;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;gCAoBQ,MAAM;2BAhJX,MAAM,KAAG,OAAO;;;+BA2JZ,MAAM,KAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;EAepE"}
1
+ {"version":3,"file":"create-context-manager.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-context-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,QAAQ,CAAC;AAgBrE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;CACvC,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B;iCAqIlC,WAAW,QAAQ,MAAM;mCAwDpD,MAAM,OACR,MAAM,KACV;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;gCAuBQ,MAAM;2BAxJX,MAAM,KAAG,OAAO;;;+BAmKZ,MAAM,KAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;EAgBpE"}
@@ -1,35 +1,22 @@
1
- import { SsgoiConfig, SsgoiContext, SsgoiInternalOptions } from '../types';
1
+ import { SsgoiConfig, SsgoiContext } from '../types/index.ts';
2
+ import { HostAnimation } from '../animation/host-animation';
2
3
  /**
3
- * SSGOI Transition Context Operation Principles
4
+ * Page-level transition context.
4
5
  *
5
- * Page transition scenario: /home → /about
6
- *
7
- * **Default mode (outFirst: true)**: OUT must arrive before IN
8
- * - Best for frameworks with native destroy callbacks (Svelte)
9
- * - OUT triggers first, then IN completes the pair
10
- * - If IN arrives without OUT, returns empty transition (page refresh)
11
- *
12
- * **Observer mode (outFirst: false)**: OUT and IN can arrive in any order
13
- * - Best for frameworks using MutationObserver (React, Vue, Solid)
14
- * - Either OUT or IN can arrive first
15
- * - Both wait indefinitely for the other to complete the pair
16
- *
17
- * Flow:
18
- * 1. First transition arrives → Creates pendingTransition
19
- * 2. Second transition arrives → Completes the pair
20
- * 3. checkAndResolve → Finds matching transition and resolves both
21
- */
22
- /**
23
- * Creates a transition configuration
24
- *
25
- * @example
26
- * const config = createSggoiTransitionConfig({
27
- * transitions: [
28
- * { from: '/home', to: '/about', transition: fade() },
29
- * { from: '/products', to: '/products/*', transition: slide() }
30
- * ],
31
- * defaultTransition: fade()
32
- * });
6
+ * Pure promise plumbing: the framework adapter calls `in(element)` on mount
7
+ * and `out(element)` on unmount; the dispatcher pairs them by path via
8
+ * NavigationDetector, then `.then`-chains the prepare result, the cloned
9
+ * `from` element, and the `to` element. `animation()` runs once the chain
10
+ * resolves — never via blocking `await` — so a follow-up navigation can
11
+ * start its own pair while a prior one is still building.
33
12
  */
34
- export declare function createSggoiTransitionContext(options: SsgoiConfig, internalOptions?: SsgoiInternalOptions): SsgoiContext;
13
+ export interface CreateSsgoiTransitionContextOptions {
14
+ /**
15
+ * Long-lived host that owns playback state across consecutive transitions.
16
+ * Pass one in to drive play/pause/rate from the outside (e.g. dev tools).
17
+ * Omit it and the context spins up its own internal host.
18
+ */
19
+ host?: HostAnimation;
20
+ }
21
+ export declare function createSggoiTransitionContext(options: SsgoiConfig, contextOptions?: CreateSsgoiTransitionContextOptions): SsgoiContext;
35
22
  //# sourceMappingURL=create-ssgoi-transition-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-ssgoi-transition-context.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-ssgoi-transition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAchF;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,eAAe,CAAC,EAAE,oBAAoB,GACrC,YAAY,CA8Id"}
1
+ {"version":3,"file":"create-ssgoi-transition-context.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-ssgoi-transition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,YAAY,EAMb,MAAM,QAAQ,CAAC;AAQhB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAiC5D;;;;;;;;;GASG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,cAAc,GAAE,mCAAwC,GACvD,YAAY,CAyPd"}
@@ -1,4 +1,4 @@
1
- import { Transition } from '../types';
1
+ import { TransitionConfig } from '../types/index.ts';
2
2
  /**
3
3
  * Matches a path against a pattern
4
4
  * Supports exact matches and wildcard patterns
@@ -16,9 +16,9 @@ export declare function matchPath(path: string, pattern: string): boolean;
16
16
  * First tries to find exact match for both from and to paths,
17
17
  * then falls back to wildcard matches if no exact match is found.
18
18
  */
19
- export declare function findMatchingTransition<TContext>(from: string, to: string, transitions: Array<{
19
+ export declare function findMatchingTransition(from: string, to: string, transitions: Array<{
20
20
  from: string;
21
21
  to: string;
22
- transition: Transition<TContext>;
23
- }>): Transition<TContext> | null;
22
+ transition: TransitionConfig;
23
+ }>): TransitionConfig | null;
24
24
  //# sourceMappingURL=find-matching-transition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-matching-transition.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/find-matching-transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAehE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAC7C,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAClC,CAAC,GACD,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAmB7B"}
1
+ {"version":3,"file":"find-matching-transition.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/find-matching-transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAehE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC,GACD,gBAAgB,GAAG,IAAI,CAmBzB"}
@@ -2,9 +2,7 @@
2
2
  * Navigation Detector Strategy
3
3
  *
4
4
  * Collects out/in navigation events and provides navigation pairs.
5
- * Each strategy handles the timing differently:
6
- * - OutFirst: OUT must arrive before IN (for Svelte)
7
- * - AnyOrder: OUT and IN can arrive in any order (for React, Vue, Solid)
5
+ * OUT and IN can arrive in any order.
8
6
  */
9
7
  export type NavigationPair = {
10
8
  from: string;
@@ -17,26 +15,18 @@ export interface NavigationDetector {
17
15
  trigger(path: string, type: "out" | "in"): void;
18
16
  /**
19
17
  * Get navigation pair when ready
20
- * Returns null if should skip (e.g., page refresh in outFirst mode)
18
+ * Returns null if a pending transition is cancelled.
21
19
  */
22
20
  get(type: "out" | "in"): Promise<NavigationPair | null>;
23
21
  }
24
22
  export type CreateNavigationDetector = () => NavigationDetector;
25
23
  /**
26
- * OutFirst Strategy
24
+ * Navigation detector
27
25
  *
28
- * OUT must arrive before IN. Best for frameworks with native destroy callbacks.
29
- * - OUT triggers first, then IN completes the pair
30
- * - If IN arrives without OUT, returns null (page refresh case)
31
- */
32
- export declare function createOutFirstDetector(): NavigationDetector;
33
- /**
34
- * AnyOrder Strategy
35
- *
36
- * OUT and IN can arrive in any order. Best for frameworks using MutationObserver.
26
+ * OUT and IN can arrive in any order.
37
27
  * - Either OUT or IN can arrive first
38
28
  * - Both wait indefinitely for the other to complete the pair
39
29
  * - If a new path arrives, cancels the previous pending transition
40
30
  */
41
- export declare function createAnyOrderDetector(): NavigationDetector;
31
+ export declare function createNavigationDetector(): NavigationDetector;
42
32
  //# sourceMappingURL=navigation-detector-strategy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-detector-strategy.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/navigation-detector-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAEhD;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,wBAAwB,GAAG,MAAM,kBAAkB,CAAC;AAShE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,kBAAkB,CAmD3D;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,kBAAkB,CAsE3D"}
1
+ {"version":3,"file":"navigation-detector-strategy.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/navigation-detector-strategy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAEhD;;;OAGG;IACH,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,wBAAwB,GAAG,MAAM,kBAAkB,CAAC;AAShE;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,kBAAkB,CA+E7D"}
@@ -1,7 +1,7 @@
1
- import { SsgoiConfig } from '../types';
1
+ import { SsgoiPathTransition } from '../types/index.ts';
2
2
  /**
3
3
  * Processes symmetric transitions to create bidirectional navigation
4
4
  * For each symmetric transition, creates a reverse transition automatically
5
5
  */
6
- export declare function processSymmetricTransitions(transitions: NonNullable<SsgoiConfig["transitions"]>): Omit<NonNullable<SsgoiConfig["transitions"]>[number], "symmetric">[];
6
+ export declare function processSymmetricTransitions(transitions: readonly SsgoiPathTransition[]): Omit<SsgoiPathTransition, "symmetric">[];
7
7
  //# sourceMappingURL=process-symmetric-transitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-symmetric-transitions.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/process-symmetric-transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,GACnD,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,EAAE,CAUtE"}
1
+ {"version":3,"file":"process-symmetric-transitions.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/process-symmetric-transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAElD;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,SAAS,mBAAmB,EAAE,GAC1C,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,EAAE,CAU1C"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Shared MutationObserver for detecting element unmount.
3
+ *
4
+ * One observer watches `document.body` with `subtree: true`. Each watched
5
+ * element registers a callback; when ANY DOM removal happens, the observer
6
+ * walks the removed subtree and fires the callback for any tracked element
7
+ * it finds (including descendants of the actually-removed node).
8
+ *
9
+ * One shared observer beats per-element observers for two reasons:
10
+ * - parent re-mounts that detach the watched node also fire
11
+ * - lower memory / browser overhead than dozens of observers
12
+ */
13
+ type UnmountCallback = () => void;
14
+ /** Register `cb` to fire when `element` is removed from the DOM. */
15
+ export declare function watchUnmount(element: HTMLElement, cb: UnmountCallback): () => void;
16
+ export {};
17
+ //# sourceMappingURL=unmount-observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmount-observer.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/unmount-observer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,KAAK,eAAe,GAAG,MAAM,IAAI,CAAC;AA2ClC,oEAAoE;AACpE,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,eAAe,GAClB,MAAM,IAAI,CAMZ"}
@@ -0,0 +1,6 @@
1
+ import { SsgoiPathTransition } from '../../types/index.ts';
2
+ export type BlindConfig = {
3
+ paths: readonly string[];
4
+ };
5
+ export declare function blind({ paths }: BlindConfig): SsgoiPathTransition[];
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/blind/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAIlD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAEnE"}
@@ -0,0 +1,16 @@
1
+ import { PhysicsOptions, TransitionConfig } from '../../types/index.ts';
2
+ export interface BlindOptions {
3
+ physics?: PhysicsOptions;
4
+ blindCount?: number;
5
+ direction?: "horizontal" | "vertical";
6
+ blindColor?: string;
7
+ }
8
+ type BlindExtras = {
9
+ fromBlinds: HTMLDivElement[];
10
+ fromContainer: HTMLDivElement;
11
+ toBlinds: HTMLDivElement[];
12
+ toContainer: HTMLDivElement;
13
+ };
14
+ export declare const blind: (options?: BlindOptions) => TransitionConfig<BlindExtras>;
15
+ export {};
16
+ //# sourceMappingURL=transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/blind/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAe/D,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAiED,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,aAAa,EAAE,cAAc,CAAC;IAC9B,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,WAAW,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,KAAK,GAChB,UAAS,YAAiB,KACzB,gBAAgB,CAAC,WAAW,CA4E9B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { SsgoiPathTransition } from '../../types/index.ts';
2
+ import { DirectionalTransitionPaths } from '../utils';
3
+ import { DrillType } from './types';
4
+ export type { DrillType } from './types';
5
+ export type DrillConfig = DirectionalTransitionPaths & {
6
+ type?: DrillType;
7
+ };
8
+ export declare function drill({ type, ...paths }: DrillConfig): SsgoiPathTransition[];
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/drill/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG,0BAA0B,GAAG;IACrD,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAI5E"}
@@ -0,0 +1,3 @@
1
+ import { DrillProvider } from '../types';
2
+ export declare function createCrossfadeProvider(): DrillProvider;
3
+ //# sourceMappingURL=crossfade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crossfade.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/drill/provider/crossfade.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,aAAa,EACd,MAAM,UAAU,CAAC;AAsClB,wBAAgB,uBAAuB,IAAI,aAAa,CAKvD"}
@@ -0,0 +1,3 @@
1
+ import { DrillProvider, DrillType } from '../types';
2
+ export declare const DRILL_PROVIDERS: Record<DrillType, DrillProvider>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/drill/provider/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAG5D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { DrillProvider } from '../types';
2
+ export declare function createParallaxProvider(): DrillProvider;
3
+ //# sourceMappingURL=parallax.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parallax.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/drill/provider/parallax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,aAAa,EACd,MAAM,UAAU,CAAC;AAkClB,wBAAgB,sBAAsB,IAAI,aAAa,CAKtD"}
@@ -0,0 +1,5 @@
1
+ import { TransitionConfig } from '../../types/index.ts';
2
+ import { DrillOptions } from './types';
3
+ export type { DrillOptions, DrillType } from './types';
4
+ export declare const drill: (options?: DrillOptions) => TransitionConfig;
5
+ //# sourceMappingURL=transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/drill/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAO/C,OAAO,KAAK,EAAE,YAAY,EAA8B,MAAM,SAAS,CAAC;AAExE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAcvD,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,gBAyClD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { PhysicsOptions } from '../../types/index.ts';
2
+ export type DrillType = "parallax" | "crossfade";
3
+ export type DrillDirection = "enter" | "exit";
4
+ export interface DrillOptions {
5
+ type?: DrillType;
6
+ direction?: DrillDirection;
7
+ }
8
+ export type DrillStyle = Record<string, number | string>;
9
+ export type DrillAnimateFunc = (progress: number) => DrillStyle;
10
+ export interface DrillSideConfig {
11
+ willChange: string;
12
+ startStyle: DrillStyle;
13
+ animate: DrillAnimateFunc;
14
+ }
15
+ export interface DrillAnimationConfig {
16
+ out: DrillSideConfig;
17
+ in: DrillSideConfig;
18
+ }
19
+ export interface DrillProvider {
20
+ physics: PhysicsOptions;
21
+ build: (direction: DrillDirection) => DrillAnimationConfig;
22
+ }
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/drill/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;AACjD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AACzD,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,UAAU,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,eAAe,CAAC;IACrB,EAAE,EAAE,eAAe,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,oBAAoB,CAAC;CAC5D"}
@@ -0,0 +1,6 @@
1
+ import { SsgoiPathTransition } from '../../types/index.ts';
2
+ export type FadeConfig = {
3
+ paths: readonly string[];
4
+ };
5
+ export declare function fade({ paths }: FadeConfig): SsgoiPathTransition[];
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/fade/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAIlD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,GAAG,mBAAmB,EAAE,CAEjE"}
@@ -0,0 +1,6 @@
1
+ import { PhysicsOptions, TransitionConfig } from '../../types/index.ts';
2
+ export interface FadeOptions {
3
+ physics?: PhysicsOptions;
4
+ }
5
+ export declare const fade: (options?: FadeOptions) => TransitionConfig;
6
+ //# sourceMappingURL=transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/fade/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAc/D,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,gBAuChD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { SsgoiPathTransition } from '../../types/index.ts';
2
+ export type FilmConfig = {
3
+ paths: readonly string[];
4
+ };
5
+ export declare function film({ paths }: FilmConfig): SsgoiPathTransition[];
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/film/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAIlD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,GAAG,mBAAmB,EAAE,CAEjE"}
@@ -0,0 +1,27 @@
1
+ import { PhysicsOptions, TransitionConfig } from '../../types/index.ts';
2
+ export interface FilmOptions {
3
+ border?: {
4
+ color?: string;
5
+ };
6
+ physics?: PhysicsOptions;
7
+ }
8
+ interface CornerBorders {
9
+ topLeft: HTMLElement;
10
+ topRight: HTMLElement;
11
+ bottomLeft: HTMLElement;
12
+ bottomRight: HTMLElement;
13
+ }
14
+ type FilmRect = {
15
+ top: number;
16
+ left: number;
17
+ width: number;
18
+ height: number;
19
+ };
20
+ type FilmExtras = {
21
+ borders: CornerBorders;
22
+ fromRect: FilmRect;
23
+ toRect: FilmRect;
24
+ };
25
+ export declare const film: (options?: FilmOptions) => TransitionConfig<FilmExtras>;
26
+ export {};
27
+ //# sourceMappingURL=transition.d.ts.map