Skip to content

Commit 0ae8c13

Browse files
committed
Patch framer-motion types
1 parent 9a566e6 commit 0ae8c13

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
diff --git a/node_modules/framer-motion/dist/client-entry.d.ts b/node_modules/framer-motion/dist/client-entry.d.ts
2+
index ac45d32..c08264e 100644
3+
--- a/node_modules/framer-motion/dist/client-entry.d.ts
4+
+++ b/node_modules/framer-motion/dist/client-entry.d.ts
5+
@@ -1,7 +1,8 @@
6+
/// <reference types="react" />
7+
import * as react from 'react';
8+
-import { SVGAttributes, CSSProperties, PropsWithoutRef, RefAttributes, JSX, HTMLElementType } from 'react';
9+
+import { SVGAttributes, CSSProperties, PropsWithoutRef, RefAttributes, JSX } from 'react';
10+
11+
+type HTMLElementType = keyof HTMLElements;
12+
type EasingFunction = (v: number) => number;
13+
type BezierDefinition = [number, number, number, number];
14+
type EasingDefinition = BezierDefinition | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate";
15+
@@ -2482,7 +2483,7 @@ type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents;
16+
17+
declare const createMotionComponent: <Props, TagName extends string = "div">(Component: string | TagName | react.ForwardRefExoticComponent<Props>, { forwardMotionProps }?: {
18+
forwardMotionProps: boolean;
19+
-}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | react.HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
20+
+}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
21+
22+
/**
23+
* HTML components
24+
diff --git a/node_modules/framer-motion/dist/index.d.ts b/node_modules/framer-motion/dist/index.d.ts
25+
index 0caa480..1095408 100644
26+
--- a/node_modules/framer-motion/dist/index.d.ts
27+
+++ b/node_modules/framer-motion/dist/index.d.ts
28+
@@ -1,8 +1,9 @@
29+
/// <reference types="react" />
30+
import * as react from 'react';
31+
-import { SVGAttributes as SVGAttributes$1, CSSProperties, PropsWithoutRef, RefAttributes, JSX, HTMLElementType, useEffect, RefObject as RefObject$1 } from 'react';
32+
+import { SVGAttributes as SVGAttributes$1, CSSProperties, PropsWithoutRef, RefAttributes, JSX, useEffect, RefObject as RefObject$1 } from 'react';
33+
import * as react_jsx_runtime from 'react/jsx-runtime';
34+
35+
+type HTMLElementType = keyof HTMLElements;
36+
type EasingFunction = (v: number) => number;
37+
type EasingModifier = (easing: EasingFunction) => EasingFunction;
38+
type BezierDefinition = [number, number, number, number];
39+
@@ -3558,18 +3559,18 @@ declare function createRendererMotionComponent<Props extends {}, Instance, Rende
40+
41+
declare const motion: (<Props, TagName extends string = "div">(Component: string | TagName | react.ForwardRefExoticComponent<Props>, { forwardMotionProps }?: {
42+
forwardMotionProps: boolean;
43+
-}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | react.HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>) & HTMLMotionComponents & SVGMotionComponents & {
44+
+}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>) & HTMLMotionComponents & SVGMotionComponents & {
45+
create: <Props, TagName extends string = "div">(Component: string | TagName | react.ForwardRefExoticComponent<Props>, { forwardMotionProps }?: {
46+
forwardMotionProps: boolean;
47+
- }) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | react.HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
48+
+ }) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
49+
};
50+
51+
declare const m: (<Props, TagName extends string = "div">(Component: string | TagName | react.ForwardRefExoticComponent<Props>, { forwardMotionProps }?: {
52+
forwardMotionProps: boolean;
53+
-}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | react.HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>) & HTMLMotionComponents & SVGMotionComponents & {
54+
+}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>) & HTMLMotionComponents & SVGMotionComponents & {
55+
create: <Props, TagName extends string = "div">(Component: string | TagName | react.ForwardRefExoticComponent<Props>, { forwardMotionProps }?: {
56+
forwardMotionProps: boolean;
57+
- }) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | react.HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
58+
+ }) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
59+
};
60+
61+
/**
62+
diff --git a/node_modules/framer-motion/dist/m-entry.d.ts b/node_modules/framer-motion/dist/m-entry.d.ts
63+
index bc97a0c..7e7580c 100644
64+
--- a/node_modules/framer-motion/dist/m-entry.d.ts
65+
+++ b/node_modules/framer-motion/dist/m-entry.d.ts
66+
@@ -1,7 +1,8 @@
67+
/// <reference types="react" />
68+
import * as react from 'react';
69+
-import { SVGAttributes, CSSProperties, PropsWithoutRef, RefAttributes, JSX, HTMLElementType } from 'react';
70+
+import { SVGAttributes, CSSProperties, PropsWithoutRef, RefAttributes, JSX } from 'react';
71+
72+
+type HTMLElementType = keyof HTMLElements;
73+
type EasingFunction = (v: number) => number;
74+
type BezierDefinition = [number, number, number, number];
75+
type EasingDefinition = BezierDefinition | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate";
76+
@@ -2482,7 +2483,7 @@ type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents;
77+
78+
declare const createMinimalMotionComponent: <Props, TagName extends string = "div">(Component: string | TagName | react.ForwardRefExoticComponent<Props>, { forwardMotionProps }?: {
79+
forwardMotionProps: boolean;
80+
-}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | react.HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
81+
+}) => TagName extends "symbol" | "filter" | "stop" | "clipPath" | "mask" | "marker" | "animate" | "text" | "path" | "image" | "circle" | "switch" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "line" | "linearGradient" | "metadata" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "svg" | "textPath" | "tspan" | "use" | "view" | HTMLElementType ? DOMMotionComponents[TagName] : react.ForwardRefExoticComponent<MotionComponentProps<react.PropsWithChildren<Props>>>;
82+
83+
/**
84+
* HTML components

0 commit comments

Comments
 (0)