@ssgoi/core 2.5.5 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/animator/animate/css-runner.d.ts +17 -0
  2. package/dist/animator/animate/css-runner.d.ts.map +1 -0
  3. package/dist/animator/animate/index.d.ts +42 -0
  4. package/dist/animator/animate/index.d.ts.map +1 -0
  5. package/dist/animator/animate/tick-runner.d.ts +16 -0
  6. package/dist/animator/animate/tick-runner.d.ts.map +1 -0
  7. package/dist/animator/animate/types.d.ts +31 -0
  8. package/dist/animator/animate/types.d.ts.map +1 -0
  9. package/dist/animator/animation.d.ts +57 -0
  10. package/dist/animator/animation.d.ts.map +1 -0
  11. package/dist/animator/index.d.ts +34 -33
  12. package/dist/animator/index.d.ts.map +1 -1
  13. package/dist/animator/multi-animator.d.ts +98 -0
  14. package/dist/animator/multi-animator.d.ts.map +1 -0
  15. package/dist/animator/spring-core.d.ts +63 -0
  16. package/dist/animator/spring-core.d.ts.map +1 -0
  17. package/dist/index.cjs +2 -2
  18. package/dist/index.js +700 -818
  19. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  20. package/dist/ssgoi-transition/create-swipe-detector.d.ts +1 -0
  21. package/dist/ssgoi-transition/create-swipe-detector.d.ts.map +1 -1
  22. package/dist/transition/create-transition-callback.d.ts +2 -2
  23. package/dist/transition/create-transition-callback.d.ts.map +1 -1
  24. package/dist/transition/transition-strategy.d.ts +28 -17
  25. package/dist/transition/transition-strategy.d.ts.map +1 -1
  26. package/dist/transition/transition.d.ts +2 -18
  27. package/dist/transition/transition.d.ts.map +1 -1
  28. package/dist/transitions/blur.d.ts +5 -5
  29. package/dist/transitions/blur.d.ts.map +1 -1
  30. package/dist/transitions/bounce.d.ts +5 -5
  31. package/dist/transitions/bounce.d.ts.map +1 -1
  32. package/dist/transitions/fade.d.ts +5 -5
  33. package/dist/transitions/fade.d.ts.map +1 -1
  34. package/dist/transitions/fly.d.ts +5 -5
  35. package/dist/transitions/fly.d.ts.map +1 -1
  36. package/dist/transitions/index.cjs +1 -1
  37. package/dist/transitions/index.js +206 -207
  38. package/dist/transitions/mask.d.ts +5 -5
  39. package/dist/transitions/mask.d.ts.map +1 -1
  40. package/dist/transitions/none.d.ts +3 -3
  41. package/dist/transitions/none.d.ts.map +1 -1
  42. package/dist/transitions/rotate.d.ts +5 -5
  43. package/dist/transitions/rotate.d.ts.map +1 -1
  44. package/dist/transitions/scale.d.ts +5 -5
  45. package/dist/transitions/scale.d.ts.map +1 -1
  46. package/dist/transitions/slide.d.ts +5 -5
  47. package/dist/transitions/slide.d.ts.map +1 -1
  48. package/dist/types.cjs +1 -1
  49. package/dist/types.d.ts +142 -102
  50. package/dist/types.d.ts.map +1 -1
  51. package/dist/types.js +69 -6
  52. package/dist/view-transitions/blind.d.ts +0 -1
  53. package/dist/view-transitions/blind.d.ts.map +1 -1
  54. package/dist/view-transitions/drill.d.ts.map +1 -1
  55. package/dist/view-transitions/fade.d.ts.map +1 -1
  56. package/dist/view-transitions/hero.d.ts.map +1 -1
  57. package/dist/view-transitions/index.cjs +13 -13
  58. package/dist/view-transitions/index.js +499 -492
  59. package/dist/view-transitions/scroll.d.ts.map +1 -1
  60. package/dist/view-transitions/slide.d.ts.map +1 -1
  61. package/dist/view-transitions/strip.d.ts.map +1 -1
  62. package/package.json +1 -1
  63. package/dist/animator/animate.d.ts +0 -35
  64. package/dist/animator/animate.d.ts.map +0 -1
  65. package/dist/animator/animation-scheduler.d.ts +0 -47
  66. package/dist/animator/animation-scheduler.d.ts.map +0 -1
  67. package/dist/test-utils.d.ts +0 -46
  68. package/dist/test-utils.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"create-ssgoi-transition-context.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-ssgoi-transition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAuB,MAAM,UAAU,CAAC;AAW/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,GACnB,YAAY,CAkJd"}
