motion-dom 12.28.1 → 12.29.0
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 +28 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/animation/waapi/utils/px-values.mjs +2 -1
- package/dist/es/animation/waapi/utils/px-values.mjs.map +1 -1
- package/dist/es/projection/shared/stack.mjs +24 -11
- package/dist/es/projection/shared/stack.mjs.map +1 -1
- package/dist/es/render/svg/SVGVisualElement.mjs.map +1 -1
- package/dist/es/value/types/maps/number.mjs +2 -1
- package/dist/es/value/types/maps/number.mjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/motion-dom.dev.js +28 -13
- package/dist/motion-dom.js +1 -1
- package/dist/size-rollup-style-effect.js +1 -1
- package/dist/size-rollup-style-effect.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -3547,7 +3547,6 @@ const numberValueTypes = {
|
|
|
3547
3547
|
borderBottomWidth: px,
|
|
3548
3548
|
borderLeftWidth: px,
|
|
3549
3549
|
borderRadius: px,
|
|
3550
|
-
radius: px,
|
|
3551
3550
|
borderTopLeftRadius: px,
|
|
3552
3551
|
borderTopRightRadius: px,
|
|
3553
3552
|
borderBottomRightRadius: px,
|
|
@@ -3591,6 +3590,8 @@ const numberValueTypes = {
|
|
|
3591
3590
|
marginInline: px,
|
|
3592
3591
|
marginInlineStart: px,
|
|
3593
3592
|
marginInlineEnd: px,
|
|
3593
|
+
// Typography
|
|
3594
|
+
fontSize: px,
|
|
3594
3595
|
// Misc
|
|
3595
3596
|
backgroundPositionX: px,
|
|
3596
3597
|
backgroundPositionY: px,
|
|
@@ -3802,7 +3803,6 @@ const pxValues = new Set([
|
|
|
3802
3803
|
"borderBottomWidth",
|
|
3803
3804
|
"borderLeftWidth",
|
|
3804
3805
|
"borderRadius",
|
|
3805
|
-
"radius",
|
|
3806
3806
|
"borderTopLeftRadius",
|
|
3807
3807
|
"borderTopRightRadius",
|
|
3808
3808
|
"borderBottomRightRadius",
|
|
@@ -3846,6 +3846,8 @@ const pxValues = new Set([
|
|
|
3846
3846
|
"marginInline",
|
|
3847
3847
|
"marginInlineStart",
|
|
3848
3848
|
"marginInlineEnd",
|
|
3849
|
+
// Typography
|
|
3850
|
+
"fontSize",
|
|
3849
3851
|
// Misc
|
|
3850
3852
|
"backgroundPositionX",
|
|
3851
3853
|
"backgroundPositionY",
|
|
@@ -7338,17 +7340,30 @@ class NodeStack {
|
|
|
7338
7340
|
if (prevLead) {
|
|
7339
7341
|
prevLead.instance && prevLead.scheduleRender();
|
|
7340
7342
|
node.scheduleRender();
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7343
|
+
/**
|
|
7344
|
+
* If both the new and previous lead have the same defined layoutDependency,
|
|
7345
|
+
* skip the shared layout animation. This allows components with layoutId
|
|
7346
|
+
* to opt-out of animations when their layoutDependency hasn't changed,
|
|
7347
|
+
* even when the component unmounts and remounts in a different location.
|
|
7348
|
+
*/
|
|
7349
|
+
const prevDep = prevLead.options.layoutDependency;
|
|
7350
|
+
const nextDep = node.options.layoutDependency;
|
|
7351
|
+
const dependencyMatches = prevDep !== undefined &&
|
|
7352
|
+
nextDep !== undefined &&
|
|
7353
|
+
prevDep === nextDep;
|
|
7354
|
+
if (!dependencyMatches) {
|
|
7355
|
+
node.resumeFrom = prevLead;
|
|
7356
|
+
if (preserveFollowOpacity) {
|
|
7357
|
+
node.resumeFrom.preserveOpacity = true;
|
|
7358
|
+
}
|
|
7359
|
+
if (prevLead.snapshot) {
|
|
7360
|
+
node.snapshot = prevLead.snapshot;
|
|
7361
|
+
node.snapshot.latestValues =
|
|
7362
|
+
prevLead.animationValues || prevLead.latestValues;
|
|
7363
|
+
}
|
|
7364
|
+
if (node.root && node.root.isUpdating) {
|
|
7365
|
+
node.isLayoutDirty = true;
|
|
7366
|
+
}
|
|
7352
7367
|
}
|
|
7353
7368
|
const { crossfade } = node.options;
|
|
7354
7369
|
if (crossfade === false) {
|