@hyperframes/core 0.7.6 → 0.7.8
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 +24 -24
- package/dist/hyperframe.runtime.mjs +24 -24
- package/dist/parsers/gsapConstants.d.ts.map +1 -1
- package/dist/parsers/gsapConstants.js +1 -0
- package/dist/parsers/gsapConstants.js.map +1 -1
- package/dist/parsers/gsapParser.d.ts +2 -1
- package/dist/parsers/gsapParser.d.ts.map +1 -1
- package/dist/parsers/gsapParser.js +63 -5
- package/dist/parsers/gsapParser.js.map +1 -1
- package/dist/parsers/gsapParserAcorn.d.ts +2 -0
- package/dist/parsers/gsapParserAcorn.d.ts.map +1 -1
- package/dist/parsers/gsapParserAcorn.js +15 -1
- package/dist/parsers/gsapParserAcorn.js.map +1 -1
- package/dist/parsers/gsapSerialize.d.ts +5 -0
- package/dist/parsers/gsapSerialize.d.ts.map +1 -1
- package/dist/parsers/gsapSerialize.js +10 -1
- package/dist/parsers/gsapSerialize.js.map +1 -1
- package/dist/parsers/gsapWriterAcorn.d.ts +2 -1
- package/dist/parsers/gsapWriterAcorn.d.ts.map +1 -1
- package/dist/parsers/gsapWriterAcorn.js +52 -8
- package/dist/parsers/gsapWriterAcorn.js.map +1 -1
- package/dist/slideshow/parseSlideshow.d.ts.map +1 -1
- package/dist/slideshow/parseSlideshow.js +9 -2
- package/dist/slideshow/parseSlideshow.js.map +1 -1
- package/dist/slideshow/slideshow.types.d.ts +8 -0
- package/dist/slideshow/slideshow.types.d.ts.map +1 -1
- package/dist/studio-api/routes/files.d.ts.map +1 -1
- package/dist/studio-api/routes/files.js +20 -2
- package/dist/studio-api/routes/files.js.map +1 -1
- package/package.json +1 -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,UAuC3B,CAAC;AAMF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,CAO1E,CAAC;AAUF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAErE;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,iBAAiB,GAAG,SAAS,CAY/B;AAED,eAAO,MAAM,eAAe,UAgC3B,CAAC"}
|
|
@@ -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,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;IACV,+C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M,CAAC,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;IAC3D,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,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;IACd,UAAU;CACX,CAAC"}
|
|
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,sBAAsB;IACtB,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;IACV,+CAA+C;IAC/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AG,qBAAqB,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;IAC3D,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,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;IACd,UAAU;CACX,CAAC"}
|
|
@@ -8,6 +8,7 @@ export type { SpringPreset } from "./springEase";
|
|
|
8
8
|
export declare function parseGsapScript(script: string): ParsedGsap;
|
|
9
9
|
export declare function updateAnimationInScript(script: string, animationId: string, updates: Partial<GsapAnimation> & {
|
|
10
10
|
easeEach?: string;
|
|
11
|
+
resetKeyframeEases?: boolean;
|
|
11
12
|
}): string;
|
|
12
13
|
export declare function shiftPositionsInScript(script: string, targetSelector: string, delta: number): string;
|
|
13
14
|
export declare function scalePositionsInScript(script: string, targetSelector: string, oldStart: number, oldDuration: number, newStart: number, newDuration: number): string;
|
|
@@ -74,7 +75,7 @@ export declare function updateKeyframeInScript(script: string, animationId: stri
|
|
|
74
75
|
* `resolvedFromValues` supplies the "from" state for `to()` tweens or
|
|
75
76
|
* the "to" state for `from()` tweens (the values the DOM would resolve to).
|
|
76
77
|
*/
|
|
77
|
-
export declare function convertToKeyframesInScript(script: string, animationId: string, resolvedFromValues?: Record<string, number | string
|
|
78
|
+
export declare function convertToKeyframesInScript(script: string, animationId: string, resolvedFromValues?: Record<string, number | string>, setDuration?: number): string;
|
|
78
79
|
/**
|
|
79
80
|
* Remove all keyframes from a tween, collapsing to a flat tween with the
|
|
80
81
|
* last keyframe's properties.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gsapParser.d.ts","sourceRoot":"","sources":["../../src/parsers/gsapParser.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAIlB,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,aAAa,EACb,cAAc,EACd,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,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"gsapParser.d.ts","sourceRoot":"","sources":["../../src/parsers/gsapParser.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAIlB,KAAK,UAAU,EAIhB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,iBAAiB,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AC;IAAC,GAAG,EAAE,MAAM,EAAE,CAAA;CAAE,CAmInC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,KAAK,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC,GACD,MAAM,CA8ER"}
|
|
@@ -347,9 +347,22 @@ function findAllTweenCalls(ast, timelineVar, scope, targetBindings) {
|
|
|
347
347
|
visitCallExpression(path) {
|
|
348
348
|
const node = path.node;
|
|
349
349
|
const callee = node.callee;
|
|
350
|
+
// A base `gsap.set("#sel", props)` is an off-timeline static hold (no position,
|
|
351
|
+
// no keyframe marker). Treat it as an editable `set` animation so a static
|
|
352
|
+
// value (e.g. a 3D transform) round-trips and re-edits in place. Restricted to
|
|
353
|
+
// a STRING-LITERAL selector: variable-target `gsap.set(el, ...)` holds stay
|
|
354
|
+
// opaque surrounding source (editing them by selector would be ambiguous).
|
|
355
|
+
const gsapSetArg = node.arguments?.[0];
|
|
356
|
+
const isGlobalSet = callee?.type === "MemberExpression" &&
|
|
357
|
+
callee.object?.type === "Identifier" &&
|
|
358
|
+
callee.object.name === "gsap" &&
|
|
359
|
+
callee.property?.type === "Identifier" &&
|
|
360
|
+
callee.property.name === "set" &&
|
|
361
|
+
(gsapSetArg?.type === "StringLiteral" ||
|
|
362
|
+
(gsapSetArg?.type === "Literal" && typeof gsapSetArg.value === "string"));
|
|
350
363
|
if (callee?.type === "MemberExpression" &&
|
|
351
364
|
callee.property?.type === "Identifier" &&
|
|
352
|
-
isTimelineRootedCall(node, timelineVar)) {
|
|
365
|
+
(isTimelineRootedCall(node, timelineVar) || isGlobalSet)) {
|
|
353
366
|
const method = callee.property.name;
|
|
354
367
|
if (!GSAP_METHODS.has(method)) {
|
|
355
368
|
this.traverse(path);
|
|
@@ -380,6 +393,7 @@ function findAllTweenCalls(ast, timelineVar, scope, targetBindings) {
|
|
|
380
393
|
selector: selectorValue,
|
|
381
394
|
varsArg: args[1],
|
|
382
395
|
positionArg: args[2],
|
|
396
|
+
...(isGlobalSet ? { global: true } : {}),
|
|
383
397
|
});
|
|
384
398
|
}
|
|
385
399
|
}
|
|
@@ -814,6 +828,8 @@ function tweenCallToAnimation(call, scope) {
|
|
|
814
828
|
}
|
|
815
829
|
if (group)
|
|
816
830
|
anim.propertyGroup = group;
|
|
831
|
+
if (call.global)
|
|
832
|
+
anim.global = true;
|
|
817
833
|
if (Object.keys(extras).length > 0)
|
|
818
834
|
anim.extras = extras;
|
|
819
835
|
if (keyframesData)
|
|
@@ -1060,6 +1076,21 @@ function applyEaseUpdate(varsArg, ease) {
|
|
|
1060
1076
|
setVarsKey(varsArg, "ease", ease);
|
|
1061
1077
|
}
|
|
1062
1078
|
}
|
|
1079
|
+
/**
|
|
1080
|
+
* "Apply to all segments": drop every per-keyframe `ease` override so the single
|
|
1081
|
+
* `easeEach` governs all segments uniformly (AE select-all + F9). Mirrors the
|
|
1082
|
+
* acorn writer's resetKeyframeEases branch.
|
|
1083
|
+
*/
|
|
1084
|
+
function stripKeyframeEases(varsArg) {
|
|
1085
|
+
const kfNode = findKeyframesObjectNode(varsArg);
|
|
1086
|
+
const props = kfNode?.properties;
|
|
1087
|
+
if (!Array.isArray(props))
|
|
1088
|
+
return;
|
|
1089
|
+
for (const entry of props) {
|
|
1090
|
+
if (isObjectProperty(entry))
|
|
1091
|
+
removeVarsKey(entry.value, "ease");
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1063
1094
|
function applyUpdatesToCall(call, updates) {
|
|
1064
1095
|
if (updates.properties)
|
|
1065
1096
|
reconcileEditableProperties(call.varsArg, updates.properties);
|
|
@@ -1072,6 +1103,8 @@ function applyUpdatesToCall(call, updates) {
|
|
|
1072
1103
|
applyEaseUpdate(call.varsArg, updates.easeEach);
|
|
1073
1104
|
else if (updates.ease !== undefined)
|
|
1074
1105
|
applyEaseUpdate(call.varsArg, updates.ease);
|
|
1106
|
+
if (updates.resetKeyframeEases)
|
|
1107
|
+
stripKeyframeEases(call.varsArg);
|
|
1075
1108
|
if (updates.position !== undefined) {
|
|
1076
1109
|
const posIdx = call.method === "fromTo" ? 3 : 2;
|
|
1077
1110
|
call.node.arguments[posIdx] = parseExpr(valueToCode(updates.position));
|
|
@@ -1110,8 +1143,9 @@ function buildTweenStatementCode(timelineVar, anim) {
|
|
|
1110
1143
|
const entries = Object.entries(props).map(([k, v]) => `${safeKey(k)}: ${valueToCode(v)}`);
|
|
1111
1144
|
// immediateRender forces GSAP to apply the set when added to the timeline,
|
|
1112
1145
|
// not on the first seek — without it, tl.set at position 0 on a paused
|
|
1113
|
-
// timeline is invisible until the playhead moves past 0.
|
|
1114
|
-
|
|
1146
|
+
// timeline is invisible until the playhead moves past 0. A base `gsap.set`
|
|
1147
|
+
// already runs immediately, so it doesn't need (or get) the flag.
|
|
1148
|
+
if (anim.method === "set" && !anim.global)
|
|
1115
1149
|
entries.push("immediateRender: true");
|
|
1116
1150
|
if (anim.extras) {
|
|
1117
1151
|
for (const [k, v] of Object.entries(anim.extras)) {
|
|
@@ -1125,6 +1159,10 @@ function buildTweenStatementCode(timelineVar, anim) {
|
|
|
1125
1159
|
const fromCode = `{ ${fromEntries.join(", ")} }`;
|
|
1126
1160
|
return `${timelineVar}.fromTo(${selector}, ${fromCode}, ${objCode}, ${posCode});`;
|
|
1127
1161
|
}
|
|
1162
|
+
// A base `gsap.set` is off the timeline: no timeline var, no position arg.
|
|
1163
|
+
if (anim.method === "set" && anim.global) {
|
|
1164
|
+
return `gsap.set(${selector}, ${objCode});`;
|
|
1165
|
+
}
|
|
1128
1166
|
return `${timelineVar}.${anim.method}(${selector}, ${objCode}, ${posCode});`;
|
|
1129
1167
|
}
|
|
1130
1168
|
export function updateAnimationInScript(script, animationId, updates) {
|
|
@@ -1990,12 +2028,12 @@ function insertKeyframesProp(varsArg, fromProps, toProps, easeEach) {
|
|
|
1990
2028
|
* `resolvedFromValues` supplies the "from" state for `to()` tweens or
|
|
1991
2029
|
* the "to" state for `from()` tweens (the values the DOM would resolve to).
|
|
1992
2030
|
*/
|
|
1993
|
-
export function convertToKeyframesInScript(script, animationId, resolvedFromValues) {
|
|
2031
|
+
export function convertToKeyframesInScript(script, animationId, resolvedFromValues, setDuration = 1) {
|
|
1994
2032
|
let loc = locateAnimationWithFallback(script, animationId);
|
|
1995
2033
|
if (!loc)
|
|
1996
2034
|
return script;
|
|
1997
2035
|
const anim = loc.target.animation;
|
|
1998
|
-
if (anim.keyframes
|
|
2036
|
+
if (anim.keyframes)
|
|
1999
2037
|
return script;
|
|
2000
2038
|
const { fromProps, toProps } = resolveConversionProps(anim, resolvedFromValues);
|
|
2001
2039
|
const varsArg = loc.target.call.varsArg;
|
|
@@ -2011,6 +2049,26 @@ export function convertToKeyframesInScript(script, animationId, resolvedFromValu
|
|
|
2011
2049
|
if (anim.method === "fromTo")
|
|
2012
2050
|
loc.target.call.node.arguments.splice(1, 1);
|
|
2013
2051
|
}
|
|
2052
|
+
// A static `set` becomes an animatable `to`: flip the method, drop the
|
|
2053
|
+
// immediateRender hold marker, and give it a real duration so the keyframes
|
|
2054
|
+
// span time. This is what makes a static 3D transform keyframeable.
|
|
2055
|
+
if (anim.method === "set") {
|
|
2056
|
+
// A GLOBAL `gsap.set(...)` is off-timeline; flipping only the method would
|
|
2057
|
+
// emit `gsap.to(...)`, which fires once at load and is NOT on the paused
|
|
2058
|
+
// master timeline (the engine can't seek/render it). Re-root it onto the
|
|
2059
|
+
// timeline var and add the position arg (a gsap.set has none) so the
|
|
2060
|
+
// converted tween is seekable. A `tl.set` already has the right object.
|
|
2061
|
+
const calleeObj = loc.target.call.node.callee.object;
|
|
2062
|
+
if (anim.global && calleeObj?.type === "Identifier") {
|
|
2063
|
+
calleeObj.name = loc.parsed.timelineVar;
|
|
2064
|
+
if (loc.target.call.node.arguments.length < 3) {
|
|
2065
|
+
loc.target.call.node.arguments.push(parseExpr("0"));
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
loc.target.call.node.callee.property.name = "to";
|
|
2069
|
+
removeVarsKey(varsArg, "immediateRender");
|
|
2070
|
+
setVarsKey(varsArg, "duration", Math.max(0.001, setDuration));
|
|
2071
|
+
}
|
|
2014
2072
|
return recast.print(loc.parsed.ast).code;
|
|
2015
2073
|
}
|
|
2016
2074
|
/**
|