motion 12.23.1 → 12.23.3

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.
Files changed (2) hide show
  1. package/dist/motion.dev.js +11 -11
  2. package/package.json +3 -3
@@ -37,7 +37,7 @@
37
37
  {
38
38
  const formatMessage = (message, errorCode) => {
39
39
  return errorCode
40
- ? `${message}. For more information and steps for solving, visit https://motion.dev/error/${errorCode}`
40
+ ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`
41
41
  : message;
42
42
  };
43
43
  exports.warning = (check, message, errorCode) => {
@@ -296,13 +296,13 @@
296
296
  const easingDefinitionToFunction = (definition) => {
297
297
  if (isBezierDefinition(definition)) {
298
298
  // If cubic bezier definition, create bezier curve
299
- exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);
299
+ exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
300
300
  const [x1, y1, x2, y2] = definition;
301
301
  return cubicBezier(x1, y1, x2, y2);
302
302
  }
303
303
  else if (isValidEasing(definition)) {
304
304
  // Else lookup from table
305
- exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);
305
+ exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type");
306
306
  return easingLookup[definition];
307
307
  }
308
308
  return definition;
@@ -862,7 +862,7 @@
862
862
  const getColorType = (v) => colorTypes.find((type) => type.test(v));
863
863
  function asRGBA(color) {
864
864
  const type = getColorType(color);
865
- exports.warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);
865
+ exports.warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable");
866
866
  if (!Boolean(type))
867
867
  return false;
868
868
  let model = type.parse(color);
@@ -980,7 +980,7 @@
980
980
  return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);
981
981
  }
982
982
  else {
983
- exports.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);
983
+ exports.warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different");
984
984
  return mixImmediate(origin, target);
985
985
  }
986
986
  };
@@ -1086,7 +1086,7 @@
1086
1086
  function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {
1087
1087
  let envelope;
1088
1088
  let derivative;
1089
- exports.warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
1089
+ exports.warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
1090
1090
  let dampingRatio = 1 - bounce;
1091
1091
  /**
1092
1092
  * Restrict dampingRatio and duration to within acceptable ranges.
@@ -1446,7 +1446,7 @@
1446
1446
  */
1447
1447
  function interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {
1448
1448
  const inputLength = input.length;
1449
- exports.invariant(inputLength === output.length, "Both input and output ranges must be the same length");
1449
+ exports.invariant(inputLength === output.length, "Both input and output ranges must be the same length", "range-length");
1450
1450
  /**
1451
1451
  * If we're only provided a single input, we can just make a function
1452
1452
  * that returns the output.
@@ -2339,7 +2339,7 @@
2339
2339
  this.isPseudoElement = Boolean(pseudoElement);
2340
2340
  this.allowFlatten = allowFlatten;
2341
2341
  this.options = options;
2342
- exports.invariant(typeof options.type !== "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
2342
+ exports.invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
2343
2343
  const transition = applyGeneratorOptions(options);
2344
2344
  this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);
2345
2345
  if (transition.autoplay === false) {
@@ -2555,7 +2555,7 @@
2555
2555
  * @internal
2556
2556
  */
2557
2557
  const isAnimatable = (value, name) => {
2558
- // If the list of keys tat might be non-animatable grows, replace with Set
2558
+ // If the list of keys that might be non-animatable grows, replace with Set
2559
2559
  if (name === "zIndex")
2560
2560
  return false;
2561
2561
  // If it's a number or a keyframes array, we can animate it. We might at some point
@@ -2600,7 +2600,7 @@
2600
2600
  const targetKeyframe = keyframes[keyframes.length - 1];
2601
2601
  const isOriginAnimatable = isAnimatable(originKeyframe, name);
2602
2602
  const isTargetAnimatable = isAnimatable(targetKeyframe, name);
2603
- exports.warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \`style\` property.`);
2603
+ exports.warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from "${originKeyframe}" to "${targetKeyframe}". "${isOriginAnimatable ? targetKeyframe : originKeyframe}" is not an animatable value.`, "value-not-animatable");
2604
2604
  // Always skip if any of these are true
2605
2605
  if (!isOriginAnimatable || !isTargetAnimatable) {
2606
2606
  return false;
@@ -2930,7 +2930,7 @@
2930
2930
  }
2931
2931
  const maxDepth = 4;
2932
2932
  function getVariableValue(current, element, depth = 1) {
2933
- exports.invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`);
2933
+ exports.invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property "${current}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
2934
2934
  const [token, fallback] = parseCSSVariable(current);
2935
2935
  // No CSS variable detected
2936
2936
  if (!token)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion",
3
- "version": "12.23.1",
3
+ "version": "12.23.3",
4
4
  "description": "An animation library for JavaScript and React.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -76,7 +76,7 @@
76
76
  "postpublish": "git push --tags"
77
77
  },
78
78
  "dependencies": {
79
- "framer-motion": "^12.23.1",
79
+ "framer-motion": "^12.23.3",
80
80
  "tslib": "^2.4.0"
81
81
  },
82
82
  "peerDependencies": {
@@ -95,5 +95,5 @@
95
95
  "optional": true
96
96
  }
97
97
  },
98
- "gitHead": "6cd3f6ce7b40efb7d50d95f252ec44a31edceee7"
98
+ "gitHead": "1a7be2f815e9c51c4793468fe03b2127f23e1a85"
99
99
  }