framer-motion 12.23.21 → 12.23.22
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/README.md +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/dom.d.ts +123 -1
- package/dist/es/components/AnimatePresence/PopChild.mjs +1 -1
- package/dist/es/index.mjs +1 -0
- package/dist/es/{components/AnimatePresence → utils}/use-composed-ref.mjs +3 -0
- package/dist/framer-motion.dev.js +4 -0
- package/dist/framer-motion.js +1 -1
- package/dist/types/index.d.ts +93 -82
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ Motion powers Framer animations, the web builder for creative pros. Design and s
|
|
|
122
122
|
|
|
123
123
|
### Gold
|
|
124
124
|
|
|
125
|
-
<a href="https://tailwindcss.com"><img alt="Tailwind" src="https://github.com/user-attachments/assets/1d5f2571-8bc3-4367-9fec-14d291168ff0" width="200px" height="120px"></a> <a href="https://emilkowal.ski"><img alt="Emil Kowalski" src="https://github.com/user-attachments/assets/33d1cb98-238a-4eed-a0df-9c7ab097d65b" width="200px" height="120px"></a> <a href="https://liveblocks.io"><img alt="Liveblocks" src="https://github.com/user-attachments/assets/28eddbe5-1617-4e74-969d-2eb6fcd481af" width="200px" height="120px"></a> <a href="https://vercel.com"><img alt="Vercel" src="https://github.com/user-attachments/assets/abc473bd-07ae-4a7d-9833-efe9dadb3773" width="200px" height="120px"></a> <a href="https://lu.ma"><img alt="Luma" src="https://github.com/user-attachments/assets/ac282433-6adb-4ad2-9fd2-5c6ee513c14b" width="200px" height="120px"></a>
|
|
125
|
+
<a href="https://tailwindcss.com"><img alt="Tailwind" src="https://github.com/user-attachments/assets/1d5f2571-8bc3-4367-9fec-14d291168ff0" width="200px" height="120px"></a> <a href="https://emilkowal.ski"><img alt="Emil Kowalski" src="https://github.com/user-attachments/assets/33d1cb98-238a-4eed-a0df-9c7ab097d65b" width="200px" height="120px"></a> <a href="https://liveblocks.io"><img alt="Liveblocks" src="https://github.com/user-attachments/assets/28eddbe5-1617-4e74-969d-2eb6fcd481af" width="200px" height="120px"></a> <a href="https://vercel.com"><img alt="Vercel" src="https://github.com/user-attachments/assets/abc473bd-07ae-4a7d-9833-efe9dadb3773" width="200px" height="120px"></a> <a href="https://lu.ma"><img alt="Luma" src="https://github.com/user-attachments/assets/ac282433-6adb-4ad2-9fd2-5c6ee513c14b" width="200px" height="120px"></a> <a href="https://notion.com"><img alt="Notion" src="https://github.com/user-attachments/assets/a27a6033-3cb0-4232-a6bb-625e1824517b" width="200px" height="120px"></a>
|
|
126
126
|
|
|
127
127
|
### Silver
|
|
128
128
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,6 +27,9 @@ function _interopNamespaceDefault(e) {
|
|
|
27
27
|
|
|
28
28
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx
|
|
32
|
+
*/
|
|
30
33
|
/**
|
|
31
34
|
* Set a given ref to a given value
|
|
32
35
|
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
@@ -2987,6 +2990,7 @@ exports.useAnimateMini = useAnimateMini;
|
|
|
2987
2990
|
exports.useAnimation = useAnimation;
|
|
2988
2991
|
exports.useAnimationControls = useAnimationControls;
|
|
2989
2992
|
exports.useAnimationFrame = useAnimationFrame;
|
|
2993
|
+
exports.useComposedRefs = useComposedRefs;
|
|
2990
2994
|
exports.useCycle = useCycle;
|
|
2991
2995
|
exports.useDeprecatedAnimatedState = useAnimatedState;
|
|
2992
2996
|
exports.useDeprecatedInvertedScale = useInvertedScale;
|
package/dist/dom.d.ts
CHANGED
|
@@ -142,10 +142,132 @@ interface InViewOptions {
|
|
|
142
142
|
}
|
|
143
143
|
declare function inView(elementOrSelector: ElementOrSelector, onStart: (element: Element, entry: IntersectionObserverEntry) => void | ViewChangeHandler, { root, margin: rootMargin, amount }?: InViewOptions): VoidFunction;
|
|
144
144
|
|
|
145
|
+
interface HTMLElements {
|
|
146
|
+
a: HTMLAnchorElement;
|
|
147
|
+
abbr: HTMLElement;
|
|
148
|
+
address: HTMLElement;
|
|
149
|
+
area: HTMLAreaElement;
|
|
150
|
+
article: HTMLElement;
|
|
151
|
+
aside: HTMLElement;
|
|
152
|
+
audio: HTMLAudioElement;
|
|
153
|
+
b: HTMLElement;
|
|
154
|
+
base: HTMLBaseElement;
|
|
155
|
+
bdi: HTMLElement;
|
|
156
|
+
bdo: HTMLElement;
|
|
157
|
+
big: HTMLElement;
|
|
158
|
+
blockquote: HTMLQuoteElement;
|
|
159
|
+
body: HTMLBodyElement;
|
|
160
|
+
br: HTMLBRElement;
|
|
161
|
+
button: HTMLButtonElement;
|
|
162
|
+
canvas: HTMLCanvasElement;
|
|
163
|
+
caption: HTMLElement;
|
|
164
|
+
center: HTMLElement;
|
|
165
|
+
cite: HTMLElement;
|
|
166
|
+
code: HTMLElement;
|
|
167
|
+
col: HTMLTableColElement;
|
|
168
|
+
colgroup: HTMLTableColElement;
|
|
169
|
+
data: HTMLDataElement;
|
|
170
|
+
datalist: HTMLDataListElement;
|
|
171
|
+
dd: HTMLElement;
|
|
172
|
+
del: HTMLModElement;
|
|
173
|
+
details: HTMLDetailsElement;
|
|
174
|
+
dfn: HTMLElement;
|
|
175
|
+
dialog: HTMLDialogElement;
|
|
176
|
+
div: HTMLDivElement;
|
|
177
|
+
dl: HTMLDListElement;
|
|
178
|
+
dt: HTMLElement;
|
|
179
|
+
em: HTMLElement;
|
|
180
|
+
embed: HTMLEmbedElement;
|
|
181
|
+
fieldset: HTMLFieldSetElement;
|
|
182
|
+
figcaption: HTMLElement;
|
|
183
|
+
figure: HTMLElement;
|
|
184
|
+
footer: HTMLElement;
|
|
185
|
+
form: HTMLFormElement;
|
|
186
|
+
h1: HTMLHeadingElement;
|
|
187
|
+
h2: HTMLHeadingElement;
|
|
188
|
+
h3: HTMLHeadingElement;
|
|
189
|
+
h4: HTMLHeadingElement;
|
|
190
|
+
h5: HTMLHeadingElement;
|
|
191
|
+
h6: HTMLHeadingElement;
|
|
192
|
+
head: HTMLHeadElement;
|
|
193
|
+
header: HTMLElement;
|
|
194
|
+
hgroup: HTMLElement;
|
|
195
|
+
hr: HTMLHRElement;
|
|
196
|
+
html: HTMLHtmlElement;
|
|
197
|
+
i: HTMLElement;
|
|
198
|
+
iframe: HTMLIFrameElement;
|
|
199
|
+
img: HTMLImageElement;
|
|
200
|
+
input: HTMLInputElement;
|
|
201
|
+
ins: HTMLModElement;
|
|
202
|
+
kbd: HTMLElement;
|
|
203
|
+
keygen: HTMLElement;
|
|
204
|
+
label: HTMLLabelElement;
|
|
205
|
+
legend: HTMLLegendElement;
|
|
206
|
+
li: HTMLLIElement;
|
|
207
|
+
link: HTMLLinkElement;
|
|
208
|
+
main: HTMLElement;
|
|
209
|
+
map: HTMLMapElement;
|
|
210
|
+
mark: HTMLElement;
|
|
211
|
+
menu: HTMLElement;
|
|
212
|
+
menuitem: HTMLElement;
|
|
213
|
+
meta: HTMLMetaElement;
|
|
214
|
+
meter: HTMLMeterElement;
|
|
215
|
+
nav: HTMLElement;
|
|
216
|
+
noindex: HTMLElement;
|
|
217
|
+
noscript: HTMLElement;
|
|
218
|
+
object: HTMLObjectElement;
|
|
219
|
+
ol: HTMLOListElement;
|
|
220
|
+
optgroup: HTMLOptGroupElement;
|
|
221
|
+
option: HTMLOptionElement;
|
|
222
|
+
output: HTMLOutputElement;
|
|
223
|
+
p: HTMLParagraphElement;
|
|
224
|
+
param: HTMLParamElement;
|
|
225
|
+
picture: HTMLElement;
|
|
226
|
+
pre: HTMLPreElement;
|
|
227
|
+
progress: HTMLProgressElement;
|
|
228
|
+
q: HTMLQuoteElement;
|
|
229
|
+
rp: HTMLElement;
|
|
230
|
+
rt: HTMLElement;
|
|
231
|
+
ruby: HTMLElement;
|
|
232
|
+
s: HTMLElement;
|
|
233
|
+
samp: HTMLElement;
|
|
234
|
+
search: HTMLElement;
|
|
235
|
+
slot: HTMLSlotElement;
|
|
236
|
+
script: HTMLScriptElement;
|
|
237
|
+
section: HTMLElement;
|
|
238
|
+
select: HTMLSelectElement;
|
|
239
|
+
small: HTMLElement;
|
|
240
|
+
source: HTMLSourceElement;
|
|
241
|
+
span: HTMLSpanElement;
|
|
242
|
+
strong: HTMLElement;
|
|
243
|
+
style: HTMLStyleElement;
|
|
244
|
+
sub: HTMLElement;
|
|
245
|
+
summary: HTMLElement;
|
|
246
|
+
sup: HTMLElement;
|
|
247
|
+
table: HTMLTableElement;
|
|
248
|
+
template: HTMLTemplateElement;
|
|
249
|
+
tbody: HTMLTableSectionElement;
|
|
250
|
+
td: HTMLTableDataCellElement;
|
|
251
|
+
textarea: HTMLTextAreaElement;
|
|
252
|
+
tfoot: HTMLTableSectionElement;
|
|
253
|
+
th: HTMLTableHeaderCellElement;
|
|
254
|
+
thead: HTMLTableSectionElement;
|
|
255
|
+
time: HTMLTimeElement;
|
|
256
|
+
title: HTMLTitleElement;
|
|
257
|
+
tr: HTMLTableRowElement;
|
|
258
|
+
track: HTMLTrackElement;
|
|
259
|
+
u: HTMLElement;
|
|
260
|
+
ul: HTMLUListElement;
|
|
261
|
+
var: HTMLElement;
|
|
262
|
+
video: HTMLVideoElement;
|
|
263
|
+
wbr: HTMLElement;
|
|
264
|
+
webview: HTMLWebViewElement;
|
|
265
|
+
}
|
|
266
|
+
|
|
145
267
|
type DelayedFunction = (overshoot: number) => void;
|
|
146
268
|
declare function delayInSeconds(callback: DelayedFunction, timeout: number): () => void;
|
|
147
269
|
|
|
148
270
|
declare const distance: (a: number, b: number) => number;
|
|
149
271
|
declare function distance2D(a: Point, b: Point): number;
|
|
150
272
|
|
|
151
|
-
export { type AbsoluteKeyframe, type AnimationSequence, type At, type DOMSegment, type DOMSegmentWithTransition, type DelayedFunction, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, type Segment, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceTime, type ValueSequence, animate, animateMini, createScopedAnimate, delayInSeconds as delay, distance, distance2D, inView, scroll, scrollInfo };
|
|
273
|
+
export { type AbsoluteKeyframe, type AnimationSequence, type At, type DOMSegment, type DOMSegmentWithTransition, type DelayedFunction, type HTMLElements, type MotionValueSegment, type MotionValueSegmentWithTransition, type ObjectSegment, type ObjectSegmentWithTransition, type ObjectTarget, type ResolvedAnimationDefinition, type ResolvedAnimationDefinitions, type Segment, type SequenceLabel, type SequenceLabelWithTime, type SequenceMap, type SequenceOptions, type SequenceTime, type ValueSequence, animate, animateMini, createScopedAnimate, delayInSeconds as delay, distance, distance2D, inView, scroll, scrollInfo };
|
|
@@ -4,7 +4,7 @@ import { isHTMLElement } from 'motion-dom';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useId, useRef, useContext, useInsertionEffect } from 'react';
|
|
6
6
|
import { MotionConfigContext } from '../../context/MotionConfigContext.mjs';
|
|
7
|
-
import { useComposedRefs } from '
|
|
7
|
+
import { useComposedRefs } from '../../utils/use-composed-ref.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Measurement functionality has to be within a separate component
|
package/dist/es/index.mjs
CHANGED
|
@@ -12,6 +12,7 @@ export { calcLength } from './projection/geometry/delta-calc.mjs';
|
|
|
12
12
|
export { createBox } from './projection/geometry/models.mjs';
|
|
13
13
|
export { filterProps } from './render/dom/utils/filter-props.mjs';
|
|
14
14
|
export { isBrowser } from './utils/is-browser.mjs';
|
|
15
|
+
export { useComposedRefs } from './utils/use-composed-ref.mjs';
|
|
15
16
|
export { useForceUpdate } from './utils/use-force-update.mjs';
|
|
16
17
|
export { useIsomorphicLayoutEffect } from './utils/use-isomorphic-effect.mjs';
|
|
17
18
|
export { useUnmountEffect } from './utils/use-unmount-effect.mjs';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx
|
|
5
|
+
*/
|
|
3
6
|
/**
|
|
4
7
|
* Set a given ref to a given value
|
|
5
8
|
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
@@ -5057,6 +5057,9 @@
|
|
|
5057
5057
|
reducedMotion: "never",
|
|
5058
5058
|
});
|
|
5059
5059
|
|
|
5060
|
+
/**
|
|
5061
|
+
* Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx
|
|
5062
|
+
*/
|
|
5060
5063
|
/**
|
|
5061
5064
|
* Set a given ref to a given value
|
|
5062
5065
|
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
@@ -14363,6 +14366,7 @@
|
|
|
14363
14366
|
exports.useAnimation = useAnimation;
|
|
14364
14367
|
exports.useAnimationControls = useAnimationControls;
|
|
14365
14368
|
exports.useAnimationFrame = useAnimationFrame;
|
|
14369
|
+
exports.useComposedRefs = useComposedRefs;
|
|
14366
14370
|
exports.useCycle = useCycle;
|
|
14367
14371
|
exports.useDeprecatedAnimatedState = useAnimatedState;
|
|
14368
14372
|
exports.useDeprecatedInvertedScale = useInvertedScale;
|