framer-motion 12.23.11 → 13.0.0-alpha.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.
Files changed (56) hide show
  1. package/README.md +79 -65
  2. package/dist/cjs/client.js +1 -2
  3. package/dist/cjs/{feature-bundle-PNQ-8QDo.js → feature-bundle-C8gfmTBU.js} +0 -1
  4. package/dist/cjs/index.js +1 -2
  5. package/dist/dom.js +1 -1
  6. package/dist/es/animation/hooks/use-animate-style.mjs +1 -0
  7. package/dist/es/animation/hooks/use-animate.mjs +1 -0
  8. package/dist/es/animation/hooks/use-animated-state.mjs +1 -0
  9. package/dist/es/animation/hooks/use-animation.mjs +1 -0
  10. package/dist/es/client.mjs +0 -2
  11. package/dist/es/components/AnimatePresence/use-presence-data.mjs +1 -0
  12. package/dist/es/components/AnimatePresence/use-presence.mjs +1 -0
  13. package/dist/es/components/AnimateSharedLayout.mjs +1 -0
  14. package/dist/es/context/DeprecatedLayoutGroupContext.mjs +1 -0
  15. package/dist/es/context/MotionContext/create.mjs +1 -0
  16. package/dist/es/events/use-dom-event.mjs +1 -0
  17. package/dist/es/index.mjs +0 -2
  18. package/dist/es/m.mjs +0 -1
  19. package/dist/es/motion/utils/use-motion-ref.mjs +1 -0
  20. package/dist/es/motion/utils/use-visual-element.mjs +1 -0
  21. package/dist/es/motion/utils/use-visual-state.mjs +1 -0
  22. package/dist/es/render/dom/use-render.mjs +1 -0
  23. package/dist/es/render/html/use-html-visual-state.mjs +1 -0
  24. package/dist/es/render/html/use-props.mjs +1 -0
  25. package/dist/es/render/svg/use-props.mjs +1 -0
  26. package/dist/es/render/svg/use-svg-visual-state.mjs +1 -0
  27. package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +1 -0
  28. package/dist/es/utils/reduced-motion/use-reduced-motion.mjs +1 -0
  29. package/dist/es/utils/use-animation-frame.mjs +1 -0
  30. package/dist/es/utils/use-constant.mjs +1 -0
  31. package/dist/es/utils/use-cycle.mjs +1 -0
  32. package/dist/es/utils/use-force-update.mjs +1 -0
  33. package/dist/es/utils/use-in-view.mjs +1 -0
  34. package/dist/es/utils/use-instant-transition.mjs +1 -0
  35. package/dist/es/utils/use-is-mounted.mjs +1 -0
  36. package/dist/es/utils/use-isomorphic-effect.mjs +1 -0
  37. package/dist/es/utils/use-motion-value-event.mjs +1 -0
  38. package/dist/es/utils/use-page-in-view.mjs +1 -0
  39. package/dist/es/utils/use-unmount-effect.mjs +1 -0
  40. package/dist/es/value/use-combine-values.mjs +1 -0
  41. package/dist/es/value/use-computed.mjs +1 -0
  42. package/dist/es/value/use-inverted-scale.mjs +1 -0
  43. package/dist/es/value/use-motion-template.mjs +1 -0
  44. package/dist/es/value/use-motion-value.mjs +1 -0
  45. package/dist/es/value/use-scroll.mjs +1 -0
  46. package/dist/es/value/use-spring.mjs +1 -0
  47. package/dist/es/value/use-time.mjs +1 -0
  48. package/dist/es/value/use-transform.mjs +1 -0
  49. package/dist/es/value/use-velocity.mjs +1 -0
  50. package/dist/es/value/use-will-change/index.mjs +1 -0
  51. package/dist/framer-motion.dev.js +5 -3
  52. package/dist/framer-motion.js +1 -1
  53. package/dist/types/client.d.ts +2 -4
  54. package/dist/types/index.d.ts +78 -3
  55. package/dist/{types.d-Cjd591yU.d.ts → types.d-C7Th3txw.d.ts} +3 -79
  56. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useRef } from 'react';
2
3
 
