motion-dom 13.3.0 → 13.4.2
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/cjs/index.js +5 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/animation/generators/keyframes.mjs +1 -1
- package/dist/es/animation/generators/keyframes.mjs.map +1 -1
- package/dist/es/effects/svg/index.mjs +5 -3
- package/dist/es/effects/svg/index.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/motion-dom.dev.js +5 -4
- package/dist/motion-dom.js +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1346,7 +1346,7 @@ function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "e
|
|
|
1346
1346
|
*/
|
|
1347
1347
|
const easingFunctions = motionUtils.isEasingArray(ease)
|
|
1348
1348
|
? ease.map(motionUtils.easingDefinitionToFunction)
|
|
1349
|
-
: motionUtils.easingDefinitionToFunction(ease);
|
|
1349
|
+
: motionUtils.easingDefinitionToFunction(ease) || motionUtils.easeInOut;
|
|
1350
1350
|
/**
|
|
1351
1351
|
* This is the Iterator-spec return value. We ensure it's mutable rather than using a generator
|
|
1352
1352
|
* to reduce GC during animation.
|
|
@@ -5310,13 +5310,14 @@ const addSVGValue = (element, state, key, value) => {
|
|
|
5310
5310
|
else if (key.startsWith("attr")) {
|
|
5311
5311
|
return addAttrValue(element, state, key, value, convertAttrKey(key));
|
|
5312
5312
|
}
|
|
5313
|
-
const handler = key in element.style ? addStyleValue : addAttrValue;
|
|
5313
|
+
const handler = isCSSVar(key) || key in element.style ? addStyleValue : addAttrValue;
|
|
5314
5314
|
return handler(element, state, key, value);
|
|
5315
5315
|
};
|
|
5316
5316
|
/**
|
|
5317
5317
|
* Reads the current value of `key` from an SVG element as the origin of
|
|
5318
5318
|
* an animation, as the SVG VisualElement does: transforms start from
|
|
5319
|
-
* their defaults, the few CSS-only properties come from
|
|
5319
|
+
* their defaults, CSS variables and the few CSS-only properties come from
|
|
5320
|
+
* computed style
|
|
5320
5321
|
* and everything else is read from the attribute, dash-cased
|
|
5321
5322
|
* (`strokeWidth` -> `stroke-width`) or, failing that, as written
|
|
5322
5323
|
* (`baseFrequency`).
|
|
@@ -5325,7 +5326,7 @@ const readSVGValue = (element, key) => {
|
|
|
5325
5326
|
if (transformProps.has(key)) {
|
|
5326
5327
|
return numberValueTypes[key]?.default || 0;
|
|
5327
5328
|
}
|
|
5328
|
-
if (cssStyleProperties.includes(key)) {
|
|
5329
|
+
if (isCSSVar(key) || cssStyleProperties.includes(key)) {
|
|
5329
5330
|
return readStyleValue(element, key);
|
|
5330
5331
|
}
|
|
5331
5332
|
key = convertAttrKey(key);
|