motion-v 0.5.0-beta.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1580 -613
- 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 +65 -19
- 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 +24 -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 +5 -6
- 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 +6 -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 +5 -3
- 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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { addPointerEvent } from "../../../events/add-pointer-event.mjs";
|
|
2
|
+
import { extractEventInfo } from "../../../events/event-info.mjs";
|
|
3
|
+
import { distance2D } from "../../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/distance.mjs";
|
|
4
|
+
import { frame, cancelFrame, frameData } from "../../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
5
|
+
import { pipe } from "../../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/pipe.mjs";
|
|
6
|
+
import { secondsToMilliseconds, millisecondsToSeconds } from "../../../utils/time-conversion.mjs";
|
|
7
|
+
import { isPrimaryPointer } from "../../../events/utils/is-primary-pointer.mjs";
|
|
8
|
+
class PanSession {
|
|
9
|
+
constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false } = {}) {
|
|
10
|
+
this.startEvent = null;
|
|
11
|
+
this.lastMoveEvent = null;
|
|
12
|
+
this.lastMoveEventInfo = null;
|
|
13
|
+
this.handlers = {};
|
|
14
|
+
this.contextWindow = window;
|
|
15
|
+
this.updatePoint = () => {
|
|
16
|
+
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
17
|
+
return;
|
|
18
|
+
const info2 = getPanInfo(this.lastMoveEventInfo, this.history);
|
|
19
|
+
const isPanStarted = this.startEvent !== null;
|
|
20
|
+
const isDistancePastThreshold = distance2D(info2.offset, { x: 0, y: 0 }) >= 3;
|
|
21
|
+
if (!isPanStarted && !isDistancePastThreshold)
|
|
22
|
+
return;
|
|
23
|
+
const { point: point2 } = info2;
|
|
24
|
+
const { timestamp: timestamp2 } = frameData;
|
|
25
|
+
this.history.push({ ...point2, timestamp: timestamp2 });
|
|
26
|
+
const { onStart, onMove } = this.handlers;
|
|
27
|
+
if (!isPanStarted) {
|
|
28
|
+
onStart && onStart(this.lastMoveEvent, info2);
|
|
29
|
+
this.startEvent = this.lastMoveEvent;
|
|
30
|
+
}
|
|
31
|
+
onMove && onMove(this.lastMoveEvent, info2);
|
|
32
|
+
};
|
|
33
|
+
this.handlePointerMove = (event2, info2) => {
|
|
34
|
+
this.lastMoveEvent = event2;
|
|
35
|
+
this.lastMoveEventInfo = transformPoint(info2, this.transformPagePoint);
|
|
36
|
+
frame.update(this.updatePoint, true);
|
|
37
|
+
};
|
|
38
|
+
this.handlePointerUp = (event2, info2) => {
|
|
39
|
+
this.end();
|
|
40
|
+
const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;
|
|
41
|
+
if (this.dragSnapToOrigin)
|
|
42
|
+
resumeAnimation && resumeAnimation();
|
|
43
|
+
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
44
|
+
return;
|
|
45
|
+
const panInfo = getPanInfo(
|
|
46
|
+
event2.type === "pointercancel" ? this.lastMoveEventInfo : transformPoint(info2, this.transformPagePoint),
|
|
47
|
+
this.history
|
|
48
|
+
);
|
|
49
|
+
if (this.startEvent && onEnd) {
|
|
50
|
+
onEnd(event2, panInfo);
|
|
51
|
+
}
|
|
52
|
+
onSessionEnd && onSessionEnd(event2, panInfo);
|
|
53
|
+
};
|
|
54
|
+
if (!isPrimaryPointer(event))
|
|
55
|
+
return;
|
|
56
|
+
this.dragSnapToOrigin = dragSnapToOrigin;
|
|
57
|
+
this.handlers = handlers;
|
|
58
|
+
this.transformPagePoint = transformPagePoint;
|
|
59
|
+
this.contextWindow = contextWindow || window;
|
|
60
|
+
const info = extractEventInfo(event);
|
|
61
|
+
const initialInfo = transformPoint(info, this.transformPagePoint);
|
|
62
|
+
const { point } = initialInfo;
|
|
63
|
+
const { timestamp } = frameData;
|
|
64
|
+
this.history = [{ ...point, timestamp }];
|
|
65
|
+
const { onSessionStart } = handlers;
|
|
66
|
+
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
67
|
+
this.removeListeners = pipe(
|
|
68
|
+
addPointerEvent(
|
|
69
|
+
this.contextWindow,
|
|
70
|
+
"pointermove",
|
|
71
|
+
this.handlePointerMove
|
|
72
|
+
),
|
|
73
|
+
addPointerEvent(
|
|
74
|
+
this.contextWindow,
|
|
75
|
+
"pointerup",
|
|
76
|
+
this.handlePointerUp
|
|
77
|
+
),
|
|
78
|
+
addPointerEvent(
|
|
79
|
+
this.contextWindow,
|
|
80
|
+
"pointercancel",
|
|
81
|
+
this.handlePointerUp
|
|
82
|
+
)
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
updateHandlers(handlers) {
|
|
86
|
+
this.handlers = handlers;
|
|
87
|
+
}
|
|
88
|
+
end() {
|
|
89
|
+
this.removeListeners && this.removeListeners();
|
|
90
|
+
cancelFrame(this.updatePoint);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function transformPoint(info, transformPagePoint) {
|
|
94
|
+
return transformPagePoint ? { point: transformPagePoint(info.point) } : info;
|
|
95
|
+
}
|
|
96
|
+
function subtractPoint(a, b) {
|
|
97
|
+
return { x: a.x - b.x, y: a.y - b.y };
|
|
98
|
+
}
|
|
99
|
+
function getPanInfo({ point }, history) {
|
|
100
|
+
return {
|
|
101
|
+
point,
|
|
102
|
+
delta: subtractPoint(point, lastDevicePoint(history)),
|
|
103
|
+
offset: subtractPoint(point, startDevicePoint(history)),
|
|
104
|
+
velocity: getVelocity(history, 0.1)
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function startDevicePoint(history) {
|
|
108
|
+
return history[0];
|
|
109
|
+
}
|
|
110
|
+
function lastDevicePoint(history) {
|
|
111
|
+
return history[history.length - 1];
|
|
112
|
+
}
|
|
113
|
+
function getVelocity(history, timeDelta) {
|
|
114
|
+
if (history.length < 2) {
|
|
115
|
+
return { x: 0, y: 0 };
|
|
116
|
+
}
|
|
117
|
+
let i = history.length - 1;
|
|
118
|
+
let timestampedPoint = null;
|
|
119
|
+
const lastPoint = lastDevicePoint(history);
|
|
120
|
+
while (i >= 0) {
|
|
121
|
+
timestampedPoint = history[i];
|
|
122
|
+
if (lastPoint.timestamp - timestampedPoint.timestamp > secondsToMilliseconds(timeDelta)) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
i--;
|
|
126
|
+
}
|
|
127
|
+
if (!timestampedPoint) {
|
|
128
|
+
return { x: 0, y: 0 };
|
|
129
|
+
}
|
|
130
|
+
const time = millisecondsToSeconds(
|
|
131
|
+
lastPoint.timestamp - timestampedPoint.timestamp
|
|
132
|
+
);
|
|
133
|
+
if (time === 0) {
|
|
134
|
+
return { x: 0, y: 0 };
|
|
135
|
+
}
|
|
136
|
+
const currentVelocity = {
|
|
137
|
+
x: (lastPoint.x - timestampedPoint.x) / time,
|
|
138
|
+
y: (lastPoint.y - timestampedPoint.y) / time
|
|
139
|
+
};
|
|
140
|
+
if (currentVelocity.x === Infinity) {
|
|
141
|
+
currentVelocity.x = 0;
|
|
142
|
+
}
|
|
143
|
+
if (currentVelocity.y === Infinity) {
|
|
144
|
+
currentVelocity.y = 0;
|
|
145
|
+
}
|
|
146
|
+
return currentVelocity;
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
PanSession
|
|
150
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { PanSession } from "./PanSession.mjs";
|
|
2
|
+
import { addPointerEvent } from "../../../events/add-pointer-event.mjs";
|
|
3
|
+
import { Feature } from "../../feature.mjs";
|
|
4
|
+
import { noop } from "../../../external/.pnpm/motion-utils@11.14.3/external/motion-utils/dist/es/noop.mjs";
|
|
5
|
+
import "../../../external/.pnpm/motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
6
|
+
import { frame } from "../../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
7
|
+
import { getContextWindow } from "../../../utils/get-context-window.mjs";
|
|
8
|
+
function asyncHandler(handler) {
|
|
9
|
+
return (event, info) => {
|
|
10
|
+
if (handler) {
|
|
11
|
+
frame.postRender(() => handler(event, info));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
class PanGesture extends Feature {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.removePointerDownListener = noop;
|
|
19
|
+
}
|
|
20
|
+
onPointerDown(pointerDownEvent) {
|
|
21
|
+
this.session = new PanSession(
|
|
22
|
+
pointerDownEvent,
|
|
23
|
+
this.createPanHandlers(),
|
|
24
|
+
{
|
|
25
|
+
transformPagePoint: this.state.visualElement.getTransformPagePoint(),
|
|
26
|
+
contextWindow: getContextWindow(this.state.visualElement)
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
createPanHandlers() {
|
|
31
|
+
return {
|
|
32
|
+
onSessionStart: asyncHandler((_, info) => {
|
|
33
|
+
const { onPanSessionStart } = this.state.options;
|
|
34
|
+
onPanSessionStart && onPanSessionStart(_, info);
|
|
35
|
+
}),
|
|
36
|
+
onStart: asyncHandler((_, info) => {
|
|
37
|
+
const { onPanStart } = this.state.options;
|
|
38
|
+
onPanStart && onPanStart(_, info);
|
|
39
|
+
}),
|
|
40
|
+
onMove: (event, info) => {
|
|
41
|
+
const { onPan } = this.state.options;
|
|
42
|
+
onPan && onPan(event, info);
|
|
43
|
+
},
|
|
44
|
+
onEnd: (event, info) => {
|
|
45
|
+
const { onPanEnd } = this.state.options;
|
|
46
|
+
delete this.session;
|
|
47
|
+
if (onPanEnd) {
|
|
48
|
+
frame.postRender(() => onPanEnd(event, info));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
mount() {
|
|
54
|
+
this.removePointerDownListener = addPointerEvent(
|
|
55
|
+
this.state.element,
|
|
56
|
+
"pointerdown",
|
|
57
|
+
this.onPointerDown.bind(this)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
update() {
|
|
61
|
+
}
|
|
62
|
+
unmount() {
|
|
63
|
+
this.removePointerDownListener();
|
|
64
|
+
this.session && this.session.end();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
PanGesture
|
|
69
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Feature } from "../../feature.mjs";
|
|
2
|
+
import { press } from "motion-dom";
|
|
3
|
+
import { frame } from "../../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
4
|
+
function extractEventInfo(event) {
|
|
5
|
+
return {
|
|
6
|
+
point: {
|
|
7
|
+
x: event.pageX,
|
|
8
|
+
y: event.pageY
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function handlePressEvent(state, event, lifecycle) {
|
|
13
|
+
const props = state.options;
|
|
14
|
+
if (props.press) {
|
|
15
|
+
state.setActive("press", lifecycle === "Start");
|
|
16
|
+
}
|
|
17
|
+
const eventName = `onPress${lifecycle === "End" ? "" : lifecycle}`;
|
|
18
|
+
const callback = props[eventName];
|
|
19
|
+
if (callback) {
|
|
20
|
+
frame.postRender(() => callback(event, extractEventInfo(event)));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
class PressGesture extends Feature {
|
|
24
|
+
isActive() {
|
|
25
|
+
return Boolean(this.state.options.press);
|
|
26
|
+
}
|
|
27
|
+
constructor(state) {
|
|
28
|
+
super(state);
|
|
29
|
+
}
|
|
30
|
+
mount() {
|
|
31
|
+
const element = this.state.element;
|
|
32
|
+
if (!element)
|
|
33
|
+
return;
|
|
34
|
+
this.unmount = press(
|
|
35
|
+
element,
|
|
36
|
+
(startEvent) => {
|
|
37
|
+
handlePressEvent(this.state, startEvent, "Start");
|
|
38
|
+
return (endEvent, { success }) => handlePressEvent(
|
|
39
|
+
this.state,
|
|
40
|
+
endEvent,
|
|
41
|
+
success ? "End" : "Cancel"
|
|
42
|
+
);
|
|
43
|
+
},
|
|
44
|
+
{ useGlobalTarget: this.state.options.globalPressTarget }
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
PressGesture,
|
|
50
|
+
extractEventInfo
|
|
51
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { correctBorderRadius } from "../../external/.pnpm/framer-motion@11.
|
|
2
|
-
import { correctBoxShadow } from "../../external/.pnpm/framer-motion@11.
|
|
1
|
+
import { correctBorderRadius } from "../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs";
|
|
2
|
+
import { correctBoxShadow } from "../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs";
|
|
3
3
|
const defaultScaleCorrector = {
|
|
4
4
|
borderRadius: {
|
|
5
5
|
...correctBorderRadius,
|
|
@@ -1,74 +1,47 @@
|
|
|
1
1
|
import { Feature } from "../feature.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { getClosestProjectingNode } from "./utils.mjs";
|
|
4
|
-
import { onBeforeMount, onBeforeUpdate, onUpdated, onBeforeUnmount } from "vue";
|
|
5
|
-
import { addScaleCorrector } from "../../external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/projection/styles/scale-correction.mjs";
|
|
2
|
+
import { addScaleCorrector } from "../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/projection/styles/scale-correction.mjs";
|
|
6
3
|
import { defaultScaleCorrector } from "./config.mjs";
|
|
7
|
-
import { globalProjectionState } from "../../external/.pnpm/framer-motion@11.
|
|
8
|
-
import { injectLayoutGroup } from "../../components/context.mjs";
|
|
4
|
+
import { globalProjectionState } from "../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/projection/node/state.mjs";
|
|
9
5
|
class LayoutFeature extends Feature {
|
|
10
6
|
constructor(state) {
|
|
11
7
|
super(state);
|
|
12
|
-
|
|
13
|
-
const visualElement = this.state.visualElement;
|
|
14
|
-
if (options.layout || options.layoutId) {
|
|
15
|
-
addScaleCorrector(defaultScaleCorrector);
|
|
16
|
-
this.layoutGroup = injectLayoutGroup({});
|
|
17
|
-
onBeforeMount(() => {
|
|
18
|
-
visualElement.projection = new HTMLProjectionNode(
|
|
19
|
-
visualElement.latestValues,
|
|
20
|
-
options["data-framer-portal-id"] ? void 0 : getClosestProjectingNode(visualElement.parent)
|
|
21
|
-
);
|
|
22
|
-
visualElement.projection.setOptions({
|
|
23
|
-
layout: options.layout,
|
|
24
|
-
layoutId: options.layoutId,
|
|
25
|
-
// TODO: drag
|
|
26
|
-
alwaysMeasureLayout: false,
|
|
27
|
-
visualElement,
|
|
28
|
-
animationType: typeof options.layout === "string" ? options.layout : "both",
|
|
29
|
-
// initialPromotionConfig
|
|
30
|
-
layoutRoot: options.layoutRoot,
|
|
31
|
-
layoutScroll: options.layoutScroll
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
onBeforeUpdate(() => {
|
|
35
|
-
var _a;
|
|
36
|
-
(_a = visualElement.projection) == null ? void 0 : _a.willUpdate();
|
|
37
|
-
});
|
|
38
|
-
onUpdated(() => {
|
|
39
|
-
var _a;
|
|
40
|
-
(_a = visualElement.projection) == null ? void 0 : _a.root.didUpdate();
|
|
41
|
-
});
|
|
42
|
-
onBeforeUnmount(() => {
|
|
43
|
-
if (visualElement.projection) {
|
|
44
|
-
visualElement.projection.willUpdate();
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
8
|
+
addScaleCorrector(defaultScaleCorrector);
|
|
48
9
|
}
|
|
49
|
-
|
|
10
|
+
beforeUpdate() {
|
|
50
11
|
var _a;
|
|
51
|
-
(_a = this.state.visualElement.projection) == null ? void 0 : _a.
|
|
12
|
+
(_a = this.state.visualElement.projection) == null ? void 0 : _a.willUpdate();
|
|
52
13
|
}
|
|
53
|
-
|
|
14
|
+
update() {
|
|
54
15
|
var _a, _b;
|
|
55
|
-
|
|
16
|
+
(_a = this.state.visualElement.projection) == null ? void 0 : _a.setOptions(this.state.options);
|
|
17
|
+
(_b = this.state.visualElement.projection) == null ? void 0 : _b.root.didUpdate();
|
|
18
|
+
}
|
|
19
|
+
beforeMount() {
|
|
20
|
+
}
|
|
21
|
+
mount() {
|
|
22
|
+
var _a;
|
|
23
|
+
const options = this.state.options;
|
|
24
|
+
const layoutGroup = this.state.options.layoutGroup;
|
|
56
25
|
if (options.layout || options.layoutId) {
|
|
57
26
|
const projection = this.state.visualElement.projection;
|
|
58
27
|
if (projection) {
|
|
59
|
-
(
|
|
28
|
+
(_a = layoutGroup == null ? void 0 : layoutGroup.group) == null ? void 0 : _a.add(projection);
|
|
60
29
|
}
|
|
61
30
|
globalProjectionState.hasEverUpdated = true;
|
|
62
|
-
projection == null ? void 0 : projection.mount(this.state.element);
|
|
63
31
|
projection == null ? void 0 : projection.root.didUpdate();
|
|
64
32
|
}
|
|
65
33
|
}
|
|
34
|
+
beforeUnmount() {
|
|
35
|
+
if (this.state.visualElement.projection) {
|
|
36
|
+
this.state.visualElement.projection.willUpdate();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
66
39
|
unmount() {
|
|
67
|
-
var _a;
|
|
68
40
|
if (this.state.visualElement.projection) {
|
|
69
41
|
this.state.visualElement.projection.unmount();
|
|
70
|
-
|
|
71
|
-
|
|
42
|
+
const layoutGroup = this.state.options.layoutGroup;
|
|
43
|
+
if (layoutGroup == null ? void 0 : layoutGroup.group)
|
|
44
|
+
layoutGroup.group.remove(this.state.visualElement.projection);
|
|
72
45
|
}
|
|
73
46
|
}
|
|
74
47
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Feature } from "../feature.mjs";
|
|
2
|
+
import { HTMLProjectionNode } from "../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs";
|
|
3
|
+
import { getClosestProjectingNode } from "./utils.mjs";
|
|
4
|
+
import { addScaleCorrector } from "../../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/projection/styles/scale-correction.mjs";
|
|
5
|
+
import { defaultScaleCorrector } from "./config.mjs";
|
|
6
|
+
class ProjectionFeature extends Feature {
|
|
7
|
+
constructor(state) {
|
|
8
|
+
super(state);
|
|
9
|
+
addScaleCorrector(defaultScaleCorrector);
|
|
10
|
+
}
|
|
11
|
+
initProjection() {
|
|
12
|
+
const options = this.state.options;
|
|
13
|
+
this.state.visualElement.projection = new HTMLProjectionNode(
|
|
14
|
+
this.state.visualElement.latestValues,
|
|
15
|
+
options["data-framer-portal-id"] ? void 0 : getClosestProjectingNode(this.state.visualElement.parent)
|
|
16
|
+
);
|
|
17
|
+
this.state.visualElement.projection.setOptions({
|
|
18
|
+
layout: options.layout,
|
|
19
|
+
layoutId: options.layoutId,
|
|
20
|
+
// TODO: drag
|
|
21
|
+
alwaysMeasureLayout: false,
|
|
22
|
+
visualElement: this.state.visualElement,
|
|
23
|
+
animationType: typeof options.layout === "string" ? options.layout : "both",
|
|
24
|
+
// initialPromotionConfig
|
|
25
|
+
layoutRoot: options.layoutRoot,
|
|
26
|
+
layoutScroll: options.layoutScroll
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
beforeMount() {
|
|
30
|
+
this.initProjection();
|
|
31
|
+
}
|
|
32
|
+
mount() {
|
|
33
|
+
var _a;
|
|
34
|
+
(_a = this.state.visualElement.projection) == null ? void 0 : _a.mount(this.state.element);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
ProjectionFeature
|
|
39
|
+
};
|
package/dist/es/features/svg.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Feature } from "./feature.mjs";
|
|
2
|
-
import { frame } from "../external/.pnpm/framer-motion@11.
|
|
2
|
+
import { frame } from "../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
3
3
|
function isSVGElement(element) {
|
|
4
4
|
return element instanceof SVGElement && element.tagName !== "svg";
|
|
5
5
|
}
|
package/dist/es/index.mjs
CHANGED
|
@@ -3,36 +3,39 @@ import { default as default3 } from "./components/AnimatePresence.vue.mjs";
|
|
|
3
3
|
import { default as default4 } from "./components/LayoutGroup.vue.mjs";
|
|
4
4
|
import { injectLayoutGroup, injectMotion, provideLayoutGroup, provideMotion, shouldInheritGroup, shouldInheritId } from "./components/context.mjs";
|
|
5
5
|
import { components, utilities } from "./constants/index.mjs";
|
|
6
|
-
import { MotionValue, motionValue, motionValue as motionValue2 } from "./external/.pnpm/framer-motion@11.
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
6
|
+
import { MotionValue, motionValue, motionValue as motionValue2 } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/value/index.mjs";
|
|
7
|
+
import { invariant } from "./external/.pnpm/motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
8
|
+
import { noop } from "./external/.pnpm/motion-utils@11.14.3/external/motion-utils/dist/es/noop.mjs";
|
|
9
|
+
import { isDragActive } from "motion-dom";
|
|
10
|
+
import { animate, createScopedAnimate } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/animate/index.mjs";
|
|
11
|
+
import { animateMini } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs";
|
|
12
|
+
import { scroll } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/render/dom/scroll/index.mjs";
|
|
13
|
+
import { scrollInfo } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/render/dom/scroll/track.mjs";
|
|
14
|
+
import { inView } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/render/dom/viewport/index.mjs";
|
|
15
|
+
import { anticipate } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/anticipate.mjs";
|
|
16
|
+
import { backIn, backInOut, backOut } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/back.mjs";
|
|
17
|
+
import { circIn, circInOut, circOut } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/circ.mjs";
|
|
18
|
+
import { easeIn, easeInOut, easeOut } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/ease.mjs";
|
|
19
|
+
import { cubicBezier } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/cubic-bezier.mjs";
|
|
20
|
+
import { steps } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/steps.mjs";
|
|
21
|
+
import { mirrorEasing } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/modifiers/mirror.mjs";
|
|
22
|
+
import { reverseEasing } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/easing/modifiers/reverse.mjs";
|
|
23
|
+
import { spring } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/generators/spring/index.mjs";
|
|
24
|
+
import { inertia } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/generators/inertia.mjs";
|
|
25
|
+
import { keyframes } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/generators/keyframes.mjs";
|
|
26
|
+
import { stagger } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/utils/stagger.mjs";
|
|
27
|
+
import { transform } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/transform.mjs";
|
|
28
|
+
import { clamp } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/clamp.mjs";
|
|
29
|
+
import { delayInSeconds } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/delay.mjs";
|
|
30
|
+
import { distance, distance2D } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/distance.mjs";
|
|
31
|
+
import { interpolate } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/interpolate.mjs";
|
|
32
|
+
import { mix } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/mix/index.mjs";
|
|
33
|
+
import { pipe } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/pipe.mjs";
|
|
34
|
+
import { progress } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/progress.mjs";
|
|
35
|
+
import { wrap } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/utils/wrap.mjs";
|
|
36
|
+
import { time } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/frameloop/sync-time.mjs";
|
|
37
|
+
import { cancelSync, sync } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/frameloop/index-legacy.mjs";
|
|
38
|
+
import { cancelFrame, frame, frameData, frameSteps } from "./external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
36
39
|
import { useComputed } from "./value/use-computed.mjs";
|
|
37
40
|
import { useCombineMotionValues } from "./value/use-combine-values.mjs";
|
|
38
41
|
import { useTransform } from "./value/use-transform.mjs";
|
|
@@ -47,6 +50,8 @@ import { createContext } from "./utils/createContext.mjs";
|
|
|
47
50
|
import { isMotionValue } from "./utils/motion-value.mjs";
|
|
48
51
|
import { useInView } from "./utils/use-in-view.mjs";
|
|
49
52
|
import { useAnimationFrame } from "./utils/use-animation-frame.mjs";
|
|
53
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from "./utils/time-conversion.mjs";
|
|
54
|
+
import { getContextWindow } from "./utils/get-context-window.mjs";
|
|
50
55
|
export {
|
|
51
56
|
default3 as AnimatePresence,
|
|
52
57
|
default4 as LayoutGroup,
|
|
@@ -77,17 +82,21 @@ export {
|
|
|
77
82
|
frame,
|
|
78
83
|
frameData,
|
|
79
84
|
frameSteps,
|
|
85
|
+
getContextWindow,
|
|
80
86
|
inView,
|
|
81
87
|
inertia,
|
|
82
88
|
injectLayoutGroup,
|
|
83
89
|
injectMotion,
|
|
84
90
|
interpolate,
|
|
85
91
|
invariant,
|
|
92
|
+
isDragActive,
|
|
86
93
|
isMotionValue,
|
|
87
94
|
keyframes,
|
|
95
|
+
millisecondsToSeconds,
|
|
88
96
|
mirrorEasing,
|
|
89
97
|
mix,
|
|
90
98
|
motionValue,
|
|
99
|
+
noop,
|
|
91
100
|
pipe,
|
|
92
101
|
progress,
|
|
93
102
|
provideLayoutGroup,
|
|
@@ -95,12 +104,14 @@ export {
|
|
|
95
104
|
reverseEasing,
|
|
96
105
|
scroll,
|
|
97
106
|
scrollInfo,
|
|
107
|
+
secondsToMilliseconds,
|
|
98
108
|
shouldInheritGroup,
|
|
99
109
|
shouldInheritId,
|
|
100
110
|
spring,
|
|
101
111
|
stagger,
|
|
102
112
|
steps,
|
|
103
113
|
sync,
|
|
114
|
+
time,
|
|
104
115
|
transform,
|
|
105
116
|
useAnimate,
|
|
106
117
|
useAnimationFrame,
|
|
@@ -116,6 +127,5 @@ export {
|
|
|
116
127
|
useTransform,
|
|
117
128
|
useVelocity,
|
|
118
129
|
utilities,
|
|
119
|
-
warning,
|
|
120
130
|
wrap
|
|
121
131
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function convertBoundingBoxToBox({
|
|
2
|
+
top,
|
|
3
|
+
left,
|
|
4
|
+
right,
|
|
5
|
+
bottom
|
|
6
|
+
}) {
|
|
7
|
+
return {
|
|
8
|
+
x: { min: left, max: right },
|
|
9
|
+
y: { min: top, max: bottom }
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function transformBoxPoints(point, transformPoint) {
|
|
13
|
+
if (!transformPoint)
|
|
14
|
+
return point;
|
|
15
|
+
const topLeft = transformPoint({ x: point.left, y: point.top });
|
|
16
|
+
const bottomRight = transformPoint({ x: point.right, y: point.bottom });
|
|
17
|
+
return {
|
|
18
|
+
top: topLeft.y,
|
|
19
|
+
left: topLeft.x,
|
|
20
|
+
bottom: bottomRight.y,
|
|
21
|
+
right: bottomRight.x
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function convertBoxToBoundingBox({ x, y }) {
|
|
25
|
+
return { top: y.min, right: x.max, bottom: y.max, left: x.min };
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
convertBoundingBoxToBox,
|
|
29
|
+
convertBoxToBoundingBox,
|
|
30
|
+
transformBoxPoints
|
|
31
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { convertBoundingBoxToBox, transformBoxPoints } from "../conversion.mjs";
|
|
2
|
+
import { translateAxis } from "../geometry/delta-apply.mjs";
|
|
3
|
+
function measureViewportBox(instance, transformPoint) {
|
|
4
|
+
return convertBoundingBoxToBox(
|
|
5
|
+
transformBoxPoints(instance.getBoundingClientRect(), transformPoint)
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
|
|
9
|
+
const viewportBox = measureViewportBox(element, transformPagePoint);
|
|
10
|
+
const { scroll } = rootProjectionNode;
|
|
11
|
+
if (scroll) {
|
|
12
|
+
translateAxis(viewportBox.x, scroll.offset.x);
|
|
13
|
+
translateAxis(viewportBox.y, scroll.offset.y);
|
|
14
|
+
}
|
|
15
|
+
return viewportBox;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
measurePageBox,
|
|
19
|
+
measureViewportBox
|
|
20
|
+
};
|