@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
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as CompositionVariable, T as TimelineElement, a as CanvasResolution, K as Keyframe, S as StageZoomKeyframe, V as ValidationResult } from './types-Y0NXTiVo.js';
|
|
2
2
|
export { A as AddElementData, b as Asset, B as BooleanVariable, c as CANVAS_DIMENSIONS, d as COMPOSITION_VARIABLE_TYPES, e as ColorVariable, f as CompositionAPI, g as CompositionAsset, h as CompositionSpec, i as CompositionVariableBase, j as CompositionVariableType, D as DEFAULT_DURATIONS, E as ElementKeyframes, k as EnumVariable, F as FontVariable, I as ImageVariable, l as KeyframeProperties, M as MediaElementType, m as MediaFile, N as NumberVariable, P as PlayerAPI, R as ResolvedResolutionFlag, n as StageZoom, o as StringVariable, p as TIMELINE_COLORS, q as TimelineCompositionElement, r as TimelineElementBase, s as TimelineElementType, t as TimelineMediaElement, u as TimelineTextElement, v as VALID_CANVAS_RESOLUTIONS, W as WaveformData, w as getDefaultStageZoom, x as isAspectAgnosticResolutionAlias, y as isCompositionElement, z as isMediaElement, G as isTextElement, H as normalizeResolutionFlag, J as resolveResolutionFlagPair } from './types-Y0NXTiVo.js';
|
|
3
|
-
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-
|
|
3
|
+
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';
|
|
4
4
|
export { isStudioHoldSet } from './gsapParser.js';
|
|
5
5
|
export { PROPERTY_GROUPS, PropertyGroupName, SUPPORTED_EASES, SUPPORTED_PROPS, classifyPropertyGroup, classifyTweenPropertyGroup } from './gsapConstants.js';
|
|
6
6
|
export { SPRING_PRESETS, SpringPreset, generateSpringEaseData } from './springEase.js';
|
package/dist/index.js
CHANGED
|
@@ -1374,6 +1374,11 @@ function resolveTargetSelector(node, ancestors, scope, bindings) {
|
|
|
1374
1374
|
}
|
|
1375
1375
|
return null;
|
|
1376
1376
|
}
|
|
1377
|
+
function hasUnresolvedArrayPart(node, ancestors, scope, bindings) {
|
|
1378
|
+
return node?.type === "ArrayExpression" && node.elements.some(
|
|
1379
|
+
(el) => !resolveTargetSelector(el, ancestors, scope, bindings) || hasUnresolvedArrayPart(el, ancestors, scope, bindings)
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1377
1382
|
function describeProxyTarget(targetNode, varsNode, scope) {
|
|
1378
1383
|
const objNode = targetNode?.type === "ObjectExpression" ? targetNode : targetNode?.type === "Identifier" ? resolveConstNode(targetNode, scope) : void 0;
|
|
1379
1384
|
if (objNode?.type !== "ObjectExpression") return null;
|
|
@@ -1561,12 +1566,14 @@ function findAllTweenCalls(ast, ref, scope, targetBindings) {
|
|
|
1561
1566
|
const method = callee.property.name;
|
|
1562
1567
|
const args = node.arguments;
|
|
1563
1568
|
const selectorValue = args.length >= 1 ? resolveTargetSelector(args[0], nodeAncestors, scope, targetBindings) ?? "__unresolved__" : "__unresolved__";
|
|
1569
|
+
const partial = hasUnresolvedArrayPart(args[0], nodeAncestors, scope, targetBindings) ? { selectorPartial: true } : {};
|
|
1564
1570
|
if (method === "fromTo" && args.length >= 3) {
|
|
1565
1571
|
results.push({
|
|
1566
1572
|
node,
|
|
1567
1573
|
ancestors: nodeAncestors,
|
|
1568
1574
|
method: "fromTo",
|
|
1569
1575
|
selector: selectorValue,
|
|
1576
|
+
...partial,
|
|
1570
1577
|
fromArg: args[1],
|
|
1571
1578
|
varsArg: args[2],
|
|
1572
1579
|
positionArg: args[3]
|
|
@@ -1577,6 +1584,7 @@ function findAllTweenCalls(ast, ref, scope, targetBindings) {
|
|
|
1577
1584
|
ancestors: nodeAncestors,
|
|
1578
1585
|
method,
|
|
1579
1586
|
selector: selectorValue,
|
|
1587
|
+
...partial,
|
|
1580
1588
|
varsArg: args[1],
|
|
1581
1589
|
positionArg: args[2],
|
|
1582
1590
|
...isGlobalSet ? { global: true } : {}
|
|
@@ -1914,6 +1922,7 @@ function tweenCallToAnimation(call, scope, source, identifierBindings) {
|
|
|
1914
1922
|
if (hasUnresolvedKeyframes) anim.hasUnresolvedKeyframes = true;
|
|
1915
1923
|
if (durationUnresolved) anim.durationUnresolved = true;
|
|
1916
1924
|
if (selector === "__unresolved__") anim.hasUnresolvedSelector = true;
|
|
1925
|
+
if (call.selectorPartial) anim.hasPartialSelector = true;
|
|
1917
1926
|
if (provenance) anim.provenance = provenance;
|
|
1918
1927
|
return anim;
|
|
1919
1928
|
}
|