@ssgoi/core 2.0.0 → 2.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/dist/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/create-transition-callback.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +284 -238
- package/dist/transition-strategy.d.ts.map +1 -1
- package/dist/transition.d.ts +51 -11
- package/dist/transition.d.ts.map +1 -1
- package/dist/transitions/blur.d.ts +3 -0
- package/dist/transitions/blur.d.ts.map +1 -1
- package/dist/transitions/bounce.d.ts +3 -0
- package/dist/transitions/bounce.d.ts.map +1 -1
- package/dist/transitions/fade.d.ts +3 -0
- package/dist/transitions/fade.d.ts.map +1 -1
- package/dist/transitions/fly.d.ts +3 -0
- package/dist/transitions/fly.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.js +121 -105
- package/dist/transitions/none.d.ts +3 -0
- package/dist/transitions/none.d.ts.map +1 -1
- package/dist/transitions/rotate.d.ts +3 -0
- package/dist/transitions/rotate.d.ts.map +1 -1
- package/dist/transitions/scale.d.ts +3 -0
- package/dist/transitions/scale.d.ts.map +1 -1
- package/dist/transitions/slide.d.ts +3 -0
- package/dist/transitions/slide.d.ts.map +1 -1
- package/dist/types.d.ts +11 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils-8Eptbv7c.cjs +2 -0
- package/dist/utils-DTRMUQW4.js +31 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/view-transitions/drill.d.ts +9 -0
- package/dist/view-transitions/drill.d.ts.map +1 -0
- package/dist/view-transitions/fade.d.ts +3 -1
- package/dist/view-transitions/fade.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +1 -1
- package/dist/view-transitions/index.d.ts +1 -0
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +234 -169
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/package.json +9 -8
- package/dist/utils-BSgyev81.cjs +0 -1
- package/dist/utils-DR41YsAh.js +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition-strategy.d.ts","sourceRoot":"","sources":["../src/lib/transition-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,mBAAmB,eAAoC,CAAC;AAErE,MAAM,WAAW,eAAe,CAAC,eAAe,GAAG,MAAM;IAEvD,gBAAgB,EAAE;
|
|
1
|
+
{"version":3,"file":"transition-strategy.d.ts","sourceRoot":"","sources":["../src/lib/transition-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,mBAAmB,eAAoC,CAAC;AAErE,MAAM,WAAW,eAAe,CAAC,eAAe,GAAG,MAAM;IAEvD,gBAAgB,EAAE;QAChB,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;QACpC,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,CA0HpC,CAAC"}
|
package/dist/transition.d.ts
CHANGED
|
@@ -1,20 +1,60 @@
|
|
|
1
1
|
import { StrategyContext, TRANSITION_STRATEGY, TransitionStrategy } from './transition-strategy';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
* Key type for transitions - can be string or symbol
|
|
5
|
-
*/
|
|
6
|
-
type TransitionKey = string | symbol;
|
|
2
|
+
import { TransitionCallback, TransitionOptions, TransitionKey } from './types';
|
|
3
|
+
export declare function generateAutoKey(): TransitionKey;
|
|
7
4
|
/**
|
|
8
5
|
* Framework-agnostic transition function that can be used as a ref
|
|
9
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Creates a transition that can be attached to DOM elements via ref.
|
|
9
|
+
* Manages entrance and exit animations with a complete lifecycle system.
|
|
10
|
+
*
|
|
11
|
+
* **IN Animation Lifecycle (Element Entering):**
|
|
12
|
+
* 1. `prepare` - Setup element's initial state (e.g., opacity: 0)
|
|
13
|
+
* 2. `wait` - Optional async delay before animation starts
|
|
14
|
+
* 3. `onStart` - Called when animation begins
|
|
15
|
+
* 4. `tick` - Called on each animation frame with progress value (0 → 1)
|
|
16
|
+
* 5. `onEnd` - Called when animation completes
|
|
17
|
+
*
|
|
18
|
+
* **OUT Animation Lifecycle (Element Exiting):**
|
|
19
|
+
* 1. `prepare` - Setup element's initial state for exit
|
|
20
|
+
* 2. `wait` - Optional async delay before animation starts
|
|
21
|
+
* 3. `onStart` - Called when animation begins
|
|
22
|
+
* 4. `tick` - Called on each animation frame with progress value (1 → 0)
|
|
23
|
+
* 5. `onEnd` - Called when animation completes and element is removed
|
|
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.
|
|
10
37
|
*
|
|
11
38
|
* @template TAnimationValue - The type of value being animated (number | object)
|
|
39
|
+
*
|
|
40
|
+
* @returns {TransitionCallback} A callback function to be used as a ref
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* // Simple fade transition
|
|
45
|
+
* <div ref={transition({
|
|
46
|
+
* key: 'hero-fade',
|
|
47
|
+
* in: (element) => ({
|
|
48
|
+
* prepare: (el) => el.style.opacity = '0',
|
|
49
|
+
* tick: (progress) => el.style.opacity = progress.toString(),
|
|
50
|
+
* }),
|
|
51
|
+
* out: (element) => ({
|
|
52
|
+
* tick: (progress) => el.style.opacity = progress.toString(),
|
|
53
|
+
* })
|
|
54
|
+
* })} />
|
|
55
|
+
* ```
|
|
12
56
|
*/
|
|
13
|
-
export declare function transition<TAnimationValue = number>(options: {
|
|
14
|
-
key: TransitionKey;
|
|
15
|
-
in?: Transition<undefined, TAnimationValue>["in"];
|
|
16
|
-
out?: Transition<undefined, TAnimationValue>["out"];
|
|
57
|
+
export declare function transition<TAnimationValue = number>(options: TransitionOptions<undefined, TAnimationValue> & {
|
|
17
58
|
[TRANSITION_STRATEGY]?: (context: StrategyContext<TAnimationValue>) => TransitionStrategy<TAnimationValue>;
|
|
18
59
|
}): TransitionCallback;
|
|
19
|
-
export {};
|
|
20
60
|
//# sourceMappingURL=transition.d.ts.map
|
package/dist/transition.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../src/lib/transition.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../src/lib/transition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,KAAK,EAAc,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA+D7C,wBAAgB,eAAe,IAAI,aAAa,CAY/C;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,UAAU,CAAC,eAAe,GAAG,MAAM,EACjD,OAAO,EAAE,iBAAiB,CAAC,SAAS,EAAE,eAAe,CAAC,GAAG;IACvD,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,eAAe,CAAC,KAAK,kBAAkB,CAAC,eAAe,CAAC,CAAC;CAC5G,GACA,kBAAkB,CAmBpB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransitionKey } from '../types';
|
|
1
2
|
interface BlurOptions {
|
|
2
3
|
amount?: number | string;
|
|
3
4
|
opacity?: number;
|
|
@@ -7,8 +8,10 @@ interface BlurOptions {
|
|
|
7
8
|
stiffness?: number;
|
|
8
9
|
damping?: number;
|
|
9
10
|
};
|
|
11
|
+
key?: TransitionKey;
|
|
10
12
|
}
|
|
11
13
|
export declare const blur: (options?: BlurOptions) => {
|
|
14
|
+
key?: TransitionKey | undefined;
|
|
12
15
|
in: (element: HTMLElement) => {
|
|
13
16
|
spring: {
|
|
14
17
|
stiffness?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/blur.ts"],"names":[],"mappings":"AAAA,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;
|
|
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;;mBAmBV,WAAW;;wBA1Cd,MAAM;sBACR,MAAM;;yBA2CG,MAAM;;CAqB5B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransitionKey } from '../types';
|
|
1
2
|
interface BounceOptions {
|
|
2
3
|
height?: number;
|
|
3
4
|
intensity?: number;
|
|
@@ -8,8 +9,10 @@ interface BounceOptions {
|
|
|
8
9
|
stiffness?: number;
|
|
9
10
|
damping?: number;
|
|
10
11
|
};
|
|
12
|
+
key?: TransitionKey;
|
|
11
13
|
}
|
|
12
14
|
export declare const bounce: (options?: BounceOptions) => {
|
|
15
|
+
key?: TransitionKey | undefined;
|
|
13
16
|
in: (element: HTMLElement) => {
|
|
14
17
|
spring: {
|
|
15
18
|
stiffness?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bounce.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/bounce.ts"],"names":[],"mappings":"AAAA,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;
|
|
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;;mBA0BV,WAAW;;wBA9Cd,MAAM;sBACR,MAAM;;yBA+CG,MAAM;;CA4B5B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransitionKey } from '../types';
|
|
1
2
|
interface FadeOptions {
|
|
2
3
|
from?: number;
|
|
3
4
|
to?: number;
|
|
@@ -5,8 +6,10 @@ interface FadeOptions {
|
|
|
5
6
|
stiffness?: number;
|
|
6
7
|
damping?: number;
|
|
7
8
|
};
|
|
9
|
+
key?: TransitionKey;
|
|
8
10
|
}
|
|
9
11
|
export declare const fade: (options?: FadeOptions) => {
|
|
12
|
+
key?: TransitionKey | undefined;
|
|
10
13
|
in: (element: HTMLElement) => {
|
|
11
14
|
spring: {
|
|
12
15
|
stiffness?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/fade.ts"],"names":[],"mappings":"AAAA,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;
|
|
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,3 +1,4 @@
|
|
|
1
|
+
import { TransitionKey } from '../types';
|
|
1
2
|
interface FlyOptions {
|
|
2
3
|
x?: number | string;
|
|
3
4
|
y?: number | string;
|
|
@@ -6,8 +7,10 @@ interface FlyOptions {
|
|
|
6
7
|
stiffness?: number;
|
|
7
8
|
damping?: number;
|
|
8
9
|
};
|
|
10
|
+
key?: TransitionKey;
|
|
9
11
|
}
|
|
10
12
|
export declare const fly: (options?: FlyOptions) => {
|
|
13
|
+
key?: TransitionKey | undefined;
|
|
11
14
|
in: (element: HTMLElement) => {
|
|
12
15
|
spring: {
|
|
13
16
|
stiffness?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fly.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/fly.ts"],"names":[],"mappings":"AAAA,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;
|
|
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;;mBAQV,WAAW;;wBAlCd,MAAM;sBACR,MAAM;;yBAmCG,MAAM;;CAU5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=($={})=>{const{from:n=0,to:s=1,spring:r={stiffness:300,damping:30},key:u}=$;return{in:l=>({spring:r,tick:y=>{const c=n+(s-n)*y;l.style.opacity=c.toString()}}),out:l=>({spring:r,tick:y=>{const c=n+(s-n)*y;l.style.opacity=c.toString()}}),...u&&{key:u}}},m=($={})=>{const{start:n=0,opacity:s=0,axis:r="both",spring:u={stiffness:300,damping:30},key:l}=$,y=c=>{switch(r){case"x":return`scaleX(${c})`;case"y":return`scaleY(${c})`;case"both":default:return`scale(${c})`}};return{in:c=>({spring:u,tick:t=>{const e=n+(1-n)*t;c.style.transform=y(e),c.style.opacity=(s+(1-s)*t).toString()}}),out:c=>({spring:u,tick:t=>{const e=n+(1-n)*t;c.style.transform=y(e),c.style.opacity=(s+(1-s)*t).toString()}}),...l&&{key:l}}},d=($={})=>{const{direction:n,distance:s=100,opacity:r=0,fade:u=!0,axis:l,spring:y={stiffness:400,damping:35},key:c}=$,e=n||(l==="x"?"left":l==="y"?"up":"left"),o=a=>typeof a=="number"?`${a}px`:a,f=a=>{const i=1-a,p=typeof s=="number"?i*s:`calc(${o(s)} * ${i})`;switch(e){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:a=>({spring:y,tick:i=>{a.style.transform=f(i),u&&(a.style.opacity=(r+(1-r)*i).toString())}}),out:a=>({spring:y,tick:i=>{a.style.transform=f(i),u&&(a.style.opacity=(r+(1-r)*i).toString())}}),...c&&{key:c}}},g=($={})=>{const{degrees:n=360,clockwise:s=!0,scale:r=!1,fade:u=!0,origin:l="center",axis:y="2d",perspective:c=800,spring:t={stiffness:500,damping:25},key:e}=$,o=s?n:-n,f=a=>{const i=(1-a)*o;switch(y){case"x":return`perspective(${c}px) rotateX(${i}deg)`;case"y":return`perspective(${c}px) rotateY(${i}deg)`;case"z":return`rotateZ(${i}deg)`;case"2d":default:return`rotate(${i}deg)`}};return{in:a=>({spring:t,tick:i=>{const p=[f(i)];r&&p.push(`scale(${i})`),a.style.transform=p.join(" "),a.style.transformOrigin=l,u&&(a.style.opacity=i.toString())}}),out:a=>({spring:t,tick:i=>{const p=[f(i)];r&&p.push(`scale(${i})`),a.style.transform=p.join(" "),a.style.transformOrigin=l,u&&(a.style.opacity=i.toString())}}),...e&&{key:e}}},x=($={})=>{const{height:n=20,intensity:s=1,scale:r=!0,fade:u=!0,direction:l="up",spring:y={stiffness:800,damping:15},key:c}=$;return{in:t=>({spring:y,tick:e=>{const o=[],f=Math.sin(e*Math.PI*(1+s)),a=1-e,i=f*n*a;if(l==="up"?o.push(`translateY(${-Math.abs(i)}px)`):o.push(`translateY(${Math.abs(i)}px)`),r){const p=.8+e*.2+f*.05*a;o.push(`scale(${p})`)}t.style.transform=o.join(" "),u&&(t.style.opacity=e.toString())}}),out:t=>({spring:y,tick:e=>{const o=[],f=Math.sin(e*Math.PI*(1+s)),a=1-e,i=f*n*a;if(l==="up"?o.push(`translateY(${-Math.abs(i)}px)`):o.push(`translateY(${Math.abs(i)}px)`),r){const p=.8+e*.2+f*.05*a;o.push(`scale(${p})`)}t.style.transform=o.join(" "),u&&(t.style.opacity=e.toString())}}),...c&&{key:c}}},k=($={})=>{const{amount:n=10,opacity:s=0,scale:r=!1,fade:u=!0,spring:l={stiffness:300,damping:30},key:y}=$,c=t=>typeof t=="number"?`${t}px`:t;return{in:t=>({spring:l,tick:e=>{const o=1-e,f=typeof n=="number"?o*n:`calc(${c(n)} * ${o})`;t.style.filter=typeof n=="number"?`blur(${f}px)`:`blur(${f})`,r&&(t.style.transform=`scale(${.8+e*.2})`),u&&(t.style.opacity=(s+(1-s)*e).toString())}}),out:t=>({spring:l,tick:e=>{const o=1-e,f=typeof n=="number"?o*n:`calc(${c(n)} * ${o})`;t.style.filter=typeof n=="number"?`blur(${f}px)`:`blur(${f})`,r&&(t.style.transform=`scale(${.8+e*.2})`),u&&(t.style.opacity=(s+(1-s)*e).toString())}}),...y&&{key:y}}},h=($={})=>{const{x:n=0,y:s=-100,opacity:r=0,spring:u={stiffness:400,damping:35},key:l}=$,y=t=>typeof t=="number"?`${t}px`:t,c=t=>typeof t=="number"?`${t}px`:t;return{in:t=>({spring:u,tick:e=>{const o=typeof n=="number"?(1-e)*n:`calc(${y(n)} * ${1-e})`,f=typeof s=="number"?(1-e)*s:`calc(${c(s)} * ${1-e})`;t.style.transform=`translate(${typeof n=="number"?o+"px":o}, ${typeof s=="number"?f+"px":f})`,t.style.opacity=(r+(1-r)*e).toString()}}),out:t=>({spring:u,tick:e=>{const o=typeof n=="number"?(1-e)*n:`calc(${y(n)} * ${1-e})`,f=typeof s=="number"?(1-e)*s:`calc(${c(s)} * ${1-e})`;t.style.transform=`translate(${typeof n=="number"?o+"px":o}, ${typeof s=="number"?f+"px":f})`,t.style.opacity=(r+(1-r)*e).toString()}}),...l&&{key:l}}},S=($={})=>{const{spring:n={stiffness:1e3,damping:100},key:s}=$;return{in:r=>({spring:n,tick:u=>{}}),out:r=>({spring:n,tick:u=>{}}),...s&&{key:s}}};exports.blur=k;exports.bounce=x;exports.fade=b;exports.fly=h;exports.none=S;exports.rotate=g;exports.scale=m;exports.slide=d;
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
const
|
|
1
|
+
const m = ($ = {}) => {
|
|
2
2
|
const {
|
|
3
3
|
from: n = 0,
|
|
4
|
-
to:
|
|
5
|
-
spring: r = { stiffness: 300, damping: 30 }
|
|
6
|
-
|
|
4
|
+
to: s = 1,
|
|
5
|
+
spring: r = { stiffness: 300, damping: 30 },
|
|
6
|
+
key: u
|
|
7
|
+
} = $;
|
|
7
8
|
return {
|
|
8
|
-
in: (
|
|
9
|
+
in: (l) => ({
|
|
9
10
|
spring: r,
|
|
10
|
-
tick: (
|
|
11
|
-
const c = n + (
|
|
12
|
-
|
|
11
|
+
tick: (y) => {
|
|
12
|
+
const c = n + (s - n) * y;
|
|
13
|
+
l.style.opacity = c.toString();
|
|
13
14
|
}
|
|
14
15
|
}),
|
|
15
|
-
out: (
|
|
16
|
+
out: (l) => ({
|
|
16
17
|
spring: r,
|
|
17
|
-
tick: (
|
|
18
|
-
const c = n + (
|
|
19
|
-
|
|
18
|
+
tick: (y) => {
|
|
19
|
+
const c = n + (s - n) * y;
|
|
20
|
+
l.style.opacity = c.toString();
|
|
20
21
|
}
|
|
21
|
-
})
|
|
22
|
+
}),
|
|
23
|
+
...u && { key: u }
|
|
22
24
|
};
|
|
23
|
-
},
|
|
25
|
+
}, b = ($ = {}) => {
|
|
24
26
|
const {
|
|
25
27
|
start: n = 0,
|
|
26
|
-
opacity:
|
|
28
|
+
opacity: s = 0,
|
|
27
29
|
axis: r = "both",
|
|
28
|
-
spring: u = { stiffness: 300, damping: 30 }
|
|
29
|
-
|
|
30
|
+
spring: u = { stiffness: 300, damping: 30 },
|
|
31
|
+
key: l
|
|
32
|
+
} = $, y = (c) => {
|
|
30
33
|
switch (r) {
|
|
31
34
|
case "x":
|
|
32
35
|
return `scaleX(${c})`;
|
|
@@ -41,70 +44,74 @@ const $ = (p = {}) => {
|
|
|
41
44
|
in: (c) => ({
|
|
42
45
|
spring: u,
|
|
43
46
|
tick: (t) => {
|
|
44
|
-
const
|
|
45
|
-
c.style.transform =
|
|
47
|
+
const e = n + (1 - n) * t;
|
|
48
|
+
c.style.transform = y(e), c.style.opacity = (s + (1 - s) * t).toString();
|
|
46
49
|
}
|
|
47
50
|
}),
|
|
48
51
|
out: (c) => ({
|
|
49
52
|
spring: u,
|
|
50
53
|
tick: (t) => {
|
|
51
|
-
const
|
|
52
|
-
c.style.transform =
|
|
54
|
+
const e = n + (1 - n) * t;
|
|
55
|
+
c.style.transform = y(e), c.style.opacity = (s + (1 - s) * t).toString();
|
|
53
56
|
}
|
|
54
|
-
})
|
|
57
|
+
}),
|
|
58
|
+
...l && { key: l }
|
|
55
59
|
};
|
|
56
|
-
},
|
|
60
|
+
}, x = ($ = {}) => {
|
|
57
61
|
const {
|
|
58
62
|
direction: n,
|
|
59
|
-
distance:
|
|
63
|
+
distance: s = 100,
|
|
60
64
|
opacity: r = 0,
|
|
61
65
|
fade: u = !0,
|
|
62
66
|
axis: l,
|
|
63
|
-
spring:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
spring: y = { stiffness: 400, damping: 35 },
|
|
68
|
+
key: c
|
|
69
|
+
} = $, e = n || (l === "x" ? "left" : l === "y" ? "up" : "left"), o = (a) => typeof a == "number" ? `${a}px` : a, f = (a) => {
|
|
70
|
+
const i = 1 - a, p = typeof s == "number" ? i * s : `calc(${o(s)} * ${i})`;
|
|
71
|
+
switch (e) {
|
|
67
72
|
case "left":
|
|
68
|
-
return typeof
|
|
73
|
+
return typeof s == "number" ? `translateX(${-p}px)` : `translateX(calc(-1 * ${p}))`;
|
|
69
74
|
case "right":
|
|
70
|
-
return typeof
|
|
75
|
+
return typeof s == "number" ? `translateX(${p}px)` : `translateX(${p})`;
|
|
71
76
|
case "up":
|
|
72
|
-
return typeof
|
|
77
|
+
return typeof s == "number" ? `translateY(${-p}px)` : `translateY(calc(-1 * ${p}))`;
|
|
73
78
|
case "down":
|
|
74
|
-
return typeof
|
|
79
|
+
return typeof s == "number" ? `translateY(${p}px)` : `translateY(${p})`;
|
|
75
80
|
}
|
|
76
81
|
};
|
|
77
82
|
return {
|
|
78
83
|
in: (a) => ({
|
|
79
|
-
spring:
|
|
84
|
+
spring: y,
|
|
80
85
|
tick: (i) => {
|
|
81
86
|
a.style.transform = f(i), u && (a.style.opacity = (r + (1 - r) * i).toString());
|
|
82
87
|
}
|
|
83
88
|
}),
|
|
84
89
|
out: (a) => ({
|
|
85
|
-
spring:
|
|
90
|
+
spring: y,
|
|
86
91
|
tick: (i) => {
|
|
87
92
|
a.style.transform = f(i), u && (a.style.opacity = (r + (1 - r) * i).toString());
|
|
88
93
|
}
|
|
89
|
-
})
|
|
94
|
+
}),
|
|
95
|
+
...c && { key: c }
|
|
90
96
|
};
|
|
91
|
-
},
|
|
97
|
+
}, d = ($ = {}) => {
|
|
92
98
|
const {
|
|
93
99
|
degrees: n = 360,
|
|
94
|
-
clockwise:
|
|
100
|
+
clockwise: s = !0,
|
|
95
101
|
scale: r = !1,
|
|
96
102
|
fade: u = !0,
|
|
97
103
|
origin: l = "center",
|
|
98
|
-
axis:
|
|
99
|
-
perspective:
|
|
100
|
-
spring:
|
|
101
|
-
|
|
104
|
+
axis: y = "2d",
|
|
105
|
+
perspective: c = 800,
|
|
106
|
+
spring: t = { stiffness: 500, damping: 25 },
|
|
107
|
+
key: e
|
|
108
|
+
} = $, o = s ? n : -n, f = (a) => {
|
|
102
109
|
const i = (1 - a) * o;
|
|
103
|
-
switch (
|
|
110
|
+
switch (y) {
|
|
104
111
|
case "x":
|
|
105
|
-
return `perspective(${
|
|
112
|
+
return `perspective(${c}px) rotateX(${i}deg)`;
|
|
106
113
|
case "y":
|
|
107
|
-
return `perspective(${
|
|
114
|
+
return `perspective(${c}px) rotateY(${i}deg)`;
|
|
108
115
|
case "z":
|
|
109
116
|
return `rotateZ(${i}deg)`;
|
|
110
117
|
case "2d":
|
|
@@ -114,124 +121,133 @@ const $ = (p = {}) => {
|
|
|
114
121
|
};
|
|
115
122
|
return {
|
|
116
123
|
in: (a) => ({
|
|
117
|
-
spring:
|
|
124
|
+
spring: t,
|
|
118
125
|
tick: (i) => {
|
|
119
|
-
const
|
|
120
|
-
r &&
|
|
126
|
+
const p = [f(i)];
|
|
127
|
+
r && p.push(`scale(${i})`), a.style.transform = p.join(" "), a.style.transformOrigin = l, u && (a.style.opacity = i.toString());
|
|
121
128
|
}
|
|
122
129
|
}),
|
|
123
130
|
out: (a) => ({
|
|
124
|
-
spring:
|
|
131
|
+
spring: t,
|
|
125
132
|
tick: (i) => {
|
|
126
|
-
const
|
|
127
|
-
r &&
|
|
133
|
+
const p = [f(i)];
|
|
134
|
+
r && p.push(`scale(${i})`), a.style.transform = p.join(" "), a.style.transformOrigin = l, u && (a.style.opacity = i.toString());
|
|
128
135
|
}
|
|
129
|
-
})
|
|
136
|
+
}),
|
|
137
|
+
...e && { key: e }
|
|
130
138
|
};
|
|
131
|
-
},
|
|
139
|
+
}, g = ($ = {}) => {
|
|
132
140
|
const {
|
|
133
141
|
height: n = 20,
|
|
134
|
-
intensity:
|
|
142
|
+
intensity: s = 1,
|
|
135
143
|
scale: r = !0,
|
|
136
144
|
fade: u = !0,
|
|
137
145
|
direction: l = "up",
|
|
138
|
-
spring:
|
|
139
|
-
|
|
146
|
+
spring: y = { stiffness: 800, damping: 15 },
|
|
147
|
+
key: c
|
|
148
|
+
} = $;
|
|
140
149
|
return {
|
|
141
150
|
in: (t) => ({
|
|
142
|
-
spring:
|
|
143
|
-
tick: (
|
|
144
|
-
const o = [], f = Math.sin(
|
|
151
|
+
spring: y,
|
|
152
|
+
tick: (e) => {
|
|
153
|
+
const o = [], f = Math.sin(e * Math.PI * (1 + s)), a = 1 - e, i = f * n * a;
|
|
145
154
|
if (l === "up" ? o.push(`translateY(${-Math.abs(i)}px)`) : o.push(`translateY(${Math.abs(i)}px)`), r) {
|
|
146
|
-
const
|
|
147
|
-
o.push(`scale(${
|
|
155
|
+
const p = 0.8 + e * 0.2 + f * 0.05 * a;
|
|
156
|
+
o.push(`scale(${p})`);
|
|
148
157
|
}
|
|
149
|
-
t.style.transform = o.join(" "), u && (t.style.opacity =
|
|
158
|
+
t.style.transform = o.join(" "), u && (t.style.opacity = e.toString());
|
|
150
159
|
}
|
|
151
160
|
}),
|
|
152
161
|
out: (t) => ({
|
|
153
|
-
spring:
|
|
154
|
-
tick: (
|
|
155
|
-
const o = [], f = Math.sin(
|
|
162
|
+
spring: y,
|
|
163
|
+
tick: (e) => {
|
|
164
|
+
const o = [], f = Math.sin(e * Math.PI * (1 + s)), a = 1 - e, i = f * n * a;
|
|
156
165
|
if (l === "up" ? o.push(`translateY(${-Math.abs(i)}px)`) : o.push(`translateY(${Math.abs(i)}px)`), r) {
|
|
157
|
-
const
|
|
158
|
-
o.push(`scale(${
|
|
166
|
+
const p = 0.8 + e * 0.2 + f * 0.05 * a;
|
|
167
|
+
o.push(`scale(${p})`);
|
|
159
168
|
}
|
|
160
|
-
t.style.transform = o.join(" "), u && (t.style.opacity =
|
|
169
|
+
t.style.transform = o.join(" "), u && (t.style.opacity = e.toString());
|
|
161
170
|
}
|
|
162
|
-
})
|
|
171
|
+
}),
|
|
172
|
+
...c && { key: c }
|
|
163
173
|
};
|
|
164
|
-
},
|
|
174
|
+
}, k = ($ = {}) => {
|
|
165
175
|
const {
|
|
166
176
|
amount: n = 10,
|
|
167
|
-
opacity:
|
|
177
|
+
opacity: s = 0,
|
|
168
178
|
scale: r = !1,
|
|
169
179
|
fade: u = !0,
|
|
170
|
-
spring: l = { stiffness: 300, damping: 30 }
|
|
171
|
-
|
|
180
|
+
spring: l = { stiffness: 300, damping: 30 },
|
|
181
|
+
key: y
|
|
182
|
+
} = $, c = (t) => typeof t == "number" ? `${t}px` : t;
|
|
172
183
|
return {
|
|
173
184
|
in: (t) => ({
|
|
174
185
|
spring: l,
|
|
175
|
-
tick: (
|
|
176
|
-
const o = 1 -
|
|
177
|
-
t.style.filter = typeof n == "number" ? `blur(${f}px)` : `blur(${f})`, r && (t.style.transform = `scale(${0.8 +
|
|
186
|
+
tick: (e) => {
|
|
187
|
+
const o = 1 - e, f = typeof n == "number" ? o * n : `calc(${c(n)} * ${o})`;
|
|
188
|
+
t.style.filter = typeof n == "number" ? `blur(${f}px)` : `blur(${f})`, r && (t.style.transform = `scale(${0.8 + e * 0.2})`), u && (t.style.opacity = (s + (1 - s) * e).toString());
|
|
178
189
|
}
|
|
179
190
|
}),
|
|
180
191
|
out: (t) => ({
|
|
181
192
|
spring: l,
|
|
182
|
-
tick: (
|
|
183
|
-
const o = 1 -
|
|
184
|
-
t.style.filter = typeof n == "number" ? `blur(${f}px)` : `blur(${f})`, r && (t.style.transform = `scale(${0.8 +
|
|
193
|
+
tick: (e) => {
|
|
194
|
+
const o = 1 - e, f = typeof n == "number" ? o * n : `calc(${c(n)} * ${o})`;
|
|
195
|
+
t.style.filter = typeof n == "number" ? `blur(${f}px)` : `blur(${f})`, r && (t.style.transform = `scale(${0.8 + e * 0.2})`), u && (t.style.opacity = (s + (1 - s) * e).toString());
|
|
185
196
|
}
|
|
186
|
-
})
|
|
197
|
+
}),
|
|
198
|
+
...y && { key: y }
|
|
187
199
|
};
|
|
188
|
-
}, h = (
|
|
200
|
+
}, h = ($ = {}) => {
|
|
189
201
|
const {
|
|
190
202
|
x: n = 0,
|
|
191
|
-
y:
|
|
203
|
+
y: s = -100,
|
|
192
204
|
opacity: r = 0,
|
|
193
|
-
spring: u = { stiffness: 400, damping: 35 }
|
|
194
|
-
|
|
205
|
+
spring: u = { stiffness: 400, damping: 35 },
|
|
206
|
+
key: l
|
|
207
|
+
} = $, y = (t) => typeof t == "number" ? `${t}px` : t, c = (t) => typeof t == "number" ? `${t}px` : t;
|
|
195
208
|
return {
|
|
196
209
|
in: (t) => ({
|
|
197
210
|
spring: u,
|
|
198
|
-
tick: (
|
|
199
|
-
const o = typeof n == "number" ? (1 -
|
|
200
|
-
t.style.transform = `translate(${typeof n == "number" ? o + "px" : o}, ${typeof
|
|
211
|
+
tick: (e) => {
|
|
212
|
+
const o = typeof n == "number" ? (1 - e) * n : `calc(${y(n)} * ${1 - e})`, f = typeof s == "number" ? (1 - e) * s : `calc(${c(s)} * ${1 - e})`;
|
|
213
|
+
t.style.transform = `translate(${typeof n == "number" ? o + "px" : o}, ${typeof s == "number" ? f + "px" : f})`, t.style.opacity = (r + (1 - r) * e).toString();
|
|
201
214
|
}
|
|
202
215
|
}),
|
|
203
216
|
out: (t) => ({
|
|
204
217
|
spring: u,
|
|
205
|
-
tick: (
|
|
206
|
-
const o = typeof n == "number" ? (1 -
|
|
207
|
-
t.style.transform = `translate(${typeof n == "number" ? o + "px" : o}, ${typeof
|
|
218
|
+
tick: (e) => {
|
|
219
|
+
const o = typeof n == "number" ? (1 - e) * n : `calc(${y(n)} * ${1 - e})`, f = typeof s == "number" ? (1 - e) * s : `calc(${c(s)} * ${1 - e})`;
|
|
220
|
+
t.style.transform = `translate(${typeof n == "number" ? o + "px" : o}, ${typeof s == "number" ? f + "px" : f})`, t.style.opacity = (r + (1 - r) * e).toString();
|
|
208
221
|
}
|
|
209
|
-
})
|
|
222
|
+
}),
|
|
223
|
+
...l && { key: l }
|
|
210
224
|
};
|
|
211
|
-
},
|
|
225
|
+
}, S = ($ = {}) => {
|
|
212
226
|
const {
|
|
213
|
-
spring: n = { stiffness: 1e3, damping: 100 }
|
|
214
|
-
|
|
227
|
+
spring: n = { stiffness: 1e3, damping: 100 },
|
|
228
|
+
key: s
|
|
229
|
+
} = $;
|
|
215
230
|
return {
|
|
216
|
-
in: (
|
|
231
|
+
in: (r) => ({
|
|
217
232
|
spring: n,
|
|
218
|
-
tick: (
|
|
233
|
+
tick: (u) => {
|
|
219
234
|
}
|
|
220
235
|
}),
|
|
221
|
-
out: (
|
|
236
|
+
out: (r) => ({
|
|
222
237
|
spring: n,
|
|
223
|
-
tick: (
|
|
238
|
+
tick: (u) => {
|
|
224
239
|
}
|
|
225
|
-
})
|
|
240
|
+
}),
|
|
241
|
+
...s && { key: s }
|
|
226
242
|
};
|
|
227
243
|
};
|
|
228
244
|
export {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
245
|
+
k as blur,
|
|
246
|
+
g as bounce,
|
|
247
|
+
m as fade,
|
|
232
248
|
h as fly,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
249
|
+
S as none,
|
|
250
|
+
d as rotate,
|
|
251
|
+
b as scale,
|
|
252
|
+
x as slide
|
|
237
253
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { TransitionKey } from '../types';
|
|
1
2
|
interface NoneOptions {
|
|
2
3
|
spring?: {
|
|
3
4
|
stiffness?: number;
|
|
4
5
|
damping?: number;
|
|
5
6
|
};
|
|
7
|
+
key?: TransitionKey;
|
|
6
8
|
}
|
|
7
9
|
export declare const none: (options?: NoneOptions) => {
|
|
10
|
+
key?: TransitionKey | undefined;
|
|
8
11
|
in: (_element: HTMLElement) => {
|
|
9
12
|
spring: {
|
|
10
13
|
stiffness?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/none.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/none.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,WAAW;IACnB,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;;mBAO3B,WAAW;;wBAbd,MAAM;sBACR,MAAM;;0BAcI,MAAM;;oBAIV,WAAW;;wBAnBf,MAAM;sBACR,MAAM;;0BAoBI,MAAM;;CAM7B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransitionKey } from '../types';
|
|
1
2
|
interface RotateOptions {
|
|
2
3
|
degrees?: number;
|
|
3
4
|
clockwise?: boolean;
|
|
@@ -10,8 +11,10 @@ interface RotateOptions {
|
|
|
10
11
|
stiffness?: number;
|
|
11
12
|
damping?: number;
|
|
12
13
|
};
|
|
14
|
+
key?: TransitionKey;
|
|
13
15
|
}
|
|
14
16
|
export declare const rotate: (options?: RotateOptions) => {
|
|
17
|
+
key?: TransitionKey | undefined;
|
|
15
18
|
in: (element: HTMLElement) => {
|
|
16
19
|
spring: {
|
|
17
20
|
stiffness?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/rotate.ts"],"names":[],"mappings":"AAAA,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/rotate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,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;;kBA+BhC,WAAW;;wBArCb,MAAM;sBACR,MAAM;;yBAsCG,MAAM;;mBAeV,WAAW;;wBAtDd,MAAM;sBACR,MAAM;;yBAuDG,MAAM;;CAiB5B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransitionKey } from '../types';
|
|
1
2
|
interface ScaleOptions {
|
|
2
3
|
start?: number;
|
|
3
4
|
opacity?: number;
|
|
@@ -6,8 +7,10 @@ interface ScaleOptions {
|
|
|
6
7
|
stiffness?: number;
|
|
7
8
|
damping?: number;
|
|
8
9
|
};
|
|
10
|
+
key?: TransitionKey;
|
|
9
11
|
}
|
|
10
12
|
export declare const scale: (options?: ScaleOptions) => {
|
|
13
|
+
key?: TransitionKey | undefined;
|
|
11
14
|
in: (element: HTMLElement) => {
|
|
12
15
|
spring: {
|
|
13
16
|
stiffness?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/scale.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../src/lib/transitions/scale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,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,KAAK,GAAI,UAAS,YAAiB;;kBAsB9B,WAAW;;wBA5Bb,MAAM;sBACR,MAAM;;yBA6BG,MAAM;;mBAMV,WAAW;;wBApCd,MAAM;sBACR,MAAM;;yBAqCG,MAAM;;CAQ5B,CAAC"}
|