UNPKG

@humanspeak/svelte-motion

Version:

Framer Motion for Svelte 5. Declarative motion.<tag> components with AnimatePresence exit animations, gestures (hover, tap, drag, focus, in-view), variants, FLIP layout animations, shared-layout transitions, spring physics, and scroll-linked motion values

212 lines (211 loc) 13.3 kB
import AnimatePresence from './components/AnimatePresence.svelte'; import LayoutGroup from './components/LayoutGroup.svelte'; import LazyMotion from './components/LazyMotion.svelte'; import MotionConfig from './components/MotionConfig.svelte'; import PresenceChild from './components/PresenceChild.svelte'; export { domAnimation } from './features/domAnimation'; export { domMax } from './features/domMax'; export { domMin } from './features/domMin'; export { m } from './m'; export { motion } from './motion'; // Re-export core animation functions from motion export { animate, delay, hover, inView, press, resize, scroll, stagger, transform } from 'motion'; // Re-export easing functions export { anticipate, backIn, backInOut, backOut, circIn, circInOut, circOut, cubicBezier, easeIn, easeInOut, easeOut } from 'motion'; // Re-export utility functions export { clamp, distance, distance2D, interpolate, mix, pipe, progress, wrap } from 'motion'; export { useAnimate } from './utils/animate.svelte'; export { animationControls, isAnimationControls, useAnimation, useAnimationControls } from './utils/animationControls.svelte'; export { useAnimationFrame } from './utils/animationFrame'; export { useCycle } from './utils/cycle.svelte'; export { createDragControls } from './utils/dragControls'; export { useFollowValue } from './utils/followValue.svelte'; export { useInView } from './utils/inView.svelte'; export { useMotionTemplate } from './utils/motionTemplate.svelte'; export { useMotionValue } from './utils/motionValue.svelte'; export { useMotionValueEvent } from './utils/motionValueEvent'; export { optimizedAppearDataAttribute, startOptimizedAppearAnimation } from './utils/optimizedAppear'; export { useReducedMotion } from './utils/reducedMotion.svelte'; export { useReducedMotionConfig } from './utils/reducedMotionConfig.svelte'; export { useScroll } from './utils/scroll.svelte'; export { useSpring } from './utils/spring.svelte'; export { useIsPresent, usePresence, usePresenceData } from './utils/usePresence'; export { useVelocity } from './utils/velocity.svelte'; /** * @deprecated Use `styleString` instead for reactive styles with automatic unit handling. */ export { stringifyStyleObject } from './utils/styleObject'; export { styleString } from './utils/styleObject.svelte'; export { useTime } from './utils/time.svelte'; export { useTransform } from './utils/transform.svelte'; export { AnimatePresence, LayoutGroup, LazyMotion, MotionConfig, PresenceChild }; // Named component exports — tree-shakeable alternative to the `motion` object export { default as MotionA } from './html/A.svelte'; export { default as MotionAbbr } from './html/Abbr.svelte'; export { default as MotionAddress } from './html/Address.svelte'; export { default as MotionAnimateElement } from './html/Animate.svelte'; export { default as MotionAnimatemotion } from './html/Animatemotion.svelte'; export { default as MotionAnimatetransform } from './html/Animatetransform.svelte'; export { default as MotionArea } from './html/Area.svelte'; export { default as MotionArticle } from './html/Article.svelte'; export { default as MotionAside } from './html/Aside.svelte'; export { default as MotionAudio } from './html/Audio.svelte'; export { default as MotionB } from './html/B.svelte'; export { default as MotionBase } from './html/Base.svelte'; export { default as MotionBdi } from './html/Bdi.svelte'; export { default as MotionBdo } from './html/Bdo.svelte'; export { default as MotionBlockquote } from './html/Blockquote.svelte'; export { default as MotionBr } from './html/Br.svelte'; export { default as MotionButton } from './html/Button.svelte'; export { default as MotionCanvas } from './html/Canvas.svelte'; export { default as MotionCaption } from './html/Caption.svelte'; export { default as MotionCircle } from './html/Circle.svelte'; export { default as MotionCite } from './html/Cite.svelte'; export { default as MotionClippath } from './html/Clippath.svelte'; export { default as MotionCode } from './html/Code.svelte'; export { default as MotionCol } from './html/Col.svelte'; export { default as MotionColgroup } from './html/Colgroup.svelte'; export { default as MotionCursor } from './html/Cursor.svelte'; export { default as MotionData } from './html/Data.svelte'; export { default as MotionDatalist } from './html/Datalist.svelte'; export { default as MotionDd } from './html/Dd.svelte'; export { default as MotionDefs } from './html/Defs.svelte'; export { default as MotionDel } from './html/Del.svelte'; export { default as MotionDesc } from './html/Desc.svelte'; export { default as MotionDetails } from './html/Details.svelte'; export { default as MotionDfn } from './html/Dfn.svelte'; export { default as MotionDialog } from './html/Dialog.svelte'; export { default as MotionDiv } from './html/Div.svelte'; export { default as MotionDl } from './html/Dl.svelte'; export { default as MotionDt } from './html/Dt.svelte'; export { default as MotionEllipse } from './html/Ellipse.svelte'; export { default as MotionEm } from './html/Em.svelte'; export { default as MotionEmbed } from './html/Embed.svelte'; export { default as MotionFeblend } from './html/Feblend.svelte'; export { default as MotionFecolormatrix } from './html/Fecolormatrix.svelte'; export { default as MotionFecomponenttransfer } from './html/Fecomponenttransfer.svelte'; export { default as MotionFecomposite } from './html/Fecomposite.svelte'; export { default as MotionFeconvolvematrix } from './html/Feconvolvematrix.svelte'; export { default as MotionFediffuselighting } from './html/Fediffuselighting.svelte'; export { default as MotionFedisplacementmap } from './html/Fedisplacementmap.svelte'; export { default as MotionFedistantlight } from './html/Fedistantlight.svelte'; export { default as MotionFeflood } from './html/Feflood.svelte'; export { default as MotionFefunca } from './html/Fefunca.svelte'; export { default as MotionFefuncb } from './html/Fefuncb.svelte'; export { default as MotionFefuncg } from './html/Fefuncg.svelte'; export { default as MotionFefuncr } from './html/Fefuncr.svelte'; export { default as MotionFegaussianblur } from './html/Fegaussianblur.svelte'; export { default as MotionFeimage } from './html/Feimage.svelte'; export { default as MotionFemerge } from './html/Femerge.svelte'; export { default as MotionFemergenode } from './html/Femergenode.svelte'; export { default as MotionFemorphology } from './html/Femorphology.svelte'; export { default as MotionFeoffset } from './html/Feoffset.svelte'; export { default as MotionFepointlight } from './html/Fepointlight.svelte'; export { default as MotionFespecularlighting } from './html/Fespecularlighting.svelte'; export { default as MotionFespotlight } from './html/Fespotlight.svelte'; export { default as MotionFetile } from './html/Fetile.svelte'; export { default as MotionFeturbulence } from './html/Feturbulence.svelte'; export { default as MotionFieldset } from './html/Fieldset.svelte'; export { default as MotionFigcaption } from './html/Figcaption.svelte'; export { default as MotionFigure } from './html/Figure.svelte'; export { default as MotionFilter } from './html/Filter.svelte'; export { default as MotionFooter } from './html/Footer.svelte'; export { default as MotionForeignobject } from './html/Foreignobject.svelte'; export { default as MotionForm } from './html/Form.svelte'; export { default as MotionG } from './html/G.svelte'; export { default as MotionH1 } from './html/H1.svelte'; export { default as MotionH2 } from './html/H2.svelte'; export { default as MotionH3 } from './html/H3.svelte'; export { default as MotionH4 } from './html/H4.svelte'; export { default as MotionH5 } from './html/H5.svelte'; export { default as MotionH6 } from './html/H6.svelte'; export { default as MotionHeader } from './html/Header.svelte'; export { default as MotionHgroup } from './html/Hgroup.svelte'; export { default as MotionHr } from './html/Hr.svelte'; export { default as MotionI } from './html/I.svelte'; export { default as MotionIframe } from './html/Iframe.svelte'; export { default as MotionImage } from './html/Image.svelte'; export { default as MotionImg } from './html/Img.svelte'; export { default as MotionInput } from './html/Input.svelte'; export { default as MotionIns } from './html/Ins.svelte'; export { default as MotionKbd } from './html/Kbd.svelte'; export { default as MotionLabel } from './html/Label.svelte'; export { default as MotionLegend } from './html/Legend.svelte'; export { default as MotionLi } from './html/Li.svelte'; export { default as MotionLine } from './html/Line.svelte'; export { default as MotionLineargradient } from './html/Lineargradient.svelte'; export { default as MotionMain } from './html/Main.svelte'; export { default as MotionMap } from './html/Map.svelte'; export { default as MotionMark } from './html/Mark.svelte'; export { default as MotionMarker } from './html/Marker.svelte'; export { default as MotionMask } from './html/Mask.svelte'; export { default as MotionMath } from './html/Math.svelte'; export { default as MotionMenu } from './html/Menu.svelte'; export { default as MotionMetadata } from './html/Metadata.svelte'; export { default as MotionMeter } from './html/Meter.svelte'; export { default as MotionMpath } from './html/Mpath.svelte'; export { default as MotionNav } from './html/Nav.svelte'; export { default as MotionNoscript } from './html/Noscript.svelte'; export { default as MotionObject } from './html/Object.svelte'; export { default as MotionOl } from './html/Ol.svelte'; export { default as MotionOptgroup } from './html/Optgroup.svelte'; export { default as MotionOption } from './html/Option.svelte'; export { default as MotionOutput } from './html/Output.svelte'; export { default as MotionP } from './html/P.svelte'; export { default as MotionPath } from './html/Path.svelte'; export { default as MotionPattern } from './html/Pattern.svelte'; export { default as MotionPicture } from './html/Picture.svelte'; export { default as MotionPolygon } from './html/Polygon.svelte'; export { default as MotionPolyline } from './html/Polyline.svelte'; export { default as MotionPre } from './html/Pre.svelte'; export { default as MotionProgress } from './html/Progress.svelte'; export { default as MotionQ } from './html/Q.svelte'; export { default as MotionRadialgradient } from './html/Radialgradient.svelte'; export { default as MotionRect } from './html/Rect.svelte'; export { default as MotionRp } from './html/Rp.svelte'; export { default as MotionRt } from './html/Rt.svelte'; export { default as MotionRuby } from './html/Ruby.svelte'; export { default as MotionS } from './html/S.svelte'; export { default as MotionSamp } from './html/Samp.svelte'; export { default as MotionScript } from './html/Script.svelte'; export { default as MotionSearch } from './html/Search.svelte'; export { default as MotionSection } from './html/Section.svelte'; export { default as MotionSelect } from './html/Select.svelte'; export { default as MotionSelectedcontent } from './html/Selectedcontent.svelte'; export { default as MotionSet } from './html/SetElement.svelte'; export { default as MotionSlot } from './html/Slot.svelte'; export { default as MotionSmall } from './html/Small.svelte'; export { default as MotionSource } from './html/Source.svelte'; export { default as MotionSpan } from './html/Span.svelte'; export { default as MotionStop } from './html/Stop.svelte'; export { default as MotionStrong } from './html/Strong.svelte'; export { default as MotionStyle } from './html/Style.svelte'; export { default as MotionSub } from './html/Sub.svelte'; export { default as MotionSummary } from './html/Summary.svelte'; export { default as MotionSup } from './html/Sup.svelte'; export { default as MotionSvg } from './html/Svg.svelte'; export { default as MotionSwitch } from './html/Switch.svelte'; export { default as MotionSymbol } from './html/Symbol.svelte'; export { default as MotionTable } from './html/Table.svelte'; export { default as MotionTbody } from './html/Tbody.svelte'; export { default as MotionTd } from './html/Td.svelte'; export { default as MotionTemplate } from './html/Template.svelte'; export { default as MotionText } from './html/Text.svelte'; export { default as MotionTextarea } from './html/Textarea.svelte'; export { default as MotionTextpath } from './html/Textpath.svelte'; export { default as MotionTfoot } from './html/Tfoot.svelte'; export { default as MotionTh } from './html/Th.svelte'; export { default as MotionThead } from './html/Thead.svelte'; export { default as MotionTime } from './html/Time.svelte'; export { default as MotionTitle } from './html/Title.svelte'; export { default as MotionTr } from './html/Tr.svelte'; export { default as MotionTrack } from './html/Track.svelte'; export { default as MotionTref } from './html/Tref.svelte'; export { default as MotionTspan } from './html/Tspan.svelte'; export { default as MotionU } from './html/U.svelte'; export { default as MotionUl } from './html/Ul.svelte'; export { default as MotionUse } from './html/Use.svelte'; export { default as MotionVar } from './html/Var.svelte'; export { default as MotionVideo } from './html/Video.svelte'; export { default as MotionView } from './html/View.svelte'; export { default as MotionWbr } from './html/Wbr.svelte';