@hyperframes/parsers 0.7.56 → 0.7.58
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/gsapParserAcorn.js +10 -2
- package/dist/gsapParserAcorn.js.map +1 -1
- package/dist/gsapParserExports.js +10 -2
- package/dist/gsapParserExports.js.map +1 -1
- package/dist/gsapWriterAcorn.js +10 -2
- package/dist/gsapWriterAcorn.js.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -922,6 +922,7 @@ function resolveCollectionSelector(node, ancestors, scope, bindings) {
|
|
|
922
922
|
}
|
|
923
923
|
function collectScopeBindings(ast) {
|
|
924
924
|
const bindings = /* @__PURE__ */ new Map();
|
|
925
|
+
const ambiguousBindings = /* @__PURE__ */ new Set();
|
|
925
926
|
const constNodes = /* @__PURE__ */ new Map();
|
|
926
927
|
Object.defineProperty(bindings, CONST_NODES, { value: constNodes, enumerable: false });
|
|
927
928
|
acornWalk.simple(ast, {
|
|
@@ -934,7 +935,14 @@ function collectScopeBindings(ast) {
|
|
|
934
935
|
return;
|
|
935
936
|
}
|
|
936
937
|
const val = resolveNode(init, bindings);
|
|
937
|
-
if (val
|
|
938
|
+
if (val === void 0 || ambiguousBindings.has(name)) return;
|
|
939
|
+
const existing = bindings.get(name);
|
|
940
|
+
if (existing !== void 0 && existing !== val) {
|
|
941
|
+
bindings.delete(name);
|
|
942
|
+
ambiguousBindings.add(name);
|
|
943
|
+
} else if (existing === void 0) {
|
|
944
|
+
bindings.set(name, val);
|
|
945
|
+
}
|
|
938
946
|
}
|
|
939
947
|
});
|
|
940
948
|
return bindings;
|
|
@@ -1505,7 +1513,7 @@ function tweenCallToAnimation(call, scope, source) {
|
|
|
1505
1513
|
}
|
|
1506
1514
|
const hasPositionArg = !!call.positionArg;
|
|
1507
1515
|
const posVal = hasPositionArg ? extractLiteralValue(call.positionArg, scope) : 0;
|
|
1508
|
-
const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : 0;
|
|
1516
|
+
const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : hasPositionArg ? `__raw:${source.slice(call.positionArg.start, call.positionArg.end)}` : 0;
|
|
1509
1517
|
let duration = typeof vars.duration === "number" ? vars.duration : void 0;
|
|
1510
1518
|
const ease = typeof vars.ease === "string" ? vars.ease : void 0;
|
|
1511
1519
|
if (duration === void 0 && keyframesData) {
|