@ssgoi/core 5.2.2 → 6.1.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 (274) hide show
  1. package/README.md +5 -6
  2. package/dist/animation/animation.d.ts +68 -0
  3. package/dist/animation/animation.d.ts.map +1 -0
  4. package/dist/animation/host-animation.d.ts +45 -0
  5. package/dist/animation/host-animation.d.ts.map +1 -0
  6. package/dist/animation/index.d.ts +6 -0
  7. package/dist/animation/index.d.ts.map +1 -0
  8. package/dist/animation/integrator/double-spring-integrator.d.ts.map +1 -0
  9. package/dist/{animator → animation}/integrator/index.d.ts +1 -0
  10. package/dist/animation/integrator/index.d.ts.map +1 -0
  11. package/dist/animation/integrator/inertia-integrator.d.ts.map +1 -0
  12. package/dist/animation/integrator/linear-integrator.d.ts +23 -0
  13. package/dist/animation/integrator/linear-integrator.d.ts.map +1 -0
  14. package/dist/{animator → animation}/integrator/provider.d.ts +1 -1
  15. package/dist/animation/integrator/provider.d.ts.map +1 -0
  16. package/dist/animation/integrator/spring-integrator.d.ts.map +1 -0
  17. package/dist/animation/integrator/types.d.ts.map +1 -0
  18. package/dist/animation/multi-animation.d.ts +55 -0
  19. package/dist/animation/multi-animation.d.ts.map +1 -0
  20. package/dist/animation/web-animation.d.ts +65 -0
  21. package/dist/animation/web-animation.d.ts.map +1 -0
  22. package/dist/index.cjs +35 -1
  23. package/dist/index.d.ts +4 -7
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +1702 -1186
  26. package/dist/internal.cjs +1 -0
  27. package/dist/internal.d.ts +4 -0
  28. package/dist/internal.d.ts.map +1 -0
  29. package/dist/internal.js +511 -0
  30. package/dist/multi-animation-CnxqLEka.js +322 -0
  31. package/dist/multi-animation-Dw2JTJI2.cjs +1 -0
  32. package/dist/ssgoi-transition/create-context-manager.d.ts +1 -1
  33. package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -1
  34. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +18 -31
  35. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  36. package/dist/ssgoi-transition/find-matching-transition.d.ts +4 -4
  37. package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -1
  38. package/dist/ssgoi-transition/navigation-detector-strategy.d.ts +5 -15
  39. package/dist/ssgoi-transition/navigation-detector-strategy.d.ts.map +1 -1
  40. package/dist/ssgoi-transition/process-symmetric-transitions.d.ts +2 -2
  41. package/dist/ssgoi-transition/process-symmetric-transitions.d.ts.map +1 -1
  42. package/dist/ssgoi-transition/unmount-observer.d.ts +17 -0
  43. package/dist/ssgoi-transition/unmount-observer.d.ts.map +1 -0
  44. package/dist/transitions/axis/index.d.ts +43 -0
  45. package/dist/transitions/axis/index.d.ts.map +1 -0
  46. package/dist/transitions/axis/provider/index.d.ts +8 -0
  47. package/dist/transitions/axis/provider/index.d.ts.map +1 -0
  48. package/dist/transitions/axis/provider/x/fluid.d.ts +3 -0
  49. package/dist/transitions/axis/provider/x/fluid.d.ts.map +1 -0
  50. package/dist/transitions/axis/provider/x/index.d.ts +3 -0
  51. package/dist/transitions/axis/provider/x/index.d.ts.map +1 -0
  52. package/dist/transitions/axis/provider/x/snappy.d.ts +3 -0
  53. package/dist/transitions/axis/provider/x/snappy.d.ts.map +1 -0
  54. package/dist/transitions/axis/provider/y.d.ts +3 -0
  55. package/dist/transitions/axis/provider/y.d.ts.map +1 -0
  56. package/dist/transitions/axis/provider/z.d.ts +3 -0
  57. package/dist/transitions/axis/provider/z.d.ts.map +1 -0
  58. package/dist/transitions/axis/transition.d.ts +5 -0
  59. package/dist/transitions/axis/transition.d.ts.map +1 -0
  60. package/dist/transitions/axis/types.d.ts +52 -0
  61. package/dist/transitions/axis/types.d.ts.map +1 -0
  62. package/dist/transitions/blind/index.d.ts +15 -0
  63. package/dist/transitions/blind/index.d.ts.map +1 -0
  64. package/dist/transitions/blind/transition.d.ts +16 -0
  65. package/dist/transitions/blind/transition.d.ts.map +1 -0
  66. package/dist/transitions/drill/index.d.ts +40 -0
  67. package/dist/transitions/drill/index.d.ts.map +1 -0
  68. package/dist/transitions/drill/provider/crossfade.d.ts +3 -0
  69. package/dist/transitions/drill/provider/crossfade.d.ts.map +1 -0
  70. package/dist/transitions/drill/provider/index.d.ts +3 -0
  71. package/dist/transitions/drill/provider/index.d.ts.map +1 -0
  72. package/dist/transitions/drill/provider/parallax.d.ts +3 -0
  73. package/dist/transitions/drill/provider/parallax.d.ts.map +1 -0
  74. package/dist/transitions/drill/transition.d.ts +5 -0
  75. package/dist/transitions/drill/transition.d.ts.map +1 -0
  76. package/dist/transitions/drill/types.d.ts +33 -0
  77. package/dist/transitions/drill/types.d.ts.map +1 -0
  78. package/dist/transitions/fade/index.d.ts +16 -0
  79. package/dist/transitions/fade/index.d.ts.map +1 -0
  80. package/dist/transitions/fade/transition.d.ts +6 -0
  81. package/dist/transitions/fade/transition.d.ts.map +1 -0
  82. package/dist/transitions/fade/types.d.ts +14 -0
  83. package/dist/transitions/fade/types.d.ts.map +1 -0
  84. package/dist/transitions/film/index.d.ts +16 -0
  85. package/dist/transitions/film/index.d.ts.map +1 -0
  86. package/dist/transitions/film/transition.d.ts +27 -0
  87. package/dist/transitions/film/transition.d.ts.map +1 -0
  88. package/dist/transitions/film/types.d.ts +16 -0
  89. package/dist/transitions/film/types.d.ts.map +1 -0
  90. package/dist/transitions/hero/index.d.ts +17 -0
  91. package/dist/transitions/hero/index.d.ts.map +1 -0
  92. package/dist/transitions/hero/transition.d.ts +7 -0
  93. package/dist/transitions/hero/transition.d.ts.map +1 -0
  94. package/dist/transitions/hero/types.d.ts +12 -0
  95. package/dist/transitions/hero/types.d.ts.map +1 -0
  96. package/dist/transitions/index.d.ts +11 -12
  97. package/dist/transitions/index.d.ts.map +1 -1
  98. package/dist/transitions/jaemin/index.d.ts +16 -0
  99. package/dist/transitions/jaemin/index.d.ts.map +1 -0
  100. package/dist/transitions/jaemin/transition.d.ts +18 -0
  101. package/dist/transitions/jaemin/transition.d.ts.map +1 -0
  102. package/dist/transitions/jaemin/types.d.ts +9 -0
  103. package/dist/transitions/jaemin/types.d.ts.map +1 -0
  104. package/dist/transitions/rotate/index.d.ts +15 -0
  105. package/dist/transitions/rotate/index.d.ts.map +1 -0
  106. package/dist/transitions/rotate/transition.d.ts +6 -0
  107. package/dist/transitions/rotate/transition.d.ts.map +1 -0
  108. package/dist/transitions/rotate/types.d.ts +9 -0
  109. package/dist/transitions/rotate/types.d.ts.map +1 -0
  110. package/dist/transitions/scroll/index.d.ts +15 -0
  111. package/dist/transitions/scroll/index.d.ts.map +1 -0
  112. package/dist/transitions/scroll/transition.d.ts +7 -0
  113. package/dist/transitions/scroll/transition.d.ts.map +1 -0
  114. package/dist/transitions/sheet/index.d.ts +41 -0
  115. package/dist/transitions/sheet/index.d.ts.map +1 -0
  116. package/dist/transitions/sheet/provider/background-scale.d.ts +3 -0
  117. package/dist/transitions/sheet/provider/background-scale.d.ts.map +1 -0
  118. package/dist/transitions/sheet/provider/index.d.ts +3 -0
  119. package/dist/transitions/sheet/provider/index.d.ts.map +1 -0
  120. package/dist/transitions/sheet/provider/static.d.ts +3 -0
  121. package/dist/transitions/sheet/provider/static.d.ts.map +1 -0
  122. package/dist/transitions/sheet/transition.d.ts +5 -0
  123. package/dist/transitions/sheet/transition.d.ts.map +1 -0
  124. package/dist/transitions/sheet/types.d.ts +29 -0
  125. package/dist/transitions/sheet/types.d.ts.map +1 -0
  126. package/dist/transitions/slide/index.d.ts +16 -0
  127. package/dist/transitions/slide/index.d.ts.map +1 -0
  128. package/dist/transitions/slide/transition.d.ts +7 -0
  129. package/dist/transitions/slide/transition.d.ts.map +1 -0
  130. package/dist/transitions/slide/types.d.ts +10 -0
  131. package/dist/transitions/slide/types.d.ts.map +1 -0
  132. package/dist/transitions/strip/index.d.ts +16 -0
  133. package/dist/transitions/strip/index.d.ts.map +1 -0
  134. package/dist/transitions/strip/transition.d.ts +6 -0
  135. package/dist/transitions/strip/transition.d.ts.map +1 -0
  136. package/dist/transitions/strip/types.d.ts +9 -0
  137. package/dist/transitions/strip/types.d.ts.map +1 -0
  138. package/dist/transitions/utils.d.ts +25 -5
  139. package/dist/transitions/utils.d.ts.map +1 -1
  140. package/dist/transitions/zoom/index.d.ts +22 -0
  141. package/dist/transitions/zoom/index.d.ts.map +1 -0
  142. package/dist/transitions/zoom/provider/blur.d.ts +14 -0
  143. package/dist/transitions/zoom/provider/blur.d.ts.map +1 -0
  144. package/dist/transitions/zoom/provider/expand.d.ts +10 -0
  145. package/dist/transitions/zoom/provider/expand.d.ts.map +1 -0
  146. package/dist/transitions/zoom/provider/index.d.ts +12 -0
  147. package/dist/transitions/zoom/provider/index.d.ts.map +1 -0
  148. package/dist/transitions/zoom/provider/static.d.ts +10 -0
  149. package/dist/transitions/zoom/provider/static.d.ts.map +1 -0
  150. package/dist/transitions/zoom/transition.d.ts +5 -0
  151. package/dist/transitions/zoom/transition.d.ts.map +1 -0
  152. package/dist/transitions/zoom/types.d.ts +109 -0
  153. package/dist/transitions/zoom/types.d.ts.map +1 -0
  154. package/dist/transitions/zoom/zoom-element.d.ts +4 -0
  155. package/dist/transitions/zoom/zoom-element.d.ts.map +1 -0
  156. package/dist/types/index.d.ts +174 -0
  157. package/dist/types/index.d.ts.map +1 -0
  158. package/dist/types.cjs +1 -1
  159. package/dist/types.d.ts +2 -504
  160. package/dist/types.js +3 -77
  161. package/dist/utils/get-viewport-rect.d.ts +17 -0
  162. package/dist/utils/get-viewport-rect.d.ts.map +1 -0
  163. package/dist/utils/index.d.ts +2 -0
  164. package/dist/utils/index.d.ts.map +1 -1
  165. package/dist/utils/prepare-outgoing.d.ts +2 -2
  166. package/dist/utils/prepare-outgoing.d.ts.map +1 -1
  167. package/dist/utils/promise-all.d.ts +18 -0
  168. package/dist/utils/promise-all.d.ts.map +1 -0
  169. package/package.json +7 -19
  170. package/dist/animator/integrator/double-spring-integrator.d.ts.map +0 -1
  171. package/dist/animator/integrator/index.d.ts.map +0 -1
  172. package/dist/animator/integrator/inertia-integrator.d.ts.map +0 -1
  173. package/dist/animator/integrator/provider.d.ts.map +0 -1
  174. package/dist/animator/integrator/spring-integrator.d.ts.map +0 -1
  175. package/dist/animator/integrator/types.d.ts.map +0 -1
  176. package/dist/animator/multi-animator.d.ts +0 -101
  177. package/dist/animator/multi-animator.d.ts.map +0 -1
  178. package/dist/animator/runner/css-runner.d.ts +0 -17
  179. package/dist/animator/runner/css-runner.d.ts.map +0 -1
  180. package/dist/animator/runner/keyframes-runner.d.ts +0 -14
  181. package/dist/animator/runner/keyframes-runner.d.ts.map +0 -1
  182. package/dist/animator/runner/provider.d.ts +0 -44
  183. package/dist/animator/runner/provider.d.ts.map +0 -1
  184. package/dist/animator/runner/tick-runner.d.ts +0 -16
  185. package/dist/animator/runner/tick-runner.d.ts.map +0 -1
  186. package/dist/animator/runner/ticker.d.ts +0 -38
  187. package/dist/animator/runner/ticker.d.ts.map +0 -1
  188. package/dist/animator/runner/types.d.ts +0 -34
  189. package/dist/animator/runner/types.d.ts.map +0 -1
  190. package/dist/animator/single-animator.d.ts +0 -65
  191. package/dist/animator/single-animator.d.ts.map +0 -1
  192. package/dist/animator/types.d.ts +0 -57
  193. package/dist/animator/types.d.ts.map +0 -1
  194. package/dist/presets/index.cjs +0 -1
  195. package/dist/presets/index.d.ts +0 -22
  196. package/dist/presets/index.d.ts.map +0 -1
  197. package/dist/presets/index.js +0 -50
  198. package/dist/provider-B2B8CK6H.js +0 -142
  199. package/dist/provider-BKaONTeg.cjs +0 -1
  200. package/dist/spring-integrator-95Mh7mdw.cjs +0 -1
  201. package/dist/spring-integrator-BM4a-82c.js +0 -33
  202. package/dist/transition/create-transition-callback.d.ts +0 -8
  203. package/dist/transition/create-transition-callback.d.ts.map +0 -1
  204. package/dist/transition/transition-scope.d.ts +0 -36
  205. package/dist/transition/transition-scope.d.ts.map +0 -1
  206. package/dist/transition/transition-strategy.d.ts +0 -75
  207. package/dist/transition/transition-strategy.d.ts.map +0 -1
  208. package/dist/transition/transition.d.ts +0 -51
  209. package/dist/transition/transition.d.ts.map +0 -1
  210. package/dist/transition/unmount-observer.d.ts +0 -43
  211. package/dist/transition/unmount-observer.d.ts.map +0 -1
  212. package/dist/transitions/blur.d.ts +0 -12
  213. package/dist/transitions/blur.d.ts.map +0 -1
  214. package/dist/transitions/bounce.d.ts +0 -13
  215. package/dist/transitions/bounce.d.ts.map +0 -1
  216. package/dist/transitions/fade.d.ts +0 -10
  217. package/dist/transitions/fade.d.ts.map +0 -1
  218. package/dist/transitions/fly.d.ts +0 -11
  219. package/dist/transitions/fly.d.ts.map +0 -1
  220. package/dist/transitions/index.cjs +0 -1
  221. package/dist/transitions/index.js +0 -285
  222. package/dist/transitions/mask.d.ts +0 -12
  223. package/dist/transitions/mask.d.ts.map +0 -1
  224. package/dist/transitions/none.d.ts +0 -8
  225. package/dist/transitions/none.d.ts.map +0 -1
  226. package/dist/transitions/rotate.d.ts +0 -15
  227. package/dist/transitions/rotate.d.ts.map +0 -1
  228. package/dist/transitions/scale.d.ts +0 -11
  229. package/dist/transitions/scale.d.ts.map +0 -1
  230. package/dist/transitions/slide.d.ts +0 -13
  231. package/dist/transitions/slide.d.ts.map +0 -1
  232. package/dist/types.d.ts.map +0 -1
  233. package/dist/view-transitions/blind.d.ts +0 -11
  234. package/dist/view-transitions/blind.d.ts.map +0 -1
  235. package/dist/view-transitions/curtain-reveal.d.ts +0 -18
  236. package/dist/view-transitions/curtain-reveal.d.ts.map +0 -1
  237. package/dist/view-transitions/depth.d.ts +0 -21
  238. package/dist/view-transitions/depth.d.ts.map +0 -1
  239. package/dist/view-transitions/drill.d.ts +0 -9
  240. package/dist/view-transitions/drill.d.ts.map +0 -1
  241. package/dist/view-transitions/fade.d.ts +0 -8
  242. package/dist/view-transitions/fade.d.ts.map +0 -1
  243. package/dist/view-transitions/film.d.ts +0 -10
  244. package/dist/view-transitions/film.d.ts.map +0 -1
  245. package/dist/view-transitions/hero.d.ts +0 -9
  246. package/dist/view-transitions/hero.d.ts.map +0 -1
  247. package/dist/view-transitions/index.cjs +0 -35
  248. package/dist/view-transitions/index.d.ts +0 -18
  249. package/dist/view-transitions/index.d.ts.map +0 -1
  250. package/dist/view-transitions/index.js +0 -1614
  251. package/dist/view-transitions/instagram.d.ts +0 -8
  252. package/dist/view-transitions/instagram.d.ts.map +0 -1
  253. package/dist/view-transitions/jaemin.d.ts +0 -21
  254. package/dist/view-transitions/jaemin.d.ts.map +0 -1
  255. package/dist/view-transitions/pinterest.d.ts +0 -8
  256. package/dist/view-transitions/pinterest.d.ts.map +0 -1
  257. package/dist/view-transitions/rotate.d.ts +0 -6
  258. package/dist/view-transitions/rotate.d.ts.map +0 -1
  259. package/dist/view-transitions/scroll.d.ts +0 -8
  260. package/dist/view-transitions/scroll.d.ts.map +0 -1
  261. package/dist/view-transitions/sheet.d.ts +0 -21
  262. package/dist/view-transitions/sheet.d.ts.map +0 -1
  263. package/dist/view-transitions/slide.d.ts +0 -8
  264. package/dist/view-transitions/slide.d.ts.map +0 -1
  265. package/dist/view-transitions/snap.d.ts +0 -16
  266. package/dist/view-transitions/snap.d.ts.map +0 -1
  267. package/dist/view-transitions/strip.d.ts +0 -7
  268. package/dist/view-transitions/strip.d.ts.map +0 -1
  269. package/dist/view-transitions/swap.d.ts +0 -15
  270. package/dist/view-transitions/swap.d.ts.map +0 -1
  271. /package/dist/{animator → animation}/integrator/double-spring-integrator.d.ts +0 -0
  272. /package/dist/{animator → animation}/integrator/inertia-integrator.d.ts +0 -0
  273. /package/dist/{animator → animation}/integrator/spring-integrator.d.ts +0 -0
  274. /package/dist/{animator → animation}/integrator/types.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAIlB;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,0BAA0B,GAClD,CACI;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,EAAE,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,EAAE,CAAA;CAAE,GACpD;IACE;;;;;OAKG;IACH,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,EAAE,CAAC;CACd,CACJ,CAAC;AAgBJ,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAUhE"}
