@hyperframes/parsers 0.8.121 → 0.8.123
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/gsapParserAcorn.js
CHANGED
|
@@ -1200,9 +1200,10 @@ function findAllTweenCalls(ast, ref, scope, targetBindings) {
|
|
|
1200
1200
|
return results;
|
|
1201
1201
|
}
|
|
1202
1202
|
var PERCENTAGE_KEY_RE = /^(\d+(?:\.\d+)?)%$/;
|
|
1203
|
-
function tryResolveStringProp(propValue, scope) {
|
|
1203
|
+
function tryResolveStringProp(propValue, scope, source) {
|
|
1204
1204
|
const val = resolveNode(propValue, scope);
|
|
1205
|
-
|
|
1205
|
+
if (typeof val === "string") return val;
|
|
1206
|
+
return source === void 0 ? void 0 : `__raw:${source.slice(propValue.start, propValue.end)}`;
|
|
1206
1207
|
}
|
|
1207
1208
|
function parsePercentageKeyframes(node, scope, source) {
|
|
1208
1209
|
const keyframes = [];
|
|
@@ -1229,9 +1230,9 @@ function parsePercentageKeyframes(node, scope, source) {
|
|
|
1229
1230
|
}
|
|
1230
1231
|
keyframes.push({ percentage, properties, ...kfEase ? { ease: kfEase } : {} });
|
|
1231
1232
|
} else if (key === "ease") {
|
|
1232
|
-
ease = tryResolveStringProp(prop.value, scope) ?? ease;
|
|
1233
|
+
ease = tryResolveStringProp(prop.value, scope, source) ?? ease;
|
|
1233
1234
|
} else if (key === "easeEach") {
|
|
1234
|
-
easeEach = tryResolveStringProp(prop.value, scope) ?? easeEach;
|
|
1235
|
+
easeEach = tryResolveStringProp(prop.value, scope, source) ?? easeEach;
|
|
1235
1236
|
}
|
|
1236
1237
|
}
|
|
1237
1238
|
keyframes.sort((a, b) => a.percentage - b.percentage);
|
|
@@ -1641,7 +1642,7 @@ function applyTimelineDefaults(anims, defaults) {
|
|
|
1641
1642
|
if (defaults.duration !== void 0) anim.duration = defaults.duration;
|
|
1642
1643
|
else if (defaults.durationUnresolved) anim.durationUnresolved = true;
|
|
1643
1644
|
}
|
|
1644
|
-
if (anim.ease === void 0 && defaults.ease !== void 0) {
|
|
1645
|
+
if (anim.ease === void 0 && defaults.ease !== void 0 && !anim.keyframes) {
|
|
1645
1646
|
anim.ease = defaults.ease;
|
|
1646
1647
|
}
|
|
1647
1648
|
}
|