@ssgoi/core 3.5.0 → 4.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.
- package/dist/animator/integrator/double-spring-integrator.d.ts +25 -0
- package/dist/animator/integrator/double-spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/index.d.ts +13 -0
- package/dist/animator/integrator/index.d.ts.map +1 -0
- package/dist/animator/integrator/inertia-integrator.d.ts +19 -0
- package/dist/animator/integrator/inertia-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/provider.d.ts +22 -0
- package/dist/animator/integrator/provider.d.ts.map +1 -0
- package/dist/animator/integrator/spring-integrator.d.ts +13 -0
- package/dist/animator/integrator/spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/types.d.ts +34 -0
- package/dist/animator/integrator/types.d.ts.map +1 -0
- package/dist/animator/multi-animator.d.ts +2 -2
- package/dist/animator/multi-animator.d.ts.map +1 -1
- package/dist/animator/{animate → runner}/css-runner.d.ts +2 -2
- package/dist/animator/runner/css-runner.d.ts.map +1 -0
- package/dist/animator/runner/provider.d.ts +35 -0
- package/dist/animator/runner/provider.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/tick-runner.d.ts +2 -2
- package/dist/animator/runner/tick-runner.d.ts.map +1 -0
- package/dist/animator/runner/ticker.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/types.d.ts +6 -3
- package/dist/animator/runner/types.d.ts.map +1 -0
- package/dist/animator/{index.d.ts → single-animator.d.ts} +17 -9
- package/dist/animator/single-animator.d.ts.map +1 -0
- package/dist/animator/{animation.d.ts → types.d.ts} +2 -2
- package/dist/animator/types.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +479 -532
- package/dist/provider-B6Xnh0BA.cjs +1 -0
- package/dist/provider-CMBovM_W.js +134 -0
- package/dist/transition/transition-strategy.d.ts +2 -2
- package/dist/transition/transition-strategy.d.ts.map +1 -1
- package/dist/transitions/blur.d.ts +4 -4
- package/dist/transitions/blur.d.ts.map +1 -1
- package/dist/transitions/bounce.d.ts +4 -4
- package/dist/transitions/bounce.d.ts.map +1 -1
- package/dist/transitions/fade.d.ts +4 -4
- package/dist/transitions/fade.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.d.ts +5 -0
- package/dist/transitions/index.d.ts.map +1 -1
- package/dist/transitions/index.js +141 -191
- package/dist/transitions/rotate.d.ts +4 -4
- package/dist/transitions/rotate.d.ts.map +1 -1
- package/dist/transitions/scale.d.ts +4 -4
- package/dist/transitions/scale.d.ts.map +1 -1
- package/dist/transitions/slide.d.ts +4 -4
- package/dist/transitions/slide.d.ts.map +1 -1
- package/dist/transitions/utils.d.ts +8 -0
- package/dist/transitions/utils.d.ts.map +1 -0
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +59 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +6 -6
- package/dist/view-transitions/blind.d.ts +2 -3
- package/dist/view-transitions/blind.d.ts.map +1 -1
- package/dist/view-transitions/curtain-reveal.d.ts +2 -3
- package/dist/view-transitions/curtain-reveal.d.ts.map +1 -1
- package/dist/view-transitions/depth.d.ts +2 -2
- package/dist/view-transitions/depth.d.ts.map +1 -1
- package/dist/view-transitions/drill.d.ts +2 -2
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/fade.d.ts +2 -3
- package/dist/view-transitions/fade.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts +2 -1
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts +2 -2
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +17 -17
- 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 +863 -843
- package/dist/view-transitions/instagram.d.ts +2 -2
- package/dist/view-transitions/instagram.d.ts.map +1 -1
- package/dist/view-transitions/jaemin.d.ts +2 -2
- package/dist/view-transitions/jaemin.d.ts.map +1 -1
- package/dist/view-transitions/pinterest.d.ts +2 -2
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/rotate.d.ts +5 -2
- package/dist/view-transitions/rotate.d.ts.map +1 -1
- package/dist/view-transitions/scroll.d.ts +2 -2
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/sheet.d.ts +2 -2
- package/dist/view-transitions/sheet.d.ts.map +1 -1
- package/dist/view-transitions/slide.d.ts +2 -2
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/snap.d.ts +14 -0
- package/dist/view-transitions/snap.d.ts.map +1 -0
- package/dist/view-transitions/strip.d.ts +6 -2
- package/dist/view-transitions/strip.d.ts.map +1 -1
- package/dist/view-transitions/swap.d.ts +2 -2
- package/dist/view-transitions/swap.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/animator/animate/css-runner.d.ts.map +0 -1
- package/dist/animator/animate/index.d.ts +0 -42
- package/dist/animator/animate/index.d.ts.map +0 -1
- package/dist/animator/animate/tick-runner.d.ts.map +0 -1
- package/dist/animator/animate/types.d.ts.map +0 -1
- package/dist/animator/animation.d.ts.map +0 -1
- package/dist/animator/index.d.ts.map +0 -1
- package/dist/animator/spring-core.d.ts +0 -82
- package/dist/animator/spring-core.d.ts.map +0 -1
- package/dist/animator/ticker.d.ts.map +0 -1
- /package/dist/animator/{ticker.d.ts → runner/ticker.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
interface InstagramOptions {
|
|
3
|
-
spring?: Partial<SpringConfig>;
|
|
4
3
|
timeout?: number;
|
|
4
|
+
physics?: PhysicsOptions;
|
|
5
5
|
}
|
|
6
6
|
export declare const instagram: (options?: InstagramOptions) => SggoiTransition;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instagram.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/instagram.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"instagram.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/instagram.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQhE,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAgPD,eAAO,MAAM,SAAS,GAAI,UAAS,gBAAqB,KAAG,eA2G1D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
interface JaeminOptions {
|
|
3
|
-
|
|
3
|
+
physics?: PhysicsOptions;
|
|
4
4
|
initialRotation?: number;
|
|
5
5
|
initialScale?: number;
|
|
6
6
|
rotationTriggerPoint?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jaemin.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/jaemin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"jaemin.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/jaemin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EACf,MAAM,UAAU,CAAC;AAQlB,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAiBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB,KAAG,eAoIpD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
interface PinterestOptions {
|
|
3
|
-
spring?: Partial<SpringConfig>;
|
|
4
3
|
timeout?: number;
|
|
4
|
+
physics?: PhysicsOptions;
|
|
5
5
|
}
|
|
6
6
|
export declare const pinterest: (options?: PinterestOptions) => SggoiTransition;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pinterest.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/pinterest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"pinterest.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/pinterest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQhE,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AA0UD,eAAO,MAAM,SAAS,GAAI,UAAS,gBAAqB,KAAG,eAqG1D,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { SggoiTransition } from '../types';
|
|
2
|
-
export
|
|
1
|
+
import { PhysicsOptions, SggoiTransition } from '../types';
|
|
2
|
+
export interface RotateOptions {
|
|
3
|
+
physics?: PhysicsOptions;
|
|
4
|
+
}
|
|
5
|
+
export declare const rotate: (options?: RotateOptions) => SggoiTransition;
|
|
3
6
|
//# sourceMappingURL=rotate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/rotate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"rotate.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/rotate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAO7E,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB,KAAG,eA4CpD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
interface ScrollOptions {
|
|
3
3
|
direction?: "up" | "down";
|
|
4
|
-
|
|
4
|
+
physics?: PhysicsOptions;
|
|
5
5
|
}
|
|
6
6
|
export declare const scroll: (options?: ScrollOptions) => SggoiTransition;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/scroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/scroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGhE,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAMD,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB,KAAG,eAoGpD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PhysicsOptions, SggoiTransition } from '../types';
|
|
2
2
|
interface SheetOptions {
|
|
3
3
|
direction?: "enter" | "exit";
|
|
4
|
-
|
|
4
|
+
physics?: PhysicsOptions;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Mobile-optimized bottom sheet style transition
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AAkBlB,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAoBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAmHlD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
interface SlideOptions {
|
|
3
3
|
direction?: "left" | "right";
|
|
4
|
-
|
|
4
|
+
physics?: PhysicsOptions;
|
|
5
5
|
}
|
|
6
6
|
export declare const slide: (options?: SlideOptions) => SggoiTransition;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slide.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/slide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"slide.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/slide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAG7E,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAUD,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAoDlD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PhysicsOptions, SggoiTransition } from '../types';
|
|
2
|
+
interface SnapOptions {
|
|
3
|
+
direction?: "left" | "right";
|
|
4
|
+
physics?: PhysicsOptions;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Snap transition - fast, subtle page transition with directional slide
|
|
8
|
+
*
|
|
9
|
+
* - OUT: Fade out + slide in same direction (waits for completion before IN)
|
|
10
|
+
* - IN: Fade in + slide from opposite direction
|
|
11
|
+
*/
|
|
12
|
+
export declare const snap: (options?: SnapOptions) => SggoiTransition;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=snap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snap.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/snap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAe7E,UAAU,WAAW;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eAiGhD,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { SggoiTransition } from '../types';
|
|
2
|
-
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
|
+
interface StripOptions {
|
|
3
|
+
physics?: PhysicsOptions;
|
|
4
|
+
}
|
|
5
|
+
export declare const strip: (options?: StripOptions) => SggoiTransition;
|
|
6
|
+
export {};
|
|
3
7
|
//# sourceMappingURL=strip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strip.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/strip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"strip.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/strip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAS7E,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eA8ElD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PhysicsOptions, SggoiTransition } from '../types';
|
|
2
2
|
interface SwapOptions {
|
|
3
|
-
|
|
3
|
+
physics?: PhysicsOptions;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Swap transition for peer-level navigation (e.g. bottom tabs)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/swap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"swap.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/swap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AAelB,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAoBD;;;;;GAKG;AACH,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eAqEhD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-runner.d.ts","sourceRoot":"","sources":["../../../src/lib/animator/animate/css-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE9D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC;IACzC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AA4HD;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,iBAAiB,CA6E5E"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { AnimationControls, AnimationOptions } from './types';
|
|
2
|
-
export type { AnimationControls, AnimationOptions };
|
|
3
|
-
/**
|
|
4
|
-
* Run spring animation
|
|
5
|
-
*
|
|
6
|
-
* tick option: RAF-based real-time animation
|
|
7
|
-
* css option: Web Animation API based (GPU accelerated)
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* // Tick mode (RAF)
|
|
12
|
-
* const controls = animate({
|
|
13
|
-
* from: 0,
|
|
14
|
-
* to: 1,
|
|
15
|
-
* spring: { stiffness: 300, damping: 30 },
|
|
16
|
-
* tick: (value) => element.style.opacity = String(value),
|
|
17
|
-
* onComplete: () => console.log('done'),
|
|
18
|
-
* });
|
|
19
|
-
*
|
|
20
|
-
* // CSS mode (Web Animation API)
|
|
21
|
-
* const controls = animate({
|
|
22
|
-
* from: 0,
|
|
23
|
-
* to: 1,
|
|
24
|
-
* spring: { stiffness: 300, damping: 30 },
|
|
25
|
-
* css: {
|
|
26
|
-
* element: myElement,
|
|
27
|
-
* style: (progress) => ({
|
|
28
|
-
* opacity: String(progress),
|
|
29
|
-
* transform: `scale(${0.5 + 0.5 * progress})`,
|
|
30
|
-
* }),
|
|
31
|
-
* },
|
|
32
|
-
* onComplete: () => console.log('done'),
|
|
33
|
-
* });
|
|
34
|
-
*
|
|
35
|
-
* // Stop mid-animation and check state
|
|
36
|
-
* controls.stop();
|
|
37
|
-
* console.log(controls.getPosition()); // Current position
|
|
38
|
-
* console.log(controls.getVelocity()); // Current velocity
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export declare function animate(options: AnimationOptions): AnimationControls;
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/animator/animate/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEnE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,iBAAiB,CA6CpE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tick-runner.d.ts","sourceRoot":"","sources":["../../../src/lib/animator/animate/tick-runner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,iBAAiB,GACzB,iBAAiB,CA8DnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/animator/animate/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAGrB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,GAAG,CAAC,EAAE;QACJ,OAAO,EAAE,WAAW,CAAC;QACrB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC;KAC1C,CAAC;CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/lib/animator/animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;GAKG;AACH,8BAAsB,SAAS;IAC7B;;;OAGG;IACH,QAAQ,CAAC,OAAO,IAAI,IAAI;IAExB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,IAAI,IAAI;IAEzB;;OAEG;IACH,QAAQ,CAAC,IAAI,IAAI,IAAI;IAErB;;;OAGG;IACH,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AkC;IAClD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAa;gBAExB,OAAO,EAAE,eAAe;IAmBpC,OAAO,CAAC,YAAY;IAqBpB,OAAO,IAAI,IAAI;IAKf,QAAQ,IAAI,IAAI;IAKhB,OAAO,IAAI,IAAI;IAWf,IAAI,IAAI,IAAI;IAWZ,WAAW,IAAI,MAAM;IAIrB,eAAe,IAAI,MAAM;IAIzB,cAAc,IAAI,OAAO;IAIzB,eAAe,IAAI,cAAc;IASjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI;IAIzD,MAAM,CAAC,SAAS,CACd,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAC7C,OAAO,EAAE,eAAe,GACvB,QAAQ;CAMZ"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Spring Core
|
|
3
|
-
*
|
|
4
|
-
* Core module containing spring physics calculation logic
|
|
5
|
-
* Used by both tick-runner (RAF based) and css-runner (synchronous simulation)
|
|
6
|
-
*
|
|
7
|
-
* Uses optimized Semi-implicit Euler method (Allen Chou's approach)
|
|
8
|
-
*/
|
|
9
|
-
export interface SpringConfig {
|
|
10
|
-
stiffness: number;
|
|
11
|
-
damping: number;
|
|
12
|
-
/**
|
|
13
|
-
* Enable double spring for ease-in-out effect (Chained/Lagged Spring)
|
|
14
|
-
*
|
|
15
|
-
* - true: same stiffness for both springs
|
|
16
|
-
* - number (0-1): follower stiffness ratio (smaller = stronger ease-in)
|
|
17
|
-
* - 1.0: same as true
|
|
18
|
-
* - 0.5: follower has half stiffness → stronger ease-in
|
|
19
|
-
* - 0.3: even stronger ease-in
|
|
20
|
-
*
|
|
21
|
-
* Creates a two-spring system:
|
|
22
|
-
* - Leader spring: tracks the target directly
|
|
23
|
-
* - Follower spring: tracks the leader's position (this is the output)
|
|
24
|
-
*/
|
|
25
|
-
doubleSpring?: boolean | number;
|
|
26
|
-
}
|
|
27
|
-
export interface SpringState {
|
|
28
|
-
position: number;
|
|
29
|
-
velocity: number;
|
|
30
|
-
}
|
|
31
|
-
export interface SpringConstants {
|
|
32
|
-
omega: number;
|
|
33
|
-
zeta: number;
|
|
34
|
-
/** @internal - Follower constants for double spring */
|
|
35
|
-
follower?: {
|
|
36
|
-
omega: number;
|
|
37
|
-
zeta: number;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Pre-compute spring constants (performance optimization)
|
|
42
|
-
*
|
|
43
|
-
* @param config Spring configuration
|
|
44
|
-
* @returns omega (angular frequency), zeta (damping ratio)
|
|
45
|
-
*/
|
|
46
|
-
export declare function computeSpringConstants(config: SpringConfig): SpringConstants;
|
|
47
|
-
/**
|
|
48
|
-
* Calculate one spring step (Semi-implicit Euler)
|
|
49
|
-
*
|
|
50
|
-
* Automatically handles double spring if constants.follower exists.
|
|
51
|
-
* For double spring, output position/velocity is from the follower.
|
|
52
|
-
*
|
|
53
|
-
* @param state Current state (position, velocity)
|
|
54
|
-
* @param target Target position
|
|
55
|
-
* @param constants Pre-computed spring constants (omega, zeta, optionally follower)
|
|
56
|
-
* @param dt Delta time (seconds)
|
|
57
|
-
* @returns New state
|
|
58
|
-
*/
|
|
59
|
-
export declare function stepSpring(state: SpringState, target: number, constants: SpringConstants, dt: number): SpringState;
|
|
60
|
-
export declare const POSITION_THRESHOLD = 0.01;
|
|
61
|
-
export declare const VELOCITY_THRESHOLD = 0.01;
|
|
62
|
-
export declare const SETTLE_THRESHOLD = 0.05;
|
|
63
|
-
/**
|
|
64
|
-
* Check if spring has converged to target
|
|
65
|
-
* For double spring, checks both leader and follower
|
|
66
|
-
*/
|
|
67
|
-
export declare function isSettled(state: SpringState, target: number): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Full spring simulation (synchronous)
|
|
70
|
-
* Used for Web Animation API keyframe generation
|
|
71
|
-
*
|
|
72
|
-
* @param config Spring configuration
|
|
73
|
-
* @param from Start value
|
|
74
|
-
* @param to Target value
|
|
75
|
-
* @param initialVelocity Initial velocity
|
|
76
|
-
* @returns Frame-by-frame progress array and duration
|
|
77
|
-
*/
|
|
78
|
-
export declare function simulateSpring(config: SpringConfig, from: number, to: number, initialVelocity?: number): {
|
|
79
|
-
frames: number[];
|
|
80
|
-
duration: number;
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=spring-core.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spring-core.d.ts","sourceRoot":"","sources":["../../src/lib/animator/spring-core.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAOD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,CAoB5E;AAoBD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,eAAe,EAC1B,EAAE,EAAE,MAA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