@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.
@@ -314,6 +314,7 @@ function resolveCollectionSelector(node, ancestors, scope, bindings) {
314
314
  }
315
315
  function collectScopeBindings(ast) {
316
316
  const bindings = /* @__PURE__ */ new Map();
317
+ const ambiguousBindings = /* @__PURE__ */ new Set();
317
318
  const constNodes = /* @__PURE__ */ new Map();
318
319
  Object.defineProperty(bindings, CONST_NODES, { value: constNodes, enumerable: false });
319
320
  acornWalk.simple(ast, {
@@ -326,7 +327,14 @@ function collectScopeBindings(ast) {
326
327
  return;
327
328
  }
328
329
  const val = resolveNode(init, bindings);
329
- if (val !== void 0) bindings.set(name, val);
330
+ if (val === void 0 || ambiguousBindings.has(name)) return;
331
+ const existing = bindings.get(name);
332
+ if (existing !== void 0 && existing !== val) {
333
+ bindings.delete(name);
334
+ ambiguousBindings.add(name);
335
+ } else if (existing === void 0) {
336
+ bindings.set(name, val);
337
+ }
330
338
  }
331
339
  });
332
340
  return bindings;
@@ -894,7 +902,7 @@ function tweenCallToAnimation(call, scope, source) {
894
902
  }
895
903
  const hasPositionArg = !!call.positionArg;
896
904
  const posVal = hasPositionArg ? extractLiteralValue(call.positionArg, scope) : 0;
897
- const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : 0;
905
+ const position = typeof posVal === "number" ? posVal : typeof posVal === "string" ? posVal : hasPositionArg ? `__raw:${source.slice(call.positionArg.start, call.positionArg.end)}` : 0;
898
906
  let duration = typeof vars.duration === "number" ? vars.duration : void 0;
899
907
  const ease = typeof vars.ease === "string" ? vars.ease : void 0;
900
908
  if (duration === void 0 && keyframesData) {