motion-v 0.5.0-beta.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1571 -608
- package/dist/es/animation/use-animate.mjs +1 -1
- package/dist/es/components/AnimatePresence.vue.mjs +1 -4
- package/dist/es/components/Motion.vue.mjs +50 -16
- package/dist/es/components/presence.mjs +2 -3
- package/dist/es/events/add-pointer-event.mjs +8 -0
- package/dist/es/events/event-info.mjs +16 -0
- package/dist/es/events/utils/is-primary-pointer.mjs +10 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +3 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +4 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +7 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +8 -2
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/linear.mjs +1 -2
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +32 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +9 -16
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +46 -17
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +23 -2
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +8 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/map.mjs +2 -2
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/events/add-dom-event.mjs +7 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/frame.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/render-step.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +15 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +13 -6
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -14
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/interpolate.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/features/feature-manager.mjs +26 -7
- package/dist/es/features/feature.mjs +10 -0
- package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +450 -0
- package/dist/es/features/gestures/drag/index.mjs +26 -0
- package/dist/es/features/gestures/drag/lock.mjs +42 -0
- package/dist/es/features/gestures/drag/utils/constraints.mjs +93 -0
- package/dist/es/features/gestures/drag/utils/is.mjs +6 -0
- package/dist/es/features/gestures/hover/index.mjs +40 -0
- package/dist/es/features/gestures/in-view/index.mjs +39 -0
- package/dist/es/features/gestures/pan/PanSession.mjs +150 -0
- package/dist/es/features/gestures/pan/index.mjs +69 -0
- package/dist/es/features/gestures/press/index.mjs +51 -0
- package/dist/es/features/layout/config.mjs +2 -2
- package/dist/es/features/layout/layout.mjs +24 -51
- package/dist/es/features/layout/projection.mjs +39 -0
- package/dist/es/features/svg.mjs +1 -1
- package/dist/es/index.mjs +41 -31
- package/dist/es/projection/conversion.mjs +31 -0
- package/dist/es/projection/geometry/delta-apply.mjs +7 -0
- package/dist/es/projection/geometry/delta-calc.mjs +6 -0
- package/dist/es/projection/geometry/models.mjs +11 -0
- package/dist/es/projection/utils/each-axis.mjs +6 -0
- package/dist/es/projection/utils/measure.mjs +20 -0
- package/dist/es/state/animate-variants-children.mjs +1 -1
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +31 -7
- package/dist/es/state/utils/is-present.mjs +7 -0
- package/dist/es/state/utils.mjs +0 -3
- package/dist/es/utils/clamp.mjs +10 -0
- package/dist/es/utils/get-context-window.mjs +6 -0
- package/dist/es/utils/mix/number.mjs +6 -0
- package/dist/es/utils/progress.mjs +7 -0
- package/dist/es/utils/time-conversion.mjs +8 -0
- package/dist/es/utils/use-animation-frame.mjs +1 -1
- package/dist/es/utils/use-in-view.mjs +1 -1
- package/dist/es/value/types/numbers/units.mjs +11 -0
- package/dist/es/value/use-combine-values.mjs +2 -2
- package/dist/es/value/use-computed.mjs +1 -1
- package/dist/es/value/use-scroll.mjs +3 -3
- package/dist/es/value/use-spring.mjs +3 -3
- package/dist/es/value/use-time.mjs +1 -1
- package/dist/es/value/use-transform.mjs +1 -1
- package/dist/es/value/use-velocity.mjs +2 -2
- package/dist/es/value/use-will-change/add-will-change.mjs +10 -0
- package/dist/es/value/use-will-change/is.mjs +7 -0
- package/dist/src/animation/animation-controls.d.ts +7 -0
- package/dist/src/animation/types.d.ts +12 -0
- package/dist/src/animation/use-animation.d.ts +0 -0
- package/dist/src/components/AnimatePresence.d.ts +1 -1
- package/dist/src/events/add-dom-event.d.ts +1 -0
- package/dist/src/events/add-pointer-event.d.ts +2 -0
- package/dist/src/events/event-info.d.ts +4 -0
- package/dist/src/events/index.d.ts +5 -0
- package/dist/src/events/types.d.ts +5 -0
- package/dist/src/events/utils/index.d.ts +1 -0
- package/dist/src/events/utils/is-primary-pointer.d.ts +1 -0
- package/dist/src/features/feature-manager.d.ts +3 -0
- package/dist/src/features/feature.d.ts +6 -3
- package/dist/src/features/gestures/drag/VisualElementDragControls.d.ts +57 -0
- package/dist/src/features/gestures/drag/index.d.ts +8 -10
- package/dist/src/features/gestures/drag/lock.d.ts +4 -0
- package/dist/src/features/gestures/drag/types.d.ts +149 -70
- package/dist/src/features/gestures/drag/use-drag-controls.d.ts +73 -0
- package/dist/src/features/gestures/drag/utils/constraints.d.ts +55 -0
- package/dist/src/features/gestures/drag/utils/is.d.ts +1 -0
- package/dist/src/features/gestures/hover/index.d.ts +7 -0
- package/dist/src/features/gestures/hover/types.d.ts +8 -0
- package/dist/src/features/gestures/in-view/index.d.ts +7 -0
- package/dist/src/features/gestures/in-view/types.d.ts +18 -0
- package/dist/src/features/gestures/pan/PanSession.d.ts +139 -0
- package/dist/src/features/gestures/pan/index.d.ts +16 -0
- package/dist/src/features/gestures/pan/types.d.ts +7 -0
- package/dist/src/features/gestures/press/index.d.ts +9 -0
- package/dist/src/features/gestures/press/types.d.ts +13 -0
- package/dist/src/features/index.d.ts +1 -1
- package/dist/src/features/layout/layout.d.ts +3 -2
- package/dist/src/features/layout/projection.d.ts +7 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/projection/conversion.d.ts +14 -0
- package/dist/src/projection/geometry/delta-apply.d.ts +2 -0
- package/dist/src/projection/geometry/delta-calc.d.ts +2 -0
- package/dist/src/projection/geometry/models.d.ts +3 -0
- package/dist/src/projection/node/types.d.ts +16 -0
- package/dist/src/projection/utils/each-axis.d.ts +3 -0
- package/dist/src/projection/utils/measure.d.ts +3 -0
- package/dist/src/render/utils/setters.d.ts +3 -0
- package/dist/src/state/motion-state.d.ts +7 -3
- package/dist/src/state/utils/is-present.d.ts +2 -0
- package/dist/src/state/utils.d.ts +0 -1
- package/dist/src/types/framer-motion.d.ts +0 -78
- package/dist/src/types/state.d.ts +10 -23
- package/dist/src/utils/clamp.d.ts +1 -0
- package/dist/src/utils/get-context-window.d.ts +2 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/mix/number.d.ts +1 -0
- package/dist/src/utils/noop.d.ts +1 -0
- package/dist/src/utils/progress.d.ts +1 -0
- package/dist/src/utils/time-conversion.d.ts +8 -0
- package/dist/src/value/types/numbers/units.d.ts +30 -0
- package/dist/src/value/use-will-change/add-will-change.d.ts +2 -0
- package/dist/src/value/use-will-change/is.d.ts +2 -0
- package/dist/src/value/use-will-change/types.d.ts +4 -0
- package/package.json +8 -5
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +0 -23
- package/dist/es/external/.pnpm/hey-listen@1.0.8/external/hey-listen/dist/hey-listen.es.mjs +0 -20
- package/dist/es/features/events.mjs +0 -69
- package/dist/es/features/gestures/base.mjs +0 -19
- package/dist/es/features/gestures/hover.mjs +0 -46
- package/dist/es/features/gestures/in-view.mjs +0 -39
- package/dist/es/features/gestures/press.mjs +0 -37
- package/dist/es/utils/events.mjs +0 -8
- package/dist/src/features/events.d.ts +0 -6
- package/dist/src/features/gestures/hover.d.ts +0 -10
- package/dist/src/features/gestures/in-view.d.ts +0 -8
- package/dist/src/features/gestures/press.d.ts +0 -8
- /package/dist/es/{external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/events → events}/add-dom-event.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/back.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/batcher.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/index-legacy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/VisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/supports.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/setters.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/delay.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/memo.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/offsets/fill.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/progress.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/time-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/warn-once.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11/external/framer-motion/dist/es/utils → motion-utils@11.14.3/external/motion-utils/dist/es}/errors.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11/external/framer-motion/dist/es/utils → motion-utils@11.14.3/external/motion-utils/dist/es}/noop.mjs +0 -0
|
@@ -1,67 +1,130 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
left: number;
|
|
1
|
+
import { DragControls } from './use-drag-controls';
|
|
2
|
+
import { Axis, BoundingBox, DragElastic, InertiaOptions, PanInfo } from 'framer-motion';
|
|
3
|
+
export interface ResolvedConstraints {
|
|
4
|
+
x: Partial<Axis>;
|
|
5
|
+
y: Partial<Axis>;
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export interface DragHandlers {
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* Set `true` to drag in both directions.
|
|
13
|
-
* Set `"x"` or `"y"` to only drag in a specific direction.
|
|
12
|
+
* Callback function that fires when dragging starts.
|
|
14
13
|
*
|
|
15
|
-
* ```
|
|
16
|
-
* <
|
|
14
|
+
* ```jsx
|
|
15
|
+
* <motion.div
|
|
16
|
+
* drag
|
|
17
|
+
* onDragStart={
|
|
18
|
+
* (event, info) => console.log(info.point.x, info.point.y)
|
|
19
|
+
* }
|
|
20
|
+
* />
|
|
17
21
|
* ```
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
18
24
|
*/
|
|
19
|
-
|
|
25
|
+
onDragStart?: (event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Callback function that fires when dragging ends.
|
|
28
|
+
*
|
|
29
|
+
* ```jsx
|
|
30
|
+
* <motion.div
|
|
31
|
+
* drag
|
|
32
|
+
* onDragEnd={
|
|
33
|
+
* (event, info) => console.log(info.point.x, info.point.y)
|
|
34
|
+
* }
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
onDragEnd?: (event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo) => void;
|
|
20
41
|
/**
|
|
21
|
-
*
|
|
22
|
-
* Set to `false` by default.
|
|
42
|
+
* Callback function that fires when the component is dragged.
|
|
23
43
|
*
|
|
24
|
-
* ```
|
|
25
|
-
* <
|
|
44
|
+
* ```jsx
|
|
45
|
+
* <motion.div
|
|
46
|
+
* drag
|
|
47
|
+
* onDrag={
|
|
48
|
+
* (event, info) => console.log(info.point.x, info.point.y)
|
|
49
|
+
* }
|
|
50
|
+
* />
|
|
26
51
|
* ```
|
|
52
|
+
*
|
|
53
|
+
* @public
|
|
27
54
|
*/
|
|
28
|
-
|
|
55
|
+
onDrag?: (event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo) => void;
|
|
29
56
|
/**
|
|
30
|
-
*
|
|
31
|
-
* default.
|
|
57
|
+
* Callback function that fires a drag direction is determined.
|
|
32
58
|
*
|
|
33
|
-
* ```
|
|
34
|
-
* <
|
|
59
|
+
* ```jsx
|
|
60
|
+
* <motion.div
|
|
61
|
+
* drag
|
|
62
|
+
* dragDirectionLock
|
|
63
|
+
* onDirectionLock={axis => console.log(axis)}
|
|
64
|
+
* />
|
|
35
65
|
* ```
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
36
68
|
*/
|
|
37
|
-
|
|
69
|
+
onDirectionLock?: (axis: 'x' | 'y') => void;
|
|
38
70
|
/**
|
|
39
|
-
*
|
|
71
|
+
* Callback function that fires when drag momentum/bounce transition finishes.
|
|
40
72
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
73
|
+
* ```jsx
|
|
74
|
+
* <motion.div
|
|
75
|
+
* drag
|
|
76
|
+
* onDragTransitionEnd={() => console.log('Drag transition complete')}
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
43
79
|
*
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
onDragTransitionEnd?: () => void;
|
|
83
|
+
/**
|
|
84
|
+
* If `dragConstraints` is set to a React ref, this callback will call with the measured drag constraints.
|
|
47
85
|
*
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
onMeasureDragConstraints?: (constraints: BoundingBox) => BoundingBox | void;
|
|
89
|
+
}
|
|
90
|
+
export interface DragProps extends DragHandlers {
|
|
91
|
+
/**
|
|
92
|
+
* Enable dragging for this element. Set to `false` by default.
|
|
93
|
+
* Set `true` to drag in both directions.
|
|
94
|
+
* Set `"x"` or `"y"` to only drag in a specific direction.
|
|
51
95
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
96
|
+
* ```jsx
|
|
97
|
+
* <motion.div drag="x" />
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
drag?: boolean | 'x' | 'y';
|
|
101
|
+
/**
|
|
102
|
+
* If true, element will snap back to its origin when dragging ends.
|
|
55
103
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
104
|
+
* Enabling this is the equivalent of setting all `dragConstraints` axes to `0`
|
|
105
|
+
* with `dragElastic={1}`, but when used together `dragConstraints` can define
|
|
106
|
+
* a wider draggable area and `dragSnapToOrigin` will ensure the element
|
|
107
|
+
* animates back to its origin on release.
|
|
108
|
+
*/
|
|
109
|
+
dragSnapToOrigin?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* If `true`, this will lock dragging to the initially-detected direction. Defaults to `false`.
|
|
112
|
+
*
|
|
113
|
+
* ```jsx
|
|
114
|
+
* <motion.div drag dragDirectionLock />
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
dragDirectionLock?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Allows drag gesture propagation to child components. Set to `false` by
|
|
120
|
+
* default.
|
|
121
|
+
*
|
|
122
|
+
* ```jsx
|
|
123
|
+
* <motion.div drag="x" dragPropagation />
|
|
62
124
|
* ```
|
|
63
125
|
*/
|
|
64
|
-
|
|
126
|
+
dragPropagation?: boolean;
|
|
127
|
+
dragConstraints?: false | Partial<BoundingBox> | HTMLElement;
|
|
65
128
|
/**
|
|
66
129
|
* The degree of movement allowed outside constraints. 0 = no movement, 1 =
|
|
67
130
|
* full movement.
|
|
@@ -71,23 +134,32 @@ export interface DragOptions {
|
|
|
71
134
|
* By passing an object of `top`/`right`/`bottom`/`left`, individual values can be set
|
|
72
135
|
* per constraint. Any missing values will be set to `0`.
|
|
73
136
|
*
|
|
74
|
-
* ```
|
|
75
|
-
* <
|
|
137
|
+
* ```jsx
|
|
138
|
+
* <motion.div
|
|
139
|
+
* drag
|
|
140
|
+
* dragConstraints={{ left: 0, right: 300 }}
|
|
141
|
+
* dragElastic={0.2}
|
|
142
|
+
* />
|
|
76
143
|
* ```
|
|
77
144
|
*/
|
|
78
|
-
|
|
145
|
+
dragElastic?: DragElastic;
|
|
79
146
|
/**
|
|
80
147
|
* Apply momentum from the pan gesture to the component when dragging
|
|
81
148
|
* finishes. Set to `true` by default.
|
|
82
149
|
*
|
|
83
|
-
* ```
|
|
84
|
-
* <
|
|
150
|
+
* ```jsx
|
|
151
|
+
* <motion.div
|
|
152
|
+
* drag
|
|
153
|
+
* dragConstraints={{ left: 0, right: 300 }}
|
|
154
|
+
* dragMomentum={false}
|
|
155
|
+
* />
|
|
85
156
|
* ```
|
|
86
157
|
*/
|
|
87
|
-
|
|
158
|
+
dragMomentum?: boolean;
|
|
88
159
|
/**
|
|
89
160
|
* Allows you to change dragging inertia parameters.
|
|
90
161
|
* 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.
|
|
162
|
+
* See {@link https://framer.com/api/animation/#inertia | Inertia} for all properties you can use.
|
|
91
163
|
*
|
|
92
164
|
* ```jsx
|
|
93
165
|
* <motion.div
|
|
@@ -96,6 +168,33 @@ export interface DragOptions {
|
|
|
96
168
|
* />
|
|
97
169
|
* ```
|
|
98
170
|
*/
|
|
171
|
+
dragTransition?: InertiaOptions;
|
|
172
|
+
/**
|
|
173
|
+
* By default, if `drag` is defined on a component then an event listener will be attached
|
|
174
|
+
* to automatically initiate dragging when a user presses down on it.
|
|
175
|
+
*
|
|
176
|
+
* By setting `dragListener` to `false`, this event listener will not be created.
|
|
177
|
+
*
|
|
178
|
+
* ```jsx
|
|
179
|
+
* const dragControls = useDragControls()
|
|
180
|
+
*
|
|
181
|
+
* function startDrag(event) {
|
|
182
|
+
* dragControls.start(event, { snapToCursor: true })
|
|
183
|
+
* }
|
|
184
|
+
*
|
|
185
|
+
* return (
|
|
186
|
+
* <>
|
|
187
|
+
* <div onPointerDown={startDrag} />
|
|
188
|
+
* <motion.div
|
|
189
|
+
* drag="x"
|
|
190
|
+
* dragControls={dragControls}
|
|
191
|
+
* dragListener={false}
|
|
192
|
+
* />
|
|
193
|
+
* </>
|
|
194
|
+
* )
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
dragListener?: boolean;
|
|
99
198
|
/**
|
|
100
199
|
* Usually, dragging is initiated by pressing down on a component and moving it. For some
|
|
101
200
|
* use-cases, for instance clicking at an arbitrary point on a video scrubber, we
|
|
@@ -120,25 +219,5 @@ export interface DragOptions {
|
|
|
120
219
|
* )
|
|
121
220
|
* ```
|
|
122
221
|
*/
|
|
123
|
-
|
|
124
|
-
* If true, element will snap back to its origin when dragging ends.
|
|
125
|
-
*
|
|
126
|
-
* Enabling this is the equivalent of setting all `dragConstraints` axes to `0`
|
|
127
|
-
* with `dragElastic={1}`, but when used together `dragConstraints` can define
|
|
128
|
-
* a wider draggable area and `dragSnapToOrigin` will ensure the element
|
|
129
|
-
* animates back to its origin on release.
|
|
130
|
-
*/
|
|
131
|
-
snapToOrigin?: boolean;
|
|
132
|
-
}
|
|
133
|
-
export interface DragProps {
|
|
134
|
-
/**
|
|
135
|
-
* Properties or variant label to animate to while the drag gesture is recognised.
|
|
136
|
-
*
|
|
137
|
-
* ```jsx
|
|
138
|
-
* <motion.div whileDrag={{ scale: 1.2 }} />
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
drag?: VariantLabels;
|
|
142
|
-
dragOptions?: DragOptions;
|
|
222
|
+
dragControls?: DragControls;
|
|
143
223
|
}
|
|
144
|
-
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DragControlOptions, VisualElementDragControls } from './VisualElementDragControls';
|
|
2
|
+
/**
|
|
3
|
+
* Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.
|
|
4
|
+
*
|
|
5
|
+
* ```jsx
|
|
6
|
+
* const dragControls = useDragControls()
|
|
7
|
+
*
|
|
8
|
+
* function startDrag(event) {
|
|
9
|
+
* dragControls.start(event, { snapToCursor: true })
|
|
10
|
+
* }
|
|
11
|
+
*
|
|
12
|
+
* return (
|
|
13
|
+
* <>
|
|
14
|
+
* <div onPointerDown={startDrag} />
|
|
15
|
+
* <motion.div drag="x" dragControls={dragControls} />
|
|
16
|
+
* </>
|
|
17
|
+
* )
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare class DragControls {
|
|
23
|
+
private componentControls;
|
|
24
|
+
/**
|
|
25
|
+
* Subscribe a component's internal `VisualElementDragControls` to the user-facing API.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
subscribe(controls: VisualElementDragControls): () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Start a drag gesture on every `motion` component that has this set of drag controls
|
|
32
|
+
* passed into it via the `dragControls` prop.
|
|
33
|
+
*
|
|
34
|
+
* ```jsx
|
|
35
|
+
* dragControls.start(e, {
|
|
36
|
+
* snapToCursor: true
|
|
37
|
+
* })
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param event - PointerEvent
|
|
41
|
+
* @param options - Options
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
start(event: PointerEvent, options?: DragControlOptions): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop
|
|
49
|
+
* and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we
|
|
50
|
+
* might want to initiate that dragging from a different component than the draggable one.
|
|
51
|
+
*
|
|
52
|
+
* By creating a `dragControls` using the `useDragControls` hook, we can pass this into
|
|
53
|
+
* the draggable component's `dragControls` prop. It exposes a `start` method
|
|
54
|
+
* that can start dragging from pointer events on other components.
|
|
55
|
+
*
|
|
56
|
+
* ```jsx
|
|
57
|
+
* const dragControls = useDragControls()
|
|
58
|
+
*
|
|
59
|
+
* function startDrag(event) {
|
|
60
|
+
* dragControls.start(event, { snapToCursor: true })
|
|
61
|
+
* }
|
|
62
|
+
*
|
|
63
|
+
* return (
|
|
64
|
+
* <>
|
|
65
|
+
* <div onPointerDown={startDrag} />
|
|
66
|
+
* <motion.div drag="x" dragControls={dragControls} />
|
|
67
|
+
* </>
|
|
68
|
+
* )
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export declare const useDragControls: () => DragControls;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ResolvedConstraints } from '../types';
|
|
2
|
+
import { Axis, BoundingBox, Box, DragElastic } from 'framer-motion';
|
|
3
|
+
/**
|
|
4
|
+
* Apply constraints to a point. These constraints are both physical along an
|
|
5
|
+
* axis, and an elastic factor that determines how much to constrain the point
|
|
6
|
+
* by if it does lie outside the defined parameters.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyConstraints(point: number, { min, max }: Partial<Axis>, elastic?: Axis): number;
|
|
9
|
+
export declare const defaultElastic = 0.35;
|
|
10
|
+
/**
|
|
11
|
+
* Calculate constraints in terms of the viewport when
|
|
12
|
+
* defined relatively to the measured bounding box.
|
|
13
|
+
*/
|
|
14
|
+
export declare function calcRelativeConstraints(layoutBox: Box, { top, left, bottom, right }: Partial<BoundingBox>): ResolvedConstraints;
|
|
15
|
+
/**
|
|
16
|
+
* Calculate constraints in terms of the viewport when defined relatively to the
|
|
17
|
+
* measured axis. This is measured from the nearest edge, so a max constraint of 200
|
|
18
|
+
* on an axis with a max value of 300 would return a constraint of 500 - axis length
|
|
19
|
+
*/
|
|
20
|
+
export declare function calcRelativeAxisConstraints(axis: Axis, min?: number, max?: number): Partial<Axis>;
|
|
21
|
+
/**
|
|
22
|
+
* Accepts a dragElastic prop and returns resolved elastic values for each axis.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveDragElastic(dragElastic?: DragElastic): Box;
|
|
25
|
+
export declare function resolveAxisElastic(dragElastic: DragElastic, minLabel: string, maxLabel: string): Axis;
|
|
26
|
+
export declare function resolvePointElastic(dragElastic: DragElastic, label: string): number;
|
|
27
|
+
/**
|
|
28
|
+
* Rebase the calculated viewport constraints relative to the layout.min point.
|
|
29
|
+
*/
|
|
30
|
+
export declare function rebaseAxisConstraints(layout: Axis, constraints: Partial<Axis>): Partial<Axis>;
|
|
31
|
+
/**
|
|
32
|
+
* Calculate viewport constraints when defined as another viewport-relative box
|
|
33
|
+
*/
|
|
34
|
+
export declare function calcViewportConstraints(layoutBox: Box, constraintsBox: Box): {
|
|
35
|
+
x: {
|
|
36
|
+
min: number;
|
|
37
|
+
max: number;
|
|
38
|
+
};
|
|
39
|
+
y: {
|
|
40
|
+
min: number;
|
|
41
|
+
max: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Calculate viewport constraints when defined as another viewport-relative axis
|
|
46
|
+
*/
|
|
47
|
+
export declare function calcViewportAxisConstraints(layoutAxis: Axis, constraintsAxis: Axis): {
|
|
48
|
+
min: number;
|
|
49
|
+
max: number;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Calculate a transform origin relative to the source axis, between 0-1, that results
|
|
53
|
+
* in an asthetically pleasing scale/transform needed to project from source to target.
|
|
54
|
+
*/
|
|
55
|
+
export declare function calcOrigin(source: Axis, target: Axis): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isHTMLElement(value: any): value is HTMLElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Variant } from '../../../types';
|
|
2
|
+
import { EventInfo } from 'framer-motion';
|
|
3
|
+
export type HoverEvent = (event: MouseEvent, info: EventInfo) => void;
|
|
4
|
+
export interface HoverProps {
|
|
5
|
+
hover?: string | Variant;
|
|
6
|
+
onHoverStart?: HoverEvent;
|
|
7
|
+
onHoverEnd?: HoverEvent;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Variant } from '../../../types';
|
|
2
|
+
type MarginValue = `${number}${'px' | '%'}`;
|
|
3
|
+
type MarginType = MarginValue | `${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue}` | `${MarginValue} ${MarginValue} ${MarginValue} ${MarginValue}`;
|
|
4
|
+
export interface InViewOptions {
|
|
5
|
+
root?: Element | Document;
|
|
6
|
+
margin?: MarginType;
|
|
7
|
+
amount?: 'some' | 'all' | number;
|
|
8
|
+
}
|
|
9
|
+
type ViewportEventHandler = (entry: IntersectionObserverEntry | null) => void;
|
|
10
|
+
export interface InViewProps {
|
|
11
|
+
inViewOptions?: InViewOptions & {
|
|
12
|
+
once?: boolean;
|
|
13
|
+
};
|
|
14
|
+
inView?: string | Variant;
|
|
15
|
+
onViewportEnter?: ViewportEventHandler;
|
|
16
|
+
onViewportLeave?: ViewportEventHandler;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Point, TransformPoint } from 'framer-motion';
|
|
2
|
+
/**
|
|
3
|
+
* Passed in to pan event handlers like `onPan` the `PanInfo` object contains
|
|
4
|
+
* information about the current state of the tap gesture such as its
|
|
5
|
+
* `point`, `delta`, `offset` and `velocity`.
|
|
6
|
+
*
|
|
7
|
+
* ```jsx
|
|
8
|
+
* <motion.div onPan={(event, info) => {
|
|
9
|
+
* console.log(info.point.x, info.point.y)
|
|
10
|
+
* }} />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface PanInfo {
|
|
16
|
+
/**
|
|
17
|
+
* Contains `x` and `y` values for the current pan position relative
|
|
18
|
+
* to the device or page.
|
|
19
|
+
*
|
|
20
|
+
* ```jsx
|
|
21
|
+
* function onPan(event, info) {
|
|
22
|
+
* console.log(info.point.x, info.point.y)
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* <motion.div onPan={onPan} />
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
point: Point;
|
|
31
|
+
/**
|
|
32
|
+
* Contains `x` and `y` values for the distance moved since
|
|
33
|
+
* the last event.
|
|
34
|
+
*
|
|
35
|
+
* ```jsx
|
|
36
|
+
* function onPan(event, info) {
|
|
37
|
+
* console.log(info.delta.x, info.delta.y)
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
* <motion.div onPan={onPan} />
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
delta: Point;
|
|
46
|
+
/**
|
|
47
|
+
* Contains `x` and `y` values for the distance moved from
|
|
48
|
+
* the first pan event.
|
|
49
|
+
*
|
|
50
|
+
* ```jsx
|
|
51
|
+
* function onPan(event, info) {
|
|
52
|
+
* console.log(info.offset.x, info.offset.y)
|
|
53
|
+
* }
|
|
54
|
+
*
|
|
55
|
+
* <motion.div onPan={onPan} />
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
offset: Point;
|
|
61
|
+
/**
|
|
62
|
+
* Contains `x` and `y` values for the current velocity of the pointer, in px/ms.
|
|
63
|
+
*
|
|
64
|
+
* ```jsx
|
|
65
|
+
* function onPan(event, info) {
|
|
66
|
+
* console.log(info.velocity.x, info.velocity.y)
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
69
|
+
* <motion.div onPan={onPan} />
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
velocity: Point;
|
|
75
|
+
}
|
|
76
|
+
export type PanHandler = (event: Event, info: PanInfo) => void;
|
|
77
|
+
interface PanSessionHandlers {
|
|
78
|
+
onSessionStart: PanHandler;
|
|
79
|
+
onStart: PanHandler;
|
|
80
|
+
onMove: PanHandler;
|
|
81
|
+
onEnd: PanHandler;
|
|
82
|
+
onSessionEnd: PanHandler;
|
|
83
|
+
resumeAnimation: () => void;
|
|
84
|
+
}
|
|
85
|
+
interface PanSessionOptions {
|
|
86
|
+
transformPagePoint?: TransformPoint;
|
|
87
|
+
contextWindow?: (Window & typeof globalThis) | null;
|
|
88
|
+
dragSnapToOrigin?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export declare class PanSession {
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
private history;
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
private startEvent;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
private lastMoveEvent;
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
private lastMoveEventInfo;
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
private transformPagePoint?;
|
|
114
|
+
/**
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
private handlers;
|
|
118
|
+
/**
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
private removeListeners;
|
|
122
|
+
/**
|
|
123
|
+
* For determining if an animation should resume after it is interupted
|
|
124
|
+
*
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
private dragSnapToOrigin;
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
private contextWindow;
|
|
132
|
+
constructor(event: PointerEvent, handlers: Partial<PanSessionHandlers>, { transformPagePoint, contextWindow, dragSnapToOrigin }?: PanSessionOptions);
|
|
133
|
+
private updatePoint;
|
|
134
|
+
private handlePointerMove;
|
|
135
|
+
private handlePointerUp;
|
|
136
|
+
updateHandlers(handlers: Partial<PanSessionHandlers>): void;
|
|
137
|
+
end(): void;
|
|
138
|
+
}
|
|
139
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PanInfo } from './PanSession';
|
|
2
|
+
import { Feature } from '../../feature';
|
|
3
|
+
export declare class PanGesture extends Feature {
|
|
4
|
+
private session?;
|
|
5
|
+
private removePointerDownListener;
|
|
6
|
+
onPointerDown(pointerDownEvent: PointerEvent): void;
|
|
7
|
+
createPanHandlers(): {
|
|
8
|
+
onSessionStart: (event: PointerEvent, info: PanInfo) => void;
|
|
9
|
+
onStart: (event: PointerEvent, info: PanInfo) => void;
|
|
10
|
+
onMove: (event: any, info: any) => void;
|
|
11
|
+
onEnd: (event: PointerEvent, info: PanInfo) => void;
|
|
12
|
+
};
|
|
13
|
+
mount(): void;
|
|
14
|
+
update(): void;
|
|
15
|
+
unmount(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PanInfo } from './PanSession';
|
|
2
|
+
export interface PanProps {
|
|
3
|
+
onPanSessionStart?: (event: PointerEvent, info: PanInfo) => void;
|
|
4
|
+
onPanStart?: (event: PointerEvent, info: PanInfo) => void;
|
|
5
|
+
onPan?: (event: PointerEvent, info: PanInfo) => void;
|
|
6
|
+
onPanEnd?: (event: PointerEvent, info: PanInfo) => void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MotionState } from '../../../state/motion-state';
|
|
2
|
+
import { Feature } from '../..';
|
|
3
|
+
import { EventInfo } from 'framer-motion';
|
|
4
|
+
export declare function extractEventInfo(event: PointerEvent): EventInfo;
|
|
5
|
+
export declare class PressGesture extends Feature {
|
|
6
|
+
isActive(): boolean;
|
|
7
|
+
constructor(state: MotionState);
|
|
8
|
+
mount(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Variant } from '../../../types';
|
|
2
|
+
import { EventInfo } from 'framer-motion';
|
|
3
|
+
export type PressEvent = (event: PointerEvent, info: EventInfo) => void;
|
|
4
|
+
export interface PressProps {
|
|
5
|
+
/**
|
|
6
|
+
* If `true`, the press gesture will attach its start listener to window.
|
|
7
|
+
*/
|
|
8
|
+
globalPressTarget?: boolean;
|
|
9
|
+
press?: string | Variant;
|
|
10
|
+
onPressStart?: PressEvent;
|
|
11
|
+
onPress?: PressEvent;
|
|
12
|
+
onPressCancel?: PressEvent;
|
|
13
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Feature } from '../feature';
|
|
2
2
|
import { MotionState } from '../../state/motion-state';
|
|
3
|
-
import { LayoutGroupState } from '../../components/context';
|
|
4
3
|
export declare class LayoutFeature extends Feature {
|
|
5
|
-
layoutGroup: LayoutGroupState;
|
|
6
4
|
constructor(state: MotionState);
|
|
5
|
+
beforeUpdate(): void;
|
|
7
6
|
update(): void;
|
|
7
|
+
beforeMount(): void;
|
|
8
8
|
mount(): void;
|
|
9
|
+
beforeUnmount(): void;
|
|
9
10
|
unmount(): void;
|
|
10
11
|
}
|
package/dist/src/index.d.ts
CHANGED