framer-motion 12.23.22 → 12.23.23

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.
@@ -1,4 +1,4 @@
1
- import { F as ForwardRefComponent, b as HTMLMotionProps, n as SVGMotionProps } from '../types.d-DsEeKk6G.js';
1
+ import { F as ForwardRefComponent, c as HTMLMotionProps, n as SVGMotionProps } from '../types.d-BJcRxCew.js';
2
2
  import 'motion-dom';
3
3
  import 'motion-utils';
4
4
  import 'react';
@@ -5,8 +5,8 @@ export * from 'motion-dom';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as React$1 from 'react';
7
7
  import { useEffect, RefObject } from 'react';
8
- import { V as VisualElement, M as MotionProps, C as CreateVisualElement, a as MotionConfigContext, H as HTMLElements, b as HTMLMotionProps, D as DOMMotionComponents, c as HTMLMotionComponents, S as SVGMotionComponents, d as VisualElementAnimationOptions, I as IProjectionNode, R as ResolvedValues, e as HTMLRenderState } from '../types.d-DsEeKk6G.js';
9
- export { A as AnimationType, p as FlatTree, F as ForwardRefComponent, i as MotionStyle, j as MotionTransform, P as PresenceContext, l as SVGAttributesAsMotionValues, n as SVGMotionProps, f as ScrapeMotionValuesFromProps, h as SwitchLayoutGroupContext, k as VariantLabels, g as VisualState, m as makeUseVisualState, o as optimizedAppearDataAttribute } from '../types.d-DsEeKk6G.js';
8
+ import { V as VariantLabels, a as VisualElement, M as MotionProps, C as CreateVisualElement, b as MotionConfigContext, H as HTMLElements, c as HTMLMotionProps, D as DOMMotionComponents, d as HTMLMotionComponents, S as SVGMotionComponents, e as VisualElementAnimationOptions, I as IProjectionNode, R as ResolvedValues, f as HTMLRenderState } from '../types.d-BJcRxCew.js';
9
+ export { A as AnimationType, p as FlatTree, F as ForwardRefComponent, j as MotionStyle, k as MotionTransform, P as PresenceContext, l as SVGAttributesAsMotionValues, n as SVGMotionProps, g as ScrapeMotionValuesFromProps, i as SwitchLayoutGroupContext, h as VisualState, m as makeUseVisualState, o as optimizedAppearDataAttribute } from '../types.d-BJcRxCew.js';
10
10
  import { Easing, EasingFunction, Point, Axis, Box } from 'motion-utils';
11
11
  export * from 'motion-utils';
12
12
  export { MotionGlobalConfig } from 'motion-utils';
@@ -120,6 +120,27 @@ interface AnimatePresenceProps {
120
120
  */
121
121
  declare const AnimatePresence: ({ children, custom, initial, onExitComplete, presenceAffectsLayout, mode, propagate, anchorX, root }: React$1.PropsWithChildren<AnimatePresenceProps>) => react_jsx_runtime.JSX.Element | null;
122
122
 
123
+ interface Props$3 {
124
+ children: React$1.ReactElement;
125
+ isPresent: boolean;
126
+ anchorX?: "left" | "right";
127
+ root?: HTMLElement | ShadowRoot;
128
+ }
129
+ declare function PopChild({ children, isPresent, anchorX, root }: Props$3): react_jsx_runtime.JSX.Element;
130
+
131
+ interface PresenceChildProps {
132
+ children: React$1.ReactElement;
133
+ isPresent: boolean;
134
+ onExitComplete?: () => void;
135
+ initial?: false | VariantLabels;
136
+ custom?: any;
137
+ presenceAffectsLayout: boolean;
138
+ mode: "sync" | "popLayout" | "wait";
139
+ anchorX?: "left" | "right";
140
+ root?: HTMLElement | ShadowRoot;
141
+ }
142
+ declare const PresenceChild: ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, root }: PresenceChildProps) => react_jsx_runtime.JSX.Element;
143
+
123
144
  type InheritOption = boolean | "id";
