m.d.ts 81 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364
  1. /// <reference types="react" />
  2. import { Easing, TransformProperties, SVGPathProperties, VariableKeyframesDefinition, MotionValue, Transition as Transition$1, ProgressTimeline, Batcher } from 'motion-dom';
  3. import * as React$1 from 'react';
  4. import { SVGAttributes, CSSProperties, PropsWithoutRef, RefAttributes, JSX } from 'react';
  5. interface Point {
  6. x: number;
  7. y: number;
  8. }
  9. interface Axis {
  10. min: number;
  11. max: number;
  12. }
  13. interface Box {
  14. x: Axis;
  15. y: Axis;
  16. }
  17. interface BoundingBox {
  18. top: number;
  19. right: number;
  20. bottom: number;
  21. left: number;
  22. }
  23. /**
  24. * Options for orchestrating the timing of animations.
  25. *
  26. * @public
  27. */
  28. interface Orchestration {
  29. /**
  30. * Delay the animation by this duration (in seconds). Defaults to `0`.
  31. *
  32. * @remarks
  33. * ```javascript
  34. * const transition = {
  35. * delay: 0.2
  36. * }
  37. * ```
  38. *
  39. * @public
  40. */
  41. delay?: number;
  42. /**
  43. * Describes the relationship between the transition and its children. Set
  44. * to `false` by default.
  45. *
  46. * @remarks
  47. * When using variants, the transition can be scheduled in relation to its
  48. * children with either `"beforeChildren"` to finish this transition before
  49. * starting children transitions, `"afterChildren"` to finish children
  50. * transitions before starting this transition.
  51. *
  52. * ```jsx
  53. * const list = {
  54. * hidden: {
  55. * opacity: 0,
  56. * transition: { when: "afterChildren" }
  57. * }
  58. * }
  59. *
  60. * const item = {
  61. * hidden: {
  62. * opacity: 0,
  63. * transition: { duration: 2 }
  64. * }
  65. * }
  66. *
  67. * return (
  68. * <motion.ul variants={list} animate="hidden">
  69. * <motion.li variants={item} />
  70. * <motion.li variants={item} />
  71. * </motion.ul>
  72. * )
  73. * ```
  74. *
  75. * @public
  76. */
  77. when?: false | "beforeChildren" | "afterChildren" | string;
  78. /**
  79. * When using variants, children animations will start after this duration
  80. * (in seconds). You can add the `transition` property to both the `Frame` and the `variant` directly. Adding it to the `variant` generally offers more flexibility, as it allows you to customize the delay per visual state.
  81. *
  82. * ```jsx
  83. * const container = {
  84. * hidden: { opacity: 0 },
  85. * show: {
  86. * opacity: 1,
  87. * transition: {
  88. * delayChildren: 0.5
  89. * }
  90. * }
  91. * }
  92. *
  93. * const item = {
  94. * hidden: { opacity: 0 },
  95. * show: { opacity: 1 }
  96. * }
  97. *
  98. * return (
  99. * <motion.ul
  100. * variants={container}
  101. * initial="hidden"
  102. * animate="show"
  103. * >
  104. * <motion.li variants={item} />
  105. * <motion.li variants={item} />
  106. * </motion.ul>
  107. * )
  108. * ```
  109. *
  110. * @public
  111. */
  112. delayChildren?: number;
  113. /**
  114. * When using variants, animations of child components can be staggered by this
  115. * duration (in seconds).
  116. *
  117. * For instance, if `staggerChildren` is `0.01`, the first child will be
  118. * delayed by `0` seconds, the second by `0.01`, the third by `0.02` and so
  119. * on.
  120. *
  121. * The calculated stagger delay will be added to `delayChildren`.
  122. *
  123. * ```jsx
  124. * const container = {
  125. * hidden: { opacity: 0 },
  126. * show: {
  127. * opacity: 1,
  128. * transition: {
  129. * staggerChildren: 0.5
  130. * }
  131. * }
  132. * }
  133. *
  134. * const item = {
  135. * hidden: { opacity: 0 },
  136. * show: { opacity: 1 }
  137. * }
  138. *
  139. * return (
  140. * <motion.ol
  141. * variants={container}
  142. * initial="hidden"
  143. * animate="show"
  144. * >
  145. * <motion.li variants={item} />
  146. * <motion.li variants={item} />
  147. * </motion.ol>
  148. * )
  149. * ```
  150. *
  151. * @public
  152. */
  153. staggerChildren?: number;
  154. /**
  155. * The direction in which to stagger children.
  156. *
  157. * A value of `1` staggers from the first to the last while `-1`
  158. * staggers from the last to the first.
  159. *
  160. * ```jsx
  161. * const container = {
  162. * hidden: { opacity: 0 },
  163. * show: {
  164. * opacity: 1,
  165. * transition: {
  166. * staggerChildren: 0.5,
  167. * staggerDirection: -1
  168. * }
  169. * }
  170. * }
  171. *
  172. * const item = {
  173. * hidden: { opacity: 0 },
  174. * show: { opacity: 1 }
  175. * }
  176. *
  177. * return (
  178. * <motion.ul
  179. * variants={container}
  180. * initial="hidden"
  181. * animate="show"
  182. * >
  183. * <motion.li variants={item} size={50} />
  184. * <motion.li variants={item} size={50} />
  185. * </motion.ul>
  186. * )
  187. * ```
  188. *
  189. * @public
  190. */
  191. staggerDirection?: number;
  192. }
  193. interface Repeat {
  194. /**
  195. * The number of times to repeat the transition. Set to `Infinity` for perpetual repeating.
  196. *
  197. * Without setting `repeatType`, this will loop the animation.
  198. *
  199. * ```jsx
  200. * <motion.div
  201. * animate={{ rotate: 180 }}
  202. * transition={{ repeat: Infinity, duration: 2 }}
  203. * />
  204. * ```
  205. *
  206. * @public
  207. */
  208. repeat?: number;
  209. /**
  210. * How to repeat the animation. This can be either:
  211. *
  212. * "loop": Repeats the animation from the start
  213. *
  214. * "reverse": Alternates between forward and backwards playback
  215. *
  216. * "mirror": Switches `from` and `to` alternately
  217. *
  218. * ```jsx
  219. * <motion.div
  220. * animate={{ rotate: 180 }}
  221. * transition={{
  222. * repeat: 1,
  223. * repeatType: "reverse",
  224. * duration: 2
  225. * }}
  226. * />
  227. * ```
  228. *
  229. * @public
  230. */
  231. repeatType?: "loop" | "reverse" | "mirror";
  232. /**
  233. * When repeating an animation, `repeatDelay` will set the
  234. * duration of the time to wait, in seconds, between each repetition.
  235. *
  236. * ```jsx
  237. * <motion.div
  238. * animate={{ rotate: 180 }}
  239. * transition={{ repeat: Infinity, repeatDelay: 1 }}
  240. * />
  241. * ```
  242. *
  243. * @public
  244. */
  245. repeatDelay?: number;
  246. }
  247. /**
  248. * An animation that animates between two or more values over a specific duration of time.
  249. * This is the default animation for non-physical values like `color` and `opacity`.
  250. *
  251. * @public
  252. */
  253. interface Tween extends Repeat {
  254. /**
  255. * Set `type` to `"tween"` to use a duration-based tween animation.
  256. * If any non-orchestration `transition` values are set without a `type` property,
  257. * this is used as the default animation.
  258. *
  259. * ```jsx
  260. * <motion.path
  261. * animate={{ pathLength: 1 }}
  262. * transition={{ duration: 2, type: "tween" }}
  263. * />
  264. * ```
  265. *
  266. * @public
  267. */
  268. type?: "tween";
  269. /**
  270. * The duration of the tween animation. Set to `0.3` by default, 0r `0.8` if animating a series of keyframes.
  271. *
  272. * ```jsx
  273. * const variants = {
  274. * visible: {
  275. * opacity: 1,
  276. * transition: { duration: 2 }
  277. * }
  278. * }
  279. * ```
  280. *
  281. * @public
  282. */
  283. duration?: number;
  284. /**
  285. * The easing function to use. Set as one of the below.
  286. *
  287. * - The name of an existing easing function.
  288. *
  289. * - An array of four numbers to define a cubic bezier curve.
  290. *
  291. * - An easing function, that accepts and returns a value `0-1`.
  292. *
  293. * If the animating value is set as an array of multiple values for a keyframes
  294. * animation, `ease` can be set as an array of easing functions to set different easings between
  295. * each of those values.
  296. *
  297. *
  298. * ```jsx
  299. * <motion.div
  300. * animate={{ opacity: 0 }}
  301. * transition={{ ease: [0.17, 0.67, 0.83, 0.67] }}
  302. * />
  303. * ```
  304. *
  305. * @public
  306. */
  307. ease?: Easing | Easing[];
  308. /**
  309. * When animating keyframes, `times` can be used to determine where in the animation each keyframe is reached.
  310. * Each value in `times` is a value between `0` and `1`, representing `duration`.
  311. *
  312. * There must be the same number of `times` as there are keyframes.
  313. * Defaults to an array of evenly-spread durations.
  314. *
  315. * ```jsx
  316. * <motion.div
  317. * animate={{ scale: [0, 1, 0.5, 1] }}
  318. * transition={{ times: [0, 0.1, 0.9, 1] }}
  319. * />
  320. * ```
  321. *
  322. * @public
  323. */
  324. times?: number[];
  325. /**
  326. * When animating keyframes, `easings` can be used to define easing functions between each keyframe. This array should be one item fewer than the number of keyframes, as these easings apply to the transitions between the keyframes.
  327. *
  328. * ```jsx
  329. * <motion.div
  330. * animate={{ backgroundColor: ["#0f0", "#00f", "#f00"] }}
  331. * transition={{ easings: ["easeIn", "easeOut"] }}
  332. * />
  333. * ```
  334. *
  335. * @public
  336. */
  337. easings?: Easing[];
  338. /**
  339. * The value to animate from.
  340. * By default, this is the current state of the animating value.
  341. *
  342. * ```jsx
  343. * <motion.div
  344. * animate={{ rotate: 180 }}
  345. * transition={{ from: 90, duration: 2 }}
  346. * />
  347. * ```
  348. *
  349. * @public
  350. */
  351. from?: number | string;
  352. }
  353. /**
  354. * An animation that simulates spring physics for realistic motion.
  355. * This is the default animation for physical values like `x`, `y`, `scale` and `rotate`.
  356. *
  357. * @public
  358. */
  359. interface Spring extends Repeat {
  360. /**
  361. * Set `type` to `"spring"` to animate using spring physics for natural
  362. * movement. Type is set to `"spring"` by default.
  363. *
  364. * ```jsx
  365. * <motion.div
  366. * animate={{ rotate: 180 }}
  367. * transition={{ type: 'spring' }}
  368. * />
  369. * ```
  370. *
  371. * @public
  372. */
  373. type: "spring";
  374. /**
  375. * Stiffness of the spring. Higher values will create more sudden movement.
  376. * Set to `100` by default.
  377. *
  378. * ```jsx
  379. * <motion.section
  380. * animate={{ rotate: 180 }}
  381. * transition={{ type: 'spring', stiffness: 50 }}
  382. * />
  383. * ```
  384. *
  385. * @public
  386. */
  387. stiffness?: number;
  388. /**
  389. * Strength of opposing force. If set to 0, spring will oscillate
  390. * indefinitely. Set to `10` by default.
  391. *
  392. * ```jsx
  393. * <motion.a
  394. * animate={{ rotate: 180 }}
  395. * transition={{ type: 'spring', damping: 300 }}
  396. * />
  397. * ```
  398. *
  399. * @public
  400. */
  401. damping?: number;
  402. /**
  403. * Mass of the moving object. Higher values will result in more lethargic
  404. * movement. Set to `1` by default.
  405. *
  406. * ```jsx
  407. * <motion.feTurbulence
  408. * animate={{ baseFrequency: 0.5 } as any}
  409. * transition={{ type: "spring", mass: 0.5 }}
  410. * />
  411. * ```
  412. *
  413. * @public
  414. */
  415. mass?: number;
  416. /**
  417. * The duration of the animation, defined in seconds. Spring animations can be a maximum of 10 seconds.
  418. *
  419. * If `bounce` is set, this defaults to `0.8`.
  420. *
  421. * Note: `duration` and `bounce` will be overridden if `stiffness`, `damping` or `mass` are set.
  422. *
  423. * ```jsx
  424. * <motion.div
  425. * animate={{ x: 100 }}
  426. * transition={{ type: "spring", duration: 0.8 }}
  427. * />
  428. * ```
  429. *
  430. * @public
  431. */
  432. duration?: number;
  433. /**
  434. * If visualDuration is set, this will override duration.
  435. *
  436. * The visual duration is a time, set in seconds, that the animation will take to visually appear to reach its target.
  437. *
  438. * In other words, the bulk of the transition will occur before this time, and the "bouncy bit" will mostly happen after.
  439. *
  440. * This makes it easier to edit a spring, as well as visually coordinate it with other time-based animations.
  441. *
  442. * ```jsx
  443. * <motion.div
  444. * animate={{ x: 100 }}
  445. * transition={{ type: "spring", visualDuration: 0.5 }}
  446. * />
  447. * ```
  448. *
  449. * @public
  450. */
  451. visualDuration?: number;
  452. /**
  453. * `bounce` determines the "bounciness" of a spring animation.
  454. *
  455. * `0` is no bounce, and `1` is extremely bouncy.
  456. *
  457. * If `duration` is set, this defaults to `0.25`.
  458. *
  459. * Note: `bounce` and `duration` will be overridden if `stiffness`, `damping` or `mass` are set.
  460. *
  461. * ```jsx
  462. * <motion.div
  463. * animate={{ x: 100 }}
  464. * transition={{ type: "spring", bounce: 0.25 }}
  465. * />
  466. * ```
  467. *
  468. * @public
  469. */
  470. bounce?: number;
  471. /**
  472. * End animation if absolute speed (in units per second) drops below this
  473. * value and delta is smaller than `restDelta`. Set to `0.01` by default.
  474. *
  475. * ```jsx
  476. * <motion.div
  477. * animate={{ rotate: 180 }}
  478. * transition={{ type: 'spring', restSpeed: 0.5 }}
  479. * />
  480. * ```
  481. *
  482. * @public
  483. */
  484. restSpeed?: number;
  485. /**
  486. * End animation if distance is below this value and speed is below
  487. * `restSpeed`. When animation ends, spring gets “snapped” to. Set to
  488. * `0.01` by default.
  489. *
  490. * ```jsx
  491. * <motion.div
  492. * animate={{ rotate: 180 }}
  493. * transition={{ type: 'spring', restDelta: 0.5 }}
  494. * />
  495. * ```
  496. *
  497. * @public
  498. */
  499. restDelta?: number;
  500. /**
  501. * The value to animate from.
  502. * By default, this is the initial state of the animating value.
  503. *
  504. * ```jsx
  505. * <motion.div
  506. * animate={{ rotate: 180 }}
  507. * transition={{ type: 'spring', from: 90 }}
  508. * />
  509. * ```
  510. *
  511. * @public
  512. */
  513. from?: number | string;
  514. /**
  515. * The initial velocity of the spring. By default this is the current velocity of the component.
  516. *
  517. * ```jsx
  518. * <motion.div
  519. * animate={{ rotate: 180 }}
  520. * transition={{ type: 'spring', velocity: 2 }}
  521. * />
  522. * ```
  523. *
  524. * @public
  525. */
  526. velocity?: number;
  527. }
  528. /**
  529. * An animation that decelerates a value based on its initial velocity,
  530. * usually used to implement inertial scrolling.
  531. *
  532. * Optionally, `min` and `max` boundaries can be defined, and inertia
  533. * will snap to these with a spring animation.
  534. *
  535. * This animation will automatically precalculate a target value,
  536. * which can be modified with the `modifyTarget` property.
  537. *
  538. * This allows you to add snap-to-grid or similar functionality.
  539. *
  540. * Inertia is also the animation used for `dragTransition`, and can be configured via that prop.
  541. *
  542. * @public
  543. */
  544. interface Inertia {
  545. /**
  546. * Set `type` to animate using the inertia animation. Set to `"tween"` by
  547. * default. This can be used for natural deceleration, like momentum scrolling.
  548. *
  549. * ```jsx
  550. * <motion.div
  551. * animate={{ rotate: 180 }}
  552. * transition={{ type: "inertia", velocity: 50 }}
  553. * />
  554. * ```
  555. *
  556. * @public
  557. */
  558. type: "inertia";
  559. /**
  560. * A function that receives the automatically-calculated target and returns a new one. Useful for snapping the target to a grid.
  561. *
  562. * ```jsx
  563. * <motion.div
  564. * drag
  565. * dragTransition={{
  566. * power: 0,
  567. * // Snap calculated target to nearest 50 pixels
  568. * modifyTarget: target => Math.round(target / 50) * 50
  569. * }}
  570. * />
  571. * ```
  572. *
  573. * @public
  574. */
  575. modifyTarget?(v: number): number;
  576. /**
  577. * If `min` or `max` is set, this affects the stiffness of the bounce
  578. * spring. Higher values will create more sudden movement. Set to `500` by
  579. * default.
  580. *
  581. * ```jsx
  582. * <motion.div
  583. * drag
  584. * dragTransition={{
  585. * min: 0,
  586. * max: 100,
  587. * bounceStiffness: 100
  588. * }}
  589. * />
  590. * ```
  591. *
  592. * @public
  593. */
  594. bounceStiffness?: number;
  595. /**
  596. * If `min` or `max` is set, this affects the damping of the bounce spring.
  597. * If set to `0`, spring will oscillate indefinitely. Set to `10` by
  598. * default.
  599. *
  600. * ```jsx
  601. * <motion.div
  602. * drag
  603. * dragTransition={{
  604. * min: 0,
  605. * max: 100,
  606. * bounceDamping: 8
  607. * }}
  608. * />
  609. * ```
  610. *
  611. * @public
  612. */
  613. bounceDamping?: number;
  614. /**
  615. * A higher power value equals a further target. Set to `0.8` by default.
  616. *
  617. * ```jsx
  618. * <motion.div
  619. * drag
  620. * dragTransition={{ power: 0.2 }}
  621. * />
  622. * ```
  623. *
  624. * @public
  625. */
  626. power?: number;
  627. /**
  628. * Adjusting the time constant will change the duration of the
  629. * deceleration, thereby affecting its feel. Set to `700` by default.
  630. *
  631. * ```jsx
  632. * <motion.div
  633. * drag
  634. * dragTransition={{ timeConstant: 200 }}
  635. * />
  636. * ```
  637. *
  638. * @public
  639. */
  640. timeConstant?: number;
  641. /**
  642. * End the animation if the distance to the animation target is below this value, and the absolute speed is below `restSpeed`.
  643. * When the animation ends, the value gets snapped to the animation target. Set to `0.01` by default.
  644. * Generally the default values provide smooth animation endings, only in rare cases should you need to customize these.
  645. *
  646. * ```jsx
  647. * <motion.div
  648. * drag
  649. * dragTransition={{ restDelta: 10 }}
  650. * />
  651. * ```
  652. *
  653. * @public
  654. */
  655. restDelta?: number;
  656. /**
  657. * Minimum constraint. If set, the value will "bump" against this value (or immediately spring to it if the animation starts as less than this value).
  658. *
  659. * ```jsx
  660. * <motion.div
  661. * drag
  662. * dragTransition={{ min: 0, max: 100 }}
  663. * />
  664. * ```
  665. *
  666. * @public
  667. */
  668. min?: number;
  669. /**
  670. * Maximum constraint. If set, the value will "bump" against this value (or immediately snap to it, if the initial animation value exceeds this value).
  671. *
  672. * ```jsx
  673. * <motion.div
  674. * drag
  675. * dragTransition={{ min: 0, max: 100 }}
  676. * />
  677. * ```
  678. *
  679. * @public
  680. */
  681. max?: number;
  682. /**
  683. * The value to animate from. By default, this is the current state of the animating value.
  684. *
  685. * ```jsx
  686. * <Frame
  687. * drag
  688. * dragTransition={{ from: 50 }}
  689. * />
  690. * ```
  691. *
  692. * @public
  693. */
  694. from?: number | string;
  695. /**
  696. * The initial velocity of the animation.
  697. * By default this is the current velocity of the component.
  698. *
  699. * ```jsx
  700. * <motion.div
  701. * animate={{ rotate: 180 }}
  702. * transition={{ type: 'inertia', velocity: 200 }}
  703. * />
  704. * ```
  705. *
  706. * @public
  707. */
  708. velocity?: number;
  709. }
  710. /**
  711. * Keyframes tweens between multiple `values`.
  712. *
  713. * These tweens can be arranged using the `duration`, `easings`, and `times` properties.
  714. */
  715. interface Keyframes {
  716. /**
  717. * Set `type` to `"keyframes"` to animate using the keyframes animation.
  718. * Set to `"tween"` by default. This can be used to animate between a series of values.
  719. *
  720. * @public
  721. */
  722. type: "keyframes";
  723. /**
  724. * An array of numbers between 0 and 1, where `1` represents the `total` duration.
  725. *
  726. * Each value represents at which point during the animation each item in the animation target should be hit, so the array should be the same length as `values`.
  727. *
  728. * Defaults to an array of evenly-spread durations.
  729. *
  730. * @public
  731. */
  732. times?: number[];
  733. /**
  734. * An array of easing functions for each generated tween, or a single easing function applied to all tweens.
  735. *
  736. * This array should be one item less than `values`, as these easings apply to the transitions *between* the `values`.
  737. *
  738. * ```jsx
  739. * const transition = {
  740. * backgroundColor: {
  741. * type: 'keyframes',
  742. * easings: ['circIn', 'circOut']
  743. * }
  744. * }
  745. * ```
  746. *
  747. * @public
  748. */
  749. ease?: Easing | Easing[];
  750. /**
  751. * The total duration of the animation. Set to `0.3` by default.
  752. *
  753. * ```jsx
  754. * const transition = {
  755. * type: "keyframes",
  756. * duration: 2
  757. * }
  758. *
  759. * <Frame
  760. * animate={{ opacity: 0 }}
  761. * transition={transition}
  762. * />
  763. * ```
  764. *
  765. * @public
  766. */
  767. duration?: number;
  768. /**
  769. * @public
  770. */
  771. repeatDelay?: number;
  772. }
  773. /**
  774. * @public
  775. */
  776. interface None {
  777. /**
  778. * Set `type` to `false` for an instant transition.
  779. *
  780. * @public
  781. */
  782. type: false;
  783. }
  784. /**
  785. * @public
  786. */
  787. type PermissiveTransitionDefinition = {
  788. [key: string]: any;
  789. };
  790. /**
  791. * @public
  792. */
  793. type TransitionDefinition = Tween | Spring | Keyframes | Inertia | None | PermissiveTransitionDefinition;
  794. type TransitionMap = Orchestration & TransitionDefinition & {
  795. [key: string]: TransitionDefinition;
  796. };
  797. /**
  798. * Transition props
  799. *
  800. * @public
  801. */
  802. type Transition = (Orchestration & Repeat & TransitionDefinition) | (Orchestration & Repeat & TransitionMap);
  803. type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
  804. type CSSPropertiesWithoutTransitionOrSingleTransforms = Omit$1<CSSProperties, "transition" | "rotate" | "scale" | "perspective">;
  805. type SVGTransformAttributes = {
  806. attrX?: number;
  807. attrY?: number;
  808. attrScale?: number;
  809. };
  810. type TargetProperties = CSSPropertiesWithoutTransitionOrSingleTransforms & SVGAttributes<SVGElement> & SVGTransformAttributes & TransformProperties & CustomStyles & SVGPathProperties & VariableKeyframesDefinition;
  811. /**
  812. * @public
  813. */
  814. type MakeCustomValueType<T> = {
  815. [K in keyof T]: T[K] | CustomValueType;
  816. };
  817. /**
  818. * @public
  819. */
  820. type Target = MakeCustomValueType<TargetProperties>;
  821. /**
  822. * @public
  823. */
  824. type MakeKeyframes<T> = {
  825. [K in keyof T]: T[K] | T[K][] | [null, ...T[K][]];
  826. };
  827. /**
  828. * @public
  829. */
  830. type TargetWithKeyframes = MakeKeyframes<Target>;
  831. /**
  832. * An object that specifies values to animate to. Each value may be set either as
  833. * a single value, or an array of values.
  834. *
  835. * It may also option contain these properties:
  836. *
  837. * - `transition`: Specifies transitions for all or individual values.
  838. * - `transitionEnd`: Specifies values to set when the animation finishes.
  839. *
  840. * ```jsx
  841. * const target = {
  842. * x: "0%",
  843. * opacity: 0,
  844. * transition: { duration: 1 },
  845. * transitionEnd: { display: "none" }
  846. * }
  847. * ```
  848. *
  849. * @public
  850. */
  851. type TargetAndTransition = TargetWithKeyframes & {
  852. transition?: Transition;
  853. transitionEnd?: Target;
  854. };
  855. type TargetResolver = (custom: any, current: Target, velocity: Target) => TargetAndTransition | string;
  856. /**
  857. * @public
  858. */
  859. type Variant = TargetAndTransition | TargetResolver;
  860. /**
  861. * @public
  862. */
  863. type Variants = {
  864. [key: string]: Variant;
  865. };
  866. /**
  867. * @public
  868. */
  869. interface CustomValueType {
  870. mix: (from: any, to: any) => (p: number) => number | string;
  871. toValue: () => number | string;
  872. }
  873. type RefObject<T> = {
  874. current: T | null;
  875. };
  876. /**
  877. * Passed in to pan event handlers like `onPan` the `PanInfo` object contains
  878. * information about the current state of the tap gesture such as its
  879. * `point`, `delta`, `offset` and `velocity`.
  880. *
  881. * ```jsx
  882. * <motion.div onPan={(event, info) => {
  883. * console.log(info.point.x, info.point.y)
  884. * }} />
  885. * ```
  886. *
  887. * @public
  888. */
  889. interface PanInfo {
  890. /**
  891. * Contains `x` and `y` values for the current pan position relative
  892. * to the device or page.
  893. *
  894. * ```jsx
  895. * function onPan(event, info) {
  896. * console.log(info.point.x, info.point.y)
  897. * }
  898. *
  899. * <motion.div onPan={onPan} />
  900. * ```
  901. *
  902. * @public
  903. */
  904. point: Point;
  905. /**
  906. * Contains `x` and `y` values for the distance moved since
  907. * the last event.
  908. *
  909. * ```jsx
  910. * function onPan(event, info) {
  911. * console.log(info.delta.x, info.delta.y)
  912. * }
  913. *
  914. * <motion.div onPan={onPan} />
  915. * ```
  916. *
  917. * @public
  918. */
  919. delta: Point;
  920. /**
  921. * Contains `x` and `y` values for the distance moved from
  922. * the first pan event.
  923. *
  924. * ```jsx
  925. * function onPan(event, info) {
  926. * console.log(info.offset.x, info.offset.y)
  927. * }
  928. *
  929. * <motion.div onPan={onPan} />
  930. * ```
  931. *
  932. * @public
  933. */
  934. offset: Point;
  935. /**
  936. * Contains `x` and `y` values for the current velocity of the pointer, in px/ms.
  937. *
  938. * ```jsx
  939. * function onPan(event, info) {
  940. * console.log(info.velocity.x, info.velocity.y)
  941. * }
  942. *
  943. * <motion.div onPan={onPan} />
  944. * ```
  945. *
  946. * @public
  947. */
  948. velocity: Point;
  949. }
  950. interface DragControlOptions {
  951. snapToCursor?: boolean;
  952. cursorProgress?: Point;
  953. }
  954. /**
  955. * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.
  956. *
  957. * ```jsx
  958. * const dragControls = useDragControls()
  959. *
  960. * function startDrag(event) {
  961. * dragControls.start(event, { snapToCursor: true })
  962. * }
  963. *
  964. * return (
  965. * <>
  966. * <div onPointerDown={startDrag} />
  967. * <motion.div drag="x" dragControls={dragControls} />
  968. * </>
  969. * )
  970. * ```
  971. *
  972. * @public
  973. */
  974. declare class DragControls {
  975. private componentControls;
  976. /**
  977. * Start a drag gesture on every `motion` component that has this set of drag controls
  978. * passed into it via the `dragControls` prop.
  979. *
  980. * ```jsx
  981. * dragControls.start(e, {
  982. * snapToCursor: true
  983. * })
  984. * ```
  985. *
  986. * @param event - PointerEvent
  987. * @param options - Options
  988. *
  989. * @public
  990. */
  991. start(event: React$1.PointerEvent | PointerEvent, options?: DragControlOptions): void;
  992. }
  993. type DragElastic = boolean | number | Partial<BoundingBox>;
  994. /**
  995. * @public
  996. */
  997. interface DragHandlers {
  998. /**
  999. * Callback function that fires when dragging starts.
  1000. *
  1001. * ```jsx
  1002. * <motion.div
  1003. * drag
  1004. * onDragStart={
  1005. * (event, info) => console.log(info.point.x, info.point.y)
  1006. * }
  1007. * />
  1008. * ```
  1009. *
  1010. * @public
  1011. */
  1012. onDragStart?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
  1013. /**
  1014. * Callback function that fires when dragging ends.
  1015. *
  1016. * ```jsx
  1017. * <motion.div
  1018. * drag
  1019. * onDragEnd={
  1020. * (event, info) => console.log(info.point.x, info.point.y)
  1021. * }
  1022. * />
  1023. * ```
  1024. *
  1025. * @public
  1026. */
  1027. onDragEnd?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
  1028. /**
  1029. * Callback function that fires when the component is dragged.
  1030. *
  1031. * ```jsx
  1032. * <motion.div
  1033. * drag
  1034. * onDrag={
  1035. * (event, info) => console.log(info.point.x, info.point.y)
  1036. * }
  1037. * />
  1038. * ```
  1039. *
  1040. * @public
  1041. */
  1042. onDrag?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
  1043. /**
  1044. * Callback function that fires a drag direction is determined.
  1045. *
  1046. * ```jsx
  1047. * <motion.div
  1048. * drag
  1049. * dragDirectionLock
  1050. * onDirectionLock={axis => console.log(axis)}
  1051. * />
  1052. * ```
  1053. *
  1054. * @public
  1055. */
  1056. onDirectionLock?(axis: "x" | "y"): void;
  1057. /**
  1058. * Callback function that fires when drag momentum/bounce transition finishes.
  1059. *
  1060. * ```jsx
  1061. * <motion.div
  1062. * drag
  1063. * onDragTransitionEnd={() => console.log('Drag transition complete')}
  1064. * />
  1065. * ```
  1066. *
  1067. * @public
  1068. */
  1069. onDragTransitionEnd?(): void;
  1070. }
  1071. /**
  1072. * @public
  1073. */
  1074. type InertiaOptions = Partial<Omit<Inertia, "velocity" | "type">>;
  1075. /**
  1076. * @public
  1077. */
  1078. interface DraggableProps extends DragHandlers {
  1079. /**
  1080. * Enable dragging for this element. Set to `false` by default.
  1081. * Set `true` to drag in both directions.
  1082. * Set `"x"` or `"y"` to only drag in a specific direction.
  1083. *
  1084. * ```jsx
  1085. * <motion.div drag="x" />
  1086. * ```
  1087. */
  1088. drag?: boolean | "x" | "y";
  1089. /**
  1090. * Properties or variant label to animate to while the drag gesture is recognised.
  1091. *
  1092. * ```jsx
  1093. * <motion.div whileDrag={{ scale: 1.2 }} />
  1094. * ```
  1095. */
  1096. whileDrag?: VariantLabels | TargetAndTransition;
  1097. /**
  1098. * If `true`, this will lock dragging to the initially-detected direction. Defaults to `false`.
  1099. *
  1100. * ```jsx
  1101. * <motion.div drag dragDirectionLock />
  1102. * ```
  1103. */
  1104. dragDirectionLock?: boolean;
  1105. /**
  1106. * Allows drag gesture propagation to child components. Set to `false` by
  1107. * default.
  1108. *
  1109. * ```jsx
  1110. * <motion.div drag="x" dragPropagation />
  1111. * ```
  1112. */
  1113. dragPropagation?: boolean;
  1114. /**
  1115. * Applies constraints on the permitted draggable area.
  1116. *
  1117. * It can accept an object of optional `top`, `left`, `right`, and `bottom` values, measured in pixels.
  1118. * This will define a distance the named edge of the draggable component.
  1119. *
  1120. * Alternatively, it can accept a `ref` to another component created with React's `useRef` hook.
  1121. * This `ref` should be passed both to the draggable component's `dragConstraints` prop, and the `ref`
  1122. * of the component you want to use as constraints.
  1123. *
  1124. * ```jsx
  1125. * // In pixels
  1126. * <motion.div
  1127. * drag="x"
  1128. * dragConstraints={{ left: 0, right: 300 }}
  1129. * />
  1130. *
  1131. * // As a ref to another component
  1132. * const MyComponent = () => {
  1133. * const constraintsRef = useRef(null)
  1134. *
  1135. * return (
  1136. * <motion.div ref={constraintsRef}>
  1137. * <motion.div drag dragConstraints={constraintsRef} />
  1138. * </motion.div>
  1139. * )
  1140. * }
  1141. * ```
  1142. */
  1143. dragConstraints?: false | Partial<BoundingBox> | RefObject<Element | null>;
  1144. /**
  1145. * The degree of movement allowed outside constraints. 0 = no movement, 1 =
  1146. * full movement.
  1147. *
  1148. * Set to `0.5` by default. Can also be set as `false` to disable movement.
  1149. *
  1150. * By passing an object of `top`/`right`/`bottom`/`left`, individual values can be set
  1151. * per constraint. Any missing values will be set to `0`.
  1152. *
  1153. * ```jsx
  1154. * <motion.div
  1155. * drag
  1156. * dragConstraints={{ left: 0, right: 300 }}
  1157. * dragElastic={0.2}
  1158. * />
  1159. * ```
  1160. */
  1161. dragElastic?: DragElastic;
  1162. /**
  1163. * Apply momentum from the pan gesture to the component when dragging
  1164. * finishes. Set to `true` by default.
  1165. *
  1166. * ```jsx
  1167. * <motion.div
  1168. * drag
  1169. * dragConstraints={{ left: 0, right: 300 }}
  1170. * dragMomentum={false}
  1171. * />
  1172. * ```
  1173. */
  1174. dragMomentum?: boolean;
  1175. /**
  1176. * Allows you to change dragging inertia parameters.
  1177. * When releasing a draggable Frame, an animation with type `inertia` starts. The animation is based on your dragging velocity. This property allows you to customize it.
  1178. * See {@link https://framer.com/api/animation/#inertia | Inertia} for all properties you can use.
  1179. *
  1180. * ```jsx
  1181. * <motion.div
  1182. * drag
  1183. * dragTransition={{ bounceStiffness: 600, bounceDamping: 10 }}
  1184. * />
  1185. * ```
  1186. */
  1187. dragTransition?: InertiaOptions;
  1188. /**
  1189. * Usually, dragging is initiated by pressing down on a component and moving it. For some
  1190. * use-cases, for instance clicking at an arbitrary point on a video scrubber, we
  1191. * might want to initiate dragging from a different component than the draggable one.
  1192. *
  1193. * By creating a `dragControls` using the `useDragControls` hook, we can pass this into
  1194. * the draggable component's `dragControls` prop. It exposes a `start` method
  1195. * that can start dragging from pointer events on other components.
  1196. *
  1197. * ```jsx
  1198. * const dragControls = useDragControls()
  1199. *
  1200. * function startDrag(event) {
  1201. * dragControls.start(event, { snapToCursor: true })
  1202. * }
  1203. *
  1204. * return (
  1205. * <>
  1206. * <div onPointerDown={startDrag} />
  1207. * <motion.div drag="x" dragControls={dragControls} />
  1208. * </>
  1209. * )
  1210. * ```
  1211. */
  1212. dragControls?: DragControls;
  1213. /**
  1214. * If true, element will snap back to its origin when dragging ends.
  1215. *
  1216. * Enabling this is the equivalent of setting all `dragConstraints` axes to `0`
  1217. * with `dragElastic={1}`, but when used together `dragConstraints` can define
  1218. * a wider draggable area and `dragSnapToOrigin` will ensure the element
  1219. * animates back to its origin on release.
  1220. */
  1221. dragSnapToOrigin?: boolean;
  1222. /**
  1223. * By default, if `drag` is defined on a component then an event listener will be attached
  1224. * to automatically initiate dragging when a user presses down on it.
  1225. *
  1226. * By setting `dragListener` to `false`, this event listener will not be created.
  1227. *
  1228. * ```jsx
  1229. * const dragControls = useDragControls()
  1230. *
  1231. * function startDrag(event) {
  1232. * dragControls.start(event, { snapToCursor: true })
  1233. * }
  1234. *
  1235. * return (
  1236. * <>
  1237. * <div onPointerDown={startDrag} />
  1238. * <motion.div
  1239. * drag="x"
  1240. * dragControls={dragControls}
  1241. * dragListener={false}
  1242. * />
  1243. * </>
  1244. * )
  1245. * ```
  1246. */
  1247. dragListener?: boolean;
  1248. /**
  1249. * If `dragConstraints` is set to a React ref, this callback will call with the measured drag constraints.
  1250. *
  1251. * @public
  1252. */
  1253. onMeasureDragConstraints?: (constraints: BoundingBox) => BoundingBox | void;
  1254. /**
  1255. * Usually, dragging uses the layout project engine, and applies transforms to the underlying VisualElement.
  1256. * Passing MotionValues as _dragX and _dragY instead applies drag updates to these motion values.
  1257. * This allows you to manually control how updates from a drag gesture on an element is applied.
  1258. *
  1259. * @public
  1260. */
  1261. _dragX?: MotionValue<number>;
  1262. /**
  1263. * Usually, dragging uses the layout project engine, and applies transforms to the underlying VisualElement.
  1264. * Passing MotionValues as _dragX and _dragY instead applies drag updates to these motion values.
  1265. * This allows you to manually control how updates from a drag gesture on an element is applied.
  1266. *
  1267. * @public
  1268. */
  1269. _dragY?: MotionValue<number>;
  1270. }
  1271. /** @public */
  1272. interface EventInfo {
  1273. point: Point;
  1274. }
  1275. /**
  1276. * @public
  1277. */
  1278. interface FocusHandlers {
  1279. /**
  1280. * Properties or variant label to animate to while the focus gesture is recognised.
  1281. *
  1282. * ```jsx
  1283. * <motion.input whileFocus={{ scale: 1.2 }} />
  1284. * ```
  1285. */
  1286. whileFocus?: VariantLabels | TargetAndTransition;
  1287. }
  1288. /**
  1289. * Passed in to tap event handlers like `onTap` the `TapInfo` object contains
  1290. * information about the tap gesture such as it‘s location.
  1291. *
  1292. * ```jsx
  1293. * function onTap(event, info) {
  1294. * console.log(info.point.x, info.point.y)
  1295. * }
  1296. *
  1297. * <motion.div onTap={onTap} />
  1298. * ```
  1299. *
  1300. * @public
  1301. */
  1302. interface TapInfo {
  1303. /**
  1304. * Contains `x` and `y` values for the tap gesture relative to the
  1305. * device or page.
  1306. *
  1307. * ```jsx
  1308. * function onTapStart(event, info) {
  1309. * console.log(info.point.x, info.point.y)
  1310. * }
  1311. *
  1312. * <motion.div onTapStart={onTapStart} />
  1313. * ```
  1314. *
  1315. * @public
  1316. */
  1317. point: Point;
  1318. }
  1319. /**
  1320. * @public
  1321. */
  1322. interface TapHandlers {
  1323. /**
  1324. * Callback when the tap gesture successfully ends on this element.
  1325. *
  1326. * ```jsx
  1327. * function onTap(event, info) {
  1328. * console.log(info.point.x, info.point.y)
  1329. * }
  1330. *
  1331. * <motion.div onTap={onTap} />
  1332. * ```
  1333. *
  1334. * @param event - The originating pointer event.
  1335. * @param info - An {@link TapInfo} object containing `x` and `y` values for the `point` relative to the device or page.
  1336. */
  1337. onTap?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void;
  1338. /**
  1339. * Callback when the tap gesture starts on this element.
  1340. *
  1341. * ```jsx
  1342. * function onTapStart(event, info) {
  1343. * console.log(info.point.x, info.point.y)
  1344. * }
  1345. *
  1346. * <motion.div onTapStart={onTapStart} />
  1347. * ```
  1348. *
  1349. * @param event - The originating pointer event.
  1350. * @param info - An {@link TapInfo} object containing `x` and `y` values for the `point` relative to the device or page.
  1351. */
  1352. onTapStart?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void;
  1353. /**
  1354. * Callback when the tap gesture ends outside this element.
  1355. *
  1356. * ```jsx
  1357. * function onTapCancel(event, info) {
  1358. * console.log(info.point.x, info.point.y)
  1359. * }
  1360. *
  1361. * <motion.div onTapCancel={onTapCancel} />
  1362. * ```
  1363. *
  1364. * @param event - The originating pointer event.
  1365. * @param info - An {@link TapInfo} object containing `x` and `y` values for the `point` relative to the device or page.
  1366. */
  1367. onTapCancel?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void;
  1368. /**
  1369. * Properties or variant label to animate to while the component is pressed.
  1370. *
  1371. * ```jsx
  1372. * <motion.div whileTap={{ scale: 0.8 }} />
  1373. * ```
  1374. */
  1375. whileTap?: VariantLabels | TargetAndTransition;
  1376. /**
  1377. * If `true`, the tap gesture will attach its start listener to window.
  1378. *
  1379. * Note: This is not supported publically.
  1380. */
  1381. globalTapTarget?: boolean;
  1382. }
  1383. /**
  1384. * @public
  1385. */
  1386. interface PanHandlers {
  1387. /**
  1388. * Callback function that fires when the pan gesture is recognised on this element.
  1389. *
  1390. * **Note:** For pan gestures to work correctly with touch input, the element needs
  1391. * touch scrolling to be disabled on either x/y or both axis with the
  1392. * [touch-action](https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action) CSS rule.
  1393. *
  1394. * ```jsx
  1395. * function onPan(event, info) {
  1396. * console.log(info.point.x, info.point.y)
  1397. * }
  1398. *
  1399. * <motion.div onPan={onPan} />
  1400. * ```
  1401. *
  1402. * @param event - The originating pointer event.
  1403. * @param info - A {@link PanInfo} object containing `x` and `y` values for:
  1404. *
  1405. * - `point`: Relative to the device or page.
  1406. * - `delta`: Distance moved since the last event.
  1407. * - `offset`: Offset from the original pan event.
  1408. * - `velocity`: Current velocity of the pointer.
  1409. */
  1410. onPan?(event: PointerEvent, info: PanInfo): void;
  1411. /**
  1412. * Callback function that fires when the pan gesture begins on this element.
  1413. *
  1414. * ```jsx
  1415. * function onPanStart(event, info) {
  1416. * console.log(info.point.x, info.point.y)
  1417. * }
  1418. *
  1419. * <motion.div onPanStart={onPanStart} />
  1420. * ```
  1421. *
  1422. * @param event - The originating pointer event.
  1423. * @param info - A {@link PanInfo} object containing `x`/`y` values for:
  1424. *
  1425. * - `point`: Relative to the device or page.
  1426. * - `delta`: Distance moved since the last event.
  1427. * - `offset`: Offset from the original pan event.
  1428. * - `velocity`: Current velocity of the pointer.
  1429. */
  1430. onPanStart?(event: PointerEvent, info: PanInfo): void;
  1431. /**
  1432. * Callback function that fires when we begin detecting a pan gesture. This
  1433. * is analogous to `onMouseStart` or `onTouchStart`.
  1434. *
  1435. * ```jsx
  1436. * function onPanSessionStart(event, info) {
  1437. * console.log(info.point.x, info.point.y)
  1438. * }
  1439. *
  1440. * <motion.div onPanSessionStart={onPanSessionStart} />
  1441. * ```
  1442. *
  1443. * @param event - The originating pointer event.
  1444. * @param info - An {@link EventInfo} object containing `x`/`y` values for:
  1445. *
  1446. * - `point`: Relative to the device or page.
  1447. */
  1448. onPanSessionStart?(event: PointerEvent, info: EventInfo): void;
  1449. /**
  1450. * Callback function that fires when the pan gesture ends on this element.
  1451. *
  1452. * ```jsx
  1453. * function onPanEnd(event, info) {
  1454. * console.log(info.point.x, info.point.y)
  1455. * }
  1456. *
  1457. * <motion.div onPanEnd={onPanEnd} />
  1458. * ```
  1459. *
  1460. * @param event - The originating pointer event.
  1461. * @param info - A {@link PanInfo} object containing `x`/`y` values for:
  1462. *
  1463. * - `point`: Relative to the device or page.
  1464. * - `delta`: Distance moved since the last event.
  1465. * - `offset`: Offset from the original pan event.
  1466. * - `velocity`: Current velocity of the pointer.
  1467. */
  1468. onPanEnd?(event: PointerEvent, info: PanInfo): void;
  1469. }
  1470. /**
  1471. * @public
  1472. */
  1473. interface HoverHandlers {
  1474. /**
  1475. * Properties or variant label to animate to while the hover gesture is recognised.
  1476. *
  1477. * ```jsx
  1478. * <motion.div whileHover={{ scale: 1.2 }} />
  1479. * ```
  1480. */
  1481. whileHover?: VariantLabels | TargetAndTransition;
  1482. /**
  1483. * Callback function that fires when pointer starts hovering over the component.
  1484. *
  1485. * ```jsx
  1486. * <motion.div onHoverStart={() => console.log('Hover starts')} />
  1487. * ```
  1488. */
  1489. onHoverStart?(event: MouseEvent, info: EventInfo): void;
  1490. /**
  1491. * Callback function that fires when pointer stops hovering over the component.
  1492. *
  1493. * ```jsx
  1494. * <motion.div onHoverEnd={() => console.log("Hover ends")} />
  1495. * ```
  1496. */
  1497. onHoverEnd?(event: MouseEvent, info: EventInfo): void;
  1498. }
  1499. /**
  1500. * @public
  1501. */
  1502. interface LayoutProps {
  1503. /**
  1504. * If `true`, this component will automatically animate to its new position when
  1505. * its layout changes.
  1506. *
  1507. * ```jsx
  1508. * <motion.div layout />
  1509. * ```
  1510. *
  1511. * This will perform a layout animation using performant transforms. Part of this technique
  1512. * involved animating an element's scale. This can introduce visual distortions on children,
  1513. * `boxShadow` and `borderRadius`.
  1514. *
  1515. * To correct distortion on immediate children, add `layout` to those too.
  1516. *
  1517. * `boxShadow` and `borderRadius` will automatically be corrected if they are already being
  1518. * animated on this component. Otherwise, set them directly via the `initial` prop.
  1519. *
  1520. * If `layout` is set to `"position"`, the size of the component will change instantly and
  1521. * only its position will animate.
  1522. *
  1523. * If `layout` is set to `"size"`, the position of the component will change instantly and
  1524. * only its size will animate.
  1525. *
  1526. * If `layout` is set to `"preserve-aspect"`, the component will animate size & position if
  1527. * the aspect ratio remains the same between renders, and just position if the ratio changes.
  1528. *
  1529. * @public
  1530. */
  1531. layout?: boolean | "position" | "size" | "preserve-aspect";
  1532. /**
  1533. * Enable shared layout transitions between different components with the same `layoutId`.
  1534. *
  1535. * When a component with a layoutId is removed from the React tree, and then
  1536. * added elsewhere, it will visually animate from the previous component's bounding box
  1537. * and its latest animated values.
  1538. *
  1539. * ```jsx
  1540. * {items.map(item => (
  1541. * <motion.li layout>
  1542. * {item.name}
  1543. * {item.isSelected && <motion.div layoutId="underline" />}
  1544. * </motion.li>
  1545. * ))}
  1546. * ```
  1547. *
  1548. * If the previous component remains in the tree it will crossfade with the new component.
  1549. *
  1550. * @public
  1551. */
  1552. layoutId?: string;
  1553. /**
  1554. * A callback that will fire when a layout animation on this component starts.
  1555. *
  1556. * @public
  1557. */
  1558. onLayoutAnimationStart?(): void;
  1559. /**
  1560. * A callback that will fire when a layout animation on this component completes.
  1561. *
  1562. * @public
  1563. */
  1564. onLayoutAnimationComplete?(): void;
  1565. /**
  1566. * @public
  1567. */
  1568. layoutDependency?: any;
  1569. /**
  1570. * Whether a projection node should measure its scroll when it or its descendants update their layout.
  1571. *
  1572. * @public
  1573. */
  1574. layoutScroll?: boolean;
  1575. /**
  1576. * Whether an element should be considered a "layout root", where
  1577. * all children will be forced to resolve relatively to it.
  1578. * Currently used for `position: sticky` elements in Framer.
  1579. */
  1580. layoutRoot?: boolean;
  1581. /**
  1582. * Attached to a portal root to ensure we attach the child to the document root and don't
  1583. * perform scale correction on it.
  1584. */
  1585. "data-framer-portal-id"?: string;
  1586. }
  1587. type ViewportEventHandler = (entry: IntersectionObserverEntry | null) => void;
  1588. interface ViewportOptions {
  1589. root?: RefObject<Element | null>;
  1590. once?: boolean;
  1591. margin?: string;
  1592. amount?: "some" | "all" | number;
  1593. }
  1594. interface ViewportProps {
  1595. whileInView?: VariantLabels | TargetAndTransition;
  1596. onViewportEnter?: ViewportEventHandler;
  1597. onViewportLeave?: ViewportEventHandler;
  1598. viewport?: ViewportOptions;
  1599. }
  1600. /**
  1601. * Either a string, or array of strings, that reference variants defined via the `variants` prop.
  1602. * @public
  1603. */
  1604. type VariantLabels = string | string[];
  1605. interface CustomStyles {
  1606. /**
  1607. * Framer Library custom prop types. These are not actually supported in Motion - preferably
  1608. * we'd have a way of external consumers injecting supported styles into this library.
  1609. */
  1610. size?: string | number;
  1611. radius?: string | number;
  1612. shadow?: string;
  1613. image?: string;
  1614. }
  1615. type MakeMotion<T> = MakeCustomValueType<{
  1616. [K in keyof T]: T[K] | MotionValue<number> | MotionValue<string> | MotionValue<any>;
  1617. }>;
  1618. type MotionCSS = MakeMotion<Omit$1<CSSProperties, "rotate" | "scale" | "perspective">>;
  1619. /**
  1620. * @public
  1621. */
  1622. type MotionTransform = MakeMotion<TransformProperties>;
  1623. /**
  1624. * @public
  1625. */
  1626. type MotionStyle$1 = MotionCSS & MotionTransform & MakeMotion<SVGPathProperties> & MakeCustomValueType<CustomStyles>;
  1627. /**
  1628. * @public
  1629. */
  1630. interface AnimationProps {
  1631. /**
  1632. * Properties, variant label or array of variant labels to start in.
  1633. *
  1634. * Set to `false` to initialise with the values in `animate` (disabling the mount animation)
  1635. *
  1636. * ```jsx
  1637. * // As values
  1638. * <motion.div initial={{ opacity: 1 }} />
  1639. *
  1640. * // As variant
  1641. * <motion.div initial="visible" variants={variants} />
  1642. *
  1643. * // Multiple variants
  1644. * <motion.div initial={["visible", "active"]} variants={variants} />
  1645. *
  1646. * // As false (disable mount animation)
  1647. * <motion.div initial={false} animate={{ opacity: 0 }} />
  1648. * ```
  1649. */
  1650. initial?: TargetAndTransition | VariantLabels | boolean;
  1651. /**
  1652. * Values to animate to, variant label(s), or `AnimationControls`.
  1653. *
  1654. * ```jsx
  1655. * // As values
  1656. * <motion.div animate={{ opacity: 1 }} />
  1657. *
  1658. * // As variant
  1659. * <motion.div animate="visible" variants={variants} />
  1660. *
  1661. * // Multiple variants
  1662. * <motion.div animate={["visible", "active"]} variants={variants} />
  1663. *
  1664. * // AnimationControls
  1665. * <motion.div animate={animation} />
  1666. * ```
  1667. */
  1668. animate?: AnimationControls | TargetAndTransition | VariantLabels | boolean;
  1669. /**
  1670. * A target to animate to when this component is removed from the tree.
  1671. *
  1672. * This component **must** be the first animatable child of an `AnimatePresence` to enable this exit animation.
  1673. *
  1674. * This limitation exists because React doesn't allow components to defer unmounting until after
  1675. * an animation is complete. Once this limitation is fixed, the `AnimatePresence` component will be unnecessary.
  1676. *
  1677. * ```jsx
  1678. * import { AnimatePresence, motion } from 'framer-motion'
  1679. *
  1680. * export const MyComponent = ({ isVisible }) => {
  1681. * return (
  1682. * <AnimatePresence>
  1683. * {isVisible && (
  1684. * <motion.div
  1685. * initial={{ opacity: 0 }}
  1686. * animate={{ opacity: 1 }}
  1687. * exit={{ opacity: 0 }}
  1688. * />
  1689. * )}
  1690. * </AnimatePresence>
  1691. * )
  1692. * }
  1693. * ```
  1694. */
  1695. exit?: TargetAndTransition | VariantLabels;
  1696. /**
  1697. * Variants allow you to define animation states and organise them by name. They allow
  1698. * you to control animations throughout a component tree by switching a single `animate` prop.
  1699. *
  1700. * Using `transition` options like `delayChildren` and `staggerChildren`, you can orchestrate
  1701. * when children animations play relative to their parent.
  1702. *
  1703. * After passing variants to one or more `motion` component's `variants` prop, these variants
  1704. * can be used in place of values on the `animate`, `initial`, `whileFocus`, `whileTap` and `whileHover` props.
  1705. *
  1706. * ```jsx
  1707. * const variants = {
  1708. * active: {
  1709. * backgroundColor: "#f00"
  1710. * },
  1711. * inactive: {
  1712. * backgroundColor: "#fff",
  1713. * transition: { duration: 2 }
  1714. * }
  1715. * }
  1716. *
  1717. * <motion.div variants={variants} animate="active" />
  1718. * ```
  1719. */
  1720. variants?: Variants;
  1721. /**
  1722. * Default transition. If no `transition` is defined in `animate`, it will use the transition defined here.
  1723. * ```jsx
  1724. * const spring = {
  1725. * type: "spring",
  1726. * damping: 10,
  1727. * stiffness: 100
  1728. * }
  1729. *
  1730. * <motion.div transition={spring} animate={{ scale: 1.2 }} />
  1731. * ```
  1732. */
  1733. transition?: Transition;
  1734. }
  1735. /**
  1736. * @public
  1737. */
  1738. interface MotionAdvancedProps {
  1739. /**
  1740. * Custom data to use to resolve dynamic variants differently for each animating component.
  1741. *
  1742. * ```jsx
  1743. * const variants = {
  1744. * visible: (custom) => ({
  1745. * opacity: 1,
  1746. * transition: { delay: custom * 0.2 }
  1747. * })
  1748. * }
  1749. *
  1750. * <motion.div custom={0} animate="visible" variants={variants} />
  1751. * <motion.div custom={1} animate="visible" variants={variants} />
  1752. * <motion.div custom={2} animate="visible" variants={variants} />
  1753. * ```
  1754. *
  1755. * @public
  1756. */
  1757. custom?: any;
  1758. /**
  1759. * @public
  1760. * Set to `false` to prevent inheriting variant changes from its parent.
  1761. */
  1762. inherit?: boolean;
  1763. /**
  1764. * @public
  1765. * Set to `false` to prevent throwing an error when a `motion` component is used within a `LazyMotion` set to strict.
  1766. */
  1767. ignoreStrict?: boolean;
  1768. }
  1769. /**
  1770. * Props for `motion` components.
  1771. *
  1772. * @public
  1773. */
  1774. interface MotionProps extends AnimationProps, EventProps, PanHandlers, TapHandlers, HoverHandlers, FocusHandlers, ViewportProps, DraggableProps, LayoutProps, MotionAdvancedProps {
  1775. /**
  1776. *
  1777. * The React DOM `style` prop, enhanced with support for `MotionValue`s and separate `transform` values.
  1778. *
  1779. * ```jsx
  1780. * export const MyComponent = () => {
  1781. * const x = useMotionValue(0)
  1782. *
  1783. * return <motion.div style={{ x, opacity: 1, scale: 0.5 }} />
  1784. * }
  1785. * ```
  1786. */
  1787. style?: MotionStyle$1;
  1788. /**
  1789. * By default, Motion generates a `transform` property with a sensible transform order. `transformTemplate`
  1790. * can be used to create a different order, or to append/preprend the automatically generated `transform` property.
  1791. *
  1792. * ```jsx
  1793. * <motion.div
  1794. * style={{ x: 0, rotate: 180 }}
  1795. * transformTemplate={
  1796. * ({ x, rotate }) => `rotate(${rotate}deg) translateX(${x}px)`
  1797. * }
  1798. * />
  1799. * ```
  1800. *
  1801. * @param transform - The latest animated transform props.
  1802. * @param generatedTransform - The transform string as automatically generated by Motion
  1803. *
  1804. * @public
  1805. */
  1806. transformTemplate?(transform: TransformProperties, generatedTransform: string): string;
  1807. children?: React.ReactNode | MotionValue<number> | MotionValue<string>;
  1808. "data-framer-appear-id"?: string;
  1809. }
  1810. type AnimationDefinition = VariantLabels | TargetAndTransition | TargetResolver;
  1811. /**
  1812. * @public
  1813. */
  1814. interface AnimationControls {
  1815. /**
  1816. * Starts an animation on all linked components.
  1817. *
  1818. * @remarks
  1819. *
  1820. * ```jsx
  1821. * controls.start("variantLabel")
  1822. * controls.start({
  1823. * x: 0,
  1824. * transition: { duration: 1 }
  1825. * })
  1826. * ```
  1827. *
  1828. * @param definition - Properties or variant label to animate to
  1829. * @param transition - Optional `transtion` to apply to a variant
  1830. * @returns - A `Promise` that resolves when all animations have completed.
  1831. *
  1832. * @public
  1833. */
  1834. start(definition: AnimationDefinition, transitionOverride?: Transition$1): Promise<any>;
  1835. /**
  1836. * Instantly set to a set of properties or a variant.
  1837. *
  1838. * ```jsx
  1839. * // With properties
  1840. * controls.set({ opacity: 0 })
  1841. *
  1842. * // With variants
  1843. * controls.set("hidden")
  1844. * ```
  1845. *
  1846. * @privateRemarks
  1847. * We could perform a similar trick to `.start` where this can be called before mount
  1848. * and we maintain a list of of pending actions that get applied on mount. But the
  1849. * expectation of `set` is that it happens synchronously and this would be difficult
  1850. * to do before any children have even attached themselves. It's also poor practise
  1851. * and we should discourage render-synchronous `.start` calls rather than lean into this.
  1852. *
  1853. * @public
  1854. */
  1855. set(definition: AnimationDefinition): void;
  1856. /**
  1857. * Stops animations on all linked components.
  1858. *
  1859. * ```jsx
  1860. * controls.stop()
  1861. * ```
  1862. *
  1863. * @public
  1864. */
  1865. stop(): void;
  1866. mount(): () => void;
  1867. }
  1868. /**
  1869. * A generic set of string/number values
  1870. */
  1871. interface ResolvedValues {
  1872. [key: string]: string | number;
  1873. }
  1874. interface LayoutLifecycles {
  1875. onBeforeLayoutMeasure?(box: Box): void;
  1876. onLayoutMeasure?(box: Box, prevBox: Box): void;
  1877. }
  1878. interface AnimationLifecycles {
  1879. /**
  1880. * Callback with latest motion values, fired max once per frame.
  1881. *
  1882. * ```jsx
  1883. * function onUpdate(latest) {
  1884. * console.log(latest.x, latest.opacity)
  1885. * }
  1886. *
  1887. * <motion.div animate={{ x: 100, opacity: 0 }} onUpdate={onUpdate} />
  1888. * ```
  1889. */
  1890. onUpdate?(latest: ResolvedValues): void;
  1891. /**
  1892. * Callback when animation defined in `animate` begins.
  1893. *
  1894. * The provided callback will be called with the triggering animation definition.
  1895. * If this is a variant, it'll be the variant name, and if a target object
  1896. * then it'll be the target object.
  1897. *
  1898. * This way, it's possible to figure out which animation has started.
  1899. *
  1900. * ```jsx
  1901. * function onStart() {
  1902. * console.log("Animation started")
  1903. * }
  1904. *
  1905. * <motion.div animate={{ x: 100 }} onAnimationStart={onStart} />
  1906. * ```
  1907. */
  1908. onAnimationStart?(definition: AnimationDefinition): void;
  1909. /**
  1910. * Callback when animation defined in `animate` is complete.
  1911. *
  1912. * The provided callback will be called with the triggering animation definition.
  1913. * If this is a variant, it'll be the variant name, and if a target object
  1914. * then it'll be the target object.
  1915. *
  1916. * This way, it's possible to figure out which animation has completed.
  1917. *
  1918. * ```jsx
  1919. * function onComplete() {
  1920. * console.log("Animation completed")
  1921. * }
  1922. *
  1923. * <motion.div
  1924. * animate={{ x: 100 }}
  1925. * onAnimationComplete={definition => {
  1926. * console.log('Completed animating', definition)
  1927. * }}
  1928. * />
  1929. * ```
  1930. */
  1931. onAnimationComplete?(definition: AnimationDefinition): void;
  1932. }
  1933. type EventProps = LayoutLifecycles & AnimationLifecycles;
  1934. type MotionComponentProps<Props> = {
  1935. [K in Exclude<keyof Props, keyof MotionProps>]?: Props[K];
  1936. } & MotionProps;
  1937. interface HTMLElements {
  1938. a: HTMLAnchorElement;
  1939. abbr: HTMLElement;
  1940. address: HTMLElement;
  1941. area: HTMLAreaElement;
  1942. article: HTMLElement;
  1943. aside: HTMLElement;
  1944. audio: HTMLAudioElement;
  1945. b: HTMLElement;
  1946. base: HTMLBaseElement;
  1947. bdi: HTMLElement;
  1948. bdo: HTMLElement;
  1949. big: HTMLElement;
  1950. blockquote: HTMLQuoteElement;
  1951. body: HTMLBodyElement;
  1952. br: HTMLBRElement;
  1953. button: HTMLButtonElement;
  1954. canvas: HTMLCanvasElement;
  1955. caption: HTMLElement;
  1956. center: HTMLElement;
  1957. cite: HTMLElement;
  1958. code: HTMLElement;
  1959. col: HTMLTableColElement;
  1960. colgroup: HTMLTableColElement;
  1961. data: HTMLDataElement;
  1962. datalist: HTMLDataListElement;
  1963. dd: HTMLElement;
  1964. del: HTMLModElement;
  1965. details: HTMLDetailsElement;
  1966. dfn: HTMLElement;
  1967. dialog: HTMLDialogElement;
  1968. div: HTMLDivElement;
  1969. dl: HTMLDListElement;
  1970. dt: HTMLElement;
  1971. em: HTMLElement;
  1972. embed: HTMLEmbedElement;
  1973. fieldset: HTMLFieldSetElement;
  1974. figcaption: HTMLElement;
  1975. figure: HTMLElement;
  1976. footer: HTMLElement;
  1977. form: HTMLFormElement;
  1978. h1: HTMLHeadingElement;
  1979. h2: HTMLHeadingElement;
  1980. h3: HTMLHeadingElement;
  1981. h4: HTMLHeadingElement;
  1982. h5: HTMLHeadingElement;
  1983. h6: HTMLHeadingElement;
  1984. head: HTMLHeadElement;
  1985. header: HTMLElement;
  1986. hgroup: HTMLElement;
  1987. hr: HTMLHRElement;
  1988. html: HTMLHtmlElement;
  1989. i: HTMLElement;
  1990. iframe: HTMLIFrameElement;
  1991. img: HTMLImageElement;
  1992. input: HTMLInputElement;
  1993. ins: HTMLModElement;
  1994. kbd: HTMLElement;
  1995. keygen: HTMLElement;
  1996. label: HTMLLabelElement;
  1997. legend: HTMLLegendElement;
  1998. li: HTMLLIElement;
  1999. link: HTMLLinkElement;
  2000. main: HTMLElement;
  2001. map: HTMLMapElement;
  2002. mark: HTMLElement;
  2003. menu: HTMLElement;
  2004. menuitem: HTMLElement;
  2005. meta: HTMLMetaElement;
  2006. meter: HTMLMeterElement;
  2007. nav: HTMLElement;
  2008. noindex: HTMLElement;
  2009. noscript: HTMLElement;
  2010. object: HTMLObjectElement;
  2011. ol: HTMLOListElement;
  2012. optgroup: HTMLOptGroupElement;
  2013. option: HTMLOptionElement;
  2014. output: HTMLOutputElement;
  2015. p: HTMLParagraphElement;
  2016. param: HTMLParamElement;
  2017. picture: HTMLElement;
  2018. pre: HTMLPreElement;
  2019. progress: HTMLProgressElement;
  2020. q: HTMLQuoteElement;
  2021. rp: HTMLElement;
  2022. rt: HTMLElement;
  2023. ruby: HTMLElement;
  2024. s: HTMLElement;
  2025. samp: HTMLElement;
  2026. search: HTMLElement;
  2027. slot: HTMLSlotElement;
  2028. script: HTMLScriptElement;
  2029. section: HTMLElement;
  2030. select: HTMLSelectElement;
  2031. small: HTMLElement;
  2032. source: HTMLSourceElement;
  2033. span: HTMLSpanElement;
  2034. strong: HTMLElement;
  2035. style: HTMLStyleElement;
  2036. sub: HTMLElement;
  2037. summary: HTMLElement;
  2038. sup: HTMLElement;
  2039. table: HTMLTableElement;
  2040. template: HTMLTemplateElement;
  2041. tbody: HTMLTableSectionElement;
  2042. td: HTMLTableDataCellElement;
  2043. textarea: HTMLTextAreaElement;
  2044. tfoot: HTMLTableSectionElement;
  2045. th: HTMLTableHeaderCellElement;
  2046. thead: HTMLTableSectionElement;
  2047. time: HTMLTimeElement;
  2048. title: HTMLTitleElement;
  2049. tr: HTMLTableRowElement;
  2050. track: HTMLTrackElement;
  2051. u: HTMLElement;
  2052. ul: HTMLUListElement;
  2053. var: HTMLElement;
  2054. video: HTMLVideoElement;
  2055. wbr: HTMLElement;
  2056. webview: HTMLWebViewElement;
  2057. }
  2058. /**
  2059. * @public
  2060. */
  2061. type ForwardRefComponent<T, P> = {
  2062. readonly $$typeof: symbol;
  2063. } & ((props: PropsWithoutRef<P> & RefAttributes<T>) => JSX.Element);
  2064. type AttributesWithoutMotionProps<Attributes> = {
  2065. [K in Exclude<keyof Attributes, keyof MotionProps>]?: Attributes[K];
  2066. };
  2067. /**
  2068. * @public
  2069. */
  2070. type HTMLMotionProps<Tag extends keyof HTMLElements> = AttributesWithoutMotionProps<JSX.IntrinsicElements[Tag]> & MotionProps;
  2071. /**
  2072. * Motion-optimised versions of React's HTML components.
  2073. *
  2074. * @public
  2075. */
  2076. type HTMLMotionComponents = {
  2077. [K in keyof HTMLElements]: ForwardRefComponent<HTMLElements[K], HTMLMotionProps<K>>;
  2078. };
  2079. interface ScrollOptions {
  2080. source?: HTMLElement;
  2081. container?: HTMLElement;
  2082. target?: Element;
  2083. axis?: "x" | "y";
  2084. offset?: ScrollOffset;
  2085. }
  2086. type SupportedEdgeUnit = "px" | "vw" | "vh" | "%";
  2087. type EdgeUnit = `${number}${SupportedEdgeUnit}`;
  2088. type NamedEdges = "start" | "end" | "center";
  2089. type EdgeString = NamedEdges | EdgeUnit | `${number}`;
  2090. type Edge = EdgeString | number;
  2091. type ProgressIntersection = [number, number];
  2092. type Intersection = `${Edge} ${Edge}`;
  2093. type ScrollOffset = Array<Edge | Intersection | ProgressIntersection>;
  2094. declare global {
  2095. interface Window {
  2096. ScrollTimeline: ScrollTimeline;
  2097. }
  2098. }
  2099. declare class ScrollTimeline implements ProgressTimeline {
  2100. constructor(options: ScrollOptions);
  2101. currentTime: null | {
  2102. value: number;
  2103. };
  2104. cancel?: VoidFunction;
  2105. }
  2106. type UnionStringArray<T extends Readonly<string[]>> = T[number];
  2107. 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"];
  2108. type SVGElements = UnionStringArray<typeof svgElements>;
  2109. interface SVGAttributesWithoutMotionProps<T> extends Pick<SVGAttributes<T>, Exclude<keyof SVGAttributes<T>, keyof MotionProps>> {
  2110. }
  2111. /**
  2112. * Blanket-accept any SVG attribute as a `MotionValue`
  2113. * @public
  2114. */
  2115. type SVGAttributesAsMotionValues<T> = MakeMotion<SVGAttributesWithoutMotionProps<T>>;
  2116. type UnwrapSVGFactoryElement<F> = F extends React.SVGProps<infer P> ? P : never;
  2117. /**
  2118. * @public
  2119. */
  2120. interface SVGMotionProps<T> extends SVGAttributesAsMotionValues<T>, MotionProps {
  2121. }
  2122. /**
  2123. * Motion-optimised versions of React's SVG components.
  2124. *
  2125. * @public
  2126. */
  2127. type SVGMotionComponents = {
  2128. [K in SVGElements]: ForwardRefComponent<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>, SVGMotionProps<UnwrapSVGFactoryElement<JSX.IntrinsicElements[K]>>>;
  2129. };
  2130. declare const optimizedAppearDataAttribute: "data-framer-appear-id";
  2131. /**
  2132. * Expose only the needed part of the VisualElement interface to
  2133. * ensure React types don't end up in the generic DOM bundle.
  2134. */
  2135. interface WithAppearProps {
  2136. props: {
  2137. [optimizedAppearDataAttribute]?: string;
  2138. values?: {
  2139. [key: string]: MotionValue<number> | MotionValue<string>;
  2140. };
  2141. };
  2142. }
  2143. type HandoffFunction = (storeId: string, valueName: string, frame: Batcher) => number | null;
  2144. /**
  2145. * The window global object acts as a bridge between our inline script
  2146. * triggering the optimized appear animations, and Motion.
  2147. */
  2148. declare global {
  2149. interface Window {
  2150. MotionHandoffAnimation?: HandoffFunction;
  2151. MotionHandoffMarkAsComplete?: (elementId: string) => void;
  2152. MotionHandoffIsComplete?: (elementId: string) => boolean;
  2153. MotionHasOptimisedAnimation?: (elementId?: string, valueName?: string) => boolean;
  2154. MotionCancelOptimisedAnimation?: (elementId?: string, valueName?: string, frame?: Batcher, canResume?: boolean) => void;
  2155. MotionCheckAppearSync?: (visualElement: WithAppearProps, valueName: string, value: MotionValue) => VoidFunction | void;
  2156. MotionIsMounted?: boolean;
  2157. }
  2158. }
  2159. type DOMMotionComponents = HTMLMotionComponents & SVGMotionComponents;
  2160. declare const createMinimalMotionComponent: <Props, TagName extends string = "div">(Component: string | TagName | React$1.ComponentType<Props>, { forwardMotionProps }?: {
  2161. forwardMotionProps: boolean;
  2162. }) => TagName extends "symbol" | "clipPath" | "filter" | "mask" | "marker" | "text" | "animate" | "path" | "image" | "circle" | "switch" | "stop" | "svg" | keyof HTMLElements | "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" | "textPath" | "tspan" | "use" | "view" ? DOMMotionComponents[TagName] : React$1.ComponentType<Omit<MotionComponentProps<Props>, "children"> & {
  2163. children?: ("children" extends keyof Props ? Props[keyof Props & "children"] | MotionComponentProps<Props>[keyof Props & "children"] : MotionComponentProps<Props>["children"]) | undefined;
  2164. }>;
  2165. /**
  2166. * HTML components
  2167. */
  2168. declare const MotionA: ForwardRefComponent<HTMLAnchorElement, HTMLMotionProps<"a">>;
  2169. declare const MotionAbbr: ForwardRefComponent<HTMLElement, HTMLMotionProps<"abbr">>;
  2170. declare const MotionAddress: ForwardRefComponent<HTMLElement, HTMLMotionProps<"address">>;
  2171. declare const MotionArea: ForwardRefComponent<HTMLAreaElement, HTMLMotionProps<"area">>;
  2172. declare const MotionArticle: ForwardRefComponent<HTMLElement, HTMLMotionProps<"article">>;
  2173. declare const MotionAside: ForwardRefComponent<HTMLElement, HTMLMotionProps<"aside">>;
  2174. declare const MotionAudio: ForwardRefComponent<HTMLAudioElement, HTMLMotionProps<"audio">>;
  2175. declare const MotionB: ForwardRefComponent<HTMLElement, HTMLMotionProps<"b">>;
  2176. declare const MotionBase: ForwardRefComponent<HTMLBaseElement, HTMLMotionProps<"base">>;
  2177. declare const MotionBdi: ForwardRefComponent<HTMLElement, HTMLMotionProps<"bdi">>;
  2178. declare const MotionBdo: ForwardRefComponent<HTMLElement, HTMLMotionProps<"bdo">>;
  2179. declare const MotionBig: ForwardRefComponent<HTMLElement, HTMLMotionProps<"big">>;
  2180. declare const MotionBlockquote: ForwardRefComponent<HTMLQuoteElement, HTMLMotionProps<"blockquote">>;
  2181. declare const MotionBody: ForwardRefComponent<HTMLBodyElement, HTMLMotionProps<"body">>;
  2182. declare const MotionButton: ForwardRefComponent<HTMLButtonElement, HTMLMotionProps<"button">>;
  2183. declare const MotionCanvas: ForwardRefComponent<HTMLCanvasElement, HTMLMotionProps<"canvas">>;
  2184. declare const MotionCaption: ForwardRefComponent<HTMLElement, HTMLMotionProps<"caption">>;
  2185. declare const MotionCite: ForwardRefComponent<HTMLElement, HTMLMotionProps<"cite">>;
  2186. declare const MotionCode: ForwardRefComponent<HTMLElement, HTMLMotionProps<"code">>;
  2187. declare const MotionCol: ForwardRefComponent<HTMLTableColElement, HTMLMotionProps<"col">>;
  2188. declare const MotionColgroup: ForwardRefComponent<HTMLTableColElement, HTMLMotionProps<"colgroup">>;
  2189. declare const MotionData: ForwardRefComponent<HTMLDataElement, HTMLMotionProps<"data">>;
  2190. declare const MotionDatalist: ForwardRefComponent<HTMLDataListElement, HTMLMotionProps<"datalist">>;
  2191. declare const MotionDd: ForwardRefComponent<HTMLElement, HTMLMotionProps<"dd">>;
  2192. declare const MotionDel: ForwardRefComponent<HTMLModElement, HTMLMotionProps<"del">>;
  2193. declare const MotionDetails: ForwardRefComponent<HTMLDetailsElement, HTMLMotionProps<"details">>;
  2194. declare const MotionDfn: ForwardRefComponent<HTMLElement, HTMLMotionProps<"dfn">>;
  2195. declare const MotionDialog: ForwardRefComponent<HTMLDialogElement, HTMLMotionProps<"dialog">>;
  2196. declare const MotionDiv: ForwardRefComponent<HTMLDivElement, HTMLMotionProps<"div">>;
  2197. declare const MotionDl: ForwardRefComponent<HTMLDListElement, HTMLMotionProps<"dl">>;
  2198. declare const MotionDt: ForwardRefComponent<HTMLElement, HTMLMotionProps<"dt">>;
  2199. declare const MotionEm: ForwardRefComponent<HTMLElement, HTMLMotionProps<"em">>;
  2200. declare const MotionEmbed: ForwardRefComponent<HTMLEmbedElement, HTMLMotionProps<"embed">>;
  2201. declare const MotionFieldset: ForwardRefComponent<HTMLFieldSetElement, HTMLMotionProps<"fieldset">>;
  2202. declare const MotionFigcaption: ForwardRefComponent<HTMLElement, HTMLMotionProps<"figcaption">>;
  2203. declare const MotionFigure: ForwardRefComponent<HTMLElement, HTMLMotionProps<"figure">>;
  2204. declare const MotionFooter: ForwardRefComponent<HTMLElement, HTMLMotionProps<"footer">>;
  2205. declare const MotionForm: ForwardRefComponent<HTMLFormElement, HTMLMotionProps<"form">>;
  2206. declare const MotionH1: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h1">>;
  2207. declare const MotionH2: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h2">>;
  2208. declare const MotionH3: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h3">>;
  2209. declare const MotionH4: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h4">>;
  2210. declare const MotionH5: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h5">>;
  2211. declare const MotionH6: ForwardRefComponent<HTMLHeadingElement, HTMLMotionProps<"h6">>;
  2212. declare const MotionHead: ForwardRefComponent<HTMLHeadElement, HTMLMotionProps<"head">>;
  2213. declare const MotionHeader: ForwardRefComponent<HTMLElement, HTMLMotionProps<"header">>;
  2214. declare const MotionHgroup: ForwardRefComponent<HTMLElement, HTMLMotionProps<"hgroup">>;
  2215. declare const MotionHr: ForwardRefComponent<HTMLHRElement, HTMLMotionProps<"hr">>;
  2216. declare const MotionHtml: ForwardRefComponent<HTMLHtmlElement, HTMLMotionProps<"html">>;
  2217. declare const MotionI: ForwardRefComponent<HTMLElement, HTMLMotionProps<"i">>;
  2218. declare const MotionIframe: ForwardRefComponent<HTMLIFrameElement, HTMLMotionProps<"iframe">>;
  2219. declare const MotionImg: ForwardRefComponent<HTMLImageElement, HTMLMotionProps<"img">>;
  2220. declare const MotionInput: ForwardRefComponent<HTMLInputElement, HTMLMotionProps<"input">>;
  2221. declare const MotionIns: ForwardRefComponent<HTMLModElement, HTMLMotionProps<"ins">>;
  2222. declare const MotionKbd: ForwardRefComponent<HTMLElement, HTMLMotionProps<"kbd">>;
  2223. declare const MotionKeygen: ForwardRefComponent<HTMLElement, HTMLMotionProps<"keygen">>;
  2224. declare const MotionLabel: ForwardRefComponent<HTMLLabelElement, HTMLMotionProps<"label">>;
  2225. declare const MotionLegend: ForwardRefComponent<HTMLLegendElement, HTMLMotionProps<"legend">>;
  2226. declare const MotionLi: ForwardRefComponent<HTMLLIElement, HTMLMotionProps<"li">>;
  2227. declare const MotionLink: ForwardRefComponent<HTMLLinkElement, HTMLMotionProps<"link">>;
  2228. declare const MotionMain: ForwardRefComponent<HTMLElement, HTMLMotionProps<"main">>;
  2229. declare const MotionMap: ForwardRefComponent<HTMLMapElement, HTMLMotionProps<"map">>;
  2230. declare const MotionMark: ForwardRefComponent<HTMLElement, HTMLMotionProps<"mark">>;
  2231. declare const MotionMenu: ForwardRefComponent<HTMLElement, HTMLMotionProps<"menu">>;
  2232. declare const MotionMenuitem: ForwardRefComponent<HTMLElement, HTMLMotionProps<"menuitem">>;
  2233. declare const MotionMeter: ForwardRefComponent<HTMLMeterElement, HTMLMotionProps<"meter">>;
  2234. declare const MotionNav: ForwardRefComponent<HTMLElement, HTMLMotionProps<"nav">>;
  2235. declare const MotionObject: ForwardRefComponent<HTMLObjectElement, HTMLMotionProps<"object">>;
  2236. declare const MotionOl: ForwardRefComponent<HTMLOListElement, HTMLMotionProps<"ol">>;
  2237. declare const MotionOptgroup: ForwardRefComponent<HTMLOptGroupElement, HTMLMotionProps<"optgroup">>;
  2238. declare const MotionOption: ForwardRefComponent<HTMLOptionElement, HTMLMotionProps<"option">>;
  2239. declare const MotionOutput: ForwardRefComponent<HTMLOutputElement, HTMLMotionProps<"output">>;
  2240. declare const MotionP: ForwardRefComponent<HTMLParagraphElement, HTMLMotionProps<"p">>;
  2241. declare const MotionParam: ForwardRefComponent<HTMLParamElement, HTMLMotionProps<"param">>;
  2242. declare const MotionPicture: ForwardRefComponent<HTMLElement, HTMLMotionProps<"picture">>;
  2243. declare const MotionPre: ForwardRefComponent<HTMLPreElement, HTMLMotionProps<"pre">>;
  2244. declare const MotionProgress: ForwardRefComponent<HTMLProgressElement, HTMLMotionProps<"progress">>;
  2245. declare const MotionQ: ForwardRefComponent<HTMLQuoteElement, HTMLMotionProps<"q">>;
  2246. declare const MotionRp: ForwardRefComponent<HTMLElement, HTMLMotionProps<"rp">>;
  2247. declare const MotionRt: ForwardRefComponent<HTMLElement, HTMLMotionProps<"rt">>;
  2248. declare const MotionRuby: ForwardRefComponent<HTMLElement, HTMLMotionProps<"ruby">>;
  2249. declare const MotionS: ForwardRefComponent<HTMLElement, HTMLMotionProps<"s">>;
  2250. declare const MotionSamp: ForwardRefComponent<HTMLElement, HTMLMotionProps<"samp">>;
  2251. declare const MotionScript: ForwardRefComponent<HTMLScriptElement, HTMLMotionProps<"script">>;
  2252. declare const MotionSection: ForwardRefComponent<HTMLElement, HTMLMotionProps<"section">>;
  2253. declare const MotionSelect: ForwardRefComponent<HTMLSelectElement, HTMLMotionProps<"select">>;
  2254. declare const MotionSmall: ForwardRefComponent<HTMLElement, HTMLMotionProps<"small">>;
  2255. declare const MotionSource: ForwardRefComponent<HTMLSourceElement, HTMLMotionProps<"source">>;
  2256. declare const MotionSpan: ForwardRefComponent<HTMLSpanElement, HTMLMotionProps<"span">>;
  2257. declare const MotionStrong: ForwardRefComponent<HTMLElement, HTMLMotionProps<"strong">>;
  2258. declare const MotionStyle: ForwardRefComponent<HTMLStyleElement, HTMLMotionProps<"style">>;
  2259. declare const MotionSub: ForwardRefComponent<HTMLElement, HTMLMotionProps<"sub">>;
  2260. declare const MotionSummary: ForwardRefComponent<HTMLElement, HTMLMotionProps<"summary">>;
  2261. declare const MotionSup: ForwardRefComponent<HTMLElement, HTMLMotionProps<"sup">>;
  2262. declare const MotionTable: ForwardRefComponent<HTMLTableElement, HTMLMotionProps<"table">>;
  2263. declare const MotionTbody: ForwardRefComponent<HTMLTableSectionElement, HTMLMotionProps<"tbody">>;
  2264. declare const MotionTd: ForwardRefComponent<HTMLTableDataCellElement, HTMLMotionProps<"td">>;
  2265. declare const MotionTextarea: ForwardRefComponent<HTMLTextAreaElement, HTMLMotionProps<"textarea">>;
  2266. declare const MotionTfoot: ForwardRefComponent<HTMLTableSectionElement, HTMLMotionProps<"tfoot">>;
  2267. declare const MotionTh: ForwardRefComponent<HTMLTableHeaderCellElement, HTMLMotionProps<"th">>;
  2268. declare const MotionThead: ForwardRefComponent<HTMLTableSectionElement, HTMLMotionProps<"thead">>;
  2269. declare const MotionTime: ForwardRefComponent<HTMLTimeElement, HTMLMotionProps<"time">>;
  2270. declare const MotionTitle: ForwardRefComponent<HTMLTitleElement, HTMLMotionProps<"title">>;
  2271. declare const MotionTr: ForwardRefComponent<HTMLTableRowElement, HTMLMotionProps<"tr">>;
  2272. declare const MotionTrack: ForwardRefComponent<HTMLTrackElement, HTMLMotionProps<"track">>;
  2273. declare const MotionU: ForwardRefComponent<HTMLElement, HTMLMotionProps<"u">>;
  2274. declare const MotionUl: ForwardRefComponent<HTMLUListElement, HTMLMotionProps<"ul">>;
  2275. declare const MotionVideo: ForwardRefComponent<HTMLVideoElement, HTMLMotionProps<"video">>;
  2276. declare const MotionWbr: ForwardRefComponent<HTMLElement, HTMLMotionProps<"wbr">>;
  2277. declare const MotionWebview: ForwardRefComponent<HTMLWebViewElement, HTMLMotionProps<"webview">>;
  2278. /**
  2279. * SVG components
  2280. */
  2281. declare const MotionAnimate: ForwardRefComponent<SVGElement, SVGMotionProps<SVGElement>>;
  2282. declare const MotionCircle: ForwardRefComponent<SVGCircleElement, SVGMotionProps<SVGCircleElement>>;
  2283. declare const MotionDefs: ForwardRefComponent<SVGDefsElement, SVGMotionProps<SVGDefsElement>>;
  2284. declare const MotionDesc: ForwardRefComponent<SVGDescElement, SVGMotionProps<SVGDescElement>>;
  2285. declare const MotionEllipse: ForwardRefComponent<SVGEllipseElement, SVGMotionProps<SVGEllipseElement>>;
  2286. declare const MotionG: ForwardRefComponent<SVGGElement, SVGMotionProps<SVGGElement>>;
  2287. declare const MotionImage: ForwardRefComponent<SVGImageElement, SVGMotionProps<SVGImageElement>>;
  2288. declare const MotionLine: ForwardRefComponent<SVGLineElement, SVGMotionProps<SVGLineElement>>;
  2289. declare const MotionFilter: ForwardRefComponent<SVGFilterElement, SVGMotionProps<SVGFilterElement>>;
  2290. declare const MotionMarker: ForwardRefComponent<SVGMarkerElement, SVGMotionProps<SVGMarkerElement>>;
  2291. declare const MotionMask: ForwardRefComponent<SVGMaskElement, SVGMotionProps<SVGMaskElement>>;
  2292. declare const MotionMetadata: ForwardRefComponent<SVGMetadataElement, SVGMotionProps<SVGMetadataElement>>;
  2293. declare const MotionPath: ForwardRefComponent<SVGPathElement, SVGMotionProps<SVGPathElement>>;
  2294. declare const MotionPattern: ForwardRefComponent<SVGPatternElement, SVGMotionProps<SVGPatternElement>>;
  2295. declare const MotionPolygon: ForwardRefComponent<SVGPolygonElement, SVGMotionProps<SVGPolygonElement>>;
  2296. declare const MotionPolyline: ForwardRefComponent<SVGPolylineElement, SVGMotionProps<SVGPolylineElement>>;
  2297. declare const MotionRect: ForwardRefComponent<SVGRectElement, SVGMotionProps<SVGRectElement>>;
  2298. declare const MotionStop: ForwardRefComponent<SVGStopElement, SVGMotionProps<SVGStopElement>>;
  2299. declare const MotionSvg: ForwardRefComponent<SVGSVGElement, SVGMotionProps<SVGSVGElement>>;
  2300. declare const MotionSymbol: ForwardRefComponent<SVGSymbolElement, SVGMotionProps<SVGSymbolElement>>;
  2301. declare const MotionText: ForwardRefComponent<SVGTextElement, SVGMotionProps<SVGTextElement>>;
  2302. declare const MotionTspan: ForwardRefComponent<SVGTSpanElement, SVGMotionProps<SVGTSpanElement>>;
  2303. declare const MotionUse: ForwardRefComponent<SVGUseElement, SVGMotionProps<SVGUseElement>>;
  2304. declare const MotionView: ForwardRefComponent<SVGViewElement, SVGMotionProps<SVGViewElement>>;
  2305. declare const MotionClipPath: ForwardRefComponent<SVGClipPathElement, SVGMotionProps<SVGClipPathElement>>;
  2306. declare const MotionFeBlend: ForwardRefComponent<SVGFEBlendElement, SVGMotionProps<SVGFEBlendElement>>;
  2307. declare const MotionFeColorMatrix: ForwardRefComponent<SVGFEColorMatrixElement, SVGMotionProps<SVGFEColorMatrixElement>>;
  2308. declare const MotionFeComponentTransfer: ForwardRefComponent<SVGFEComponentTransferElement, SVGMotionProps<SVGFEComponentTransferElement>>;
  2309. declare const MotionFeComposite: ForwardRefComponent<SVGFECompositeElement, SVGMotionProps<SVGFECompositeElement>>;
  2310. declare const MotionFeConvolveMatrix: ForwardRefComponent<SVGFEConvolveMatrixElement, SVGMotionProps<SVGFEConvolveMatrixElement>>;
  2311. declare const MotionFeDiffuseLighting: ForwardRefComponent<SVGFEDiffuseLightingElement, SVGMotionProps<SVGFEDiffuseLightingElement>>;
  2312. declare const MotionFeDisplacementMap: ForwardRefComponent<SVGFEDisplacementMapElement, SVGMotionProps<SVGFEDisplacementMapElement>>;
  2313. declare const MotionFeDistantLight: ForwardRefComponent<SVGFEDistantLightElement, SVGMotionProps<SVGFEDistantLightElement>>;
  2314. declare const MotionFeDropShadow: ForwardRefComponent<SVGFEDropShadowElement, SVGMotionProps<SVGFEDropShadowElement>>;
  2315. declare const MotionFeFlood: ForwardRefComponent<SVGFEFloodElement, SVGMotionProps<SVGFEFloodElement>>;
  2316. declare const MotionFeFuncA: ForwardRefComponent<SVGFEFuncAElement, SVGMotionProps<SVGFEFuncAElement>>;
  2317. declare const MotionFeFuncB: ForwardRefComponent<SVGFEFuncBElement, SVGMotionProps<SVGFEFuncBElement>>;
  2318. declare const MotionFeFuncG: ForwardRefComponent<SVGFEFuncGElement, SVGMotionProps<SVGFEFuncGElement>>;
  2319. declare const MotionFeFuncR: ForwardRefComponent<SVGFEFuncRElement, SVGMotionProps<SVGFEFuncRElement>>;
  2320. declare const MotionFeGaussianBlur: ForwardRefComponent<SVGFEGaussianBlurElement, SVGMotionProps<SVGFEGaussianBlurElement>>;
  2321. declare const MotionFeImage: ForwardRefComponent<SVGFEImageElement, SVGMotionProps<SVGFEImageElement>>;
  2322. declare const MotionFeMerge: ForwardRefComponent<SVGFEMergeElement, SVGMotionProps<SVGFEMergeElement>>;
  2323. declare const MotionFeMergeNode: ForwardRefComponent<SVGFEMergeNodeElement, SVGMotionProps<SVGFEMergeNodeElement>>;
  2324. declare const MotionFeMorphology: ForwardRefComponent<SVGFEMorphologyElement, SVGMotionProps<SVGFEMorphologyElement>>;
  2325. declare const MotionFeOffset: ForwardRefComponent<SVGFEOffsetElement, SVGMotionProps<SVGFEOffsetElement>>;
  2326. declare const MotionFePointLight: ForwardRefComponent<SVGFEPointLightElement, SVGMotionProps<SVGFEPointLightElement>>;
  2327. declare const MotionFeSpecularLighting: ForwardRefComponent<SVGFESpecularLightingElement, SVGMotionProps<SVGFESpecularLightingElement>>;
  2328. declare const MotionFeSpotLight: ForwardRefComponent<SVGFESpotLightElement, SVGMotionProps<SVGFESpotLightElement>>;
  2329. declare const MotionFeTile: ForwardRefComponent<SVGFETileElement, SVGMotionProps<SVGFETileElement>>;
  2330. declare const MotionFeTurbulence: ForwardRefComponent<SVGFETurbulenceElement, SVGMotionProps<SVGFETurbulenceElement>>;
  2331. declare const MotionForeignObject: ForwardRefComponent<SVGForeignObjectElement, SVGMotionProps<SVGForeignObjectElement>>;
  2332. declare const MotionLinearGradient: ForwardRefComponent<SVGLinearGradientElement, SVGMotionProps<SVGLinearGradientElement>>;
  2333. declare const MotionRadialGradient: ForwardRefComponent<SVGRadialGradientElement, SVGMotionProps<SVGRadialGradientElement>>;
  2334. declare const MotionTextPath: ForwardRefComponent<SVGTextPathElement, SVGMotionProps<SVGTextPathElement>>;
  2335. export { MotionA as a, MotionAbbr as abbr, MotionAddress as address, MotionAnimate as animate, MotionArea as area, MotionArticle as article, MotionAside as aside, MotionAudio as audio, MotionB as b, MotionBase as base, MotionBdi as bdi, MotionBdo as bdo, MotionBig as big, MotionBlockquote as blockquote, MotionBody as body, MotionButton as button, MotionCanvas as canvas, MotionCaption as caption, MotionCircle as circle, MotionCite as cite, MotionClipPath as clipPath, MotionCode as code, MotionCol as col, MotionColgroup as colgroup, createMinimalMotionComponent as create, MotionData as data, MotionDatalist as datalist, MotionDd as dd, MotionDefs as defs, MotionDel as del, MotionDesc as desc, MotionDetails as details, MotionDfn as dfn, MotionDialog as dialog, MotionDiv as div, MotionDl as dl, MotionDt as dt, MotionEllipse as ellipse, MotionEm as em, MotionEmbed as embed, MotionFeBlend as feBlend, MotionFeColorMatrix as feColorMatrix, MotionFeComponentTransfer as feComponentTransfer, MotionFeComposite as feComposite, MotionFeConvolveMatrix as feConvolveMatrix, MotionFeDiffuseLighting as feDiffuseLighting, MotionFeDisplacementMap as feDisplacementMap, MotionFeDistantLight as feDistantLight, MotionFeDropShadow as feDropShadow, MotionFeFlood as feFlood, MotionFeFuncA as feFuncA, MotionFeFuncB as feFuncB, MotionFeFuncG as feFuncG, MotionFeFuncR as feFuncR, MotionFeGaussianBlur as feGaussianBlur, MotionFeImage as feImage, MotionFeMerge as feMerge, MotionFeMergeNode as feMergeNode, MotionFeMorphology as feMorphology, MotionFeOffset as feOffset, MotionFePointLight as fePointLight, MotionFeSpecularLighting as feSpecularLighting, MotionFeSpotLight as feSpotLight, MotionFeTile as feTile, MotionFeTurbulence as feTurbulence, MotionFieldset as fieldset, MotionFigcaption as figcaption, MotionFigure as figure, MotionFilter as filter, MotionFooter as footer, MotionForeignObject as foreignObject, MotionForm as form, MotionG as g, MotionH1 as h1, MotionH2 as h2, MotionH3 as h3, MotionH4 as h4, MotionH5 as h5, MotionH6 as h6, MotionHead as head, MotionHeader as header, MotionHgroup as hgroup, MotionHr as hr, MotionHtml as html, MotionI as i, MotionIframe as iframe, MotionImage as image, MotionImg as img, MotionInput as input, MotionIns as ins, MotionKbd as kbd, MotionKeygen as keygen, MotionLabel as label, MotionLegend as legend, MotionLi as li, MotionLine as line, MotionLinearGradient as linearGradient, MotionLink as link, MotionMain as main, MotionMap as map, MotionMark as mark, MotionMarker as marker, MotionMask as mask, MotionMenu as menu, MotionMenuitem as menuitem, MotionMetadata as metadata, MotionMeter as meter, MotionNav as nav, MotionObject as object, MotionOl as ol, MotionOptgroup as optgroup, MotionOption as option, MotionOutput as output, MotionP as p, MotionParam as param, MotionPath as path, MotionPattern as pattern, MotionPicture as picture, MotionPolygon as polygon, MotionPolyline as polyline, MotionPre as pre, MotionProgress as progress, MotionQ as q, MotionRadialGradient as radialGradient, MotionRect as rect, MotionRp as rp, MotionRt as rt, MotionRuby as ruby, MotionS as s, MotionSamp as samp, MotionScript as script, MotionSection as section, MotionSelect as select, MotionSmall as small, MotionSource as source, MotionSpan as span, MotionStop as stop, MotionStrong as strong, MotionStyle as style, MotionSub as sub, MotionSummary as summary, MotionSup as sup, MotionSvg as svg, MotionSymbol as symbol, MotionTable as table, MotionTbody as tbody, MotionTd as td, MotionText as text, MotionTextPath as textPath, MotionTextarea as textarea, MotionTfoot as tfoot, MotionTh as th, MotionThead as thead, MotionTime as time, MotionTitle as title, MotionTr as tr, MotionTrack as track, MotionTspan as tspan, MotionU as u, MotionUl as ul, MotionUse as use, MotionVideo as video, MotionView as view, MotionWbr as wbr, MotionWebview as webview };