@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
package/dist/index.js
CHANGED
|
@@ -1608,9 +1608,10 @@ function findAllTweenCalls(ast, ref, scope, targetBindings) {
|
|
|
1608
1608
|
return results;
|
|
1609
1609
|
}
|
|
1610
1610
|
var PERCENTAGE_KEY_RE = /^(\d+(?:\.\d+)?)%$/;
|
|
1611
|
-
function tryResolveStringProp(propValue, scope) {
|
|
1611
|
+
function tryResolveStringProp(propValue, scope, source) {
|
|
1612
1612
|
const val = resolveNode(propValue, scope);
|
|
1613
|
-
|
|
1613
|
+
if (typeof val === "string") return val;
|
|
1614
|
+
return source === void 0 ? void 0 : `__raw:${source.slice(propValue.start, propValue.end)}`;
|
|
1614
1615
|
}
|
|
1615
1616
|
function parsePercentageKeyframes(node, scope, source) {
|
|
1616
1617
|
const keyframes = [];
|
|
@@ -1637,9 +1638,9 @@ function parsePercentageKeyframes(node, scope, source) {
|
|
|
1637
1638
|
}
|
|
1638
1639
|
keyframes.push({ percentage, properties, ...kfEase ? { ease: kfEase } : {} });
|
|
1639
1640
|
} else if (key === "ease") {
|
|
1640
|
-
ease = tryResolveStringProp(prop.value, scope) ?? ease;
|
|
1641
|
+
ease = tryResolveStringProp(prop.value, scope, source) ?? ease;
|
|
1641
1642
|
} else if (key === "easeEach") {
|
|
1642
|
-
easeEach = tryResolveStringProp(prop.value, scope) ?? easeEach;
|
|
1643
|
+
easeEach = tryResolveStringProp(prop.value, scope, source) ?? easeEach;
|
|
1643
1644
|
}
|
|
1644
1645
|
}
|
|
1645
1646
|
keyframes.sort((a, b) => a.percentage - b.percentage);
|
|
@@ -2049,7 +2050,7 @@ function applyTimelineDefaults(anims, defaults) {
|
|
|
2049
2050
|
if (defaults.duration !== void 0) anim.duration = defaults.duration;
|
|
2050
2051
|
else if (defaults.durationUnresolved) anim.durationUnresolved = true;
|
|
2051
2052
|
}
|
|
2052
|
-
if (anim.ease === void 0 && defaults.ease !== void 0) {
|
|
2053
|
+
if (anim.ease === void 0 && defaults.ease !== void 0 && !anim.keyframes) {
|
|
2053
2054
|
anim.ease = defaults.ease;
|
|
2054
2055
|
}
|
|
2055
2056
|
}
|