@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.
- package/README.md +5 -6
- package/dist/animation/animation.d.ts +68 -0
- package/dist/animation/animation.d.ts.map +1 -0
- package/dist/animation/host-animation.d.ts +45 -0
- package/dist/animation/host-animation.d.ts.map +1 -0
- package/dist/animation/index.d.ts +6 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/integrator/double-spring-integrator.d.ts.map +1 -0
- package/dist/{animator → animation}/integrator/index.d.ts +1 -0
- package/dist/animation/integrator/index.d.ts.map +1 -0
- package/dist/animation/integrator/inertia-integrator.d.ts.map +1 -0
- package/dist/animation/integrator/linear-integrator.d.ts +23 -0
- package/dist/animation/integrator/linear-integrator.d.ts.map +1 -0
- package/dist/{animator → animation}/integrator/provider.d.ts +1 -1
- package/dist/animation/integrator/provider.d.ts.map +1 -0
- package/dist/animation/integrator/spring-integrator.d.ts.map +1 -0
- package/dist/animation/integrator/types.d.ts.map +1 -0
- package/dist/animation/multi-animation.d.ts +55 -0
- package/dist/animation/multi-animation.d.ts.map +1 -0
- package/dist/animation/web-animation.d.ts +65 -0
- package/dist/animation/web-animation.d.ts.map +1 -0
- package/dist/index.cjs +35 -1
- package/dist/index.d.ts +4 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1702 -1186
- package/dist/internal.cjs +1 -0
- package/dist/internal.d.ts +4 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +511 -0
- package/dist/multi-animation-CnxqLEka.js +322 -0
- package/dist/multi-animation-Dw2JTJI2.cjs +1 -0
- package/dist/ssgoi-transition/create-context-manager.d.ts +1 -1
- package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -1
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +18 -31
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/find-matching-transition.d.ts +4 -4
- package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -1
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts +5 -15
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts.map +1 -1
- package/dist/ssgoi-transition/process-symmetric-transitions.d.ts +2 -2
- package/dist/ssgoi-transition/process-symmetric-transitions.d.ts.map +1 -1
- package/dist/ssgoi-transition/unmount-observer.d.ts +17 -0
- package/dist/ssgoi-transition/unmount-observer.d.ts.map +1 -0
- package/dist/transitions/axis/index.d.ts +43 -0
- package/dist/transitions/axis/index.d.ts.map +1 -0
- package/dist/transitions/axis/provider/index.d.ts +8 -0
- package/dist/transitions/axis/provider/index.d.ts.map +1 -0
- package/dist/transitions/axis/provider/x/fluid.d.ts +3 -0
- package/dist/transitions/axis/provider/x/fluid.d.ts.map +1 -0
- package/dist/transitions/axis/provider/x/index.d.ts +3 -0
- package/dist/transitions/axis/provider/x/index.d.ts.map +1 -0
- package/dist/transitions/axis/provider/x/snappy.d.ts +3 -0
- package/dist/transitions/axis/provider/x/snappy.d.ts.map +1 -0
- package/dist/transitions/axis/provider/y.d.ts +3 -0
- package/dist/transitions/axis/provider/y.d.ts.map +1 -0
- package/dist/transitions/axis/provider/z.d.ts +3 -0
- package/dist/transitions/axis/provider/z.d.ts.map +1 -0
- package/dist/transitions/axis/transition.d.ts +5 -0
- package/dist/transitions/axis/transition.d.ts.map +1 -0
- package/dist/transitions/axis/types.d.ts +52 -0
- package/dist/transitions/axis/types.d.ts.map +1 -0
- package/dist/transitions/blind/index.d.ts +15 -0
- package/dist/transitions/blind/index.d.ts.map +1 -0
- package/dist/transitions/blind/transition.d.ts +16 -0
- package/dist/transitions/blind/transition.d.ts.map +1 -0
- package/dist/transitions/drill/index.d.ts +40 -0
- package/dist/transitions/drill/index.d.ts.map +1 -0
- package/dist/transitions/drill/provider/crossfade.d.ts +3 -0
- package/dist/transitions/drill/provider/crossfade.d.ts.map +1 -0
- package/dist/transitions/drill/provider/index.d.ts +3 -0
- package/dist/transitions/drill/provider/index.d.ts.map +1 -0
- package/dist/transitions/drill/provider/parallax.d.ts +3 -0
- package/dist/transitions/drill/provider/parallax.d.ts.map +1 -0
- package/dist/transitions/drill/transition.d.ts +5 -0
- package/dist/transitions/drill/transition.d.ts.map +1 -0
- package/dist/transitions/drill/types.d.ts +33 -0
- package/dist/transitions/drill/types.d.ts.map +1 -0
- package/dist/transitions/fade/index.d.ts +16 -0
- package/dist/transitions/fade/index.d.ts.map +1 -0
- package/dist/transitions/fade/transition.d.ts +6 -0
- package/dist/transitions/fade/transition.d.ts.map +1 -0
- package/dist/transitions/fade/types.d.ts +14 -0
- package/dist/transitions/fade/types.d.ts.map +1 -0
- package/dist/transitions/film/index.d.ts +16 -0
- package/dist/transitions/film/index.d.ts.map +1 -0
- package/dist/transitions/film/transition.d.ts +27 -0
- package/dist/transitions/film/transition.d.ts.map +1 -0
- package/dist/transitions/film/types.d.ts +16 -0
- package/dist/transitions/film/types.d.ts.map +1 -0
- package/dist/transitions/hero/index.d.ts +17 -0
- package/dist/transitions/hero/index.d.ts.map +1 -0
- package/dist/transitions/hero/transition.d.ts +7 -0
- package/dist/transitions/hero/transition.d.ts.map +1 -0
- package/dist/transitions/hero/types.d.ts +12 -0
- package/dist/transitions/hero/types.d.ts.map +1 -0
- package/dist/transitions/index.d.ts +11 -12
- package/dist/transitions/index.d.ts.map +1 -1
- package/dist/transitions/jaemin/index.d.ts +16 -0
- package/dist/transitions/jaemin/index.d.ts.map +1 -0
- package/dist/transitions/jaemin/transition.d.ts +18 -0
- package/dist/transitions/jaemin/transition.d.ts.map +1 -0
- package/dist/transitions/jaemin/types.d.ts +9 -0
- package/dist/transitions/jaemin/types.d.ts.map +1 -0
- package/dist/transitions/rotate/index.d.ts +15 -0
- package/dist/transitions/rotate/index.d.ts.map +1 -0
- package/dist/transitions/rotate/transition.d.ts +6 -0
- package/dist/transitions/rotate/transition.d.ts.map +1 -0
- package/dist/transitions/rotate/types.d.ts +9 -0
- package/dist/transitions/rotate/types.d.ts.map +1 -0
- package/dist/transitions/scroll/index.d.ts +15 -0
- package/dist/transitions/scroll/index.d.ts.map +1 -0
- package/dist/transitions/scroll/transition.d.ts +7 -0
- package/dist/transitions/scroll/transition.d.ts.map +1 -0
- package/dist/transitions/sheet/index.d.ts +41 -0
- package/dist/transitions/sheet/index.d.ts.map +1 -0
- package/dist/transitions/sheet/provider/background-scale.d.ts +3 -0
- package/dist/transitions/sheet/provider/background-scale.d.ts.map +1 -0
- package/dist/transitions/sheet/provider/index.d.ts +3 -0
- package/dist/transitions/sheet/provider/index.d.ts.map +1 -0
- package/dist/transitions/sheet/provider/static.d.ts +3 -0
- package/dist/transitions/sheet/provider/static.d.ts.map +1 -0
- package/dist/transitions/sheet/transition.d.ts +5 -0
- package/dist/transitions/sheet/transition.d.ts.map +1 -0
- package/dist/transitions/sheet/types.d.ts +29 -0
- package/dist/transitions/sheet/types.d.ts.map +1 -0
- package/dist/transitions/slide/index.d.ts +16 -0
- package/dist/transitions/slide/index.d.ts.map +1 -0
- package/dist/transitions/slide/transition.d.ts +7 -0
- package/dist/transitions/slide/transition.d.ts.map +1 -0
- package/dist/transitions/slide/types.d.ts +10 -0
- package/dist/transitions/slide/types.d.ts.map +1 -0
- package/dist/transitions/strip/index.d.ts +16 -0
- package/dist/transitions/strip/index.d.ts.map +1 -0
- package/dist/transitions/strip/transition.d.ts +6 -0
- package/dist/transitions/strip/transition.d.ts.map +1 -0
- package/dist/transitions/strip/types.d.ts +9 -0
- package/dist/transitions/strip/types.d.ts.map +1 -0
- package/dist/transitions/utils.d.ts +25 -5
- package/dist/transitions/utils.d.ts.map +1 -1
- package/dist/transitions/zoom/index.d.ts +22 -0
- package/dist/transitions/zoom/index.d.ts.map +1 -0
- package/dist/transitions/zoom/provider/blur.d.ts +14 -0
- package/dist/transitions/zoom/provider/blur.d.ts.map +1 -0
- package/dist/transitions/zoom/provider/expand.d.ts +10 -0
- package/dist/transitions/zoom/provider/expand.d.ts.map +1 -0
- package/dist/transitions/zoom/provider/index.d.ts +12 -0
- package/dist/transitions/zoom/provider/index.d.ts.map +1 -0
- package/dist/transitions/zoom/provider/static.d.ts +10 -0
- package/dist/transitions/zoom/provider/static.d.ts.map +1 -0
- package/dist/transitions/zoom/transition.d.ts +5 -0
- package/dist/transitions/zoom/transition.d.ts.map +1 -0
- package/dist/transitions/zoom/types.d.ts +109 -0
- package/dist/transitions/zoom/types.d.ts.map +1 -0
- package/dist/transitions/zoom/zoom-element.d.ts +4 -0
- package/dist/transitions/zoom/zoom-element.d.ts.map +1 -0
- package/dist/types/index.d.ts +174 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +2 -504
- package/dist/types.js +3 -77
- package/dist/utils/get-viewport-rect.d.ts +17 -0
- package/dist/utils/get-viewport-rect.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/prepare-outgoing.d.ts +2 -2
- package/dist/utils/prepare-outgoing.d.ts.map +1 -1
- package/dist/utils/promise-all.d.ts +18 -0
- package/dist/utils/promise-all.d.ts.map +1 -0
- package/package.json +7 -19
- package/dist/animator/integrator/double-spring-integrator.d.ts.map +0 -1
- package/dist/animator/integrator/index.d.ts.map +0 -1
- package/dist/animator/integrator/inertia-integrator.d.ts.map +0 -1
- package/dist/animator/integrator/provider.d.ts.map +0 -1
- package/dist/animator/integrator/spring-integrator.d.ts.map +0 -1
- package/dist/animator/integrator/types.d.ts.map +0 -1
- package/dist/animator/multi-animator.d.ts +0 -101
- package/dist/animator/multi-animator.d.ts.map +0 -1
- package/dist/animator/runner/css-runner.d.ts +0 -17
- package/dist/animator/runner/css-runner.d.ts.map +0 -1
- package/dist/animator/runner/keyframes-runner.d.ts +0 -14
- package/dist/animator/runner/keyframes-runner.d.ts.map +0 -1
- package/dist/animator/runner/provider.d.ts +0 -44
- package/dist/animator/runner/provider.d.ts.map +0 -1
- package/dist/animator/runner/tick-runner.d.ts +0 -16
- package/dist/animator/runner/tick-runner.d.ts.map +0 -1
- package/dist/animator/runner/ticker.d.ts +0 -38
- package/dist/animator/runner/ticker.d.ts.map +0 -1
- package/dist/animator/runner/types.d.ts +0 -34
- package/dist/animator/runner/types.d.ts.map +0 -1
- package/dist/animator/single-animator.d.ts +0 -65
- package/dist/animator/single-animator.d.ts.map +0 -1
- package/dist/animator/types.d.ts +0 -57
- package/dist/animator/types.d.ts.map +0 -1
- package/dist/presets/index.cjs +0 -1
- package/dist/presets/index.d.ts +0 -22
- package/dist/presets/index.d.ts.map +0 -1
- package/dist/presets/index.js +0 -50
- package/dist/provider-B2B8CK6H.js +0 -142
- package/dist/provider-BKaONTeg.cjs +0 -1
- package/dist/spring-integrator-95Mh7mdw.cjs +0 -1
- package/dist/spring-integrator-BM4a-82c.js +0 -33
- package/dist/transition/create-transition-callback.d.ts +0 -8
- package/dist/transition/create-transition-callback.d.ts.map +0 -1
- package/dist/transition/transition-scope.d.ts +0 -36
- package/dist/transition/transition-scope.d.ts.map +0 -1
- package/dist/transition/transition-strategy.d.ts +0 -75
- package/dist/transition/transition-strategy.d.ts.map +0 -1
- package/dist/transition/transition.d.ts +0 -51
- package/dist/transition/transition.d.ts.map +0 -1
- package/dist/transition/unmount-observer.d.ts +0 -43
- package/dist/transition/unmount-observer.d.ts.map +0 -1
- package/dist/transitions/blur.d.ts +0 -12
- package/dist/transitions/blur.d.ts.map +0 -1
- package/dist/transitions/bounce.d.ts +0 -13
- package/dist/transitions/bounce.d.ts.map +0 -1
- package/dist/transitions/fade.d.ts +0 -10
- package/dist/transitions/fade.d.ts.map +0 -1
- package/dist/transitions/fly.d.ts +0 -11
- package/dist/transitions/fly.d.ts.map +0 -1
- package/dist/transitions/index.cjs +0 -1
- package/dist/transitions/index.js +0 -285
- package/dist/transitions/mask.d.ts +0 -12
- package/dist/transitions/mask.d.ts.map +0 -1
- package/dist/transitions/none.d.ts +0 -8
- package/dist/transitions/none.d.ts.map +0 -1
- package/dist/transitions/rotate.d.ts +0 -15
- package/dist/transitions/rotate.d.ts.map +0 -1
- package/dist/transitions/scale.d.ts +0 -11
- package/dist/transitions/scale.d.ts.map +0 -1
- package/dist/transitions/slide.d.ts +0 -13
- package/dist/transitions/slide.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/view-transitions/blind.d.ts +0 -11
- package/dist/view-transitions/blind.d.ts.map +0 -1
- package/dist/view-transitions/curtain-reveal.d.ts +0 -18
- package/dist/view-transitions/curtain-reveal.d.ts.map +0 -1
- package/dist/view-transitions/depth.d.ts +0 -21
- package/dist/view-transitions/depth.d.ts.map +0 -1
- package/dist/view-transitions/drill.d.ts +0 -9
- package/dist/view-transitions/drill.d.ts.map +0 -1
- package/dist/view-transitions/fade.d.ts +0 -8
- package/dist/view-transitions/fade.d.ts.map +0 -1
- package/dist/view-transitions/film.d.ts +0 -10
- package/dist/view-transitions/film.d.ts.map +0 -1
- package/dist/view-transitions/hero.d.ts +0 -9
- package/dist/view-transitions/hero.d.ts.map +0 -1
- package/dist/view-transitions/index.cjs +0 -35
- package/dist/view-transitions/index.d.ts +0 -18
- package/dist/view-transitions/index.d.ts.map +0 -1
- package/dist/view-transitions/index.js +0 -1614
- package/dist/view-transitions/instagram.d.ts +0 -8
- package/dist/view-transitions/instagram.d.ts.map +0 -1
- package/dist/view-transitions/jaemin.d.ts +0 -21
- package/dist/view-transitions/jaemin.d.ts.map +0 -1
- package/dist/view-transitions/pinterest.d.ts +0 -8
- package/dist/view-transitions/pinterest.d.ts.map +0 -1
- package/dist/view-transitions/rotate.d.ts +0 -6
- package/dist/view-transitions/rotate.d.ts.map +0 -1
- package/dist/view-transitions/scroll.d.ts +0 -8
- package/dist/view-transitions/scroll.d.ts.map +0 -1
- package/dist/view-transitions/sheet.d.ts +0 -21
- package/dist/view-transitions/sheet.d.ts.map +0 -1
- package/dist/view-transitions/slide.d.ts +0 -8
- package/dist/view-transitions/slide.d.ts.map +0 -1
- package/dist/view-transitions/snap.d.ts +0 -16
- package/dist/view-transitions/snap.d.ts.map +0 -1
- package/dist/view-transitions/strip.d.ts +0 -7
- package/dist/view-transitions/strip.d.ts.map +0 -1
- package/dist/view-transitions/swap.d.ts +0 -15
- package/dist/view-transitions/swap.d.ts.map +0 -1
- /package/dist/{animator → animation}/integrator/double-spring-integrator.d.ts +0 -0
- /package/dist/{animator → animation}/integrator/inertia-integrator.d.ts +0 -0
- /package/dist/{animator → animation}/integrator/spring-integrator.d.ts +0 -0
- /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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 {
|
|
1
|
+
import { AnyTransitionConfig, SsgoiPathTransition } from '../types/index.ts';
|
|
2
|
+
export type DirectionalTransitionPaths = {
|
|
3
|
+
enter: string;
|
|
4
|
+
exit: string;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
|
-
*
|
|
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
|
|
6
|
-
|
|
7
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAEvE,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,CACtB,MAAM,EACN,KAAK,SAAS,MAAM,GAAG,KAAK,EAC5B,QAAQ,SAAS,MAAM,GAAG,SAAS,EACnC,QAAQ,SAAS,MAAM,GAAG,EAAE,IAC1B,MAAM,GAAG;IACX,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,gBAAgB,EAAE,MAAM,mBAAmB,GAC1C,mBAAmB,EAAE,CAkBvB;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,0BAA0B,EACjC,gBAAgB,EAAE,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,KAAK,mBAAmB,GACrE,mBAAmB,EAAE,CAavB;AAED,wBAAgB,4BAA4B,CAAC,UAAU,SAAS,MAAM,EACpE,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,UAAU,EAAE;IACV,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,UAAU,CAAC;CACtB,EACD,gBAAgB,EAAE,CAAC,SAAS,EAAE,UAAU,KAAK,mBAAmB,GAC/D,mBAAmB,EAAE,CAwBvB"}
|
|
@@ -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":"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"}
|
|
@@ -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
|