@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/index.js CHANGED
@@ -995,6 +995,7 @@ function resolveCollectionSelector(node, ancestors, scope, bindings) {
995
995
  }
996
996
  function collectScopeBindings(ast) {
997
997
  const bindings = /* @__PURE__ */ new Map();
998
+ const ambiguousBindings = /* @__PURE__ */ new Set();
998
999
  const constNodes = /* @__PURE__ */ new Map();
999
1000
  Object.defineProperty(bindings, CONST_NODES, { value: constNodes, enumerable: false });
1000
1001
  acornWalk.simple(ast, {
@@ -1007,7 +1008,14 @@ function collectScopeBindings(ast) {
1007
1008
  return;
1008
1009
  }
1009
1010
  const val = resolveNode(init, bindings);
1010
- if (val !== void 0) bindings.set(name, val);
1011
+ if (val === void 0 || ambiguousBindings.has(name)) return;
1012
+ const existing = bindings.get(name);
1013
+ if (existing !== void 0 && existing !== val) {
1014
+ bindings.delete(name);
1015
+ ambiguousBindings.add(name);
1016
+ } else if (existing === void 0) {
1017
+ bindings.set(name, val);
1018
+ }
1011
1019
  }
1012
1020
  });
1013
1021
  return bindings;
@@ -1578,7 +1586,7 @@ function tweenCallToAnimation(call, scope, source) {
1578
1586
  }
1579
1587
  const hasPositionArg = !!call.positionArg;
1580
1588
  const posVal = hasPositionArg ? extractLiteralValue(call.positionArg, scope) : 0;
1581
- const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : 0;
1589
+ const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : hasPositionArg ? `__raw:${source.slice(call.positionArg.start, call.positionArg.end)}` : 0;
1582
1590
  let duration = typeof vars.duration === "number" ? vars.duration : void 0;
1583
1591
  const ease = typeof vars.ease === "string" ? vars.ease : void 0;
1584
1592
  if (duration === void 0 && keyframesData) {