framer-motion 11.5.2 → 12.0.0-alpha.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.
- package/dist/cjs/client-entry.js +5 -5
- package/dist/cjs/dom-entry.js +4 -4
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/m-entry.js +1 -1
- package/dist/client-entry.d.ts +133 -21
- package/dist/dom.js +1 -1
- package/dist/es/animation/animators/MainThreadAnimation.mjs +2 -2
- package/dist/es/motion/utils/use-visual-element.mjs +1 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/utils/use-instant-transition.mjs +1 -1
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +6 -6
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +167 -55
- package/dist/m-entry.d.ts +133 -21
- package/dist/three-entry.d.ts +2 -2
- package/package.json +2 -2
package/dist/cjs/client-entry.js
CHANGED
|
@@ -2268,13 +2268,13 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2268
2268
|
* animation.stop is returned as a reference from a useEffect.
|
|
2269
2269
|
*/
|
|
2270
2270
|
this.stop = () => {
|
|
2271
|
+
const { onStop } = this.options;
|
|
2272
|
+
onStop && onStop();
|
|
2271
2273
|
this.resolver.cancel();
|
|
2272
2274
|
this.isStopped = true;
|
|
2273
2275
|
if (this.state === "idle")
|
|
2274
2276
|
return;
|
|
2275
2277
|
this.teardown();
|
|
2276
|
-
const { onStop } = this.options;
|
|
2277
|
-
onStop && onStop();
|
|
2278
2278
|
};
|
|
2279
2279
|
const { name, motionValue, element, keyframes } = this.options;
|
|
2280
2280
|
const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;
|
|
@@ -3227,7 +3227,7 @@ class MotionValue {
|
|
|
3227
3227
|
* This will be replaced by the build step with the latest version number.
|
|
3228
3228
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
3229
3229
|
*/
|
|
3230
|
-
this.version = "
|
|
3230
|
+
this.version = "12.0.0-alpha.1";
|
|
3231
3231
|
/**
|
|
3232
3232
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
3233
3233
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -5850,7 +5850,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5850
5850
|
* and warn against mismatches.
|
|
5851
5851
|
*/
|
|
5852
5852
|
if (process.env.NODE_ENV === "development") {
|
|
5853
|
-
warnOnce(nextValue.version === "
|
|
5853
|
+
warnOnce(nextValue.version === "12.0.0-alpha.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 12.0.0-alpha.1 may not work as expected.`);
|
|
5854
5854
|
}
|
|
5855
5855
|
}
|
|
5856
5856
|
else if (isMotionValue(prevValue)) {
|
|
@@ -8975,7 +8975,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
|
|
|
8975
8975
|
const lazyContext = react.useContext(LazyContext);
|
|
8976
8976
|
const presenceContext = react.useContext(PresenceContext);
|
|
8977
8977
|
const reducedMotionConfig = react.useContext(MotionConfigContext).reducedMotion;
|
|
8978
|
-
const visualElementRef = react.useRef();
|
|
8978
|
+
const visualElementRef = react.useRef(undefined);
|
|
8979
8979
|
/**
|
|
8980
8980
|
* If we haven't preloaded a renderer, check to see if we have one lazy-loaded
|
|
8981
8981
|
*/
|
package/dist/cjs/dom-entry.js
CHANGED
|
@@ -279,7 +279,7 @@ class MotionValue {
|
|
|
279
279
|
* This will be replaced by the build step with the latest version number.
|
|
280
280
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
281
281
|
*/
|
|
282
|
-
this.version = "
|
|
282
|
+
this.version = "12.0.0-alpha.1";
|
|
283
283
|
/**
|
|
284
284
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
285
285
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -2674,13 +2674,13 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2674
2674
|
* animation.stop is returned as a reference from a useEffect.
|
|
2675
2675
|
*/
|
|
2676
2676
|
this.stop = () => {
|
|
2677
|
+
const { onStop } = this.options;
|
|
2678
|
+
onStop && onStop();
|
|
2677
2679
|
this.resolver.cancel();
|
|
2678
2680
|
this.isStopped = true;
|
|
2679
2681
|
if (this.state === "idle")
|
|
2680
2682
|
return;
|
|
2681
2683
|
this.teardown();
|
|
2682
|
-
const { onStop } = this.options;
|
|
2683
|
-
onStop && onStop();
|
|
2684
2684
|
};
|
|
2685
2685
|
const { name, motionValue, element, keyframes } = this.options;
|
|
2686
2686
|
const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;
|
|
@@ -3790,7 +3790,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3790
3790
|
* and warn against mismatches.
|
|
3791
3791
|
*/
|
|
3792
3792
|
if (process.env.NODE_ENV === "development") {
|
|
3793
|
-
warnOnce(nextValue.version === "
|
|
3793
|
+
warnOnce(nextValue.version === "12.0.0-alpha.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 12.0.0-alpha.1 may not work as expected.`);
|
|
3794
3794
|
}
|
|
3795
3795
|
}
|
|
3796
3796
|
else if (isMotionValue(prevValue)) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -2338,13 +2338,13 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2338
2338
|
* animation.stop is returned as a reference from a useEffect.
|
|
2339
2339
|
*/
|
|
2340
2340
|
this.stop = () => {
|
|
2341
|
+
const { onStop } = this.options;
|
|
2342
|
+
onStop && onStop();
|
|
2341
2343
|
this.resolver.cancel();
|
|
2342
2344
|
this.isStopped = true;
|
|
2343
2345
|
if (this.state === "idle")
|
|
2344
2346
|
return;
|
|
2345
2347
|
this.teardown();
|
|
2346
|
-
const { onStop } = this.options;
|
|
2347
|
-
onStop && onStop();
|
|
2348
2348
|
};
|
|
2349
2349
|
const { name, motionValue, element, keyframes } = this.options;
|
|
2350
2350
|
const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;
|
|
@@ -3310,7 +3310,7 @@ class MotionValue {
|
|
|
3310
3310
|
* This will be replaced by the build step with the latest version number.
|
|
3311
3311
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
3312
3312
|
*/
|
|
3313
|
-
this.version = "
|
|
3313
|
+
this.version = "12.0.0-alpha.1";
|
|
3314
3314
|
/**
|
|
3315
3315
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
3316
3316
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -5965,7 +5965,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
5965
5965
|
* and warn against mismatches.
|
|
5966
5966
|
*/
|
|
5967
5967
|
if (process.env.NODE_ENV === "development") {
|
|
5968
|
-
warnOnce(nextValue.version === "
|
|
5968
|
+
warnOnce(nextValue.version === "12.0.0-alpha.1", `Attempting to mix Framer Motion versions ${nextValue.version} with 12.0.0-alpha.1 may not work as expected.`);
|
|
5969
5969
|
}
|
|
5970
5970
|
}
|
|
5971
5971
|
else if (isMotionValue(prevValue)) {
|
|
@@ -10117,7 +10117,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
|
|
|
10117
10117
|
const lazyContext = React.useContext(LazyContext);
|
|
10118
10118
|
const presenceContext = React.useContext(PresenceContext);
|
|
10119
10119
|
const reducedMotionConfig = React.useContext(MotionConfigContext).reducedMotion;
|
|
10120
|
-
const visualElementRef = React.useRef();
|
|
10120
|
+
const visualElementRef = React.useRef(undefined);
|
|
10121
10121
|
/**
|
|
10122
10122
|
* If we haven't preloaded a renderer, check to see if we have one lazy-loaded
|
|
10123
10123
|
*/
|
|
@@ -12483,7 +12483,7 @@ function startTransition(callback) {
|
|
|
12483
12483
|
function useInstantTransition() {
|
|
12484
12484
|
const [forceUpdate, forcedRenderCount] = useForceUpdate();
|
|
12485
12485
|
const startInstantLayoutTransition = useInstantLayoutTransition();
|
|
12486
|
-
const unlockOnFrameRef = React.useRef();
|
|
12486
|
+
const unlockOnFrameRef = React.useRef(undefined);
|
|
12487
12487
|
React.useEffect(() => {
|
|
12488
12488
|
/**
|
|
12489
12489
|
* Unblock after two animation frames, otherwise this will unblock too soon.
|
package/dist/cjs/m-entry.js
CHANGED
|
@@ -202,7 +202,7 @@ function useVisualElement(Component, visualState, props, createVisualElement, Pr
|
|
|
202
202
|
const lazyContext = react.useContext(LazyContext);
|
|
203
203
|
const presenceContext = react.useContext(PresenceContext);
|
|
204
204
|
const reducedMotionConfig = react.useContext(MotionConfigContext).reducedMotion;
|
|
205
|
-
const visualElementRef = react.useRef();
|
|
205
|
+
const visualElementRef = react.useRef(undefined);
|
|
206
206
|
/**
|
|
207
207
|
* If we haven't preloaded a renderer, check to see if we have one lazy-loaded
|
|
208
208
|
*/
|
package/dist/client-entry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as
|
|
3
|
-
import { SVGAttributes, CSSProperties, PropsWithoutRef, RefAttributes,
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { SVGAttributes, CSSProperties, PropsWithoutRef, RefAttributes, JSX, HTMLElementType } from 'react';
|
|
4
4
|
|
|
5
5
|
type EasingFunction = (v: number) => number;
|
|
6
6
|
type BezierDefinition = [number, number, number, number];
|
|
@@ -1386,7 +1386,7 @@ declare class DragControls {
|
|
|
1386
1386
|
*
|
|
1387
1387
|
* @public
|
|
1388
1388
|
*/
|
|
1389
|
-
start(event:
|
|
1389
|
+
start(event: react.PointerEvent | PointerEvent, options?: DragControlOptions): void;
|
|
1390
1390
|
}
|
|
1391
1391
|
|
|
1392
1392
|
type DragElastic = boolean | number | Partial<BoundingBox>;
|
|
@@ -1539,7 +1539,7 @@ interface DraggableProps extends DragHandlers {
|
|
|
1539
1539
|
* }
|
|
1540
1540
|
* ```
|
|
1541
1541
|
*/
|
|
1542
|
-
dragConstraints?: false | Partial<BoundingBox> | RefObject<Element>;
|
|
1542
|
+
dragConstraints?: false | Partial<BoundingBox> | RefObject<Element | null>;
|
|
1543
1543
|
/**
|
|
1544
1544
|
* The degree of movement allowed outside constraints. 0 = no movement, 1 =
|
|
1545
1545
|
* full movement.
|
|
@@ -1990,7 +1990,7 @@ interface HoverHandlers {
|
|
|
1990
1990
|
|
|
1991
1991
|
type ViewportEventHandler = (entry: IntersectionObserverEntry | null) => void;
|
|
1992
1992
|
interface ViewportOptions {
|
|
1993
|
-
root?: RefObject<Element>;
|
|
1993
|
+
root?: RefObject<Element | null>;
|
|
1994
1994
|
once?: boolean;
|
|
1995
1995
|
margin?: string;
|
|
1996
1996
|
amount?: "some" | "all" | number;
|
|
@@ -2250,39 +2250,151 @@ type MotionComponentProps<Props> = {
|
|
|
2250
2250
|
[K in Exclude<keyof Props, keyof MotionProps>]?: Props[K];
|
|
2251
2251
|
} & MotionProps;
|
|
2252
2252
|
|
|
2253
|
-
type UnionStringArray$1<T extends Readonly<string[]>> = T[number];
|
|
2254
|
-
declare const svgElements: readonly ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view", "clipPath", "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", "linearGradient", "radialGradient", "textPath"];
|
|
2255
|
-
type SVGElements = UnionStringArray$1<typeof svgElements>;
|
|
2256
|
-
|
|
2257
2253
|
type UnionStringArray<T extends Readonly<string[]>> = T[number];
|
|
2258
|
-
declare const
|
|
2259
|
-
type
|
|
2254
|
+
declare const svgElements: readonly ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view", "clipPath", "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", "linearGradient", "radialGradient", "textPath"];
|
|
2255
|
+
type SVGElements = UnionStringArray<typeof svgElements>;
|
|
2260
2256
|
|
|
2257
|
+
interface HTMLElements {
|
|
2258
|
+
a: HTMLAnchorElement;
|
|
2259
|
+
abbr: HTMLElement;
|
|
2260
|
+
address: HTMLElement;
|
|
2261
|
+
area: HTMLAreaElement;
|
|
2262
|
+
article: HTMLElement;
|
|
2263
|
+
aside: HTMLElement;
|
|
2264
|
+
audio: HTMLAudioElement;
|
|
2265
|
+
b: HTMLElement;
|
|
2266
|
+
base: HTMLBaseElement;
|
|
2267
|
+
bdi: HTMLElement;
|
|
2268
|
+
bdo: HTMLElement;
|
|
2269
|
+
big: HTMLElement;
|
|
2270
|
+
blockquote: HTMLQuoteElement;
|
|
2271
|
+
body: HTMLBodyElement;
|
|
2272
|
+
br: HTMLBRElement;
|
|
2273
|
+
button: HTMLButtonElement;
|
|
2274
|
+
canvas: HTMLCanvasElement;
|
|
2275
|
+
caption: HTMLElement;
|
|
2276
|
+
center: HTMLElement;
|
|
2277
|
+
cite: HTMLElement;
|
|
2278
|
+
code: HTMLElement;
|
|
2279
|
+
col: HTMLTableColElement;
|
|
2280
|
+
colgroup: HTMLTableColElement;
|
|
2281
|
+
data: HTMLDataElement;
|
|
2282
|
+
datalist: HTMLDataListElement;
|
|
2283
|
+
dd: HTMLElement;
|
|
2284
|
+
del: HTMLModElement;
|
|
2285
|
+
details: HTMLDetailsElement;
|
|
2286
|
+
dfn: HTMLElement;
|
|
2287
|
+
dialog: HTMLDialogElement;
|
|
2288
|
+
div: HTMLDivElement;
|
|
2289
|
+
dl: HTMLDListElement;
|
|
2290
|
+
dt: HTMLElement;
|
|
2291
|
+
em: HTMLElement;
|
|
2292
|
+
embed: HTMLEmbedElement;
|
|
2293
|
+
fieldset: HTMLFieldSetElement;
|
|
2294
|
+
figcaption: HTMLElement;
|
|
2295
|
+
figure: HTMLElement;
|
|
2296
|
+
footer: HTMLElement;
|
|
2297
|
+
form: HTMLFormElement;
|
|
2298
|
+
h1: HTMLHeadingElement;
|
|
2299
|
+
h2: HTMLHeadingElement;
|
|
2300
|
+
h3: HTMLHeadingElement;
|
|
2301
|
+
h4: HTMLHeadingElement;
|
|
2302
|
+
h5: HTMLHeadingElement;
|
|
2303
|
+
h6: HTMLHeadingElement;
|
|
2304
|
+
head: HTMLHeadElement;
|
|
2305
|
+
header: HTMLElement;
|
|
2306
|
+
hgroup: HTMLElement;
|
|
2307
|
+
hr: HTMLHRElement;
|
|
2308
|
+
html: HTMLHtmlElement;
|
|
2309
|
+
i: HTMLElement;
|
|
2310
|
+
iframe: HTMLIFrameElement;
|
|
2311
|
+
img: HTMLImageElement;
|
|
2312
|
+
input: HTMLInputElement;
|
|
2313
|
+
ins: HTMLModElement;
|
|
2314
|
+
kbd: HTMLElement;
|
|
2315
|
+
keygen: HTMLElement;
|
|
2316
|
+
label: HTMLLabelElement;
|
|
2317
|
+
legend: HTMLLegendElement;
|
|
2318
|
+
li: HTMLLIElement;
|
|
2319
|
+
link: HTMLLinkElement;
|
|
2320
|
+
main: HTMLElement;
|
|
2321
|
+
map: HTMLMapElement;
|
|
2322
|
+
mark: HTMLElement;
|
|
2323
|
+
menu: HTMLElement;
|
|
2324
|
+
menuitem: HTMLElement;
|
|
2325
|
+
meta: HTMLMetaElement;
|
|
2326
|
+
meter: HTMLMeterElement;
|
|
2327
|
+
nav: HTMLElement;
|
|
2328
|
+
noindex: HTMLElement;
|
|
2329
|
+
noscript: HTMLElement;
|
|
2330
|
+
object: HTMLObjectElement;
|
|
2331
|
+
ol: HTMLOListElement;
|
|
2332
|
+
optgroup: HTMLOptGroupElement;
|
|
2333
|
+
option: HTMLOptionElement;
|
|
2334
|
+
output: HTMLOutputElement;
|
|
2335
|
+
p: HTMLParagraphElement;
|
|
2336
|
+
param: HTMLParamElement;
|
|
2337
|
+
picture: HTMLElement;
|
|
2338
|
+
pre: HTMLPreElement;
|
|
2339
|
+
progress: HTMLProgressElement;
|
|
2340
|
+
q: HTMLQuoteElement;
|
|
2341
|
+
rp: HTMLElement;
|
|
2342
|
+
rt: HTMLElement;
|
|
2343
|
+
ruby: HTMLElement;
|
|
2344
|
+
s: HTMLElement;
|
|
2345
|
+
samp: HTMLElement;
|
|
2346
|
+
search: HTMLElement;
|
|
2347
|
+
slot: HTMLSlotElement;
|
|
2348
|
+
script: HTMLScriptElement;
|
|
2349
|
+
section: HTMLElement;
|
|
2350
|
+
select: HTMLSelectElement;
|
|
2351
|
+
small: HTMLElement;
|
|
2352
|
+
source: HTMLSourceElement;
|
|
2353
|
+
span: HTMLSpanElement;
|
|
2354
|
+
strong: HTMLElement;
|
|
2355
|
+
style: HTMLStyleElement;
|
|
2356
|
+
sub: HTMLElement;
|
|
2357
|
+
summary: HTMLElement;
|
|
2358
|
+
sup: HTMLElement;
|
|
2359
|
+
table: HTMLTableElement;
|
|
2360
|
+
template: HTMLTemplateElement;
|
|
2361
|
+
tbody: HTMLTableSectionElement;
|
|
2362
|
+
td: HTMLTableDataCellElement;
|
|
2363
|
+
textarea: HTMLTextAreaElement;
|
|
2364
|
+
tfoot: HTMLTableSectionElement;
|
|
2365
|
+
th: HTMLTableHeaderCellElement;
|
|
2366
|
+
thead: HTMLTableSectionElement;
|
|
2367
|
+
time: HTMLTimeElement;
|
|
2368
|
+
title: HTMLTitleElement;
|
|
2369
|
+
tr: HTMLTableRowElement;
|
|
2370
|
+
track: HTMLTrackElement;
|
|
2371
|
+
u: HTMLElement;
|
|
2372
|
+
ul: HTMLUListElement;
|
|
2373
|
+
var: HTMLElement;
|
|
2374
|
+
video: HTMLVideoElement;
|
|
2375
|
+
wbr: HTMLElement;
|
|
2376
|
+
webview: HTMLWebViewElement;
|
|
2377
|
+
}
|
|
2261
2378
|
/**
|
|
2262
2379
|
* @public
|
|
2263
2380
|
*/
|
|
2264
2381
|
type ForwardRefComponent<T, P> = {
|
|
2265
2382
|
readonly $$typeof: symbol;
|
|
2266
2383
|
} & ((props: PropsWithoutRef<P> & RefAttributes<T>) => JSX.Element);
|
|
2267
|
-
|
|
2268
|
-
* Support for React component props
|
|
2269
|
-
*/
|
|
2270
|
-
type UnwrapFactoryAttributes<F> = F extends DetailedHTMLFactory<infer P, any> ? P : never;
|
|
2271
|
-
type UnwrapFactoryElement<F> = F extends DetailedHTMLFactory<any, infer P> ? P : never;
|
|
2272
|
-
type HTMLAttributesWithoutMotionProps<Attributes extends HTMLAttributes<Element>, Element extends HTMLElement> = {
|
|
2384
|
+
type AttributesWithoutMotionProps<Attributes> = {
|
|
2273
2385
|
[K in Exclude<keyof Attributes, keyof MotionProps>]?: Attributes[K];
|
|
2274
2386
|
};
|
|
2275
2387
|
/**
|
|
2276
2388
|
* @public
|
|
2277
2389
|
*/
|
|
2278
|
-
type HTMLMotionProps<
|
|
2390
|
+
type HTMLMotionProps<Tag extends HTMLElementType> = AttributesWithoutMotionProps<JSX.IntrinsicElements[Tag]> & MotionProps;
|
|
2279
2391
|
/**
|
|
2280
2392
|
* Motion-optimised versions of React's HTML components.
|
|
2281
2393
|
*
|
|
2282
2394
|
* @public
|
|
2283
2395
|
*/
|
|
2284
2396
|
type HTMLMotionComponents = {
|
|
2285
|
-
[
|
|
2397
|
+
[Tag in HTMLElementType]: ForwardRefComponent<HTMLElements[Tag], HTMLMotionProps<Tag>>;
|
|
2286
2398
|
};
|
|
2287
2399
|
|
|
2288
2400
|
interface SVGAttributesWithoutMotionProps<T> extends Pick<SVGAttributes<T>, Exclude<keyof SVGAttributes<T>, keyof MotionProps>> {
|
|
@@ -2368,9 +2480,9 @@ declare global {
|
|
|
2368
2480
|
|
|
2369
2481
|
type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents;
|
|
2370
2482
|
|
|
2371
|
-
declare const createMotionComponent: <Props, TagName extends string = "div">(Component: string | TagName |
|
|
2483
|
+
declare const createMotionComponent: <Props, TagName extends string = "div">(Component: string | TagName | react.ForwardRefExoticComponent<Props>, { forwardMotionProps }?: {
|
|
2372
2484
|
forwardMotionProps: boolean;
|
|
2373
|
-
}) => TagName extends "symbol" | "
|
|
2485
|
+
}) => 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>>>;
|
|
2374
2486
|
|
|
2375
2487
|
/**
|
|
2376
2488
|
* HTML components
|