1
+ {"version":3,"file":"create-ssgoi-transition-context.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-ssgoi-transition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAuB,MAAM,UAAU,CAAC;AAW/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,GACnB,YAAY,CAqJd"}
@@ -6,5 +6,6 @@ export declare function createSwipeDetector(enabled: boolean): {
6
6
  initialize: () => void;
7
7
  cleanup: () => void;
8
8
  isSwipePending: () => boolean;
9
+ resetSwipeDetection: () => void;
9
10
  };
10
11
  //# sourceMappingURL=create-swipe-detector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-swipe-detector.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-swipe-detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO;;;;EAgFnD"}
1
+ {"version":3,"file":"create-swipe-detector.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-swipe-detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO;;;;;EAuFnD"}
@@ -1,7 +1,7 @@
1
1
  import { Transition, TransitionCallback } from '../types';
2
2
  import { StrategyContext, TransitionStrategy } from './transition-strategy';
3
- export declare function createTransitionCallback<TAnimationValue = number>(getTransition: () => Transition<undefined, TAnimationValue>, options?: {
3
+ export declare function createTransitionCallback(getTransition: () => Transition<undefined>, options?: {
4
4
  onCleanupEnd?: () => void;
5
- strategy?: (context: StrategyContext<TAnimationValue>) => TransitionStrategy<TAnimationValue>;
5
+ strategy?: (context: StrategyContext) => TransitionStrategy;
6
6
  }): TransitionCallback;
7
7
  //# sourceMappingURL=create-transition-callback.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-transition-callback.d.ts","sourceRoot":"","sources":["../../src/lib/transition/create-transition-callback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAExB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,wBAAwB,CAAC,eAAe,GAAG,MAAM,EAC/D,aAAa,EAAE,MAAM,UAAU,CAAC,SAAS,EAAE,eAAe,CAAC,EAC3D,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,CACT,OAAO,EAAE,eAAe,CAAC,eAAe,CAAC,KACtC,kBAAkB,CAAC,eAAe,CAAC,CAAC;CAC1C,GACA,kBAAkB,CA0RpB"}
1
+ {"version":3,"file":"create-transition-callback.d.ts","sourceRoot":"","sources":["../../src/lib/transition/create-transition-callback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAI/D,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAExB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,UAAU,CAAC,SAAS,CAAC,EAC1C,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,kBAAkB,CAAC;CAC7D,GACA,kBAAkB,CA+KpB"}
@@ -1,28 +1,39 @@
1
- import { TransitionConfig, AnimationController } from '../types';
1
+ import { MultiSpringConfig } from '../types';
2
+ import { Animation } from '../animator/animation';
2
3
  export declare const TRANSITION_STRATEGY: unique symbol;
3
- export interface StrategyContext<TAnimationValue = number> {
4
+ export interface StrategyContext {
4
5
  currentAnimation: {
5
- controller: AnimationController<TAnimationValue>;
6
+ controller: Animation;
6
7
  direction: "in" | "out";
7
8
  } | null;
8
9
  }
9
- export interface AnimationSetup<TAnimationValue = number> {
10
- config?: TransitionConfig<TAnimationValue>;
10
+ /**
11
+ * Internal animation setup returned by strategy
12
+ * Always uses MultiSpringConfig (normalized from user's Single/Multi config)
13
+ * @internal
14
+ */
15
+ export interface InternalAnimationSetup {
16
+ config?: MultiSpringConfig;
11
17
  state: {
12
- position: TAnimationValue;
13
- velocity: TAnimationValue extends number ? number : Record<string, number>;
18
+ position: number;
19
+ velocity: number;
14
20
  };
15
- from: TAnimationValue;
16
- to: TAnimationValue;
21
+ from: number;
22
+ to: number;
17
23
  direction: "forward" | "backward";
18
24
  }
19
- export interface TransitionConfigs<TAnimationValue = number> {
20
- in?: Promise<TransitionConfig<TAnimationValue>>;
21
- out?: Promise<TransitionConfig<TAnimationValue>>;
25
+ /**
26
+ * Internal transition configs passed to strategy
27
+ * Always uses MultiSpringConfig (normalized before passing)
28
+ * @internal
29
+ */
30
+ export interface InternalTransitionConfigs {
31
+ in?: MultiSpringConfig;
32
+ out?: MultiSpringConfig;
22
33
  }
23
- export interface TransitionStrategy<TAnimationValue = number> {
24
- runIn: (configs: TransitionConfigs<TAnimationValue>) => Promise<AnimationSetup<TAnimationValue>>;
25
- runOut: (configs: TransitionConfigs<TAnimationValue>) => Promise<AnimationSetup<TAnimationValue>>;
34
+ export interface TransitionStrategy {
35
+ runIn: (configs: InternalTransitionConfigs) => Promise<InternalAnimationSetup>;
36
+ runOut: (configs: InternalTransitionConfigs) => Promise<InternalAnimationSetup>;
26
37
  }
27
38
  /**
28
39
  * Creates a transition callback that can be used with framework-specific implementations
@@ -55,10 +66,10 @@ export interface TransitionStrategy<TAnimationValue = number> {
55
66
  * - Inner function (entrance callback): Returns cleanup callback (exit)
56
67
  * - Cleanup callback: Handles exit transitions
57
68
  */
58
- export declare const createDefaultStrategy: <TAnimationValue = number>(context: StrategyContext<TAnimationValue>) => TransitionStrategy<TAnimationValue>;
69
+ export declare const createDefaultStrategy: (context: StrategyContext) => TransitionStrategy;
59
70
  /**
60
71
  * Page transition strategy - Always starts fresh without checking current animations
61
72
  * This is used for page-level transitions where each transition should be independent
62
73
  */
63
- export declare const createPageTransitionStrategy: <TAnimationValue = number>() => TransitionStrategy<TAnimationValue>;
74
+ export declare const createPageTransitionStrategy: () => TransitionStrategy;
64
75
  //# sourceMappingURL=transition-strategy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transition-strategy.d.ts","sourceRoot":"","sources":["../../src/lib/transition/transition-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,mBAAmB,eAAoC,CAAC;AAErE,MAAM,WAAW,eAAe,CAAC,eAAe,GAAG,MAAM;IAGvD,gBAAgB,EAAE;QAChB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;QACjD,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;KACzB,GAAG,IAAI,CAAC;CACV;AAED,MAAM,WAAW,cAAc,CAAC,eAAe,GAAG,MAAM;IACtD,MAAM,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC3C,KAAK,EAAE;QACL,QAAQ,EAAE,eAAe,CAAC;QAC1B,QAAQ,EAAE,eAAe,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC5E,CAAC;IACF,IAAI,EAAE,eAAe,CAAC;IACtB,EAAE,EAAE,eAAe,CAAC;IACpB,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB,CAAC,eAAe,GAAG,MAAM;IACzD,EAAE,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;IAChD,GAAG,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB,CAAC,eAAe,GAAG,MAAM;IAC1D,KAAK,EAAE,CACL,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,KACxC,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;IAC9C,MAAM,EAAE,CACN,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,KACxC,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,qBAAqB,GAAI,eAAe,GAAG,MAAM,EAC5D,SAAS,eAAe,CAAC,eAAe,CAAC,KACxC,kBAAkB,CAAC,eAAe,CAiMpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,eAAe,GAAG,MAAM,OACrB,kBAAkB,CAAC,eAAe,CAoGtC,CAAC"}
1
+ {"version":3,"file":"transition-strategy.d.ts","sourceRoot":"","sources":["../../src/lib/transition/transition-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAO,MAAM,mBAAmB,eAAoC,CAAC;AAErE,MAAM,WAAW,eAAe;IAE9B,gBAAgB,EAAE;QAChB,UAAU,EAAE,SAAS,CAAC;QACtB,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;KACzB,GAAG,IAAI,CAAC;CACV;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB,GAAG,CAAC,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,CACL,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACrC,MAAM,EAAE,CACN,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,qBAAqB,GAChC,SAAS,eAAe,KACvB,kBAwGF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,QAAO,kBA0D/C,CAAC"}
@@ -22,26 +22,10 @@ export declare function generateAutoKey(): TransitionKey;
22
22
  * 4. `tick` - Called on each animation frame with progress value (1 → 0)
23
23
  * 5. `onEnd` - Called when animation completes and element is removed
24
24
  *
25
- * The `key` parameter is crucial for transition management - it uniquely identifies
26
- * each transition instance, allowing the system to track, cleanup, and prevent
27
- * conflicts between multiple transitions on the same element.
28
- *
29
- * @param {object} options - Configuration object
30
- * @param {TransitionKey} options.key - Unique identifier for this transition instance.
31
- * Can be string or symbol. Used to manage and cleanup
32
- * transitions internally.
33
- * @param {Function} options.in - Configuration for entrance animation.
34
- * Returns TransitionConfig with lifecycle hooks.
35
- * @param {Function} options.out - Configuration for exit animation.
36
- * Returns TransitionConfig with lifecycle hooks.
37
- *
38
- * @template TAnimationValue - The type of value being animated (number | object)
39
- *
40
25
  * @returns {TransitionCallback} A callback function to be used as a ref
41
26
  *
42
27
  * @example
43
28
  * ```tsx
44
- * // Simple fade transition
45
29
  * <div ref={transition({
46
30
  * key: 'hero-fade',
47
31
  * in: (element) => ({
@@ -54,7 +38,7 @@ export declare function generateAutoKey(): TransitionKey;
54
38
  * })} />
55
39
  * ```
56
40
  */
57
- export declare function transition<TAnimationValue = number>(options: TransitionOptions<undefined, TAnimationValue> & {
58
- [TRANSITION_STRATEGY]?: (context: StrategyContext<TAnimationValue>) => TransitionStrategy<TAnimationValue>;
41
+ export declare function transition(options: TransitionOptions<undefined> & {
42
+ [TRANSITION_STRATEGY]?: (context: StrategyContext) => TransitionStrategy;
59
43
  }): TransitionCallback;
60
44
  //# sourceMappingURL=transition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../src/lib/transition/transition.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAEV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAiE9C,wBAAgB,eAAe,IAAI,aAAa,CAY/C;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,UAAU,CAAC,eAAe,GAAG,MAAM,EACjD,OAAO,EAAE,iBAAiB,CAAC,SAAS,EAAE,eAAe,CAAC,GAAG;IACvD,CAAC,mBAAmB,CAAC,CAAC,EAAE,CACtB,OAAO,EAAE,eAAe,CAAC,eAAe,CAAC,KACtC,kBAAkB,CAAC,eAAe,CAAC,CAAC;CAC1C,GACA,kBAAkB,CAoBpB"}
1
+ {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../src/lib/transition/transition.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAEV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA2D9C,wBAAgB,eAAe,IAAI,aAAa,CAU/C;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG;IACtC,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,kBAAkB,CAAC;CAC1E,GACA,kBAAkB,CAmBpB"}
@@ -1,4 +1,4 @@
1
- import { TransitionKey } from '../types';
1
+ import { StyleObject, TransitionKey } from '../types';
2
2
  interface BlurOptions {
3
3
  amount?: number | string;
4
4
  opacity?: number;
@@ -12,19 +12,19 @@ interface BlurOptions {
12
12
  }
13
13
  export declare const blur: (options?: BlurOptions) => {
14
14
  key?: TransitionKey | undefined;
15
- in: (element: HTMLElement) => {
15
+ in: () => {
16
16
  spring: {
17
17
  stiffness?: number;
18
18
  damping?: number;
19
19
  };
20
- tick: (progress: number) => void;
20
+ css: (progress: number) => StyleObject;
21
21
  };
22
- out: (element: HTMLElement) => {
22
+ out: () => {
23
23
  spring: {
24
24
  stiffness?: number;
25
25
  damping?: number;
26
26
  };
27
- tick: (progress: number) => void;
27
+ css: (progress: number) => StyleObject;
28
28
  };
29
29
  };
30
30
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/blur.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB;;kBAe5B,WAAW;;wBArBb,MAAM;sBACR,MAAM;;yBAsBG,MAAM;;mBAwBV,WAAW;;wBA/Cd,MAAM;sBACR,MAAM;;yBAgDG,MAAM;;CA0B5B,CAAC"}
1
+ {"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/blur.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB;;;;wBAN9B,MAAM;sBACR,MAAM;;wBAeQ,MAAM,KAAG,WAAW;;;;wBAhBhC,MAAM;sBACR,MAAM;;wBAeQ,MAAM,KAAG,WAAW;;CAgC/C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { TransitionKey } from '../types';
1
+ import { StyleObject, TransitionKey } from '../types';
2
2
  interface BounceOptions {
3
3
  height?: number;
4
4
  intensity?: number;
@@ -13,19 +13,19 @@ interface BounceOptions {
13
13
  }
14
14
  export declare const bounce: (options?: BounceOptions) => {
15
15
  key?: TransitionKey | undefined;
16
- in: (element: HTMLElement) => {
16
+ in: () => {
17
17
  spring: {
18
18
  stiffness?: number;
19
19
  damping?: number;
20
20
  };
21
- tick: (progress: number) => void;
21
+ css: (progress: number) => StyleObject;
22
22
  };
23
- out: (element: HTMLElement) => {
23
+ out: () => {
24
24
  spring: {
25
25
  stiffness?: number;
26
26
  damping?: number;
27
27
  };
28
- tick: (progress: number) => void;
28
+ css: (progress: number) => StyleObject;
29
29
  };
30
30
  };
31
31
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"bounce.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/bounce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB;;kBAYhC,WAAW;;wBAlBb,MAAM;sBACR,MAAM;;yBAmBG,MAAM;;mBA2BV,WAAW;;wBA/Cd,MAAM;sBACR,MAAM;;yBAgDG,MAAM;;CA6B5B,CAAC"}
1
+ {"version":3,"file":"bounce.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/bounce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB;;;;wBANlC,MAAM;sBACR,MAAM;;wBAgBQ,MAAM,KAAG,WAAW;;;;wBAjBhC,MAAM;sBACR,MAAM;;wBAgBQ,MAAM,KAAG,WAAW;;CAwC/C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { TransitionKey } from '../types';
1
+ import { StyleObject, TransitionKey } from '../types';
2
2
  interface FadeOptions {
3
3
  from?: number;
4
4
  to?: number;
@@ -10,19 +10,19 @@ interface FadeOptions {
10
10
  }
11
11
  export declare const fade: (options?: FadeOptions) => {
12
12
  key?: TransitionKey | undefined;
13
- in: (element: HTMLElement) => {
13
+ in: () => {
14
14
  spring: {
15
15
  stiffness?: number;
16
16
  damping?: number;
17
17
  };
18
- tick: (progress: number) => void;
18
+ css: (progress: number) => StyleObject;
19
19
  };
20
- out: (element: HTMLElement) => {
20
+ out: () => {
21
21
  spring: {
22
22
  stiffness?: number;
23
23
  damping?: number;
24
24
  };
25
- tick: (progress: number) => void;
25
+ css: (progress: number) => StyleObject;
26
26
  };
27
27
  };
28
28
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB;;kBAS5B,WAAW;;wBAfb,MAAM;sBACR,MAAM;;yBAgBG,MAAM;;mBAKV,WAAW;;wBAtBd,MAAM;sBACR,MAAM;;yBAuBG,MAAM;;CAO5B,CAAC"}
1
+ {"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB;;;;wBAN9B,MAAM;sBACR,MAAM;;wBAgBE,MAAM,KAAG,WAAW;;;;wBAjB1B,MAAM;sBACR,MAAM;;wBAsBE,MAAM,KAAG,WAAW;;CAMzC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { TransitionKey } from '../types';
1
+ import { StyleObject, TransitionKey } from '../types';
2
2
  interface FlyOptions {
3
3
  x?: number | string;
4
4
  y?: number | string;
@@ -11,19 +11,19 @@ interface FlyOptions {
11
11
  }
12
12
  export declare const fly: (options?: FlyOptions) => {
13
13
  key?: TransitionKey | undefined;
14
- in: (element: HTMLElement) => {
14
+ in: () => {
15
15
  spring: {
16
16
  stiffness?: number;
17
17
  damping?: number;
18
18
  };
19
- tick: (progress: number) => void;
19
+ css: (progress: number) => StyleObject;
20
20
  };
21
- out: (element: HTMLElement) => {
21
+ out: () => {
22
22
  spring: {
23
23
  stiffness?: number;
24
24
  damping?: number;
25
25
  };
26
- tick: (progress: number) => void;
26
+ css: (progress: number) => StyleObject;
27
27
  };
28
28
  };
29
29
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"fly.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/fly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,UAAU;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,GAAG,GAAI,UAAS,UAAe;;kBAkB1B,WAAW;;wBAxBb,MAAM;sBACR,MAAM;;yBAyBG,MAAM;;mBAcV,WAAW;;wBAxCd,MAAM;sBACR,MAAM;;yBAyCG,MAAM;;CAgB5B,CAAC"}
1
+ {"version":3,"file":"fly.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/fly.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,UAAU,UAAU;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED,eAAO,MAAM,GAAG,GAAI,UAAS,UAAe;;;;wBAN5B,MAAM;sBACR,MAAM;;wBAcQ,MAAM,KAAG,WAAW;;;;wBAfhC,MAAM;sBACR,MAAM;;wBAcQ,MAAM,KAAG,WAAW;;CAmC/C,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=($={})=>{const{from:e=0,to:s=1,spring:f={stiffness:300,damping:30},key:l}=$;return{in:u=>({spring:f,tick:y=>{const a=e+(s-e)*y;u.style.opacity=a.toString()}}),out:u=>({spring:f,tick:y=>{const a=e+(s-e)*y;u.style.opacity=a.toString()}}),...l&&{key:l}}},h=($={})=>{const{start:e=0,opacity:s=0,axis:f="both",spring:l={stiffness:300,damping:30},key:u}=$,y=a=>{switch(f){case"x":return`scaleX(${a})`;case"y":return`scaleY(${a})`;case"both":default:return`scale(${a})`}};return{in:a=>({spring:l,tick:n=>{const t=e+(1-e)*n;a.style.transform=y(t),a.style.opacity=(s+(1-s)*n).toString()}}),out:a=>({spring:l,tick:n=>{const t=e+(1-e)*n;a.style.transform=y(t),a.style.opacity=(s+(1-s)*n).toString()}}),...u&&{key:u}}},x=($={})=>{const{direction:e,distance:s=100,opacity:f=0,fade:l=!0,axis:u,spring:y={stiffness:400,damping:35},key:a}=$,t=e||(u==="x"?"left":u==="y"?"up":"left"),c=i=>typeof i=="number"?`${i}px`:i,o=i=>{const r=1-i,p=typeof s=="number"?r*s:`calc(${c(s)} * ${r})`;switch(t){case"left":return typeof s=="number"?`translateX(${-p}px)`:`translateX(calc(-1 * ${p}))`;case"right":return typeof s=="number"?`translateX(${p}px)`:`translateX(${p})`;case"up":return typeof s=="number"?`translateY(${-p}px)`:`translateY(calc(-1 * ${p}))`;case"down":return typeof s=="number"?`translateY(${p}px)`:`translateY(${p})`}};return{in:i=>({spring:y,tick:r=>{i.style.transform=o(r),l&&(i.style.opacity=(f+(1-f)*r).toString())}}),out:i=>({spring:y,tick:r=>{i.style.transform=o(r),l&&(i.style.opacity=(f+(1-f)*r).toString())}}),...a&&{key:a}}},k=($={})=>{const{degrees:e=360,clockwise:s=!0,scale:f=!1,fade:l=!0,origin:u="center",axis:y="2d",perspective:a=800,spring:n={stiffness:500,damping:25},key:t}=$,c=s?e:-e,o=i=>{const r=(1-i)*c;switch(y){case"x":return`perspective(${a}px) rotateX(${r}deg)`;case"y":return`perspective(${a}px) rotateY(${r}deg)`;case"z":return`rotateZ(${r}deg)`;case"2d":default:return`rotate(${r}deg)`}};return{in:i=>({spring:n,tick:r=>{const p=[o(r)];f&&p.push(`scale(${r})`),i.style.transform=p.join(" "),i.style.transformOrigin=u,l&&(i.style.opacity=r.toString())}}),out:i=>({spring:n,tick:r=>{const p=[o(r)];f&&p.push(`scale(${r})`),i.style.transform=p.join(" "),i.style.transformOrigin=u,l&&(i.style.opacity=r.toString())}}),...t&&{key:t}}},S=($={})=>{const{height:e=20,intensity:s=1,scale:f=!0,fade:l=!0,direction:u="up",spring:y={stiffness:800,damping:15},key:a}=$;return{in:n=>({spring:y,tick:t=>{const c=[],o=Math.sin(t*Math.PI*(1+s)),i=1-t,r=o*e*i;if(u==="up"?c.push(`translateY(${-Math.abs(r)}px)`):c.push(`translateY(${Math.abs(r)}px)`),f){const p=.8+t*.2+o*.05*i;c.push(`scale(${p})`)}n.style.transform=c.join(" "),l&&(n.style.opacity=t.toString())}}),out:n=>({spring:y,tick:t=>{const c=[],o=Math.sin(t*Math.PI*(1+s)),i=1-t,r=o*e*i;if(u==="up"?c.push(`translateY(${-Math.abs(r)}px)`):c.push(`translateY(${Math.abs(r)}px)`),f){const p=.8+t*.2+o*.05*i;c.push(`scale(${p})`)}n.style.transform=c.join(" "),l&&(n.style.opacity=t.toString())}}),...a&&{key:a}}},M=($={})=>{const{amount:e=10,opacity:s=0,scale:f=!1,fade:l=!0,spring:u={stiffness:300,damping:30},key:y}=$,a=n=>typeof n=="number"?`${n}px`:n;return{in:n=>({spring:u,tick:t=>{const c=1-t,o=typeof e=="number"?c*e:`calc(${a(e)} * ${c})`;n.style.filter=typeof e=="number"?`blur(${o}px)`:`blur(${o})`,f&&(n.style.transform=`scale(${.8+t*.2})`),l&&(n.style.opacity=(s+(1-s)*t).toString())}}),out:n=>({spring:u,tick:t=>{const c=1-t,o=typeof e=="number"?c*e:`calc(${a(e)} * ${c})`;n.style.filter=typeof e=="number"?`blur(${o}px)`:`blur(${o})`,f&&(n.style.transform=`scale(${.8+t*.2})`),l&&(n.style.opacity=(s+(1-s)*t).toString())}}),...y&&{key:y}}},Y=($={})=>{const{x:e=0,y:s=-100,opacity:f=0,spring:l={stiffness:400,damping:35},key:u}=$,y=n=>typeof n=="number"?`${n}px`:n,a=n=>typeof n=="number"?`${n}px`:n;return{in:n=>({spring:l,tick:t=>{const c=typeof e=="number"?(1-t)*e:`calc(${y(e)} * ${1-t})`,o=typeof s=="number"?(1-t)*s:`calc(${a(s)} * ${1-t})`;n.style.transform=`translate(${typeof e=="number"?c+"px":c}, ${typeof s=="number"?o+"px":o})`,n.style.opacity=(f+(1-f)*t).toString()}}),out:n=>({spring:l,tick:t=>{const c=typeof e=="number"?(1-t)*e:`calc(${y(e)} * ${1-t})`,o=typeof s=="number"?(1-t)*s:`calc(${a(s)} * ${1-t})`;n.style.transform=`translate(${typeof e=="number"?c+"px":c}, ${typeof s=="number"?o+"px":o})`,n.style.opacity=(f+(1-f)*t).toString()}}),...u&&{key:u}}},O=($={})=>{const{shape:e="circle",origin:s="center",scale:f=1.5,fade:l=!1,spring:u={stiffness:300,damping:30},key:y}=$,a=()=>{switch(s){case"top":return"50% 0%";case"bottom":return"50% 100%";case"left":return"0% 50%";case"right":return"100% 50%";case"top-left":return"0% 0%";case"top-right":return"100% 0%";case"bottom-left":return"0% 100%";case"bottom-right":return"100% 100%";case"center":default:return"50% 50%"}},n=t=>{const c=t*f*100,o=a();switch(e){case"ellipse":return`ellipse(${c}% ${c*.75}% at ${o})`;case"square":{const i=t*f*100,[r,p]=o.split(" "),m=parseFloat(r),d=parseFloat(p),b=i/2;return`polygon(${m-b}% ${d-b}%, ${m+b}% ${d-b}%, ${m+b}% ${d+b}%, ${m-b}% ${d+b}%)`}case"circle":default:return`circle(${c}% at ${o})`}};return{in:t=>({spring:u,tick:c=>{t.style.clipPath=n(c),l&&(t.style.opacity=c.toString())}}),out:t=>({spring:u,tick:c=>{t.style.clipPath=n(c),l&&(t.style.opacity=c.toString())}}),...y&&{key:y}}},V=($={})=>{const{spring:e={stiffness:1e3,damping:100},key:s}=$;return{in:()=>({spring:e,tick:()=>{}}),out:()=>({spring:e,tick:()=>{}}),...s&&{key:s}}};exports.blur=M;exports.bounce=S;exports.fade=g;exports.fly=Y;exports.mask=O;exports.none=V;exports.rotate=k;exports.scale=h;exports.slide=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=(p={})=>{const{from:t=0,to:e=1,spring:a={stiffness:300,damping:30},key:u}=p;return{in:()=>({spring:a,css:c=>({opacity:t+(e-t)*c})}),out:()=>({spring:a,css:c=>({opacity:t+(e-t)*c})}),...u&&{key:u}}},x=(p={})=>{const{start:t=0,opacity:e=0,axis:a="both",spring:u={stiffness:300,damping:30},key:c}=p,f=s=>{switch(a){case"x":return`scaleX(${s})`;case"y":return`scaleY(${s})`;case"both":default:return`scale(${s})`}},i=s=>{const r=t+(1-t)*s;return{transform:f(r),opacity:e+(1-e)*s}};return{in:()=>({spring:u,css:i}),out:()=>({spring:u,css:i}),...c&&{key:c}}},k=(p={})=>{const{direction:t,distance:e=100,opacity:a=0,fade:u=!0,axis:c,spring:f={stiffness:400,damping:35},key:i}=p,r=t||(c==="x"?"left":c==="y"?"up":"left"),n=d=>{const o=1-d;if(typeof e=="number"){const l=o*e;switch(r){case"left":return`translate3d(${-l}px, 0, 0)`;case"right":return`translate3d(${l}px, 0, 0)`;case"up":return`translate3d(0, ${-l}px, 0)`;case"down":return`translate3d(0, ${l}px, 0)`}}else switch(r){case"left":return`translate3d(calc(-1 * ${e} * ${o}), 0, 0)`;case"right":return`translate3d(calc(${e} * ${o}), 0, 0)`;case"up":return`translate3d(0, calc(-1 * ${e} * ${o}), 0)`;case"down":return`translate3d(0, calc(${e} * ${o}), 0)`}},$=d=>{const o={transform:n(d)};return u&&(o.opacity=a+(1-a)*d),o};return{in:()=>({spring:f,css:$}),out:()=>({spring:f,css:$}),...i&&{key:i}}},w=(p={})=>{const{degrees:t=360,clockwise:e=!0,scale:a=!1,fade:u=!0,origin:c="center",axis:f="2d",perspective:i=800,spring:s={stiffness:500,damping:25},key:r}=p,n=e?t:-t,$=o=>{const l=(1-o)*n;switch(f){case"x":return`perspective(${i}px) rotateX(${l}deg)`;case"y":return`perspective(${i}px) rotateY(${l}deg)`;case"z":return`rotateZ(${l}deg)`;case"2d":default:return`rotate(${l}deg)`}},d=o=>{const l={},g=[$(o)];return a&&g.push(`scale(${o})`),l.transform=g.join(" "),l.transformOrigin=c,u&&(l.opacity=o),l};return{in:()=>({spring:s,css:d}),out:()=>({spring:s,css:d}),...r&&{key:r}}},C=(p={})=>{const{height:t=20,intensity:e=1,scale:a=!0,fade:u=!0,direction:c="up",spring:f={stiffness:800,damping:15},key:i}=p,s=r=>{const n={},$=[],d=Math.sin(r*Math.PI*(1+e)),o=1-r,l=d*t*o;if(c==="up"?$.push(`translateY(${-Math.abs(l)}px)`):$.push(`translateY(${Math.abs(l)}px)`),a){const g=.8+r*.2+d*.05*o;$.push(`scale(${g})`)}return n.transform=$.join(" "),u&&(n.opacity=r),n};return{in:()=>({spring:f,css:s}),out:()=>({spring:f,css:s}),...i&&{key:i}}},M=(p={})=>{const{amount:t=10,opacity:e=0,scale:a=!1,fade:u=!0,spring:c={stiffness:300,damping:30},key:f}=p,i=s=>{const r=1-s,n={};return typeof t=="number"?n.filter=`blur(${r*t}px)`:n.filter=`blur(calc(${t} * ${r}))`,a&&(n.transform=`scale(${.8+s*.2})`),u&&(n.opacity=e+(1-e)*s),n};return{in:()=>({spring:c,css:i}),out:()=>({spring:c,css:i}),...f&&{key:f}}},O=(p={})=>{const{x:t=0,y:e=-100,opacity:a=0,spring:u={stiffness:400,damping:35},key:c}=p,f=i=>{const s=1-i;let r,n;return typeof t=="number"?r=`${s*t}px`:r=`calc(${t} * ${s})`,typeof e=="number"?n=`${s*e}px`:n=`calc(${e} * ${s})`,{transform:`translate3d(${r}, ${n}, 0)`,opacity:a+(1-a)*i}};return{in:()=>({spring:u,css:f}),out:()=>({spring:u,css:f}),...c&&{key:c}}},P=(p={})=>{const{shape:t="circle",origin:e="center",scale:a=1.5,fade:u=!1,spring:c={stiffness:300,damping:30},key:f}=p,i=()=>{switch(e){case"top":return"50% 0%";case"bottom":return"50% 100%";case"left":return"0% 50%";case"right":return"100% 50%";case"top-left":return"0% 0%";case"top-right":return"100% 0%";case"bottom-left":return"0% 100%";case"bottom-right":return"100% 100%";case"center":default:return"50% 50%"}},s=n=>{const $=n*a*100,d=i();switch(t){case"ellipse":return`ellipse(${$}% ${$*.75}% at ${d})`;case"square":{const o=n*a*100,[l,g]=d.split(" "),m=parseFloat(l),h=parseFloat(g),y=o/2;return`polygon(${m-y}% ${h-y}%, ${m+y}% ${h-y}%, ${m+y}% ${h+y}%, ${m-y}% ${h+y}%)`}case"circle":default:return`circle(${$}% at ${d})`}},r=n=>{const $={clipPath:s(n)};return u&&($.opacity=n),$};return{in:()=>({spring:c,css:r}),out:()=>({spring:c,css:r}),...f&&{key:f}}},S=(p={})=>{const{spring:t={stiffness:1e3,damping:100},key:e}=p;return{in:()=>({spring:t,css:()=>({})}),out:()=>({spring:t,css:()=>({})}),...e&&{key:e}}};exports.blur=M;exports.bounce=C;exports.fade=b;exports.fly=O;exports.mask=P;exports.none=S;exports.rotate=w;exports.scale=x;exports.slide=k;