@@ -0,0 +1,3 @@
1
+ import { SheetProvider } from '../types';
2
+ export declare function createBackgroundScaleProvider(): SheetProvider;
3
+ //# sourceMappingURL=background-scale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background-scale.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/provider/background-scale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAY9C,wBAAgB,6BAA6B,IAAI,aAAa,CAgB7D"}
@@ -0,0 +1,3 @@
1
+ import { SheetProvider, SheetType } from '../types';
2
+ export declare const SHEET_PROVIDERS: Record<SheetType, SheetProvider>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/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 { SheetProvider } from '../types';
2
+ export declare function createStaticProvider(): SheetProvider;
3
+ //# sourceMappingURL=static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/sheet/provider/static.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAY9C,wBAAgB,oBAAoB,IAAI,aAAa,CAUpD"}
@@ -0,0 +1,5 @@
1
+ import { TransitionConfig } from '../../types/index.ts';
2
+ import { SheetOptions } from './types';
3
+ export type { SheetOptions, SheetType } from './types';
4
+ export declare const sheet: (options?: SheetOptions) => TransitionConfig;
5
+ //# sourceMappingURL=transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAQ/C,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,SAAS,CAAC;AAEvD,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKvD,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,gBAsHlD,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { PhysicsOptions } from '../../types/index.ts';
2
+ /**
3
+ * Internal type union accepted by the underlying `sheet` transition provider.
4
+ *
5
+ * Public API uses `"scale"` (the new name for `"background-scale"`). The
6
+ * `"background-scale"` key is retained here purely so the BC normalization
7
+ * in `index.ts` can keep routing through the same provider without touching
8
+ * the internal transition / provider code.
9
+ *
10
+ * @internal
11
+ */
12
+ export type SheetType = "static" | "background-scale";
13
+ export type SheetDirection = "enter" | "exit";
14
+ export interface SheetOptions {
15
+ type?: SheetType;
16
+ direction?: SheetDirection;
17
+ }
18
+ export type SheetStyle = Record<string, number | string>;
19
+ export interface SheetBackgroundConfig {
20
+ willChange: string;
21
+ enterStyle: (t: number, u: number) => SheetStyle;
22
+ exitStyle: (t: number) => SheetStyle;
23
+ }
24
+ export interface SheetProvider {
25
+ enterPhysics: PhysicsOptions;
26
+ exitPhysics: PhysicsOptions;
27
+ background: SheetBackgroundConfig;
28
+ }
29
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/sheet/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,kBAAkB,CAAC;AACtD,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;AAEzD,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,UAAU,CAAC;IACjD,SAAS,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,UAAU,CAAC;CACtC;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,cAAc,CAAC;IAC7B,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,EAAE,qBAAqB,CAAC;CACnC"}
@@ -0,0 +1,16 @@
1
+ import { SsgoiPathTransition } from '../../types/index.ts';
2
+ import { PresetConfig } from '../utils';
3
+ import { SlideOptions, SlideVariant } from './types';
4
+ export type { SlideOptions, SlideVariant } from './types';
5
+ /**
6
+ * Slide preset configuration.
7
+ *
8
+ * Single-behavior preset: no `type` discriminator. The unified
9
+ * `{ variant, options }` slots are exposed so callers can adopt the v6
10
+ * schema consistently across presets.
11
+ */
12
+ export type SlideConfig = PresetConfig<{
13
+ paths: readonly string[];
14
+ }, never, SlideVariant, SlideOptions>;
15
+ export declare function slide(config: SlideConfig): SsgoiPathTransition[];
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/slide/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAgC,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,CACpC;IAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,EAC5B,KAAK,EACL,YAAY,EACZ,YAAY,CACb,CAAC;AAEF,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAShE"}
@@ -0,0 +1,7 @@
1
+ import { PhysicsOptions, TransitionConfig } from '../../types/index.ts';
2
+ export interface SlideOptions {
3
+ direction?: "left" | "right";
4
+ physics?: PhysicsOptions;
5
+ }
6
+ export declare const slide: (options?: SlideOptions) => TransitionConfig;
7
+ //# sourceMappingURL=transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/slide/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAO/D,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAQD,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,gBAoDlD,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Public option shapes for the slide preset.
3
+ *
4
+ * The slide preset has no `type` discriminator (single behavior). It still
5
+ * exposes the unified `{ variant, options }` slots so callers can adopt the
6
+ * v6 schema uniformly across presets.
7
+ */
8
+ export type SlideVariant = "default";
9
+ export type SlideOptions = Record<string, never>;
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/slide/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;AAErC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { SsgoiPathTransition } from '../../types/index.ts';
2
+ import { PresetConfig } from '../utils';
3
+ import { StripOptions, StripVariant } from './types';
4
+ export type { StripOptions, StripVariant } from './types';
5
+ /**
6
+ * Strip preset configuration.
7
+ *
8
+ * Single-behavior preset: no `type` discriminator. The unified
9
+ * `{ variant, options }` slots are exposed for consistency with other v6
10
+ * presets.
11
+ */
12
+ export type StripConfig = PresetConfig<{
13
+ paths: readonly string[];
14
+ }, never, StripVariant, StripOptions>;
15
+ export declare function strip(config: StripConfig): SsgoiPathTransition[];
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/strip/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,CACpC;IAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,EAC5B,KAAK,EACL,YAAY,EACZ,YAAY,CACb,CAAC;AAEF,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAGhE"}
@@ -0,0 +1,6 @@
1
+ import { PhysicsOptions, TransitionConfig } from '../../types/index.ts';
2
+ export interface StripOptions {
3
+ physics?: PhysicsOptions;
4
+ }
5
+ export declare const strip: (options?: StripOptions) => TransitionConfig;
6
+ //# sourceMappingURL=transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/strip/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAa/D,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,gBAuDlD,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Public option shapes for the strip preset.
3
+ *
4
+ * Single-behavior preset (no `type` slot). Exposes the unified
5
+ * `{ variant, options }` slots so callers can adopt the v6 schema.
6
+ */
7
+ export type StripVariant = "default";
8
+ export type StripOptions = Record<string, never>;
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/strip/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;AAErC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC"}
@@ -1,8 +1,28 @@
1
- import { PhysicsOptions, SpringConfig } from '../types';
1
+ import { AnyTransitionConfig, SsgoiPathTransition } from '../types/index.ts';
2
+ export type DirectionalTransitionPaths = {
3
+ enter: string;
4
+ exit: string;
5
+ };
2
6
  /**
3
- * Get physics options with fallback to default spring
7
+ * Unified preset configuration schema used by all v6 transition presets.
8
+ *
9
+ * - `TPaths` carries the paths shape (symmetric / directional / ordered).
10
+ * - `TType` is the union of supported `type` discriminators. Use `never`
11
+ * when the preset has no `type` slot.
12
+ * - `TVariant` is the union of supported `variant` values. Defaults to
13
+ * `"default"` so single-variant presets expose a stable slot.
14
+ * - `TOptions` is the bag of fine-tuning options. Defaults to `{}` so
15
+ * presets can stay forward-compatible without exposing knobs yet.
4
16
  */
