@hyperframes/core 0.6.73 → 0.6.74
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/generated/runtime-inline.js +1 -1
- package/dist/generated/runtime-inline.js.map +1 -1
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +11 -11
- package/dist/hyperframe.runtime.mjs +11 -11
- package/dist/parsers/gsapConstants.d.ts.map +1 -1
- package/dist/parsers/gsapConstants.js +31 -2
- package/dist/parsers/gsapConstants.js.map +1 -1
- package/dist/parsers/gsapParser.d.ts +51 -1
- package/dist/parsers/gsapParser.d.ts.map +1 -1
- package/dist/parsers/gsapParser.js +612 -9
- package/dist/parsers/gsapParser.js.map +1 -1
- package/dist/parsers/gsapSerialize.d.ts +18 -0
- package/dist/parsers/gsapSerialize.d.ts.map +1 -1
- package/dist/parsers/gsapSerialize.js.map +1 -1
- package/dist/parsers/springEase.d.ts +29 -0
- package/dist/parsers/springEase.d.ts.map +1 -0
- package/dist/parsers/springEase.js +70 -0
- package/dist/parsers/springEase.js.map +1 -0
- package/dist/studio-api/helpers/sourceMutation.d.ts +6 -0
- package/dist/studio-api/helpers/sourceMutation.d.ts.map +1 -1
- package/dist/studio-api/helpers/sourceMutation.js +42 -0
- package/dist/studio-api/helpers/sourceMutation.js.map +1 -1
- package/dist/studio-api/routes/files.d.ts.map +1 -1
- package/dist/studio-api/routes/files.js +60 -1
- package/dist/studio-api/routes/files.js.map +1 -1
- package/dist/studio-api/routes/render.d.ts.map +1 -1
- package/dist/studio-api/routes/render.js +1 -0
- package/dist/studio-api/routes/render.js.map +1 -1
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gsapConstants.d.ts","sourceRoot":"","sources":["../../src/parsers/gsapConstants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"gsapConstants.d.ts","sourceRoot":"","sources":["../../src/parsers/gsapConstants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,eAAe,UAoC3B,CAAC;AAEF,eAAO,MAAM,eAAe,UA+B3B,CAAC"}
|
|
@@ -5,17 +5,41 @@
|
|
|
5
5
|
* without pulling in gsapParser (which depends on recast / @babel/parser).
|
|
6
6
|
*/
|
|
7
7
|
export const SUPPORTED_PROPS = [
|
|
8
|
-
|
|
9
|
-
"visibility",
|
|
8
|
+
// 2D Transforms
|
|
10
9
|
"x",
|
|
11
10
|
"y",
|
|
12
11
|
"scale",
|
|
13
12
|
"scaleX",
|
|
14
13
|
"scaleY",
|
|
15
14
|
"rotation",
|
|
15
|
+
"skewX",
|
|
16
|
+
"skewY",
|
|
17
|
+
// 3D Transforms
|
|
18
|
+
"z",
|
|
19
|
+
"rotationX",
|
|
20
|
+
"rotationY",
|
|
21
|
+
"rotationZ",
|
|
22
|
+
"perspective",
|
|
23
|
+
"transformOrigin",
|
|
24
|
+
// Visibility
|
|
25
|
+
"opacity",
|
|
26
|
+
"visibility",
|
|
16
27
|
"autoAlpha",
|
|
28
|
+
// Dimensions
|
|
17
29
|
"width",
|
|
18
30
|
"height",
|
|
31
|
+
// Colors
|
|
32
|
+
"color",
|
|
33
|
+
"backgroundColor",
|
|
34
|
+
"borderColor",
|
|
35
|
+
// Box model
|
|
36
|
+
"borderRadius",
|
|
37
|
+
// Typography
|
|
38
|
+
"fontSize",
|
|
39
|
+
"letterSpacing",
|
|
40
|
+
// Filter & Clipping
|
|
41
|
+
"filter",
|
|
42
|
+
"clipPath",
|
|
19
43
|
];
|
|
20
44
|
export const SUPPORTED_EASES = [
|
|
21
45
|
"none",
|
|
@@ -43,5 +67,10 @@ export const SUPPORTED_EASES = [
|
|
|
43
67
|
"expo.in",
|
|
44
68
|
"expo.out",
|
|
45
69
|
"expo.inOut",
|
|
70
|
+
"spring-gentle",
|
|
71
|
+
"spring-bouncy",
|
|
72
|
+
"spring-stiff",
|
|
73
|
+
"spring-wobbly",
|
|
74
|
+
"spring-heavy",
|
|
46
75
|
];
|
|
47
76
|
//# sourceMappingURL=gsapConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gsapConstants.js","sourceRoot":"","sources":["../../src/parsers/gsapConstants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,
|
|
1
|
+
{"version":3,"file":"gsapConstants.js","sourceRoot":"","sources":["../../src/parsers/gsapConstants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,gBAAgB;IAChB,GAAG;IACH,GAAG;IACH,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,OAAO;IACP,OAAO;IACP,gBAAgB;IAChB,GAAG;IACH,WAAW;IACX,WAAW;IACX,WAAW;IACX,aAAa;IACb,iBAAiB;IACjB,aAAa;IACb,SAAS;IACT,YAAY;IACZ,WAAW;IACX,aAAa;IACb,OAAO;IACP,QAAQ;IACR,SAAS;IACT,OAAO;IACP,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,cAAc;IACd,aAAa;IACb,UAAU;IACV,eAAe;IACf,oBAAoB;IACpB,QAAQ;IACR,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM;IACN,WAAW;IACX,YAAY;IACZ,cAAc;IACd,WAAW;IACX,YAAY;IACZ,cAAc;IACd,WAAW;IACX,YAAY;IACZ,cAAc;IACd,WAAW;IACX,YAAY;IACZ,cAAc;IACd,SAAS;IACT,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;IACZ,cAAc;IACd,SAAS;IACT,UAAU;IACV,YAAY;IACZ,eAAe;IACf,eAAe;IACf,cAAc;IACd,eAAe;IACf,cAAc;CACf,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type GsapAnimation, type ParsedGsap } from "./gsapSerialize";
|
|
2
|
-
export type { GsapAnimation, GsapMethod, ParsedGsap } from "./gsapSerialize";
|
|
2
|
+
export type { GsapAnimation, GsapMethod, ParsedGsap, GsapKeyframesData, GsapPercentageKeyframe, GsapKeyframeFormat, } from "./gsapSerialize";
|
|
3
3
|
export { serializeGsapAnimations, getAnimationsForElementId, validateCompositionGsap, keyframesToGsapAnimations, gsapAnimationsToKeyframes, SUPPORTED_PROPS, SUPPORTED_EASES, } from "./gsapSerialize";
|
|
4
|
+
export { generateSpringEaseData, SPRING_PRESETS } from "./springEase";
|
|
5
|
+
export type { SpringPreset } from "./springEase";
|
|
4
6
|
export declare function parseGsapScript(script: string): ParsedGsap;
|
|
5
7
|
export declare function updateAnimationInScript(script: string, animationId: string, updates: Partial<GsapAnimation>): string;
|
|
6
8
|
export declare function addAnimationToScript(script: string, animation: Omit<GsapAnimation, "id">): {
|
|
@@ -8,4 +10,52 @@ export declare function addAnimationToScript(script: string, animation: Omit<Gsa
|
|
|
8
10
|
id: string;
|
|
9
11
|
};
|
|
10
12
|
export declare function removeAnimationFromScript(script: string, animationId: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Insert a keyframe at the given percentage in an existing percentage-keyframes
|
|
15
|
+
* object. If the percentage already exists, its value is replaced.
|
|
16
|
+
*/
|
|
17
|
+
export declare function addKeyframeToScript(script: string, animationId: string, percentage: number, properties: Record<string, number | string>, ease?: string, backfillDefaults?: Record<string, number | string>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Remove a keyframe at the given percentage. If fewer than 2 keyframes remain
|
|
20
|
+
* after removal, collapse the keyframes object to a flat tween using the
|
|
21
|
+
* remaining keyframe's properties.
|
|
22
|
+
*/
|
|
23
|
+
export declare function removeKeyframeFromScript(script: string, animationId: string, percentage: number): string;
|
|
24
|
+
/**
|
|
25
|
+
* Replace the properties (and optionally ease) at an existing keyframe percentage.
|
|
26
|
+
*/
|
|
27
|
+
export declare function updateKeyframeInScript(script: string, animationId: string, percentage: number, properties: Record<string, number | string>, ease?: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Convert a flat tween (to/from/fromTo) to percentage-keyframes format.
|
|
30
|
+
* `resolvedFromValues` supplies the "from" state for `to()` tweens or
|
|
31
|
+
* the "to" state for `from()` tweens (the values the DOM would resolve to).
|
|
32
|
+
*/
|
|
33
|
+
export declare function convertToKeyframesInScript(script: string, animationId: string, resolvedFromValues?: Record<string, number | string>): string;
|
|
34
|
+
/**
|
|
35
|
+
* Remove all keyframes from a tween, collapsing to a flat tween with the
|
|
36
|
+
* last keyframe's properties.
|
|
37
|
+
*/
|
|
38
|
+
export declare function removeAllKeyframesFromScript(script: string, animationId: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Replace a dynamic `keyframes: <expr>` with a static percentage-keyframes object.
|
|
41
|
+
* Called when the user first edits a dynamically-generated keyframe in the studio.
|
|
42
|
+
*/
|
|
43
|
+
export declare function materializeKeyframesInScript(script: string, animationId: string, keyframes: Array<{
|
|
44
|
+
percentage: number;
|
|
45
|
+
properties: Record<string, number | string>;
|
|
46
|
+
ease?: string;
|
|
47
|
+
}>, easeEach?: string, resolvedSelector?: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Replace a dynamic loop that generates multiple tween calls with individual
|
|
50
|
+
* static `tl.to()` calls — one per element. Finds the loop containing the
|
|
51
|
+
* animation and replaces the entire loop body with unrolled static calls.
|
|
52
|
+
*/
|
|
53
|
+
export declare function unrollDynamicAnimations(script: string, animationId: string, elements: Array<{
|
|
54
|
+
selector: string;
|
|
55
|
+
keyframes: Array<{
|
|
56
|
+
percentage: number;
|
|
57
|
+
properties: Record<string, number | string>;
|
|
58
|
+
}>;
|
|
59
|
+
easeEach?: string;
|
|
60
|
+
}>): string;
|
|
11
61
|
//# sourceMappingURL=gsapParser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gsapParser.d.ts","sourceRoot":"","sources":["../../src/parsers/gsapParser.ts"],"names":[],"mappings":"AAYA,OAAO,
|
|
1
|
+
{"version":3,"file":"gsapParser.d.ts","sourceRoot":"","sources":["../../src/parsers/gsapParser.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,aAAa,EAIlB,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,eAAe,EACf,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA+wBjD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CA+B1D;AAuID,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAC9B,MAAM,CAYR;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,GACnC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CA4BhC;AAoCD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CA0BrF;AAqED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,IAAI,CA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