framer-motion 8.2.4 → 8.3.1

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.
@@ -159,7 +159,7 @@ interface Orchestration {
159
159
  * show: {
160
160
  * opacity: 1,
161
161
  * transition: {
162
- * delayChildren: 0.5,
162
+ * staggerChildren: 0.5,
163
163
  * staggerDirection: -1
164
164
  * }
165
165
  * }
@@ -921,14 +921,6 @@ interface MotionConfigContext {
921
921
  */
922
922
  declare const MotionConfigContext: React$1.Context<MotionConfigContext>;
923
923
 
924
- declare type IsValidProp = (key: string) => boolean;
925
- declare function filterProps(props: MotionProps, isDom: boolean, forwardMotionProps: boolean): {};
926
-
927
- interface MotionConfigProps extends Partial<MotionConfigContext> {
928
- children?: React$1.ReactNode;
929
- isValidProp?: IsValidProp;
930
- }
931
-
932
924
  declare class NodeStack {
933
925
  lead?: IProjectionNode;
934
926
  prevLead?: IProjectionNode;
@@ -1210,7 +1202,7 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
1210
1202
  /**
1211
1203
  * Measure the viewport-relative bounding box of the Instance.
1212
1204
  */
1213
- abstract measureInstanceViewportBox(instance: Instance, props: MotionProps & MotionConfigProps): Box;
1205
+ abstract measureInstanceViewportBox(instance: Instance, props: MotionProps & Partial<MotionConfigContext>): Box;
1214
1206
  /**
1215
1207
  * When a value has been removed from all animation props we need to
1216
1208
  * pick a target to animate back to. For instance, for HTMLElements
@@ -1240,6 +1232,11 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
1240
1232
  * will have values applied to attributes.
1241
1233
  */
1242
1234
  abstract renderInstance(instance: Instance, renderState: RenderState, styleProp?: MotionStyle, projection?: IProjectionNode): void;
1235
+ /**
1236
+ * If the component child is provided as a motion value, handle subscriptions
1237
+ * with the renderer-specific VisualElement.
1238
+ */
1239
+ handleChildMotionValue?(): void;
1243
1240
  /**
1244
1241
  * This method takes React props and returns found MotionValues. For example, HTML
1245
1242
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -1336,7 +1333,7 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
1336
1333
  /**
1337
1334
  * A reference to the latest props provided to the VisualElement's host React component.
1338
1335
  */
1339
- private props;
1336
+ protected props: MotionProps;
1340
1337
  /**
1341
1338
  * A map of every subscription that binds the provided or generated
1342
1339
  * motion values onChange listeners to this visual element.
@@ -1381,7 +1378,7 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
1381
1378
  unmount(): void;
1382
1379
  private bindToMotionValue;
1383
1380
  sortNodePosition(other: VisualElement<Instance>): number;
1384
- loadFeatures(renderedProps: MotionProps, isStrict?: boolean, preloadedFeatures?: FeatureBundle, projectionId?: number, ProjectionNodeConstructor?: any, initialLayoutGroupConfig?: SwitchLayoutGroupContext): JSX.Element[];
1381
+ loadFeatures({ children, ...renderedProps }: MotionProps, isStrict?: boolean, preloadedFeatures?: FeatureBundle, projectionId?: number, ProjectionNodeConstructor?: any, initialLayoutGroupConfig?: SwitchLayoutGroupContext): JSX.Element[];
1385
1382
  notifyUpdate: () => void;
1386
1383
  triggerBuild(): void;
1387
1384
  render: () => void;
@@ -2635,6 +2632,7 @@ interface MotionProps extends AnimationProps, EventProps, PanHandlers, TapHandle
2635
2632
  * @param values -
2636
2633
  */
2637
2634
  transformValues?<V extends ResolvedValues>(values: V): V;
2635
+ children?: React.ReactNode | MotionValue<number> | MotionValue<string>;
2638
2636
  }
2639
2637
 
2640
2638
  declare type VariantStateContext = {
@@ -2749,6 +2747,8 @@ declare const createBox: () => Box;
2749
2747
 
2750
2748
  declare function calcLength(axis: Axis): number;
2751
2749
 
2750
+ declare function filterProps(props: MotionProps, isDom: boolean, forwardMotionProps: boolean): {};
2751
+
2752
2752
  declare function isDragActive(): boolean;
2753
2753
 
2754
2754
  declare type EventListenerWithPointInfo = (e: PointerEvent, info: EventInfo) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "8.2.4",
3
+ "version": "8.3.1",
4
4
  "description": "A simple and powerful React animation library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -39,7 +39,7 @@
39
39
  "clean": "rm -rf types dist lib",
40
40
  "test": "yarn test-server && yarn test-client",
41
41
  "test-ci": "yarn test",
42
- "test-client": "jest --config jest.config.json --max-workers=2 --detectOpenHandles",
42
+ "test-client": "jest --config jest.config.json --max-workers=2",
43
43
  "test-server": "jest --config jest.config.ssr.json ",
44
44
  "test-watch": "jest --watch --coverage --coverageReporters=lcov --config jest.config.json",
45
45
  "test-appear": "yarn run collect-appear-tests && start-server-and-test 'pushd ../../; python -m SimpleHTTPServer; popd' http://0.0.0.0:8000 'cypress run -s cypress/integration/appear.chrome.ts --config baseUrl=http://localhost:8000/'",
@@ -72,32 +72,32 @@
72
72
  "bundlesize": [
73
73
  {
74
74
  "path": "./dist/size-rollup-motion.js",
75
- "maxSize": "29.4 kB"
75
+ "maxSize": "29.55 kB"
76
76
  },
77
77
  {
78
78
  "path": "./dist/size-rollup-m.js",
79
- "maxSize": "4.75 kB"
79
+ "maxSize": "4.78 kB"
80
80
  },
81
81
  {
82
82
  "path": "./dist/size-rollup-dom-animation.js",
83
- "maxSize": "14.66 kB"
83
+ "maxSize": "14.78 kB"
84
84
  },
85
85
  {
86
86
  "path": "./dist/size-rollup-dom-max.js",
87
- "maxSize": "25.35 kB"
87
+ "maxSize": "25.49 kB"
88
88
  },
89
89
  {
90
90
  "path": "./dist/size-webpack-m.js",
91
- "maxSize": "4.96 kB"
91
+ "maxSize": "4.98 kB"
92
92
  },
93
93
  {
94
94
  "path": "./dist/size-webpack-dom-animation.js",
95
- "maxSize": "18.75 kB"
95
+ "maxSize": "18.85 kB"
96
96
  },
97
97
  {
98
98
  "path": "./dist/size-webpack-dom-max.js",
99
- "maxSize": "30.3 kB"
99
+ "maxSize": "30.42 kB"
100
100
  }
101
101
  ],
102
- "gitHead": "b94527384a52d21a68c70666fad82e004708a4f6"
102
+ "gitHead": "2cf8b622487b2f442e009fe4851be8318e8d907d"
103
103
  }