@hyperframes/parsers 0.7.56 → 0.7.57
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
package/dist/gsapParserAcorn.js
CHANGED
|
@@ -607,6 +607,7 @@ function resolveCollectionSelector(node, ancestors, scope, bindings) {
|
|
|
607
607
|
}
|
|
608
608
|
function collectScopeBindings(ast) {
|
|
609
609
|
const bindings = /* @__PURE__ */ new Map();
|
|
610
|
+
const ambiguousBindings = /* @__PURE__ */ new Set();
|
|
610
611
|
const constNodes = /* @__PURE__ */ new Map();
|
|
611
612
|
Object.defineProperty(bindings, CONST_NODES, { value: constNodes, enumerable: false });
|
|
612
613
|
acornWalk.simple(ast, {
|
|
@@ -619,7 +620,14 @@ function collectScopeBindings(ast) {
|
|
|
619
620
|
return;
|
|
620
621
|
}
|
|
621
622
|
const val = resolveNode(init, bindings);
|
|
622
|
-
if (val
|
|
623
|
+
if (val === void 0 || ambiguousBindings.has(name)) return;
|
|
624
|
+
const existing = bindings.get(name);
|
|
625
|
+
if (existing !== void 0 && existing !== val) {
|
|
626
|
+
bindings.delete(name);
|
|
627
|
+
ambiguousBindings.add(name);
|
|
628
|
+
} else if (existing === void 0) {
|
|
629
|
+
bindings.set(name, val);
|
|
630
|
+
}
|
|
623
631
|
}
|
|
624
632
|
});
|
|
625
633
|
return bindings;
|
|
@@ -1190,7 +1198,7 @@ function tweenCallToAnimation(call, scope, source) {
|
|
|
1190
1198
|
}
|
|
1191
1199
|
const hasPositionArg = !!call.positionArg;
|
|
1192
1200
|
const posVal = hasPositionArg ? extractLiteralValue(call.positionArg, scope) : 0;
|
|
1193
|
-
const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : 0;
|
|
1201
|
+
const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : hasPositionArg ? `__raw:${source.slice(call.positionArg.start, call.positionArg.end)}` : 0;
|
|
1194
1202
|
let duration = typeof vars.duration === "number" ? vars.duration : void 0;
|
|
1195
1203
|
const ease = typeof vars.ease === "string" ? vars.ease : void 0;
|
|
1196
1204
|
if (duration === void 0 && keyframesData) {
|