5
- export declare function getPhysics(physics: PhysicsOptions | undefined, fallback: {
6
- spring: SpringConfig;
7
- }): PhysicsOptions;
17
+ export type PresetConfig<TPaths, TType extends string = never, TVariant extends string = "default", TOptions extends object = {}> = TPaths & {
18
+ type?: TType;
19
+ variant?: TVariant;
20
+ options?: TOptions;
21
+ };
22
+ export declare function createSymmetricPathTransitions(paths: readonly string[], createTransition: () => AnyTransitionConfig): SsgoiPathTransition[];
23
+ export declare function createDirectionalPathTransitions(paths: DirectionalTransitionPaths, createTransition: (direction: "enter" | "exit") => AnyTransitionConfig): SsgoiPathTransition[];
24
+ export declare function createOrderedPathTransitions<TDirection extends string>(paths: readonly string[], directions: {
25
+ forward: TDirection;
26
+ backward: TDirection;
27
+ }, createTransition: (direction: TDirection) => AnyTransitionConfig): SsgoiPathTransition[];
8
28
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;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"}
@@ -0,0 +1,22 @@
1
+ import { SsgoiPathTransition } from '../../types/index.ts';
2
+ import { ZoomType, ZoomVariant } from './types';
3
+ /**
4
+ * Public config for the `zoom` preset (v6 unified `{type?, variant?, options?}`
5
+ * surface). Only the implemented type × variant combinations are exposed in
6
+ * the type so editors can drive completion without showing TODO branches.
7
+ */
8
+ export type ZoomConfig = {
9
+ paths: readonly string[];
10
+ type?: ZoomType;
11
+ variant?: ZoomVariant;
12
+ options?: Record<string, never>;
13
+ /**
14
+ * @deprecated Do not use in new code. v6 only supports `{ type, variant, options }`.
15
+ * Migrate `fade: true` to `variant: "fade"`.
16
+ * Example: `zoom({ paths, type: "static", variant: "fade" })`.
17
+ * Kept here only for backward compatibility — will be removed in a future major.
18
+ */
19
+ fade?: boolean;
20
+ };
21
+ export declare function zoom(config: ZoomConfig): SsgoiPathTransition[];
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAGlD,OAAO,KAAK,EAEV,QAAQ,EACR,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;IAGtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAChC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAmBF,wBAAgB,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,EAAE,CAK9D"}
@@ -0,0 +1,14 @@
1
+ import { PhysicsOptions } from '../../../types/index.ts';
2
+ import { ZoomContributeCtx, ZoomExtras, ZoomPrepareCtx, ZoomProvider, ZoomStrategy } from '../types';
3
+ import { Animation } from '../../../animation';
4
+ export declare const BLUR_PHYSICS: PhysicsOptions;
5
+ export declare class BlurBackgroundStrategy implements ZoomStrategy {
6
+ readonly physics: PhysicsOptions;
7
+ contribute(ctx: ZoomContributeCtx): Animation[];
8
+ }
9
+ export declare class OverlayStrategy implements ZoomStrategy {
10
+ prepare(ctx: ZoomPrepareCtx): Partial<ZoomExtras>;
11
+ contribute(ctx: ZoomContributeCtx): Animation[];
12
+ }
13
+ export declare function createBlurProvider(): ZoomProvider;
14
+ //# sourceMappingURL=blur.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/zoom/provider/blur.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAEV,iBAAiB,EACjB,UAAU,EAEV,cAAc,EACd,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAoC,MAAM,oBAAoB,CAAC;AAGjF,eAAO,MAAM,YAAY,EAAE,cAE1B,CAAC;AAmEF,qBAAa,sBAAuB,YAAW,YAAY;IACzD,QAAQ,CAAC,OAAO,iBAAgB;IAEhC,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,EAAE;CAkBhD;AAQD,qBAAa,eAAgB,YAAW,YAAY;IAClD,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAQjD,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,EAAE;CAWhD;AAMD,wBAAgB,kBAAkB,IAAI,YAAY,CASjD"}
@@ -0,0 +1,10 @@
1
+ import { PhysicsOptions } from '../../../types/index.ts';
2
+ import { ZoomContributeCtx, ZoomProvider, ZoomStrategy } from '../types';
3
+ import { Animation } from '../../../animation';
4
+ export declare const EXPAND_PHYSICS: PhysicsOptions;
5
+ export declare class ExpandBackgroundStrategy implements ZoomStrategy {
6
+ readonly physics: PhysicsOptions;
7
+ contribute(ctx: ZoomContributeCtx): Animation[];
8
+ }
9
+ export declare function createExpandProvider(): ZoomProvider;
10
+ //# sourceMappingURL=expand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/zoom/provider/expand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAGV,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAoC,MAAM,oBAAoB,CAAC;AAEjF,eAAO,MAAM,cAAc,EAAE,cAE5B,CAAC;AAuFF,qBAAa,wBAAyB,YAAW,YAAY;IAC3D,QAAQ,CAAC,OAAO,iBAAkB;IAElC,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,EAAE;CAoBhD;AAUD,wBAAgB,oBAAoB,IAAI,YAAY,CAQnD"}
@@ -0,0 +1,12 @@
1
+ import { BlurBackgroundStrategy, OverlayStrategy } from './blur';
2
+ import { ExpandBackgroundStrategy } from './expand';
3
+ import { StaticBackgroundStrategy } from './static';
4
+ import { ZoomProvider, ZoomStrategy, ZoomType } from '../types';
5
+ import { PhysicsOptions } from '../../../types/index.ts';
6
+ export declare const ZOOM_PROVIDERS: Record<ZoomType, ZoomProvider>;
7
+ export type BackgroundStrategyWithPhysics = ZoomStrategy & {
8
+ physics: PhysicsOptions;
9
+ };
10
+ export declare function createBackgroundStrategy(type: ZoomType): BackgroundStrategyWithPhysics;
11
+ export { BlurBackgroundStrategy, ExpandBackgroundStrategy, OverlayStrategy, StaticBackgroundStrategy, };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/zoom/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAsB,MAAM,QAAQ,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAwB,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAwB,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAO7C,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,CAIzD,CAAC;AAQF,MAAM,MAAM,6BAA6B,GAAG,YAAY,GAAG;IACzD,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC;AAQF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,QAAQ,GAAG,6BAA6B,CAEtF;AAED,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,wBAAwB,GACzB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { PhysicsOptions } from '../../../types/index.ts';
2
+ import { ZoomContributeCtx, ZoomProvider, ZoomStrategy } from '../types';
3
+ import { Animation } from '../../../animation';
4
+ export declare const STATIC_PHYSICS: PhysicsOptions;
5
+ export declare class StaticBackgroundStrategy implements ZoomStrategy {
6
+ readonly physics: PhysicsOptions;
7
+ contribute(_ctx: ZoomContributeCtx): Animation[];
8
+ }
9
+ export declare function createStaticProvider(): ZoomProvider;
10
+ //# sourceMappingURL=static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/zoom/provider/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAEV,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,eAAO,MAAM,cAAc,EAAE,cAE5B,CAAC;AAgBF,qBAAa,wBAAyB,YAAW,YAAY;IAC3D,QAAQ,CAAC,OAAO,iBAAkB;IAElC,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,SAAS,EAAE;CAGjD;AAMD,wBAAgB,oBAAoB,IAAI,YAAY,CAQnD"}
@@ -0,0 +1,5 @@
1
+ import { TransitionConfig } from '../../types/index.ts';
2
+ import { NormalizedZoomOptions, ZoomExtras } from './types';
3
+ export type { ZoomType, ZoomVariant, NormalizedZoomOptions } from './types';
4
+ export declare const zoom: (options: NormalizedZoomOptions) => TransitionConfig<ZoomExtras>;
5
+ //# sourceMappingURL=transition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAa/D,OAAO,KAAK,EACV,qBAAqB,EAGrB,UAAU,EAKX,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA0Q5E,eAAO,MAAM,IAAI,GACf,SAAS,qBAAqB,KAC7B,gBAAgB,CAAC,UAAU,CAmF7B,CAAC"}
@@ -0,0 +1,109 @@
1
+ import { PhysicsOptions } from '../../types/index.ts';
2
+ import { Animation } from '../../animation';
3
+ export type ZoomType = "expand" | "static" | "blur";
4
+ export type ZoomVariant = "default" | "fade";
5
+ export interface NormalizedZoomOptions {
6
+ type: ZoomType;
7
+ variant: ZoomVariant;
8
+ }
9
+ export type ZoomStyleObject = Record<string, string>;
10
+ export type ZoomAnimationFunc = (progress: number) => ZoomStyleObject;
11
+ export interface ZoomAnimationConfig {
12
+ transformOrigin: string;
13
+ animate: ZoomAnimationFunc;
14
+ }
15
+ export interface ZoomAnimationInput {
16
+ enterRect: DOMRect;
17
+ exitRect: DOMRect;
18
+ pageRect: DOMRect;
19
+ scrollOffset: {
20
+ x: number;
21
+ y: number;
22
+ };
23
+ enterRadius: number;
24
+ exitRadius: number;
25
+ }
26
+ export interface ZoomOverlayConfig {
27
+ willChange: string;
28
+ initialStyle: Record<string, string>;
29
+ style: (mode: "enter" | "exit", progress: number) => Record<string, string | number>;
30
+ }
31
+ export interface ZoomProvider {
32
+ physics: PhysicsOptions;
33
+ in: (input: ZoomAnimationInput) => ZoomAnimationConfig;
34
+ out: (input: ZoomAnimationInput) => ZoomAnimationConfig;
35
+ backgroundIn: (input: ZoomAnimationInput) => ZoomAnimationConfig;
36
+ backgroundOut: (input: ZoomAnimationInput) => ZoomAnimationConfig;
37
+ overlay?: ZoomOverlayConfig;
38
+ }
39
+ export interface ZoomAnimationHandlers {
40
+ mode: "enter" | "exit";
41
+ inAnimation?: ZoomAnimationFunc;
42
+ outAnimation?: ZoomAnimationFunc;
43
+ }
44
+ /**
45
+ * Resolution result handed to every strategy: which side initiated the zoom
46
+ * and the two DOM nodes whose rects drive the math.
47
+ */
48
+ export interface ZoomResolved {
49
+ mode: "enter" | "exit";
50
+ enterEl: HTMLElement;
51
+ exitEl: HTMLElement;
52
+ }
53
+ /**
54
+ * Mutable extras pool. Strategies fill in their own slots during `prepare`
55
+ * and read from a shared bag in `contribute`, which keeps the dispatcher
56
+ * agnostic to which slot belongs to which strategy.
57
+ */
58
+ export interface ZoomExtras {
59
+ overlay?: HTMLElement;
60
+ }
61
+ /**
62
+ * Arguments passed to `prepare`. The strategy can `from.then(el => …)` to
63
+ * attach styles ahead of layout, or create DOM via `createElement`.
64
+ */
65
+ export interface ZoomPrepareCtx {
66
+ from: Promise<HTMLElement>;
67
+ to: Promise<HTMLElement>;
68
+ context: {
69
+ positionedParent: HTMLElement;
70
+ };
71
+ createElement: <K extends keyof HTMLElementTagNameMap>(id: string, tag?: K) => K extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[K] : HTMLDivElement;
72
+ }
73
+ /**
74
+ * Inputs each strategy receives at `contribute` time. `physics` is sourced
75
+ * from the BackgroundStrategy that owns the active `type` and is reused by
76
+ * every other strategy so progress is locked.
77
+ */
78
+ export interface ZoomContributeCtx {
79
+ from: HTMLElement;
80
+ to: HTMLElement;
81
+ resolved: ZoomResolved;
82
+ input: ZoomAnimationInput;
83
+ physics: PhysicsOptions;
84
+ extras: ZoomExtras;
85
+ /**
86
+ * Mutation registry. Strategies push restore callbacks here; the
87
+ * dispatcher fires them on completion. Keeps cleanup local to each
88
+ * strategy instead of leaking back into the dispatcher.
89
+ */
90
+ onComplete: (fn: () => void) => void;
91
+ }
92
+ /**
93
+ * Strategy interface. Both methods are optional — a no-op strategy is
94
+ * a legitimate factory return value (e.g. `FadeStrategy.forVariant("default")`).
95
+ */
96
+ export interface ZoomStrategy {
97
+ /**
98
+ * Pre-paint setup. May mutate the outgoing/incoming pages via the
99
+ * promises in `ctx`, or stage DOM via `createElement`. Returns extras
100
+ * that get merged into the shared `ZoomExtras` bag.
101
+ */
102
+ prepare?: (ctx: ZoomPrepareCtx) => Partial<ZoomExtras> | void;
103
+ /**
104
+ * Build the strategy's contribution to the final animation list. Called
105
+ * once per transition with both pages resolved and rect math complete.
106
+ */
107
+ contribute?: (ctx: ZoomContributeCtx) => Animation[];
108
+ }
109
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAMjD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAS7C,MAAM,WAAW,qBA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C,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,SAAS,EAAE,CAAC;CACtD"}
@@ -0,0 +1,4 @@
1
+ import { ZoomAnimationConfig, ZoomAnimationInput } from './types';
2
+ export declare function createZoomIn({ enterRect, exitRect, pageRect, scrollOffset, enterRadius, exitRadius, }: ZoomAnimationInput): ZoomAnimationConfig;
3
+ export declare function createZoomOut({ enterRect, exitRect, pageRect, scrollOffset, enterRadius, exitRadius, }: ZoomAnimationInput): ZoomAnimationConfig;
4
+ //# sourceMappingURL=zoom-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zoom-element.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/zoom/zoom-element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEvE,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE,kBAAkB,GAAG,mBAAmB,CAyC1C;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE,kBAAkB,GAAG,mBAAmB,CAuC1C"}
@@ -0,0 +1,174 @@
1
+ import { Integrator } from '../animation/integrator';
2
+ import { Animation } from '../animation/animation';
3
+ export type StyleObject = Record<string, number | string>;
4
+ export type DoubleSpringFollowerConfig = {
5
+ stiffness: number;
6
+ damping: number;
7
+ };
8
+ export type SpringConfig = {
9
+ stiffness: number;
10
+ damping: number;
11
+ doubleSpring?: boolean | number | DoubleSpringFollowerConfig;
12
+ restDelta?: number;
13
+ restSpeed?: number;
14
+ };
15
+ export type ResistanceType = "linear" | "quadratic";
16
+ export type InertiaConfig = {
17
+ acceleration: number;
18
+ resistance: number;
19
+ resistanceType?: ResistanceType;
20
+ min?: number;
21
+ max?: number;
22
+ bounceStiffness?: number;
23
+ bounceDamping?: number;
24
+ restDelta?: number;
25
+ };
26
+ export type IntegratorFactory = () => Integrator;
27
+ export type PhysicsOptions = {
28
+ spring?: SpringConfig;
29
+ inertia?: InertiaConfig;
30
+ integrator?: IntegratorFactory;
31
+ };
32
+ export type Pose = {
33
+ /** Identity for motion matching — same DOM node across animations means
34
+ * the same pose. */
35
+ element: HTMLElement;
36
+ value: number;
37
+ velocity: number;
38
+ };
39
+ export type TimelineFrame = {
40
+ time: number;
41
+ value: number;
42
+ velocity: number;
43
+ style?: StyleObject;
44
+ };
45
+ export type Timeline = {
46
+ element: HTMLElement;
47
+ frames: TimelineFrame[];
48
+ };
49
+ export type ScrollOffset = {
50
+ x: number;
51
+ y: number;
52
+ };
53
+ export type ScrollPosition = {
54
+ x: number;
55
+ y: number;
56
+ };
57
+ /**
58
+ * Context provided by the dispatcher to a transition.
59
+ *
60
+ * Has `from`/`to` views split so a transition can read each side independently
61
+ * — `from.scroll` is the outgoing page's scroll, `to.scroll` the incoming page.
62
+ */
63
+ export type SsgoiTransitionContext = {
64
+ scrollOffset: ScrollOffset;
65
+ from: {
66
+ scroll: ScrollPosition;
67
+ };
68
+ to: {
69
+ scroll: ScrollPosition;
70
+ };
71
+ scrollingElement: HTMLElement;
72
+ positionedParent: HTMLElement;
73
+ };
74
+ export interface CreateElement {
75
+ <K extends keyof HTMLElementTagNameMap>(id: string, tag: K): HTMLElementTagNameMap[K];
76
+ (id: string): HTMLDivElement;
77
+ }
78
+ export type PrepareArgs = {
79
+ from: Promise<HTMLElement>;
80
+ to: Promise<HTMLElement>;
81
+ context: SsgoiTransitionContext;
82
+ createElement: CreateElement;
83
+ };
84
+ export type AnimationFactoryArgs<TExtras> = {
85
+ from: HTMLElement;
86
+ to: HTMLElement;
87
+ context: SsgoiTransitionContext;
88
+ } & TExtras;
89
+ /**
90
+ * Helper to author transitions with full type inference: TS reads the return
91
+ * shape of `prepare` and feeds it back into `animation`'s argument type, so
92
+ * you never need to write the extras type explicitly.
93
+ *
94
+ * @example
95
+ * export const myTransition = () => defineTransition({
96
+ * prepare: ({ to, createElement }) => {
97
+ * const overlay = createElement("overlay");
98
+ * return { overlay };
99
+ * },
100
+ * animation: ({ from, to, overlay }) => { // overlay typed as HTMLDivElement
101
+ * return new MultiAnimation([...]);
102
+ * },
103
+ * });
104
+ */
105
+ export declare function defineTransition<TExtras extends object>(config: TransitionConfig<TExtras>): TransitionConfig<TExtras>;
106
+ export type TransitionConfig<TExtras extends object = object> = {
107
+ /**
108
+ * Synchronous setup that returns extras (or a Promise of them).
109
+ *
110
+ * Runs as soon as the path-pair is matched; receives `from`/`to` as
111
+ * Promises so each side can be styled the moment it arrives — typically
112
+ * via `from.then(el => …)` for pre-paint hints. Don't `await` from/to
113
+ * inside an async prepare just to do per-side setup; doing so serialises
114
+ * what should be parallel.
115
+ *
116
+ * The dispatcher does not synchronously await anything: prepare's return
117
+ * (Promise or value), `from`, and `to` are all `.then`-chained in parallel
118
+ * and `animation` runs once all three resolve.
119
+ */
120
+ prepare?: (args: PrepareArgs) => TExtras | Promise<TExtras>;
121
+ animation: (args: AnimationFactoryArgs<TExtras>) => Animation;
122
+ };
123
+ /**
124
+ * Erased-extras form used at path config storage boundaries. The dispatcher
125
+ * passes whatever prepare returned to animation verbatim, so we can treat the
126
+ * extras as opaque here.
127
+ */
128
+ export type AnyTransitionConfig = TransitionConfig<any>;
129
+ export type SsgoiPathTransition = {
130
+ from: string;
131
+ to: string;
132
+ transition: AnyTransitionConfig;
133
+ symmetric?: boolean;
134
+ };
135
+ export type SsgoiPathTransitionInput = SsgoiPathTransition | readonly SsgoiPathTransitionInput[];
136
+ export type PreserveScrollValue = boolean | {
137
+ exclude: string[];
138
+ key?: string;
139
+ } | {
140
+ key: string;
141
+ exclude?: string[];
142
+ };
143
+ export type PreserveScrollFn = (isMobile: boolean) => PreserveScrollValue;
144
+ export type PreserveScrollOption = PreserveScrollValue | PreserveScrollFn;
145
+ export type SsgoiConfig = {
146
+ transitions?: readonly SsgoiPathTransitionInput[];
147
+ middleware?: (from: string, to: string) => {
148
+ from: string;
149
+ to: string;
150
+ };
151
+ preserveScroll?: PreserveScrollOption;
152
+ };
153
+ /**
154
+ * Adapter-facing API surface exposed by `createSsgoiTransitionContext`.
155
+ *
156
+ * Wrapped in an object so we can add fields later (e.g. status getters,
157
+ * cancellation helpers) without breaking call sites that destructure.
158
+ */
159
+ export type SsgoiContext = {
160
+ /**
161
+ * Tell the dispatcher this DOM node has mounted under `path`. The
162
+ * dispatcher handles pairing with the outgoing page, running the matched
163
+ * transition, and watching for removal via a shared MutationObserver.
164
+ * Idempotent per element — repeat calls with the same node are no-ops.
165
+ */
166
+ register: (path: string, element: HTMLElement) => void;
167
+ /**
168
+ * Returns a path-bound ref callback. Stable across calls for the same
169
+ * `path` so framework adapters can drop it straight into `ref={…}` without
170
+ * `useCallback`/`useMemo`.
171
+ */
172
+ refFor: (path: string) => (element: HTMLElement | null) => void;
173
+ };
174
+ //# sourceMappingURL=index.d.ts.map