@hyperframes/parsers 0.8.120 → 0.8.122
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 +6 -5
- package/dist/gsapParserAcorn.js.map +1 -1
- package/dist/gsapParserExports.js +6 -5
- package/dist/gsapParserExports.js.map +1 -1
- package/dist/gsapWriterAcorn.js +14 -13
- package/dist/gsapWriterAcorn.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1519,9 +1519,10 @@ function findAllTweenCalls(ast, ref, scope, targetBindings) {
|
|
|
1519
1519
|
return results;
|
|
1520
1520
|
}
|
|
1521
1521
|
var PERCENTAGE_KEY_RE = /^(\d+(?:\.\d+)?)%$/;
|
|
1522
|
-
function tryResolveStringProp(propValue, scope) {
|
|
1522
|
+
function tryResolveStringProp(propValue, scope, source) {
|
|
1523
1523
|
const val = resolveNode(propValue, scope);
|
|
1524
|
-
|
|
1524
|
+
if (typeof val === "string") return val;
|
|
1525
|
+
return source === void 0 ? void 0 : `__raw:${source.slice(propValue.start, propValue.end)}`;
|
|
1525
1526
|
}
|
|
1526
1527
|
function parsePercentageKeyframes(node, scope, source) {
|
|
1527
1528
|
const keyframes = [];
|
|
@@ -1548,9 +1549,9 @@ function parsePercentageKeyframes(node, scope, source) {
|
|
|
1548
1549
|
}
|
|
1549
1550
|
keyframes.push({ percentage, properties, ...kfEase ? { ease: kfEase } : {} });
|
|
1550
1551
|
} else if (key === "ease") {
|
|
1551
|
-
ease = tryResolveStringProp(prop.value, scope) ?? ease;
|
|
1552
|
+
ease = tryResolveStringProp(prop.value, scope, source) ?? ease;
|
|
1552
1553
|
} else if (key === "easeEach") {
|
|
1553
|
-
easeEach = tryResolveStringProp(prop.value, scope) ?? easeEach;
|
|
1554
|
+
easeEach = tryResolveStringProp(prop.value, scope, source) ?? easeEach;
|
|
1554
1555
|
}
|
|
1555
1556
|
}
|
|
1556
1557
|
keyframes.sort((a, b) => a.percentage - b.percentage);
|
|
@@ -1960,7 +1961,7 @@ function applyTimelineDefaults(anims, defaults) {
|
|
|
1960
1961
|
if (defaults.duration !== void 0) anim.duration = defaults.duration;
|
|
1961
1962
|
else if (defaults.durationUnresolved) anim.durationUnresolved = true;
|
|
1962
1963
|
}
|
|
1963
|
-
if (anim.ease === void 0 && defaults.ease !== void 0) {
|
|
1964
|
+
if (anim.ease === void 0 && defaults.ease !== void 0 && !anim.keyframes) {
|
|
1964
1965
|
anim.ease = defaults.ease;
|
|
1965
1966
|
}
|
|
1966
1967
|
}
|