124
145
  interface Props$2 {
125
146
  id?: string;
@@ -1250,4 +1271,4 @@ interface ScaleMotionValues {
1250
1271
  */
1251
1272
  declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMotionValues;
1252
1273
 
1253
- export { type AbsoluteKeyframe, AnimatePresence, type AnimatePresenceProps, AnimateSharedLayout, type AnimationSequence, type At, CreateVisualElement, type Cycle, type CycleState, DOMMotionComponents, type DOMSegment, type DOMSegmentWithTransition, type DelayedFunction, DeprecatedLayoutGroupContext, DragControls, type FeatureBundle, type FeatureDefinition, type FeatureDefinitions, type FeaturePackage, type FeaturePackages, HTMLElements, HTMLMotionProps, type HydratedFeatureDefinition, type HydratedFeatureDefinitions, IProjectionNode, LayoutGroup, LayoutGroupContext, type LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, type LazyProps, MotionConfig, MotionConfigContext, type MotionConfigProps, MotionContext, MotionProps, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, namespace_d as Reorder, type ResolveKeyframes, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, ResolvedValues, type ScrollMotionValues, type Segment, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceTime, type UseInViewOptions, type UseScrollOptions, type ValueSequence, VisualElement, WillChangeMotionValue, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateMini, animateVisualElement, animationControls, animations, buildTransform, calcLength, createBox, createScopedAnimate, delay, disableInstantTransitions, distance, distance2D, domAnimation, domMax, domMin, filterProps, inView, isBrowser, isMotionComponent, isValidMotionProp, m, motion, resolveMotionValue, scroll, scrollInfo, startOptimizedAppearAnimation, unwrapMotionComponent, useAnimate, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useComposedRefs, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePageInView, usePresence, usePresenceData, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, visualElementStore };
1274
+ export { type AbsoluteKeyframe, AnimatePresence, type AnimatePresenceProps, AnimateSharedLayout, type AnimationSequence, type At, CreateVisualElement, type Cycle, type CycleState, DOMMotionComponents, type DOMSegment, type DOMSegmentWithTransition, type DelayedFunction, DeprecatedLayoutGroupContext, DragControls, type FeatureBundle, type FeatureDefinition, type FeatureDefinitions, type FeaturePackage, type FeaturePackages, HTMLElements, HTMLMotionProps, type HydratedFeatureDefinition, type HydratedFeatureDefinitions, IProjectionNode, LayoutGroup, LayoutGroupContext, type LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, type LazyProps, MotionConfig, MotionConfigContext, type MotionConfigProps, MotionContext, MotionProps, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, PopChild, PresenceChild, namespace_d as Reorder, type ResolveKeyframes, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, ResolvedValues, type ScrollMotionValues, type Segment, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceTime, type UseInViewOptions, type UseScrollOptions, type ValueSequence, VariantLabels, VisualElement, WillChangeMotionValue, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateMini, animateVisualElement, animationControls, animations, buildTransform, calcLength, createBox, createScopedAnimate, delay, disableInstantTransitions, distance, distance2D, domAnimation, domMax, domMin, filterProps, inView, isBrowser, isMotionComponent, isValidMotionProp, m, motion, resolveMotionValue, scroll, scrollInfo, startOptimizedAppearAnimation, unwrapMotionComponent, useAnimate, useAnimateMini, useAnimation, useAnimationControls, useAnimationFrame, useComposedRefs, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePageInView, usePresence, usePresenceData, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, visualElementStore };
@@ -1,51 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import * as motion_dom from 'motion-dom';
3
- import { Transition, TransformProperties, MotionNodeOptions, MotionValue, SVGPathProperties, JSAnimation, ValueTransition, TargetAndTransition, AnyResolvedKeyframe, KeyframeResolver, AnimationDefinition, Batcher } from 'motion-dom';
3
+ import { TransformProperties, MotionNodeOptions, MotionValue, SVGPathProperties, Transition, JSAnimation, ValueTransition, TargetAndTransition, AnyResolvedKeyframe, KeyframeResolver, AnimationDefinition, Batcher } from 'motion-dom';
4
4
  import { TransformPoint, Box, Delta, Point, Axis } from 'motion-utils';
5
5
  import * as React$1 from 'react';
6
6
  import { CSSProperties, PropsWithoutRef, RefAttributes, JSX, SVGAttributes } from 'react';
7
7
 
8
- type ReducedMotionConfig = "always" | "never" | "user";
9
- /**
10
- * @public
11
- */
12
- interface MotionConfigContext {
13
- /**
14
- * Internal, exported only for usage in Framer
15
- */
16
- transformPagePoint: TransformPoint;
17
- /**
18
- * Internal. Determines whether this is a static context ie the Framer canvas. If so,
19
- * it'll disable all dynamic functionality.
20
- */
21
- isStatic: boolean;
22
- /**
23
- * Defines a new default transition for the entire tree.
24
- *
25
- * @public
26
- */
27
- transition?: Transition;
28
- /**
29
- * If true, will respect the device prefersReducedMotion setting by switching
30
- * transform animations off.
31
- *
32
- * @public
33
- */
34
- reducedMotion?: ReducedMotionConfig;
35
- /**
36
- * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP).
37
- * For more details see:
38
- * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles
39
- *
40
- * @public
41
- */
42
- nonce?: string;
43
- }
44
- /**
45
- * @public
46
- */
47
- declare const MotionConfigContext: React$1.Context<MotionConfigContext>;
48
-
49
8
  /**
50
9
  * Either a string, or array of strings, that reference variants defined via the `variants` prop.
51
10
  * @public
@@ -95,6 +54,47 @@ interface MotionProps extends MotionNodeOptions {
95
54
  children?: React.ReactNode | MotionValueNumber | MotionValueString;
96
55
  }
97
56
 
57
+ type ReducedMotionConfig = "always" | "never" | "user";
58
+ /**
59
+ * @public
60
+ */
61
+ interface MotionConfigContext {
62
+ /**
63
+ * Internal, exported only for usage in Framer
64
+ */
65
+ transformPagePoint: TransformPoint;
66
+ /**
67
+ * Internal. Determines whether this is a static context ie the Framer canvas. If so,
68
+ * it'll disable all dynamic functionality.
69
+ */
70
+ isStatic: boolean;
71
+ /**
72
+ * Defines a new default transition for the entire tree.
73
+ *
74
+ * @public
75
+ */
76
+ transition?: Transition;
77
+ /**
78
+ * If true, will respect the device prefersReducedMotion setting by switching
79
+ * transform animations off.
80
+ *
81
+ * @public
82
+ */
83
+ reducedMotion?: ReducedMotionConfig;
84
+ /**
85
+ * A custom `nonce` attribute used when wanting to enforce a Content Security Policy (CSP).
86
+ * For more details see:
87
+ * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src#unsafe_inline_styles
88
+ *
89
+ * @public
90
+ */
91
+ nonce?: string;
92
+ }
93
+ /**
94
+ * @public
95
+ */
96
+ declare const MotionConfigContext: React$1.Context<MotionConfigContext>;
97
+
98
98
  /**
99
99
  * @public
100
100
  */
@@ -879,4 +879,4 @@ declare global {
879
879
  }
880
880
  }
881
881
 
882
- export { type AnimationType as A, type CreateVisualElement as C, type DOMMotionComponents as D, type ForwardRefComponent as F, type HTMLElements as H, type IProjectionNode as I, type MotionProps as M, PresenceContext as P, type ResolvedValues as R, type SVGMotionComponents as S, VisualElement as V, MotionConfigContext as a, type HTMLMotionProps as b, type HTMLMotionComponents as c, type VisualElementAnimationOptions as d, type HTMLRenderState as e, type ScrapeMotionValuesFromProps as f, type VisualState as g, SwitchLayoutGroupContext as h, type MotionStyle as i, type MotionTransform as j, type VariantLabels as k, type SVGAttributesAsMotionValues as l, makeUseVisualState as m, type SVGMotionProps as n, optimizedAppearDataAttribute as o, FlatTree as p };
882
+ export { type AnimationType as A, type CreateVisualElement as C, type DOMMotionComponents as D, type ForwardRefComponent as F, type HTMLElements as H, type IProjectionNode as I, type MotionProps as M, PresenceContext as P, type ResolvedValues as R, type SVGMotionComponents as S, type VariantLabels as V, VisualElement as a, MotionConfigContext as b, type HTMLMotionProps as c, type HTMLMotionComponents as d, type VisualElementAnimationOptions as e, type HTMLRenderState as f, type ScrapeMotionValuesFromProps as g, type VisualState as h, SwitchLayoutGroupContext as i, type MotionStyle as j, type MotionTransform as k, type SVGAttributesAsMotionValues as l, makeUseVisualState as m, type SVGMotionProps as n, optimizedAppearDataAttribute as o, FlatTree as p };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "12.23.22",
3
+ "version": "12.23.23",
4
4
  "description": "A simple and powerful JavaScript animation library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -87,7 +87,7 @@
87
87
  "measure": "rollup -c ./rollup.size.config.mjs"
88
88
  },
89
89
  "dependencies": {
90
- "motion-dom": "^12.23.21",
90
+ "motion-dom": "^12.23.23",
91
91
  "motion-utils": "^12.23.6",
92
92
  "tslib": "^2.4.0"
93
93
  },
@@ -142,5 +142,5 @@
142
142
  "maxSize": "2.26 kB"
143
143
  }
144
144
  ],
145
- "gitHead": "bb14a6dc82fea534f0f295439d60cc05dd9b935f"
145
+ "gitHead": "237eee22464039152dd3acf122496503b3f3a5da"
146
146
  }