@hyperframes/parsers 0.8.97 → 0.8.99
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/gsapParser.d.ts +4 -4
- package/dist/gsapParser.js +48 -11
- package/dist/gsapParser.js.map +1 -1
- package/dist/gsapParserAcorn.d.ts +8 -3
- package/dist/gsapParserAcorn.js +14 -0
- package/dist/gsapParserAcorn.js.map +1 -1
- package/dist/gsapParserExports.d.ts +1 -1
- package/dist/gsapParserExports.js +9 -0
- package/dist/gsapParserExports.js.map +1 -1
- package/dist/{gsapSerialize-b8lNzSbI.d.ts → gsapSerialize-D92cSJOu.d.ts} +1 -0
- package/dist/gsapWriterAcorn.d.ts +16 -6
- package/dist/gsapWriterAcorn.js +56 -11
- package/dist/gsapWriterAcorn.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ArcPathConfig, a as ArcPathSegment, G as GsapAnimation, b as GsapKeyframesData, c as GsapMethod, d as GsapPercentageKeyframe, e as GsapProvenance, f as GsapProvenanceKind, K as KeyframeEditability, P as ParsedGsap, S as SourcedGsapPercentageKeyframe, g as SplitAnimationsOptions, h as SplitAnimationsResult, i as editabilityForProvenance, j as getAnimationsForElementId, k as gsapAnimationsToKeyframes, l as keyframesToGsapAnimations, s as serializeGsapAnimations, v as validateCompositionGsap } from './gsapSerialize-
|
|
1
|
+
export { A as ArcPathConfig, a as ArcPathSegment, G as GsapAnimation, b as GsapKeyframesData, c as GsapMethod, d as GsapPercentageKeyframe, e as GsapProvenance, f as GsapProvenanceKind, K as KeyframeEditability, P as ParsedGsap, S as SourcedGsapPercentageKeyframe, g as SplitAnimationsOptions, h as SplitAnimationsResult, i as editabilityForProvenance, j as getAnimationsForElementId, k as gsapAnimationsToKeyframes, l as keyframesToGsapAnimations, s as serializeGsapAnimations, v as validateCompositionGsap } from './gsapSerialize-D92cSJOu.js';
|
|
2
2
|
export { isStudioHoldSet } from './gsapParser.js';
|
|
3
3
|
export { PROPERTY_GROUPS, PropertyGroupName, SUPPORTED_EASES, SUPPORTED_PROPS, classifyPropertyGroup, classifyTweenPropertyGroup } from './gsapConstants.js';
|
|
4
4
|
export { SPRING_PRESETS, SpringPreset, generateSpringEaseData } from './springEase.js';
|
|
@@ -1285,6 +1285,11 @@ function resolveTargetSelector(node, ancestors, scope, bindings) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
return null;
|
|
1287
1287
|
}
|
|
1288
|
+
function hasUnresolvedArrayPart(node, ancestors, scope, bindings) {
|
|
1289
|
+
return node?.type === "ArrayExpression" && node.elements.some(
|
|
1290
|
+
(el) => !resolveTargetSelector(el, ancestors, scope, bindings) || hasUnresolvedArrayPart(el, ancestors, scope, bindings)
|
|
1291
|
+
);
|
|
1292
|
+
}
|
|
1288
1293
|
function describeProxyTarget(targetNode, varsNode, scope) {
|
|
1289
1294
|
const objNode = targetNode?.type === "ObjectExpression" ? targetNode : targetNode?.type === "Identifier" ? resolveConstNode(targetNode, scope) : void 0;
|
|
1290
1295
|
if (objNode?.type !== "ObjectExpression") return null;
|
|
@@ -1472,12 +1477,14 @@ function findAllTweenCalls(ast, ref, scope, targetBindings) {
|
|
|
1472
1477
|
const method = callee.property.name;
|
|
1473
1478
|
const args = node.arguments;
|
|
1474
1479
|
const selectorValue = args.length >= 1 ? resolveTargetSelector(args[0], nodeAncestors, scope, targetBindings) ?? "__unresolved__" : "__unresolved__";
|
|
1480
|
+
const partial = hasUnresolvedArrayPart(args[0], nodeAncestors, scope, targetBindings) ? { selectorPartial: true } : {};
|
|
1475
1481
|
if (method === "fromTo" && args.length >= 3) {
|
|
1476
1482
|
results.push({
|
|
1477
1483
|
node,
|
|
1478
1484
|
ancestors: nodeAncestors,
|
|
1479
1485
|
method: "fromTo",
|
|
1480
1486
|
selector: selectorValue,
|
|
1487
|
+
...partial,
|
|
1481
1488
|
fromArg: args[1],
|
|
1482
1489
|
varsArg: args[2],
|
|
1483
1490
|
positionArg: args[3]
|
|
@@ -1488,6 +1495,7 @@ function findAllTweenCalls(ast, ref, scope, targetBindings) {
|
|
|
1488
1495
|
ancestors: nodeAncestors,
|
|
1489
1496
|
method,
|
|
1490
1497
|
selector: selectorValue,
|
|
1498
|
+
...partial,
|
|
1491
1499
|
varsArg: args[1],
|
|
1492
1500
|
positionArg: args[2],
|
|
1493
1501
|
...isGlobalSet ? { global: true } : {}
|
|
@@ -1825,6 +1833,7 @@ function tweenCallToAnimation(call, scope, source, identifierBindings) {
|
|
|
1825
1833
|
if (hasUnresolvedKeyframes) anim.hasUnresolvedKeyframes = true;
|
|
1826
1834
|
if (durationUnresolved) anim.durationUnresolved = true;
|
|
1827
1835
|
if (selector === "__unresolved__") anim.hasUnresolvedSelector = true;
|
|
1836
|
+
if (call.selectorPartial) anim.hasPartialSelector = true;
|
|
1828
1837
|
if (provenance) anim.provenance = provenance;
|
|
1829
1838
|
return anim;
|
|
1830
1839
|
}
|