@nethesis/phone-island 1.0.9-dev.7 → 1.0.10
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/_virtual/index6.js +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/lib/devices/devices.js +1 -1
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js +2 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.js +2 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.js +2 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/distance.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +2 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs.js.map +1 -1
- package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js +1 -1
- package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js.map +1 -1
- package/dist/node_modules/mic-check/lib/index.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js.map +1 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.mjs.js.map +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/utils/camel-to-dash.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js +2 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/int.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/test.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.mjs.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/array.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/clamp.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/back.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/circ.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/ease.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/errors.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/format-error-message.mjs.js +2 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.mjs.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/is-object.mjs.js +2 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.mjs.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/memo.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/noop.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/progress.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/progress.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/time-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/warn-once.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/warn-once.mjs.js.map +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
- package/dist/package.json.js +1 -1
- package/package.json +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/events/add-dom-event.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/Feature.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/models.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/node/state.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/styles/transform.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/projection/utils/measure.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/config-motion.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/html/config-motion.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/store.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/setters.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/render/utils/setters.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs.js +0 -2
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js +0 -2
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js.map +0 -1
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/value/utils/is-motion-value.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/value/utils/resolve-motion-value.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.mjs.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/is.mjs.js +0 -0
package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisualElementDragControls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { frame, mixNumber, setDragLock, percent } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n const { dragSnapToOrigin } = this.getProps();\n // Stop or pause any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.postRender(() => onDragStart(event, info));\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n const resumeAnimation = () => eachAxis((axis) => this.getAnimationState(axis) === \"paused\" &&\n this.getAxisMotionValue(axis).animation?.play());\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n contextWindow: getContextWindow(this.visualElement),\n });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n pauseAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).animation?.pause());\n }\n getAnimationState(axis) {\n return this.getAxisMotionValue(axis).animation?.state;\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial\n ? props.initial[axis]\n : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mixNumber(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n"],"names":["elementDragControls","WeakMap","shouldDrag","direction","drag","currentDirection","constructor","visualElement","this","openDragLock","isDragging","originPoint","x","y","constraints","hasMutatedConstraints","elastic","createBox","start","originEvent","snapToCursor","arguments","length","undefined","presenceContext","isPresent","dragSnapToOrigin","getProps","panSession","PanSession","onSessionStart","event","pauseAnimation","stopAnimation","extractEventInfo","point","onStart","info","dragPropagation","onDragStart","setDragLock","resolveConstraints","projection","isAnimationBlocked","target","eachAxis","axis","current","getAxisMotionValue","get","percent","test","layout","measuredAxis","layoutBox","calcLength","parseFloat","frame","postRender","addValueToWillChange","animationState","setActive","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","lockThreshold","Math","abs","getCurrentDirection","updateAxis","render","onSessionEnd","stop","resumeAnimation","getAnimationState","animation","play","transformPagePoint","getTransformPagePoint","contextWindow","getContextWindow","cancel","velocity","startAnimation","onDragEnd","end","_point","axisValue","next","applyConstraints","set","dragConstraints","dragElastic","measure","prevConstraints","isRefObject","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","invariant","constraintsBox","measurePageBox","root","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","min","max","bounceStiffness","bounceDamping","inertia","type","timeConstant","restDelta","restSpeed","startAxisValueAnimation","Promise","all","then","animateMotionValue","pause","state","dragKey","toUpperCase","props","externalMotionValue","getValue","initial","mixNumber","scalePositionWithinConstraints","boxProgress","latest","calcOrigin","transformTemplate","style","transform","updateScroll","updateLayout","addListeners","element","stopPointerListener","addPointerEvent","dragListener","measureDragConstraints","stopMeasureLayoutListener","addEventListener","read","stopResizeListener","addDomEvent","window","stopLayoutUpdateListener","_ref","delta","hasLayoutChanged","motionValue","translate","defaultElastic"],"mappings":"ioCAiBA,MAAMA,EAAsB,IAAIC,QAobhC,SAASC,EAAWC,EAAWC,EAAMC,GACjC,SAAkB,IAATD,GAAiBA,IAASD,GACT,OAArBE,GAA6BA,IAAqBF,EAC3D,mCAlbA,M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0E,EAAcA,eAAAvD,aAAEA,GAAe,GAAUuB,EAC1J,MAAO,IACAA,EACHpI,OACA2D,oBACAzB,kBACAuD,kBACAC,cACAmB,eAER"}
|
|
1
|
+
{"version":3,"file":"VisualElementDragControls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { createBox, frame, eachAxis, measurePageBox, convertBoxToBoundingBox, convertBoundingBoxToBox, addValueToWillChange, animateMotionValue, mixNumber, addDomEvent, setDragLock, percent, calcLength, resize, isElementTextInput } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPointerEvent = null;\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPanInfo = null;\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n this.stopAnimation();\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true);\n }\n };\n const onSessionEnd = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.stop(event, info);\n this.latestPointerEvent = null;\n this.latestPanInfo = null;\n };\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps();\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 });\n }\n };\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n });\n }\n /**\n * @internal\n */\n stop(event, panInfo) {\n const finalEvent = event || this.latestPointerEvent;\n const finalPanInfo = panInfo || this.latestPanInfo;\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging || !finalPanInfo || !finalEvent)\n return;\n const { velocity } = finalPanInfo;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));\n }\n }\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.endPanSession();\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\", \"drag-constraints-ref\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined;\n projection.root.updateScroll();\n }\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin === true ||\n dragSnapToOrigin === axis)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0;\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false;\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render();\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n const target = event.target;\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild = target !== element && isElementTextInput(target);\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event);\n }\n });\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers;\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());\n }\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n stopResizeObservers && stopResizeObservers();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction skipFirstCall(callback) {\n let isFirst = true;\n return () => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n callback();\n };\n}\nfunction startResizeObservers(element, constraintsElement, onResize) {\n const stopElement = resize(element, skipFirstCall(onResize));\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize));\n return () => {\n stopElement();\n stopContainer();\n };\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n//# sourceMappingURL=VisualElementDragControls.mjs.map\n"],"names":["elementDragControls","WeakMap","skipFirstCall","callback","isFirst","shouldDrag","direction","drag","currentDirection","constructor","visualElement","this","openDragLock","isDragging","originPoint","x","y","constraints","hasMutatedConstraints","elastic","createBox","latestPointerEvent","latestPanInfo","start","originEvent","snapToCursor","distanceThreshold","arguments","length","undefined","presenceContext","isPresent","dragSnapToOrigin","getProps","panSession","PanSession","onSessionStart","event","extractEventInfo","point","stopAnimation","onStart","info","dragPropagation","onDragStart","setDragLock","resolveConstraints","projection","isAnimationBlocked","target","eachAxis","axis","current","getAxisMotionValue","get","percent","test","layout","measuredAxis","layoutBox","calcLength","parseFloat","frame","update","addValueToWillChange","animationState","setActive","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","lockThreshold","Math","abs","getCurrentDirection","updateAxis","render","onSessionEnd","stop","resumeAnimation","snap","startAnimation","transformPagePoint","getTransformPagePoint","contextWindow","getContextWindow","element","panInfo","finalEvent","finalPanInfo","cancel","velocity","onDragEnd","postRender","endPanSession","end","_point","axisValue","next","applyConstraints","set","dragConstraints","dragElastic","measure","prevConstraints","isRefObject","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","invariant","root","scroll","updateScroll","constraintsBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","min","max","bounceStiffness","bounceDamping","inertia","type","timeConstant","restDelta","restSpeed","startAxisValueAnimation","Promise","all","then","animateMotionValue","dragKey","toUpperCase","externalMotionValue","getValue","latestValues","mixNumber","scalePositionWithinConstraints","boxProgress","latest","calcOrigin","transformTemplate","style","transform","updateLayout","addListeners","stopPointerListener","addPointerEvent","dragListener","isClickingTextInputChild","isElementTextInput","stopResizeObservers","measureDragConstraints","onResize","stopElement","resize","stopContainer","startResizeObservers","stopMeasureLayoutListener","addEventListener","read","stopResizeListener","addDomEvent","window","stopLayoutUpdateListener","_ref","delta","hasLayoutChanged","motionValue","translate","props","defaultElastic"],"mappings":"kgDAsCaA,MAAAA,EAAsB,IAAIC,QAivBvC,SAASC,EAAcC,GACnB,IAAIC,GAAU,EACd,MAAO,KACCA,EACAA,GAAU,EAGdD,GAAU,CAElB,CAeA,SAASE,EACLC,EACAC,EACAC,GAEA,SACc,IAATD,GAAiBA,IAASD,GACL,OAArBE,GAA6BA,IAAqBF,EAE3D,yCAztBIG,WAAAA,CAAYC,GA7BJC,KAAAC,aAAoC,KAE5CD,KAAAE,YAAa,EACLF,KAAAH,iBAAyC,KAEzCG,KAAAG,YAAqB,CAAEC,EAAG,EAAGC,EAAG,GAKhCL,KAAAM,aAA2C,EAE3CN,KAAAO,uBAAwB,EAKxBP,KAAAQ,QAAUC,EAAAA,YAKVT,KAAAU,mBAA0C,KAK1CV,KAAAW,cAAgC,KAGpCX,KAAKD,cAAgBA,CACzB,CAEAa,KAAAA,CACIC,GACoE,IAApEC,aAAEA,GAAe,EAAKC,kBAAEA,GAAiBC,UAAAC,OAAAD,QAAAE,IAAAF,aAAAA,UAAA,GAAyB,GAKlE,MAAMG,gBAAEA,GAAoBnB,KAAKD,cACjC,GAAIoB,IAAiD,IAA9BA,EAAgBC,UAAqB,OAE5D,MAsIMC,iBAAEA,GAAqBrB,KAAKsB,WAClCtB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WACnC,IAGL1K,KAAKD,cAAcmE,SACvB,IAIR,MAAO,KACHgG,IACAf,IACAY,IACAM,GAA4BA,IAC5Bb,GAAuBA,GAAqB,CAEpD,CAEAlI,QAAAA,GACI,MAAMqJ,EAAQ3K,KAAKD,cAAcuB,YAC3B1B,KACFA,GAAO,EAAK6D,kBACZA,GAAoB,EAAKzB,gBACzBA,GAAkB,EAAK2D,gBACvBA,GAAkB,EAAKC,YACvBA,EAAcgF,EAAcA,eAAA3D,aAC5BA,GAAe,GACf0D,EACJ,MAAO,IACAA,EACH/K,OACA6D,oBACAzB,kBACA2D,kBACAC,cACAqB,eAER"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("./VisualElementDragControls.mjs.js"),o=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../motion-utils/dist/es/noop.mjs.js");class r extends o.Feature{constructor(o){super(o),this.removeGroupControls=e.noop,this.removeListeners=e.noop,this.controls=new s.VisualElementDragControls(o)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||e.noop}update(){const{dragControls:s}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};s!==o&&(this.removeGroupControls(),s&&(this.removeGroupControls=s.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}exports.DragGesture=r;
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs"],"sourcesContent":["import { Feature } from '
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs"],"sourcesContent":["import { Feature } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n update() {\n const { dragControls } = this.node.getProps();\n const { dragControls: prevDragControls } = this.node.prevProps || {};\n if (dragControls !== prevDragControls) {\n this.removeGroupControls();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n }\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n /**\n * In React 19, during list reorder reconciliation, components may\n * briefly unmount and remount while the drag is still active. If we're\n * actively dragging, we should NOT end the pan session - it will\n * continue tracking pointer events via its window-level listeners.\n *\n * The pan session will be properly cleaned up when:\n * 1. The drag ends naturally (pointerup/pointercancel)\n * 2. The component is truly removed from the DOM\n */\n if (!this.controls.isDragging) {\n this.controls.endPanSession();\n }\n }\n}\n\nexport { DragGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["DragGesture","Feature","constructor","node","super","this","removeGroupControls","noop","removeListeners","controls","VisualElementDragControls","mount","dragControls","getProps","subscribe","addListeners","update","prevDragControls","prevProps","unmount","isDragging","endPanSession"],"mappings":"0PAIM,MAAOA,UAAoBC,EAAAA,QAM7BC,WAAAA,CAAYC,GACRC,MAAMD,GAJVE,KAAAC,oBAAgCC,OAChCF,KAAAG,gBAA4BD,OAIxBF,KAAKI,SAAW,IAAIC,EAAyBA,0BAACP,EAClD,CAEAQ,KAAAA,GAGI,MAAMC,aAAEA,GAAiBP,KAAKF,KAAKU,WAE/BD,IACAP,KAAKC,oBAAsBM,EAAaE,UAAUT,KAAKI,WAG3DJ,KAAKG,gBAAkBH,KAAKI,SAASM,gBAAkBR,EAAAA,IAC3D,CAEAS,MAAAA,GACI,MAAMJ,aAAEA,GAAiBP,KAAKF,KAAKU,YAC3BD,aAAcK,GAAqBZ,KAAKF,KAAKe,WAAa,GAE9DN,IAAiBK,IACjBZ,KAAKC,sBACDM,IACAP,KAAKC,oBAAsBM,EAAaE,UAAUT,KAAKI,WAGnE,CAEAU,OAAAA,GACId,KAAKC,sBACLD,KAAKG,kBAWAH,KAAKI,SAASW,YACff,KAAKI,SAASY,eAEtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../utils/use-constant.mjs.js");class o{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,o){this.componentControls.forEach((s=>{s.start(t.nativeEvent||t,o)}))}}const s=()=>new o;exports.DragControls=o,exports.useDragControls=function(){return t.useConstant(s)};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../utils/use-constant.mjs.js");class o{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,o){this.componentControls.forEach((s=>{s.start(t.nativeEvent||t,o)}))}cancel(){this.componentControls.forEach((t=>{t.cancel()}))}stop(){this.componentControls.forEach((t=>{t.stop()}))}}const s=()=>new o;exports.DragControls=o,exports.useDragControls=function(){return t.useConstant(s)};
|
|
2
2
|
//# sourceMappingURL=use-drag-controls.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-drag-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs"],"sourcesContent":["import { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nclass DragControls {\n constructor() {\n this.componentControls = new Set();\n }\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls) {\n this.componentControls.add(controls);\n return () => this.componentControls.delete(controls);\n }\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(event, options) {\n this.componentControls.forEach((controls) => {\n controls.start(event.nativeEvent || event, options);\n });\n }\n}\nconst createDragControls = () => new DragControls();\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nfunction useDragControls() {\n return useConstant(createDragControls);\n}\n\nexport { DragControls, useDragControls };\n"],"names":["DragControls","constructor","this","componentControls","Set","subscribe","controls","add","delete","start","event","options","forEach","nativeEvent","createDragControls","useConstant"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-drag-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs"],"sourcesContent":["import { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nclass DragControls {\n constructor() {\n this.componentControls = new Set();\n }\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls) {\n this.componentControls.add(controls);\n return () => this.componentControls.delete(controls);\n }\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(event, options) {\n this.componentControls.forEach((controls) => {\n controls.start(event.nativeEvent || event, options);\n });\n }\n /**\n * Cancels a drag gesture.\n *\n * ```jsx\n * dragControls.cancel()\n * ```\n *\n * @public\n */\n cancel() {\n this.componentControls.forEach((controls) => {\n controls.cancel();\n });\n }\n /**\n * Stops a drag gesture.\n *\n * ```jsx\n * dragControls.stop()\n * ```\n *\n * @public\n */\n stop() {\n this.componentControls.forEach((controls) => {\n controls.stop();\n });\n }\n}\nconst createDragControls = () => new DragControls();\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nfunction useDragControls() {\n return useConstant(createDragControls);\n}\n\nexport { DragControls, useDragControls };\n//# sourceMappingURL=use-drag-controls.mjs.map\n"],"names":["DragControls","constructor","this","componentControls","Set","subscribe","controls","add","delete","start","event","options","forEach","nativeEvent","cancel","stop","createDragControls","useDragControls","useConstant"],"mappings":"2HA2BaA,EAAbC,WAAAA,GACYC,KAAAC,kBAAoB,IAAIC,GAqEpC,CA9DIC,SAAAA,CAAUC,GAGN,OAFAJ,KAAKC,kBAAkBI,IAAID,GAEpB,IAAMJ,KAAKC,kBAAkBK,OAAOF,EAC/C,CAiBAG,KAAAA,CACIC,EACAC,GAEAT,KAAKC,kBAAkBS,SAASN,IAC5BA,EAASG,MACJC,EAA6BG,aAAeH,EAC7CC,EACH,GAET,CAWAG,MAAAA,GACIZ,KAAKC,kBAAkBS,SAASN,IAC5BA,EAASQ,QAAQ,GAEzB,CAWAC,IAAAA,GACIb,KAAKC,kBAAkBS,SAASN,IAC5BA,EAASS,MAAM,GAEvB,EAGJ,MAAMC,EAAqBA,IAAM,IAAIhB,iDA4BrBiB,WACZ,OAAOC,EAAAA,YAAYF,EACvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/utils/mix/number.mjs.js"),i=require("../../../../../../motion-dom/dist/es/projection/geometry/delta-calc.mjs.js"),e=require("../../../../../../motion-utils/dist/es/progress.mjs.js"),n=require("../../../../../../motion-utils/dist/es/clamp.mjs.js");function r(t,i,e){return{min:void 0!==i?t.min+i:void 0,max:void 0!==e?t.max+e-(t.max-t.min):void 0}}function o(t,i){let e=i.min-t.min,n=i.max-t.max;return i.max-i.min<t.max-t.min&&([e,n]=[n,e]),{min:e,max:n}}const s=.35;function m(t,i,e){return{min:a(t,i),max:a(t,e)}}function a(t,i){return"number"==typeof t?t:t[i]||0}exports.applyConstraints=function(i,e,n){let{min:r,max:o}=e;return void 0!==r&&i<r?i=n?t.mixNumber(r,i,n.min):Math.max(i,r):void 0!==o&&i>o&&(i=n?t.mixNumber(o,i,n.max):Math.min(i,o)),i},exports.calcOrigin=function(t,r){let o=.5;const s=i.calcLength(t),m=i.calcLength(r);return m>s?o=e.progress(r.min,r.max-s,t.min):s>m&&(o=e.progress(t.min,t.max-m,r.min)),n.clamp(0,1,o)},exports.calcRelativeAxisConstraints=r,exports.calcRelativeConstraints=function(t,i){let{top:e,left:n,bottom:o,right:s}=i;return{x:r(t.x,n,s),y:r(t.y,e,o)}},exports.calcViewportAxisConstraints=o,exports.calcViewportConstraints=function(t,i){return{x:o(t.x,i.x),y:o(t.y,i.y)}},exports.defaultElastic=s,exports.rebaseAxisConstraints=function(t,i){const e={};return void 0!==i.min&&(e.min=i.min-t.min),void 0!==i.max&&(e.max=i.max-t.min),e},exports.resolveAxisElastic=m,exports.resolveDragElastic=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return!1===t?t=0:!0===t&&(t=s),{x:m(t,"left","right"),y:m(t,"top","bottom")}},exports.resolvePointElastic=a;
|
|
2
2
|
//# sourceMappingURL=constraints.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraints.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs"],"sourcesContent":["import { mixNumber } from 'motion-dom';\nimport { progress, clamp } from 'motion-utils';\
|
|
1
|
+
{"version":3,"file":"constraints.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs"],"sourcesContent":["import { mixNumber, calcLength } from 'motion-dom';\nimport { progress, clamp } from 'motion-utils';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n//# sourceMappingURL=constraints.mjs.map\n"],"names":["calcRelativeAxisConstraints","axis","min","max","undefined","calcViewportAxisConstraints","layoutAxis","constraintsAxis","defaultElastic","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","label","point","_ref","elastic","mixNumber","Math","source","target","origin","sourceLength","calcLength","targetLength","calcProgress","clamp","layoutBox","_ref2","top","left","bottom","right","x","y","constraintsBox","layout","constraints","relativeConstraints","arguments","length"],"mappings":"+WA6DgBA,SAAAA,EACZC,EACAC,EACAC,GAEA,MAAO,CACHD,SAAaE,IAARF,EAAoBD,EAAKC,IAAMA,OAAME,EAC1CD,SACYC,IAARD,EACMF,EAAKE,I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A6BJ,EAElD,MAAO,CACHK,EAAGlC,EAA4B4B,EAAUM,EAAGH,EAAME,GAClDE,EAAGnC,EAA4B4B,EAAUO,EAAGL,EAAKE,GAEzD,wEA2BM,SAAkCJ,EAAgBQ,GACpD,MAAO,CACHF,EAAG7B,EAA4BuB,EAAUM,EAAGE,EAAeF,GAC3DC,EAAG9B,EAA4BuB,EAAUO,EAAGC,EAAeD,GAEnE,yDA0DM,SACFE,EACAC,GAEA,MAAMC,EAAqC,CAAA,EAU3C,YARwBnC,IAApBkC,EAAYpC,MACZqC,EAAoBrC,IAAMoC,EAAYpC,IAAMmC,EAAOnC,UAG/BE,IAApBkC,EAAYnC,MACZoC,EAAoBpC,IAAMmC,EAAYnC,IAAMkC,EAAOnC,KAGhDqC,CACX,0DAMM,WACuC,IAAzC7B,EAAA8B,UAAAC,OAAA,QAAArC,IAAAoC,UAAA,GAAAA,UAAA,GAA2BhC,EAQ3B,OANoB,IAAhBE,EACAA,EAAc,GACS,IAAhBA,IACPA,EAAcF,GAGX,CACH0B,EAAGzB,EAAmBC,EAAa,OAAQ,SAC3CyB,EAAG1B,EAAmBC,EAAa,MAAO,UAElD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../motion-utils/dist/es/pipe.mjs.js"),s=require("../../../../motion-dom/dist/es/events/add-dom-event.mjs.js");class i extends t.Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=e.pipe(s.addDomEvent(this.node.current,"focus",(()=>this.onFocus())),s.addDomEvent(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}exports.FocusGesture=i;
|
|
2
2
|
//# sourceMappingURL=focus.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/focus.mjs"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"focus.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/focus.mjs"],"sourcesContent":["import { Feature, addDomEvent } from 'motion-dom';\nimport { pipe } from 'motion-utils';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n//# sourceMappingURL=focus.mjs.map\n"],"names":["FocusGesture","Feature","constructor","this","isActive","onFocus","isFocusVisible","node","current","matches","e","animationState","setActive","onBlur","mount","unmount","pipe","addDomEvent"],"mappings":"4QAGM,MAAOA,UAAqBC,EAAAA,QAAlCC,WAAAA,uBACYC,KAAAC,UAAW,CAqCvB,CAnCIC,OAAAA,GACI,IAAIC,GAAiB,EAQrB,IACIA,EAAiBH,KAAKI,KAAKC,QAASC,QAAQ,iBAC9C,CAAA,MAAOC,GACLJ,GAAiB,CACrB,CAEKA,GAAmBH,KAAKI,KAAKI,iBAElCR,KAAKI,KAAKI,eAAeC,UAAU,cAAc,GACjDT,KAAKC,UAAW,EACpB,CAEAS,MAAAA,GACSV,KAAKC,UAAaD,KAAKI,KAAKI,iBACjCR,KAAKI,KAAKI,eAAeC,UAAU,cAAc,GACjDT,KAAKC,UAAW,EACpB,CAEAU,KAAAA,GACIX,KAAKY,QAAUC,EAAIA,KACfC,cAAYd,KAAKI,KAAKC,QAAU,SAAS,IAAML,KAAKE,YACpDY,EAAWA,YAACd,KAAKI,KAAKC,QAAU,QAAQ,IAAML,KAAKU,WAE3D,CAEAE,OAAAA,GAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../motion-dom/dist/es/gestures/hover.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function s(t,o,s){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===s);const i=n["onHover"+s];i&&r.frame.postRender((()=>i(o,e.extractEventInfo(o))))}class n extends t.Feature{mount(){const{current:e}=this.node;e&&(this.unmount=o.hover(e,((e,t)=>(s(this.node,t,"Start"),e=>s(this.node,e,"End")))))}unmount(){}}exports.HoverGesture=n;
|
|
2
2
|
//# sourceMappingURL=hover.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\
|
|
1
|
+
{"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature, hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["handleHoverEvent","node","event","lifecycle","props","animationState","whileHover","setActive","callback","frame","postRender","extractEventInfo","HoverGesture","Feature","mount","current","this","unmount","hover","_element","startEvent","endEvent"],"mappings":"wTAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAEdA,EAAKI,gBAAkBD,EAAME,YAC7BL,EAAKI,eAAeE,UAAU,aAA4B,UAAdJ,GAGhD,MACMK,EAAWJ,EADE,UAAYD,GAE3BK,GACAC,EAAKA,MAACC,YAAW,IAAMF,EAASN,EAAOS,mBAAiBT,KAEhE,CAEM,MAAOU,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKf,KACpBc,IAELC,KAAKC,QAAUC,EAAKA,MAACH,GAAS,CAACI,EAAUC,KACrCpB,EAAiBgB,KAAKf,KAAMmB,EAAY,SAEhCC,GAAarB,EAAiBgB,KAAKf,KAAMoB,EAAU,UAEnE,CAEAJ,OAAAA,GAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../events/add-pointer-event.mjs.js"),e=require("../../events/event-info.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../events/add-pointer-event.mjs.js"),e=require("../../events/event-info.mjs.js"),s=require("../../utils/distance.mjs.js"),n=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),o=require("../../../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs.js"),i=require("../../../../../motion-utils/dist/es/pipe.mjs.js"),r=require("../../../../../motion-utils/dist/es/time-conversion.mjs.js");const l=new Set(["auto","scroll"]);function a(t,e){return e?{point:e(t.point)}:t}function h(t,e){return{x:t.x-e.x,y:t.y-e.y}}function c(t,e){let{point:s}=t;return{point:s,delta:h(s,v(e)),offset:h(s,d(e)),velocity:m(e,.1)}}function d(t){return t[0]}function v(t){return t[t.length-1]}function m(t,e){if(t.length<2)return{x:0,y:0};let s=t.length-1,n=null;const o=v(t);for(;s>=0&&(n=t[s],!(o.timestamp-n.timestamp>r.secondsToMilliseconds(e)));)s--;if(!n)return{x:0,y:0};n===t[0]&&t.length>2&&o.timestamp-n.timestamp>2*r.secondsToMilliseconds(e)&&(n=t[1]);const i=r.millisecondsToSeconds(o.timestamp-n.timestamp);if(0===i)return{x:0,y:0};const l={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}exports.PanSession=class{constructor(r,l){let{transformPagePoint:h,contextWindow:d=window,dragSnapToOrigin:v=!1,distanceThreshold:m=3,element:p}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=a(this.lastRawMoveEventInfo,this.transformPagePoint));const t=c(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,o=s.distance2D(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!o)return;const{point:i}=t,{timestamp:r}=n.frameData;this.history.push({...i,timestamp:r});const{onStart:l,onMove:h}=this.handlers;e||(l&&l(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=a(e,this.transformPagePoint),n.frame.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:s,onSessionEnd:n,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=c("pointercancel"===t.type?this.lastMoveEventInfo:a(e,this.transformPagePoint),this.history);this.startEvent&&s&&s(t,i),n&&n(t,i)},!o.isPrimaryPointer(r))return;this.dragSnapToOrigin=v,this.handlers=l,this.transformPagePoint=h,this.distanceThreshold=m,this.contextWindow=d||window;const u=a(e.extractEventInfo(r),this.transformPagePoint),{point:f}=u,{timestamp:w}=n.frameData;this.history=[{...f,timestamp:w}];const{onSessionStart:E}=l;E&&E(r,c(u,this.history)),this.removeListeners=i.pipe(t.addPointerEvent(this.contextWindow,"pointermove",this.handlePointerMove),t.addPointerEvent(this.contextWindow,"pointerup",this.handlePointerUp),t.addPointerEvent(this.contextWindow,"pointercancel",this.handlePointerUp)),p&&this.startScrollTracking(p)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(l.has(t.overflowX)||l.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const s=t===window,o=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i=o.x-e.x,r=o.y-e.y;0===i&&0===r||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i,this.lastMoveEventInfo.point.y+=r):this.history.length>0&&(this.history[0].x-=i,this.history[0].y-=r),this.scrollPositions.set(t,o),n.frame.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),n.cancelFrame(this.updatePoint)}};
|
|
2
2
|
//# sourceMappingURL=PanSession.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanSession.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs"],"sourcesContent":["import { frame, isPrimaryPointer, cancelFrame, frameData } from 'motion-dom';\nimport { pipe, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n if (this.dragSnapToOrigin)\n resumeAnimation && resumeAnimation();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n"],"names":["transformPoint","info","transformPagePoint","point","subtractPoint","a","b","x","y","getPanInfo","_ref","history","delta","lastDevicePoint","offset","startDevicePoint","velocity","getVelocity","length","timeDelta","i","timestampedPoint","lastPoint","timestamp","secondsToMilliseconds","time","millisecondsToSeconds","currentVelocity","Infinity","constructor","event","handlers","contextWindow","dragSnapToOrigin","arguments","undefined","this","startEvent","lastMoveEvent","lastMoveEventInfo","window","updatePoint","isPanStarted","isDistancePastThreshold","distance2D","frameData","push","onStart","onMove","handlePointerMove","frame","update","handlePointerUp","end","onEnd","onSessionEnd","resumeAnimation","panInfo","type","isPrimaryPointer","initialInfo","extractEventInfo","onSessionStart","removeListeners","pipe","addPointerEvent","updateHandlers","cancelFrame"],"mappings":"mfAkGA,SAASA,EAAeC,EAAMC,GAC1B,OAAOA,EAAqB,CAAEC,MAAOD,EAAmBD,EAAKE,QAAWF,CAC5E,CACA,SAASG,EAAcC,EAAGC,GACtB,MAAO,CAAEC,EAAGF,EAAEE,EAAID,EAAEC,EAAGC,EAAGH,EAAEG,EAAIF,EAAEE,EACtC,CACA,SAASC,EAAUC,EAAYC,GAAS,IAApBR,MAAEA,GAAOO,EACzB,MAAO,CACHP,QACAS,MAAOR,EAAcD,EAAOU,EAAgBF,IAC5CG,OAAQV,EAAcD,EAAOY,EAAiBJ,IAC9CK,SAAUC,EAAYN,EAAS,IAEvC,CACA,SAASI,EAAiBJ,GACtB,OAAOA,EAAQ,EACnB,CACA,SAASE,EAAgBF,GACrB,OAAOA,EAAQA,EAAQO,OAAS,EACpC,CACA,SAASD,EAAYN,EAASQ,GAC1B,GAAIR,EAAQO,OAAS,EACjB,MAAO,CAAEX,EAAG,EAAGC,EAAG,GAEtB,IAAIY,EAAIT,EAAQO,OAAS,EACrBG,EAAmB,KACvB,MAAMC,EAAYT,EAAgBF,GAClC,KAAOS,GAAK,IACRC,EAAmBV,EAAQS,KACvBE,EAAUC,UAAYF,EAAiBE,UACvCC,EAAAA,sBAAsBL,MAG1BC,IAEJ,IAAKC,EACD,MAAO,CAAEd,EAAG,EAAGC,EAAG,GAEtB,MAAMiB,EAAOC,EAAAA,sBAAsBJ,EAAUC,UAAYF,EAAiBE,WAC1E,GAAa,IAATE,EACA,MAAO,CAAElB,EAAG,EAAGC,EAAG,GAEtB,MAAMmB,EAAkB,CACpBpB,GAAIe,EAAUf,EAAIc,EAAiBd,GAAKkB,EACxCjB,GAAIc,EAAUd,EAAIa,EAAiBb,GAAKiB,GAQ5C,OANIE,EAAgBpB,IAAMqB,MACtBD,EAAgBpB,EAAI,GAEpBoB,EAAgBnB,IAAMoB,MACtBD,EA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MkB,EAAUhD,EAA0B,kBAAfqB,EAAM4B,KAC3BtB,KAAKG,kBACLvC,EAAeC,EAAMmC,KAAKlC,oBAAqBkC,KAAKzB,SACtDyB,KAAKC,YAAciB,GACnBA,EAAMxB,EAAO2B,GAEjBF,GAAgBA,EAAazB,EAAO2B,EAAQ,GAG3CE,EAAAA,iBAAiB7B,GAClB,OACJM,KAAKH,iBAAmBA,EACxBG,KAAKL,SAAWA,EAChBK,KAAKlC,mBAAqBA,EAC1BkC,KAAKJ,cAAgBA,GAAiBQ,OACtC,MACMoB,EAAc5D,EADP6D,mBAAiB/B,GACWM,KAAKlC,qBACxCC,MAAEA,GAAUyD,GACZrC,UAAEA,GAAcsB,YACtBT,KAAKzB,QAAU,CAAC,IAAKR,EAAOoB,cAC5B,MAAMuC,eAAEA,GAAmB/B,EAC3B+B,GACIA,EAAehC,EAAOrB,EAAWmD,EAAaxB,KAAKzB,UACvDyB,KAAK2B,gBAAkBC,OAAKC,EAAAA,gBAAgB7B,KAAKJ,cAAe,cAAeI,KAAKa,mBAAoBgB,kBAAgB7B,KAAKJ,cAAe,YAAaI,KAAKgB,iBAAkBa,EAAeA,gBAAC7B,KAAKJ,cAAe,gBAAiBI,KAAKgB,iBAC9O,CACAc,cAAAA,CAAenC,GACXK,KAAKL,SAAWA,CACpB,CACAsB,GAAAA,GACIjB,KAAK2B,iBAAmB3B,KAAK2B,kBAC7BI,cAAY/B,KAAKK,YACrB"}
|
|
1
|
+
{"version":3,"file":"PanSession.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs"],"sourcesContent":["import { frameData, frame, isPrimaryPointer, cancelFrame } from 'motion-dom';\nimport { pipe, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\n\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"]);\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * Raw (untransformed) event info, re-transformed each frame\n * so transformPagePoint sees the current parent matrix.\n * @internal\n */\n this.lastRawMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n /**\n * Scroll positions of scrollable ancestors and window.\n * @internal\n */\n this.scrollPositions = new Map();\n /**\n * Cleanup function for scroll listeners.\n * @internal\n */\n this.removeScrollListeners = null;\n this.onElementScroll = (event) => {\n this.handleScroll(event.target);\n };\n this.onWindowScroll = () => {\n this.handleScroll(window);\n };\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n // Re-transform raw point through current transformPagePoint so\n // animated parent transforms (e.g. rotation) are picked up each frame\n if (this.lastRawMoveEventInfo) {\n this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint);\n }\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursor.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastRawMoveEventInfo = info;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n // This ensures constraint animations continue when interrupted by a click\n if (this.dragSnapToOrigin || !this.startEvent) {\n resumeAnimation && resumeAnimation();\n }\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.distanceThreshold = distanceThreshold;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n // Start scroll tracking if element provided\n if (element) {\n this.startScrollTracking(element);\n }\n }\n /**\n * Start tracking scroll on ancestors and window.\n */\n startScrollTracking(element) {\n // Store initial scroll positions for scrollable ancestors\n let current = element.parentElement;\n while (current) {\n const style = getComputedStyle(current);\n if (overflowStyles.has(style.overflowX) ||\n overflowStyles.has(style.overflowY)) {\n this.scrollPositions.set(current, {\n x: current.scrollLeft,\n y: current.scrollTop,\n });\n }\n current = current.parentElement;\n }\n // Track window scroll\n this.scrollPositions.set(window, {\n x: window.scrollX,\n y: window.scrollY,\n });\n // Capture listener catches element scroll events as they bubble\n window.addEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n // Direct window scroll listener (window scroll doesn't bubble)\n window.addEventListener(\"scroll\", this.onWindowScroll);\n this.removeScrollListeners = () => {\n window.removeEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n window.removeEventListener(\"scroll\", this.onWindowScroll);\n };\n }\n /**\n * Handle scroll compensation during drag.\n *\n * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n */\n handleScroll(target) {\n const initial = this.scrollPositions.get(target);\n if (!initial)\n return;\n const isWindow = target === window;\n const current = isWindow\n ? { x: window.scrollX, y: window.scrollY }\n : {\n x: target.scrollLeft,\n y: target.scrollTop,\n };\n const delta = { x: current.x - initial.x, y: current.y - initial.y };\n if (delta.x === 0 && delta.y === 0)\n return;\n if (isWindow) {\n // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n if (this.lastMoveEventInfo) {\n this.lastMoveEventInfo.point.x += delta.x;\n this.lastMoveEventInfo.point.y += delta.y;\n }\n }\n else {\n // Element scroll: pageX/pageY unchanged, so adjust history origin\n if (this.history.length > 0) {\n this.history[0].x -= delta.x;\n this.history[0].y -= delta.y;\n }\n }\n this.scrollPositions.set(target, current);\n frame.update(this.updatePoint, true);\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n this.removeScrollListeners && this.removeScrollListeners();\n this.scrollPositions.clear();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n /**\n * If the selected point is the pointer-down origin (history[0]),\n * there are better movement points available, and the time gap\n * is suspiciously large (>2x timeDelta), use the next point instead.\n * This prevents stale pointer-down points from diluting velocity\n * in hold-then-flick gestures.\n */\n if (timestampedPoint === history[0] &&\n history.length > 2 &&\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta) * 2) {\n timestampedPoint = history[1];\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n//# sourceMappingURL=PanSession.mjs.map\n"],"names":["overflowStyles","Set","transformPoint","info","transformPagePoint","point","subtractPoint","a","b","x","y","getPanInfo","_ref","history","delta","lastDevicePoint","offset","startDevicePoint","velocity","getVelocity","length","timeDelta","i","timestampedPoint","lastPoint","timestamp","secondsToMilliseconds","time","millisecondsToSeconds","currentVelocity","Infinity","constructor","event","handlers","contextWindow","window","dragSnapToOrigin","distanceThreshold","element","arguments","undefined","this","startEvent","lastMoveEvent","lastMoveEventInfo","lastRawMoveEventInfo","scrollPositions","Map","removeScrollListeners","onElementScroll","handleScroll","target","onWindowScroll","updatePoint","isPanStarted","isDistancePastThreshold","distance2D","frameData","push","onStart","onMove","handlePointerMove","frame","update","handlePointerUp","end","onEnd","onSessionEnd","resumeAnimation","panInfo","type","isPrimaryPointer","initialInfo","extractEventInfo","onSessionStart","removeListeners","pipe","addPointerEvent","startScrollTracking","current","parentElement","style","getComputedStyle","has","overflowX","overflowY","set","scrollLeft","scrollTop","scrollX","scrollY","addEventListener","capture","removeEventListener","initial","get","isWindow","updateHandlers","clear","cancelFrame"],"mappings":"mfAuCA,MAAMA,EAA+B,IAAIC,IAAI,CAAC,OAAQ,WAoTtD,SAASC,EACLC,EACAC,GAEA,OAAOA,EAAqB,CAAEC,MAAOD,EAAmBD,EAAKE,QAAWF,CAC5E,CAEA,SAASG,EAAcC,EAAUC,GAC7B,MAAO,CAAEC,EAAGF,EAAEE,EAAID,EAAEC,EAAGC,EAAGH,EAAEG,EAAIF,EAAEE,EACtC,CAEA,SAASC,EAAUC,EAAuBC,GAA2B,IAAjDR,MAAEA,GAAkBO,EACpC,MAAO,CACHP,QACAS,MAAOR,EAAcD,EAAOU,EAAgBF,IAC5CG,OAAQV,EAAcD,EAAOY,EAAiBJ,IAC9CK,SAAUC,EAAYN,EAAS,IAEvC,CAEA,SAASI,EAAiBJ,GACtB,OAAOA,EAAQ,EACnB,CAEA,SAASE,EAAgBF,GACrB,OAAOA,EAAQA,EAAQO,OAAS,EACpC,CAEA,SAASD,EAAYN,EAA6BQ,GAC9C,GAAIR,EAAQO,OAAS,EACjB,MAAO,CAAEX,EAAG,EAAGC,EAAG,GAGtB,IAAIY,EAAIT,EAAQO,OAAS,EACrBG,EAA4C,KAChD,MAAMC,EAAYT,EAAgBF,GAClC,KAAOS,GAAK,IACRC,EAAmBV,EAAQS,KAEvBE,EAAUC,UAAYF,EAAiBE,UACvCC,EAAAA,sBAAsBL,MAI1BC,IAGJ,IAAKC,EACD,MAAO,CAAEd,EAAG,EAAGC,EAAG,GAWlBa,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ACIjF,EAAI0C,EAAmBoC,WACvB7E,EAAIyC,EAAmBqC,WAG3B1E,EAAaiE,EAAQtE,EAAIqF,EAAQrF,EAAjCK,EAAuCiE,EAAQrE,EAAIoF,EAAQpF,EACjD,IAAZI,GAA6B,IAAZA,IAEjBkF,EAEIvD,KAAKG,oBACLH,KAAKG,kBAAkBvC,MAAMI,GAAKK,EAClC2B,KAAKG,kBAAkBvC,MAAMK,GAAKI,GAIlC2B,KAAK5B,QAAQO,OAAS,IACtBqB,KAAK5B,QAAQ,GAAGJ,GAAKK,EACrB2B,KAAK5B,QAAQ,GAAGH,GAAKI,GAI7B2B,KAAKK,gBAAgBwC,IAAInC,EAAQ4B,GACjCjB,EAAAA,MAAMC,OAAOtB,KAAKY,aAAa,GACnC,CA0EA4C,cAAAA,CAAehE,GACXQ,KAAKR,SAAWA,CACpB,CAEAgC,GAAAA,GACIxB,KAAKkC,iBAAmBlC,KAAKkC,kBAC7BlC,KAAKO,uBAAyBP,KAAKO,wBACnCP,KAAKK,gBAAgBoD,QACrBC,cAAY1D,KAAKY,YACrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../events/add-pointer-event.mjs.js"),n=require("../../
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../events/add-pointer-event.mjs.js"),n=require("../../utils/get-context-window.mjs.js"),s=require("./PanSession.mjs.js"),t=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../../motion-utils/dist/es/noop.mjs.js"),r=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js");const i=e=>(n,s)=>{e&&r.frame.update((()=>e(n,s)),!1,!0)};class a extends t.Feature{constructor(){super(...arguments),this.removePointerDownListener=o.noop}onPointerDown(e){this.session=new s.PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n.getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:t}=this.node.getProps();return{onSessionStart:i(e),onStart:i(n),onMove:i(s),onEnd:(e,n)=>{delete this.session,t&&r.frame.postRender((()=>t(e,n)))}}}mount(){this.removePointerDownListener=e.addPointerEvent(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}exports.PanGesture=a;
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { frame } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { Feature, frame } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { PanSession } from './PanSession.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["asyncHandler","handler","event","info","frame","update","PanGesture","Feature","constructor","this","removePointerDownListener","noop","onPointerDown","pointerDownEvent","session","PanSession","createPanHandlers","transformPagePoint","node","getTransformPagePoint","contextWindow","getContextWindow","onPanSessionStart","onPanStart","onPan","onPanEnd","getProps","onSessionStart","onStart","onMove","onEnd","postRender","mount","addPointerEvent","current","updateHandlers","unmount","end"],"mappings":"uZAOA,MAAMA,EACDC,GAA8B,CAACC,EAAqBC,KAC7CF,GACAG,QAAMC,QAAO,IAAMJ,EAAQC,EAAOC,KAAO,GAAO,EACpD,EAGF,MAAOG,UAAmBC,EAAAA,QAAhCC,WAAAA,uBAGYC,KAAAC,0BAAsCC,MA8ClD,CA5CIC,aAAAA,CAAcC,GACVJ,KAAKK,QAAU,IAAIC,EAAAA,WACfF,EACAJ,KAAKO,oBACL,CACIC,mBAAoBR,KAAKS,KAAKC,wBAC9BC,cAAeC,EAAAA,iBAAiBZ,KAAKS,OAGjD,CAEAF,iBAAAA,GACI,MAAMM,kBAAEA,EAAiBC,WAAEA,EAAUC,MAAEA,EAAKC,SAAEA,GAC1ChB,KAAKS,KAAKQ,WAEd,MAAO,CACHC,eAAgB3B,EAAasB,GAC7BM,QAAS5B,EAAauB,GACtBM,OAAQ7B,EAAawB,GACrBM,MAAOA,CAAC5B,EAAqBC,YAClBM,KAAKK,QACRW,GACArB,EAAKA,MAAC2B,YAAW,IAAMN,EAASvB,EAAOC,IAC3C,EAGZ,CAEA6B,KAAAA,GACIvB,KAAKC,0BAA4BuB,kBAC7BxB,KAAKS,KAAKgB,QACV,eACChC,GAAwBO,KAAKG,cAAcV,IAEpD,CAEAG,MAAAA,GACII,KAAKK,SAAWL,KAAKK,QAAQqB,eAAe1B,KAAKO,oBACrD,CAEAoB,OAAAA,GACI3B,KAAKC,4BACLD,KAAKK,SAAWL,KAAKK,QAAQuB,KACjC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),s=require("../../../../motion-dom/dist/es/gestures/press/index.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function n(t,s,n){const{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap","Start"===n);const a=o["onTap"+("End"===n?"":n)];a&&r.frame.postRender((()=>a(s,e.extractEventInfo(s))))}class o extends t.Feature{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=s.press(e,((e,t)=>(n(this.node,t,"Start"),(e,t)=>{let{success:s}=t;return n(this.node,e,s?"End":"Cancel")})),{useGlobalTarget:t,stopPropagation:!1===r?.tap})}unmount(){}}exports.PressGesture=o;
|
|
2
2
|
//# sourceMappingURL=press.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\
|
|
1
|
+
{"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature, press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n const { globalTapTarget, propagate } = this.node.props;\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n//# sourceMappingURL=press.mjs.map\n"],"names":["handlePressEvent","node","event","lifecycle","props","current","HTMLButtonElement","disabled","animationState","whileTap","setActive","callback","frame","postRender","extractEventInfo","PressGesture","Feature","mount","this","globalTapTarget","propagate","unmount","press","_element","startEvent","endEvent","_ref","success","useGlobalTarget","stopPropagation","tap"],"mappings":"8TAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAElB,GAAIA,EAAKI,mBAAmBC,mBAAqBL,EAAKI,QAAQE,SAC1D,OAGAN,EAAKO,gBAAkBJ,EAAMK,UAC7BR,EAAKO,eAAeE,UAAU,WAA0B,UAAdP,GAG9C,MAKMQ,EAAWP,EALE,SAAyB,QAAdD,EAAsB,GAAKA,IAMrDQ,GACAC,EAAKA,MAACC,YAAW,IAAMF,EAAST,EAAOY,mBAAiBZ,KAEhE,CAEM,MAAOa,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMZ,QAAEA,GAAYa,KAAKjB,KACzB,IAAKI,EAAS,OAEd,MAAMc,gBAAEA,EAAeC,UAAEA,GAAcF,KAAKjB,KAAKG,MAEjDc,KAAKG,QAAUC,EAAKA,MAChBjB,GACA,CAACkB,EAAUC,KACPxB,EAAiBkB,KAAKjB,KAAMuB,EAAY,SAEjC,CAACC,EAAQC,KAAA,IAAEC,QAAEA,GAASD,EAAA,OACzB1B,EACIkB,KAAKjB,KACLwB,EACAE,EAAU,MAAQ,SACrB,IAET,CACIC,gBAAiBT,EACjBU,iBAAoC,IAAnBT,GAAWU,KAGxC,CAEAT,OAAAA,GAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js");let i=0;class s extends t.Feature{constructor(){super(...arguments),this.id=i++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&!1===s){if(this.isExitComplete){const{initial:t,custom:i}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const s=e.resolveVariant(this.node,t,i);if(s){const{transition:t,transitionEnd:e,...i}=s;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const n=this.node.animationState.setActive("exit",!t);i&&!t&&n.then((()=>{this.isExitComplete=!0,i(this.id)}))}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}exports.ExitAnimationFeature=s;
|
|
2
2
|
//# sourceMappingURL=exit.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature } from '
|
|
1
|
+
{"version":3,"file":"exit.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature, resolveVariant } from 'motion-dom';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n this.isExitComplete = false;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n if (isPresent && prevIsPresent === false) {\n /**\n * When re-entering, if the exit animation already completed\n * (element is at rest), reset to initial values so the enter\n * animation replays from the correct position.\n */\n if (this.isExitComplete) {\n const { initial, custom } = this.node.getProps();\n if (typeof initial === \"string\" ||\n (typeof initial === \"object\" &&\n initial !== null &&\n !Array.isArray(initial))) {\n const resolved = resolveVariant(this.node, initial, custom);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(target[key]);\n }\n }\n }\n this.node.animationState.reset();\n this.node.animationState.animateChanges();\n }\n else {\n this.node.animationState.setActive(\"exit\", false);\n }\n this.isExitComplete = false;\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n this.isExitComplete = true;\n onExitComplete(this.id);\n });\n }\n }\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {};\n if (onExitComplete) {\n onExitComplete(this.id);\n }\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n//# sourceMappingURL=exit.mjs.map\n"],"names":["id","ExitAnimationFeature","Feature","constructor","this","isExitComplete","update","node","presenceContext","isPresent","onExitComplete","prevIsPresent","prevPresenceContext","animationState","initial","custom","getProps","Array","isArray","resolved","resolveVariant","transition","transitionEnd","target","key","getValue","jump","reset","animateChanges","setActive","exitAnimation","then","mount","register","unmount"],"mappings":"+OAEA,IAAIA,EAAK,EA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
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/animation-state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/render/utils/is-animation-controls.mjs.js");class o extends t.Feature{constructor(t){super(t),t.animationState||(t.animationState=e.createAnimationState(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();n.isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}exports.AnimationFeature=o;
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs"],"sourcesContent":["import { Feature, createAnimationState, isAnimationControls } from 'motion-dom';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n this.node.animationState.reset();\n this.unmountControls?.();\n }\n}\n\nexport { AnimationFeature };\n//# sourceMappingURL=index.mjs.map\n"],"names":["AnimationFeature","Feature","constructor","node","super","animationState","createAnimationState","updateAnimationControlsSubscription","animate","this","getProps","isAnimationControls","unmountControls","subscribe","mount","update","prevAnimate","prevProps","unmount","reset"],"mappings":"kUAOM,MAAOA,UAAyBC,EAAAA,QAQlCC,WAAAA,CAAYC,GACRC,MAAMD,GACNA,EAAKE,iBAALF,EAAKE,eAAmBC,EAAoBA,qBAACH,GACjD,CAEAI,mCAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKN,KAAKO,WAC1BC,EAAAA,oBAAoBH,KACpBC,KAAKG,gBAAkBJ,EAAQK,UAAUJ,KAAKN,MAEtD,CAKAW,KAAAA,GACIL,KAAKF,qCACT,CAEAQ,MAAAA,GACI,MAAMP,QAAEA,GAAYC,KAAKN,KAAKO,YACtBF,QAASQ,GAAgBP,KAAKN,KAAKc,WAAa,GACpDT,IAAYQ,GACZP,KAAKF,qCAEb,CAEAW,OAAAA,GACIT,KAAKN,KAAKE,eAAgBc,QAC1BV,KAAKG,mBACT"}
|