3
4
  /**
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { wrap } from 'motion-utils';
2
3
  import { useRef, useState, useCallback } from 'react';
3
4
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { frame } from 'motion-dom';
2
3
  import { useState, useCallback } from 'react';
3
4
  import { useIsMounted } from './use-is-mounted.mjs';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useState, useEffect } from 'react';
2
3
  import { inView } from '../render/dom/viewport/index.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { frame } from 'motion-dom';
2
3
  import { MotionGlobalConfig } from 'motion-utils';
3
4
  import { useRef, useEffect } from 'react';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useRef } from 'react';
2
3
  import { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useLayoutEffect, useEffect } from 'react';
2
3
  import { isBrowser } from './is-browser.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useInsertionEffect } from 'react';
2
3
 
3
4
  function useMotionValueEvent(value, event, callback) {
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useState, useEffect } from 'react';
2
3
 
3
4
  function usePageInView() {
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useEffect } from 'react';
2
3
 
3
4
  function useUnmountEffect(callback) {
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { cancelFrame, frame } from 'motion-dom';
2
3
  import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs';
3
4
  import { useMotionValue } from './use-motion-value.mjs';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { collectMotionValues } from 'motion-dom';
2
3
  import { useCombineMotionValues } from './use-combine-values.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { invariant, warning } from 'motion-utils';
2
3
  import { useContext } from 'react';
3
4
  import { MotionContext } from '../context/MotionContext/index.mjs';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { isMotionValue } from 'motion-dom';
2
3
  import { useCombineMotionValues } from './use-combine-values.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { motionValue } from 'motion-dom';
2
3
  import { useContext, useState, useEffect } from 'react';
3
4
  import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { motionValue } from 'motion-dom';
2
3
  import { invariant } from 'motion-utils';
3
4
  import { useRef, useCallback, useEffect } from 'react';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { attachSpring, isMotionValue } from 'motion-dom';
2
3
  import { useContext, useInsertionEffect } from 'react';
3
4
  import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useAnimationFrame } from '../utils/use-animation-frame.mjs';
2
3
  import { useMotionValue } from './use-motion-value.mjs';
3
4
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { transform } from 'motion-dom';
2
3
  import { useConstant } from '../utils/use-constant.mjs';
3
4
  import { useCombineMotionValues } from './use-combine-values.mjs';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { frame } from 'motion-dom';
2
3
  import { useMotionValueEvent } from '../utils/use-motion-value-event.mjs';
3
4
  import { useMotionValue } from './use-motion-value.mjs';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useConstant } from '../../utils/use-constant.mjs';
2
3
  import { WillChangeMotionValue } from './WillChangeMotionValue.mjs';
3
4
 
@@ -4742,7 +4742,7 @@
4742
4742
  },
4743
4743
  };
4744
4744
 
4745
- function getLayerName(pseudoElement) {
4745
+ function getViewAnimationLayerInfo(pseudoElement) {
4746
4746
  const match = pseudoElement.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);
4747
4747
  if (!match)
4748
4748
  return null;
@@ -4861,7 +4861,7 @@
4861
4861
  const { pseudoElement } = effect;
4862
4862
  if (!pseudoElement)
4863
4863
  continue;
4864
- const name = getLayerName(pseudoElement);
4864
+ const name = getViewAnimationLayerInfo(pseudoElement);
4865
4865
  if (!name)
4866
4866
  continue;
4867
4867
  const targetDefinition = targets.get(name.layer);
@@ -14061,7 +14061,6 @@
14061
14061
  exports.DOMKeyframesResolver = DOMKeyframesResolver;
14062
14062
  exports.DeprecatedLayoutGroupContext = DeprecatedLayoutGroupContext;
14063
14063
  exports.DragControls = DragControls;
14064
- exports.FlatTree = FlatTree;
14065
14064
  exports.GroupAnimation = GroupAnimation;
14066
14065
  exports.GroupAnimationWithThen = GroupAnimationWithThen;
14067
14066
  exports.JSAnimation = JSAnimation;
@@ -14103,6 +14102,7 @@
14103
14102
  exports.animationMapKey = animationMapKey;
14104
14103
  exports.animations = animations;
14105
14104
  exports.anticipate = anticipate;
14105
+ exports.applyGeneratorOptions = applyGeneratorOptions;
14106
14106
  exports.applyPxDefaults = applyPxDefaults;
14107
14107
  exports.attachSpring = attachSpring;
14108
14108
  exports.attrEffect = attrEffect;
@@ -14166,6 +14166,8 @@
14166
14166
  exports.getValueAsType = getValueAsType;
14167
14167
  exports.getValueTransition = getValueTransition$1;
14168
14168
  exports.getVariableValue = getVariableValue;
14169
+ exports.getViewAnimationLayerInfo = getViewAnimationLayerInfo;
14170
+ exports.getViewAnimations = getViewAnimations;
14169
14171
  exports.hasWarned = hasWarned$1;
14170
14172
  exports.hex = hex;
14171
14173
  exports.hover = hover;