@nethesis/phone-island 1.0.9 → 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/App.js +1 -1
- package/dist/App.js.map +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js +1 -1
- package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
- package/dist/components/Socket.js +1 -1
- package/dist/components/Socket.js.map +1 -1
- package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
- package/dist/lib/devices/devices.js +1 -1
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js +7 -1
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js.map +1 -1
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +1 -1
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +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/dist/services/user.js +1 -1
- package/dist/services/user.js.map +1 -1
- package/dist/utils/genericFunctions/summaryEvents.js +2 -0
- package/dist/utils/genericFunctions/summaryEvents.js.map +1 -0
- package/package.json +4 -4
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs"],"sourcesContent":["import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/driver-frameloop.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n const { onStop } = this.options;\n onStop && onStop();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes[0] }\n : frameGenerator.next(elapsed);\n if (mixKeyframes) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n this.updateTime(time.now());\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, onPlay, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n onPlay && onPlay();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.teardown();\n this.state = \"finished\";\n const { onComplete } = this.options;\n onComplete && onComplete();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n }\n teardown() {\n this.notifyFinished();\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n"],"names":["percentToProgress","percent","JSAnimation","WithPromise","constructor","options","super","this","state","startTime","isStopped","currentTime","holdTime","playbackSpeed","stop","motionValue","updatedAt","time","now","tick","teardown","onStop","initAnimation","play","autoplay","pause","replaceTransitionType","type","keyframes","repeat","repeatDelay","repeatType","velocity","keyframes$1","generatorFactory","process","env","NODE_ENV","invariant","length","mixKeyframes","pipe","mix","generator","mirroredGenerator","reverse","calculatedDuration","calcGeneratorDuration","resolvedDuration","totalDuration","updateTime","timestamp","animationTime","Math","round","sample","arguments","undefined","next","delay","onUpdate","finalKeyframe","speed","min","timeWithoutDelay","isInDelayPhase","max","elapsed","frameGenerator","progress","currentIteration","floor","iterationProgress","Boolean","clamp","done","value","isAnimationFinished","inertia","getFinalKeyframe","finish","then","resolve","reject","finished","duration","millisecondsToSeconds","newTime","secondsToMilliseconds","driver","newSpeed","hasChanged","frameloopDriver","onPlay","updateFinished","start","complete","onComplete","cancel","notifyFinished","stopDriver","sampleTime","attachTimeline","timeline","allowFlatten","ease","observe"],"mappings":"8sBAYA,MAAMA,EAAqBC,GAAYA,EAAU,IACjD,MAAMC,UAAoBC,EAAAA,YACtBC,WAAAA,CAAYC,GACRC,QACAC,KAAKC,MAAQ,OACbD,KAAKE,UAAY,KACjBF,KAAKG,WAAY,EAIjBH,KAAKI,YAAc,EAInBJ,KAAKK,SAAW,KAIhBL,KAAKM,cAAgB,EAKrBN,KAAKO,KAAO,KACR,MAAMC,YAAEA,GAAgBR,KAAKF,QAK7B,GAJIU,GAAeA,EAAYC,YAAcC,EAAIA,KAACC,OAC9CX,KAAKY,KAAKF,OAAKC,OAEnBX,KAAKG,WAAY,EACE,SAAfH,KAAKC,MACL,OACJD,KAAKa,WACL,MAAMC,OAAEA,GAAWd,KAAKF,QACxBgB,GAAUA,GAAQ,EAGtBd,KAAKF,QAAUA,EACfE,KAAKe,gBACLf,KAAKgB,QACoB,IAArBlB,EAAQmB,UACRjB,KAAKkB,OACb,CACAH,aAAAA,GACI,MAAMjB,QAAEA,GAAYE,KACpBmB,EAAqBA,sBAACrB,GACtB,MAAMsB,KAAEA,EAAOC,EAASA,UAAAC,OAAEA,EAAS,EAACC,YAAEA,EAAc,EAACC,WAAEA,EAAUC,SAAEA,EAAW,GAAO3B,EACrF,IAAMuB,UAAWK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vF,KAAKE,UAAYS,GAEM,OAAlBX,KAAKK,SACVL,KAAKE,UAAYS,EAAMX,KAAKK,SAEtBL,KAAKE,YACXF,KAAKE,UAAYA,GAAaS,GAEf,aAAfX,KAAKC,OAAwBD,KAAKuD,MAAQ,IAC1CvD,KAAKE,WAAaF,KAAKuC,oBAE3BvC,KAAKK,SAAW,KAKhBL,KAAKC,MAAQ,UACbD,KAAKkF,OAAOM,OAChB,CACAtE,KAAAA,GACIlB,KAAKC,MAAQ,SACbD,KAAK2C,WAAWjC,OAAKC,OACrBX,KAAKK,SAAWL,KAAKI,WACzB,CACAqF,QAAAA,GACuB,YAAfzF,KAAKC,OACLD,KAAKgB,OAEThB,KAAKC,MAAQ,WACbD,KAAKK,SAAW,IACpB,CACAoE,MAAAA,GACIzE,KAAKa,WACLb,KAAKC,MAAQ,WACb,MAAMyF,WAAEA,GAAe1F,KAAKF,QAC5B4F,GAAcA,GAClB,CACAC,MAAAA,GACI3F,KAAKK,SAAW,KAChBL,KAAKE,UAAY,EACjBF,KAAKY,KAAK,GACVZ,KAAKa,UACT,CACAA,QAAAA,GACIb,KAAK4F,iBACL5F,KAAKC,MAAQ,OACbD,KAAK6F,aACL7F,KAAKE,UAAYF,KAAKK,SAAW,IAErC,CACAwF,UAAAA,GACS7F,KAAKkF,SAEVlF,KAAKkF,OAAO3E,OACZP,KAAKkF,YAAShC,EAClB,CACAF,MAAAA,CAAO8C,GAEH,OADA9F,KAAKE,UAAY,EACVF,KAAKY,KAAKkF,GAAY,EACjC,CACAC,cAAAA,CAAeC,GAMX,OALIhG,KAAKF,QAAQmG,eACbjG,KAAKF,QAAQsB,KAAO,YACpBpB,KAAKF,QAAQoG,KAAO,SACpBlG,KAAKe,iBAEFiF,EAASG,QAAQnG,KAC5B"}
|
|
1
|
+
{"version":3,"file":"JSAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs"],"sourcesContent":["import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n const t = this.currentTime;\n if (t <= 0)\n return this.options.velocity || 0;\n if (this.generator.velocity) {\n return this.generator.velocity(t);\n }\n // Fallback: finite difference\n const current = this.generator.next(t).value;\n return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n//# sourceMappingURL=JSAnimation.mjs.map\n"],"names":["percentToProgress","percent","JSAnimation","WithPromise","constructor","options","super","this","state","startTime","isStopped","currentTime","holdTime","playbackSpeed","delayState","done","value","undefined","stop","motionValue","updatedAt","time","now","tick","teardown","onStop","initAnimation","play","autoplay","pause","replaceTransitionType","type","keyframes","repeat","repeatDelay","repeatType","velocity","keyframes$1","generatorFactory","process","env","NODE_ENV","keyframesGenerator","invariant","length","mixKeyframes","pipe","mix","generator","mirroredGenerator","reverse","calculatedDuration","calcGeneratorDuration","resolvedDuration","totalDuration","updateTime","timestamp","animationTime","Math","round","sample","arguments","next","delay","onUpdate","finalKeyframe","speed","min","timeWithoutDelay","isInDelayPhase","max","elapsed","frameGenerator","progress","currentIteration","floor","iterationProgress","Boolean","clamp","isAnimationFinished","inertia","getFinalKeyframe","finish","then","resolve","reject","finished","duration","millisecondsToSeconds","iterationDuration","newTime","secondsToMilliseconds","driver","start","getGeneratorVelocity","t","current","s","newSpeed","hasChanged","frameloopDriver","onPlay","updateFinished","complete","notifyFinished","onComplete","cancel","onCancel","stopDriver","sampleTime","attachTimeline","timeline","allowFlatten","ease","observe"],"mappings":"mvBA6BA,MAAMA,EAAqBC,GAAoBA,EAAU,IAEnD,MAAOC,UACDC,EAAAA,YA2DRC,WAAAA,CAAYC,GACRC,QAzDJC,KAAAC,MAA4B,OAE5BD,KAAAE,UAA2B,KAQnBF,KAAAG,WAAY,EAeZH,KAAAI,YAAsB,EAKtBJ,KAAAK,SAA0B,KAK1BL,KAAAM,cAAgB,EAgBhBN,KAAAO,WAAgC,CACpCC,MAAM,EACNC,WAAOC,GA+YXV,KAAAW,KAAO,KACH,MAAMC,YAAEA,GAAgBZ,KAAKF,QACzBc,GAAeA,EAAYC,YAAcC,EAAIA,KAACC,OAC9Cf,KAAKgB,KAAKF,OAAKC,OAGnBf,KAAKG,WAAY,EACE,SAAfH,KAAKC,QACTD,KAAKiB,WACLjB,KAAKF,QAAQoB,WAAU,EAjZvBlB,KAAKF,QAAUA,EACfE,KAAKmB,gBACLnB,KAAKoB,Q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L,KAAKI,WACzB,CAkBA4F,QAAAA,GACuB,YAAfhG,KAAKC,OACLD,KAAKoB,OAGTpB,KAAKC,MAAQ,WACbD,KAAKK,SAAW,IACpB,CAEAsE,MAAAA,GACI3E,KAAKiG,iBACLjG,KAAKiB,WACLjB,KAAKC,MAAQ,WAEbD,KAAKF,QAAQoG,cACjB,CAEAC,MAAAA,GACInG,KAAKK,SAAW,KAChBL,KAAKE,UAAY,EACjBF,KAAKgB,KAAK,GACVhB,KAAKiB,WACLjB,KAAKF,QAAQsG,YACjB,CAEQnF,QAAAA,GACJjB,KAAKC,MAAQ,OACbD,KAAKqG,aACLrG,KAAKE,UAAYF,KAAKK,SAAW,IAErC,CAEQgG,UAAAA,GACCrG,KAAKqF,SACVrF,KAAKqF,OAAO1E,OACZX,KAAKqF,YAAS3E,EAClB,CAEA2C,MAAAA,CAAOiD,GAEH,OADAtG,KAAKE,UAAY,EACVF,KAAKgB,KAAKsF,GAAY,EACjC,CAEAC,cAAAA,CAAeC,GAQX,OAPIxG,KAAKF,QAAQ2G,eACbzG,KAAKF,QAAQ0B,KAAO,YACpBxB,KAAKF,QAAQ4G,KAAO,SACpB1G,KAAKmB,iBAGTnB,KAAKqF,QAAQ1E,OACN6F,EAASG,QAAQ3G,KAC5B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../render/dom/style-set.mjs.js"),t=require("../utils/supports/scroll-timeline.mjs.js"),e=require("./keyframes/get-final.mjs.js"),s=require("./utils/WithPromise.mjs.js"),n=require("./waapi/start-waapi-animation.mjs.js"),a=require("./waapi/utils/apply-generator.mjs.js"),o=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js");class l extends s.WithPromise{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:s,name:m,keyframes:r,pseudoElement:l,allowFlatten:h=!1,finalKeyframe:u,onComplete:p}=t;this.isPseudoElement=Boolean(l),this.allowFlatten=h,this.options=t,o.invariant("string"!=typeof t.type,'
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../render/dom/style-set.mjs.js"),t=require("../utils/supports/scroll-timeline.mjs.js"),e=require("./keyframes/get-final.mjs.js"),s=require("./utils/WithPromise.mjs.js"),n=require("./waapi/start-waapi-animation.mjs.js"),a=require("./waapi/utils/apply-generator.mjs.js"),o=require("../../../../motion-utils/dist/es/errors.mjs.js"),m=require("../../../../motion-utils/dist/es/time-conversion.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js");class l extends s.WithPromise{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:m,keyframes:r,pseudoElement:l,allowFlatten:h=!1,finalKeyframe:u,onComplete:p}=t;this.isPseudoElement=Boolean(l),this.allowFlatten=h,this.options=t,o.invariant("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const d=a.applyGeneratorOptions(t);this.animation=n.startWaapiAnimation(s,m,r,d,l),!1===d.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const t=e.getFinalKeyframe(r,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(t),i.setStyle(s,m,t),this.animation.cancel()}p?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(i){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;"idle"!==i&&"finished"!==i&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const i=this.options?.element;!this.isPseudoElement&&i?.isConnected&&this.animation.commitStyles?.()}get duration(){const i=this.animation.effect?.getComputedTiming?.().duration||0;return m.millisecondsToSeconds(Number(i))}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+m.millisecondsToSeconds(i)}get time(){return m.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(i){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=m.secondsToMilliseconds(i),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(i){this.manualStartTime=this.animation.startTime=i}attachTimeline(i){let{timeline:e,rangeStart:s,rangeEnd:n,observe:a}=i;return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&t.supportsScrollTimeline()?(this.animation.timeline=e,s&&(this.animation.rangeStart=s),n&&(this.animation.rangeEnd=n),r.noop):a(this)}}exports.NativeAnimation=l;
|
|
2
2
|
//# sourceMappingURL=NativeAnimation.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs"],"sourcesContent":["import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"motion\"?`);\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n else {\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n */\n setStyle(element, name, keyframe);\n }\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n /**\n * TODO: In a breaking change, we should replace this with `.notifyCancel()`\n */\n this.animation.oncancel = () => this.notifyFinished();\n }\n play() {\n if (this.isStopped)\n return;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n if (!this.isPseudoElement) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, observe }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n"],"names":["NativeAnimation","WithPromise","constructor","options","super","this","finishedTime","isStopped","element","name","keyframes","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","invariant","type","transition","applyGeneratorOptions","animation","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","getFinalKeyframe","speed","updateMotionValue","setStyle","cancel","notifyFinished","oncancel","play","state","updateFinished","complete","finish","e","stop","commitStyles","duration","effect","getComputedTiming","millisecondsToSeconds","Number","currentTime","newTime","secondsToMilliseconds","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","_ref","timeline","observe","updateTiming","easing","supportsScrollTimeline","noop"],"mappings":"2hBAWA,MAAMA,UAAwBC,EAAAA,YAC1BC,WAAAA,CAAYC,GAIR,GAHAC,QACAC,KAAKC,aAAe,KACpBD,KAAKE,WAAY,GACZJ,EACD,OACJ,MAAMK,QAAEA,EAAOC,KAAEA,EAAIC,UAAEA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MA,EAAWtC,KAAKgB,UAAUuB,QAAQC,sBAAsBF,UAAY,EAC1E,OAAOG,wBAAsBC,OAAOJ,GACxC,CACA,QAAIjB,GACA,OAAOoB,EAAAA,sBAAsBC,OAAO1C,KAAKgB,UAAU2B,cAAgB,EACvE,CACA,QAAItB,CAAKuB,GACL5C,KAAKC,aAAe,KACpBD,KAAKgB,UAAU2B,YAAcE,EAAqBA,sBAACD,EACvD,CAKA,SAAIpB,GACA,OAAOxB,KAAKgB,UAAU8B,YAC1B,CACA,SAAItB,CAAMuB,GAEFA,EAAW,IACX/C,KAAKC,aAAe,MACxBD,KAAKgB,UAAU8B,aAAeC,CAClC,CACA,SAAIhB,GACA,OAA6B,OAAtB/B,KAAKC,aACN,WACAD,KAAKgB,UAAUgC,SACzB,CACA,aAAIC,GACA,OAAOP,OAAO1C,KAAKgB,UAAUiC,UACjC,CACA,aAAIA,CAAUC,GACVlD,KAAKgB,UAAUiC,UAAYC,CAC/B,CAIAC,cAAAA,CAAcC,GAAwB,IAAvBC,SAAEA,EAAQC,QAAEA,GAASF,EAKhC,OAJIpD,KAAKO,cACLP,KAAKgB,UAAUuB,QAAQgB,aAAa,CAAEC,OAAQ,WAElDxD,KAAKgB,UAAUI,SAAW,KACtBiC,GAAYI,EAAAA,0BACZzD,KAAKgB,UAAUqC,SAAWA,EACnBK,QAGAJ,EAAQtD,KAEvB"}
|
|
1
|
+
{"version":3,"file":"NativeAnimation.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs"],"sourcesContent":["import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n"],"names":["NativeAnimation","WithPromise","constructor","options","super","this","finishedTime","isStopped","manualStartTime","element","name","keyframes","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","invariant","type","transition","applyGeneratorOptions","animation","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","getFinalKeyframe","speed","updateMotionValue","setStyle","cancel","notifyFinished","play","state","updateFinished","complete","finish","e","stop","commitStyles","isConnected","duration","effect","getComputedTiming","millisecondsToSeconds","Number","iterationDuration","delay","currentTime","newTime","wasFinished","secondsToMilliseconds","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","_ref","timeline","rangeStart","rangeEnd","observe","updateTiming","easing","supportsScrollTimeline","noop"],"mappings":"2hBA4BM,MAAOA,UACDC,EAAAA,YAyBRC,WAAAA,CAAYC,GAGR,GAFAC,QAlBMC,KAAAC,aAA8B,KAMhCD,KAAAE,WAAY,EASVF,KAAAG,gBAAiC,MAKlCL,EAAS,OAEd,MAAMM,QACFA,EAAOC,KACPA,EAAIC,UACJA,EAASC,cACTA,EAAaC,aACbA,GAAe,EAAKC,cACpBA,EAAaC,WACbA,GACAZ,EAEJE,KAAKW,gBAAkBC,QAAQL,GAE/BP,KAAKQ,aAAeA,EACpBR,KAAKF,QAAUA,EAEfe,EAASA,UACmB,iBAAjBf,EAAQgB,KACf,sDACA,eAGJ,MAAMC,EAAaC,wBAAsBlB,GAEzCE,KAAKiB,UAAYC,EAAAA,oBACbd,EACAC,EACAC,EACAS,EACAR,IAGwB,IAAxBQ,EAAWI,UACXnB,KAAKiB,UAAUG,QAGnBpB,KAAKiB,UAAUI,SAAW,KAGtB,GAFArB,KAAKC,aAAeD,KAAKsB,MAEpBf,EAAe,CAChB,MAAMgB,EAAWC,EAAgBA,iBAC7BlB,EACAN,KAAKF,QACLW,EACAT,KAAKyB,OAELzB,KAAK0B,mBACL1B,KAAK0B,kBAAkBH,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,KAAKiB,UAAUiC,YAC1B,CAEA,SAAIzB,CAAM0B,GAEFA,EAAW,IAAGnD,KAAKC,aAAe,MAEtCD,KAAKiB,UAAUiC,aAAeC,CAClC,CAEA,SAAIpB,GACA,OAA6B,OAAtB/B,KAAKC,aACN,WACAD,KAAKiB,UAAUmC,SACzB,CAEA,aAAIC,GACA,OAAOrD,KAAKG,iBAAmBwC,OAAO3C,KAAKiB,UAAUoC,UACzD,CAEA,aAAIA,CAAUC,GACVtD,KAAKG,gBAAkBH,KAAKiB,UAAUoC,UAAYC,CACtD,CAKAC,cAAAA,CAAcC,GAKS,IALRC,SACXA,EAAQC,WACRA,EAAUC,SACVA,EAAQC,QACRA,GACmBJ,EAOnB,OANIxD,KAAKQ,cACLR,KAAKiB,UAAUuB,QAAQqB,aAAa,CAAEC,OAAQ,WAGlD9D,KAAKiB,UAAUI,SAAW,KAEtBoC,GAAYM,EAAAA,0BACZ/D,KAAKiB,UAAUwC,SAAWA,EAEtBC,IAAa1D,KAAKiB,UAAkByC,WAAaA,GACjDC,IAAW3D,KAAKiB,UAAkB0C,SAAWA,GAE1CK,QAEAJ,EAAQ5D,KAEvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./JSAnimation.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../frameloop/sync-time.mjs.js"),t=require("../render/dom/style-set.mjs.js"),i=require("./JSAnimation.mjs.js"),s=require("./NativeAnimation.mjs.js"),a=require("./utils/replace-transition-type.mjs.js"),o=require("./waapi/utils/unsupported-easing.mjs.js"),r=require("../../../../motion-utils/dist/es/clamp.mjs.js");class n extends s.NativeAnimation{constructor(e){o.replaceStringEasing(e),a.replaceTransitionType(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(s){const{motionValue:a,onUpdate:o,onComplete:n,element:m,...p}=this.options;if(!a)return;if(void 0!==s)return void a.set(s);const u=new i.JSAnimation({...p,autoplay:!1}),l=Math.max(10,e.time.now()-this.startTime),j=r.clamp(0,10,l-10),c=u.sample(l).value,{name:d}=this.options;m&&d&&t.setStyle(m,d,c),a.setWithVelocity(u.sample(Math.max(0,l-j)).value,c,j),u.stop()}}exports.NativeAnimationExtended=n;
|
|
2
2
|
//# sourceMappingURL=NativeAnimationExtended.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAnimationExtended.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"NativeAnimationExtended.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs"],"sourcesContent":["import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);\n const current = sampleAnimation.sample(sampleTime).value;\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options;\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n"],"names":["NativeAnimationExtended","NativeAnimation","constructor","options","replaceStringEasing","replaceTransitionType","super","undefined","startTime","autoplay","this","updateMotionValue","value","motionValue","onUpdate","onComplete","element","set","sampleAnimation","JSAnimation","sampleTime","Math","max","time","now","delta","clamp","current","sample","name","setStyle","setWithVelocity","stop"],"mappings":"2YAmBM,MAAOA,UAEHC,EAAAA,gBAGNC,WAAAA,CAAYC,GAURC,EAAmBA,oBAACD,GASpBE,EAAqBA,sBAACF,GAEtBG,MAAMH,QAOoBI,IAAtBJ,EAAQK,YAAgD,IAArBL,EAAQM,WAC3CC,KAAKF,UAAYL,EAAQK,WAG7BE,KAAKP,QAAUA,CACnB,CAUAQ,iBAAAA,CAAkBC,GACd,MAAMC,YAAEA,EAAWC,SAAEA,EAAQC,WAAEA,EAAUC,QAAEA,KAAYb,GACnDO,KAAKP,QAET,IAAKU,EAAa,OAElB,QAAcN,IAAVK,EAEA,YADAC,EAAYI,IAAIL,GAIpB,MAAMM,EAAkB,IAAIC,cAAY,IACjChB,EACHM,UAAU,IAQRW,EAAaC,KAAKC,IAvEZ,GAuE6BC,EAAIA,KAACC,MAAQd,KAAKF,WACrDiB,EAAQC,EAAAA,MAAM,EAxER,GAwEwBN,EAxExB,IAyENO,EAAUT,EAAgBU,OAAOR,GAAYR,OAO7CiB,KAAEA,GAASnB,KAAKP,QAClBa,GAAWa,GAAMC,EAAAA,SAASd,EAASa,EAAMF,GAE7Cd,EAAYkB,gBACRb,EAAgBU,OAAOP,KAAKC,IAAI,EAAGF,EAAaK,IAAQb,MACxDe,EACAF,GAGJP,EAAgBc,MACpB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../interfaces/motion-value.mjs.js"),i=require("../../value/index.mjs.js"),t=require("../../value/utils/is-motion-value.mjs.js");exports.animateSingleValue=function(a,n,o){const s=t.isMotionValue(a)?a:i.motionValue(a);return s.start(e.animateMotionValue("",s,n,o)),s.animation};
|
|
2
|
+
//# sourceMappingURL=single-value.mjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"single-value.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/animate/single-value.mjs"],"sourcesContent":["import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n"],"names":["animateSingleValue","value","keyframes","options","motionValue","isMotionValue","start","animateMotionValue","motionValue$1","animation"],"mappings":"8OAagBA,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAcC,EAAAA,cAAcJ,GAASA,EAAQG,EAAAA,YAAkBH,GAIrE,OAFAG,EAAYE,MAAMC,qBAAmB,GAAIC,EAAaN,EAAWC,IAE1DC,EAAYK,SACvB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../frameloop/sync-time.mjs.js"),r=require("../../frameloop/frame.mjs.js");exports.frameloopDriver=t=>{const a=e=>{let{timestamp:r}=e;return t(r)};return{start:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.frame.update(a,e)},stop:()=>r.cancelFrame(a),now:()=>r.frameData.isProcessing?r.frameData.timestamp:e.time.now()}};
|
|
2
|
+
//# sourceMappingURL=frame.mjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/drivers/frame.mjs"],"sourcesContent":["import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n"],"names":["update","passTimestamp","_ref","timestamp","start","keepAlive","arguments","length","undefined","frame","stop","cancelFrame","now","frameData","isProcessing","time"],"mappings":"wLAKwCA,IACpC,MAAMC,EAAgBC,IAAA,IAACC,UAAEA,GAAsBD,EAAA,OAAKF,EAAOG,EAAU,EAErE,MAAO,CACHC,MAAO,WAAA,IAACC,IAASC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAAO,OAAKG,QAAMT,OAAOC,EAAeI,EAAU,EACnEK,KAAMA,IAAMC,EAAWA,YAACV,GAKxBW,IAAKA,IAAOC,EAAAA,UAAUC,aAAeD,EAASA,UAACV,UAAYY,EAAIA,KAACH,MACnE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./spring.mjs.js"),t=require("./utils/velocity.mjs.js");exports.inertia=function(s){let{keyframes:o,velocity:a=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:l=500,modifyTarget:u,min:v,max:d,restDelta:c=.5,restSpeed:p}=s;const m=o[0],f={done:!1,value:m},y=e=>void 0===v?d:void 0===d||Math.abs(v-e)<Math.abs(d-e)?v:d;let b=n*a;const g=m+b,x=void 0===u?g:u(g);x!==g&&(b=x-m);const j=e=>-b*Math.exp(-e/i),M=e=>x+j(e),h=e=>{const t=j(e),s=M(e);f.done=Math.abs(t)<=c,f.value=f.done?x:s};let D,S;const k=s=>{var o;(o=f.value,void 0!==v&&o<v||void 0!==d&&o>d)&&(D=s,S=e.spring({keyframes:[f.value,y(f.value)],velocity:t.getGeneratorVelocity(M,s,f.value),damping:r,stiffness:l,restDelta:c,restSpeed:p}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return S||void 0!==D||(t=!0,h(e),k(e)),void 0!==D&&e>=D?S.next(e-D):(!t&&h(e),f)}}};
|
|
2
2
|
//# sourceMappingURL=inertia.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inertia.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring
|
|
1
|
+
{"version":3,"file":"inertia.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring.mjs';\nimport { getGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n"],"names":["_ref","keyframes","velocity","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","min","max","restDelta","restSpeed","origin","state","done","value","nearestBoundary","v","undefined","Math","abs","amplitude","ideal","target","calcDelta","t","exp","calcLatest","applyFriction","delta","latest","timeReachedBoundary","spring","checkCatchBoundary","getGeneratorVelocity","damping","stiffness","calculatedDuration","next","hasUpdatedFrame"],"mappings":"mKAQuBA,GAYS,IAZRC,UACpBA,EACAC,SAAAA,EAAW,EAAGC,MACdA,EAAQ,GAAGC,aACXA,EAAe,IAAGC,cAClBA,EAAgB,GAAEC,gBAClBA,EAAkB,IAAGC,aACrBA,EAAYC,IACZA,EAAGC,IACHA,EAAGC,UACHA,EAAY,GAAGC,UACfA,GAC4BX,EAC5B,MAAMY,EAASX,EAAU,GAEnBY,EAAgC,CAClCC,MAAM,EACNC,MAAOH,GAMLI,EAAmBC,QACTC,IAARV,EAA0BC,OAClBS,IAART,GAEGU,KAAKC,IAAIZ,EAAMS,GAAKE,KAAKC,IAAIX,EAAMQ,GAFZT,EAEuBC,EAGzD,IAAIY,EAAYlB,EAAQD,EACxB,MAAMoB,EAAQV,EAASS,EACjBE,OAA0BL,IAAjBX,EAA6Be,EAAQf,EAAae,GAM7DC,IAAWD,IAAOD,EAAYE,EAASX,GAE3C,MAAMY,EAAaC,IAAeJ,EAAYF,KAAKO,KAAKD,EAAIrB,GAEtDuB,EAAcF,GAAcF,EAASC,EAAUC,GAE/CG,EAAiBH,IACnB,MAAMI,EAAQL,EAAUC,GAClBK,EAASH,EAAWF,GAC1BZ,EAAMC,KAAOK,KAAKC,IAAIS,IAAUnB,EAChCG,EAAME,MAAQF,EAAMC,KAAOS,EAASO,CAAM,EAS9C,IAAIC,EACAC,EAEJ,MAAMC,EAAsBR,IAxCLR,SAyCAJ,EAAME,WAxChBG,IAARV,GAAqBS,EAAIT,QAAiBU,IAART,GAAqBQ,EAAIR,KA0C5DsB,EAAsBN,EAEtBO,EAASA,EAAAA,OAAa,CAClB/B,UAAW,CAACY,EAAME,MAAOC,EAAgBH,EAAME,QAC/Cb,SAAUgC,EAAAA,qBAAqBP,EAAYF,EAAGZ,EAAME,OACpDoB,QAAS9B,EACT+B,UAAW9B,EACXI,YACAC,cACF,EAKN,OAFAsB,EAAmB,GAEZ,CACHI,mBAAoB,KACpBC,KAAOb,IAOH,IAAIc,GAAkB,EAWtB,OAVKP,QAAkCd,IAAxBa,IACXQ,GAAkB,EAClBX,EAAcH,GACdQ,EAAmBR,SAOKP,IAAxBa,GAAqCN,GAAKM,EACnCC,EAAQM,KAAKb,EAAIM,KAEvBQ,GAAmBX,EAAcH,GAC3BZ,EACX,EAGZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyframes.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n"],"names":["defaultEasing","values","easing","map","easeInOut","splice","length","_ref","duration","keyframes","keyframeValues","times","ease","easingFunctions","isEasingArray","easingDefinitionToFunction","state","done","value","absoluteTimes","convertOffsetToTimes","defaultOffset","mapTimeToKeyframe","interpolate","Array","isArray","calculatedDuration","next","t"],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyframes.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n"],"names":["defaultEasing","values","easing","map","easeInOut","splice","length","_ref","duration","keyframes","keyframeValues","times","ease","easingFunctions","isEasingArray","easingDefinitionToFunction","state","done","value","absoluteTimes","convertOffsetToTimes","defaultOffset","mapTimeToKeyframe","interpolate","Array","isArray","calculatedDuration","next","t"],"mappings":"qbAgBM,SAAUA,EACZC,EACAC,GAEA,OAAOD,EAAOE,KAAI,IAAMD,GAAUE,EAASA,YAAEC,OAAO,EAAGJ,EAAOK,OAAS,EAC3E,oDAEyBC,GAKE,IAL8BC,SACrDA,EAAW,IACXC,UAAWC,EAAcC,MACzBA,EAAKC,KACLA,EAAO,aACgBL,EAKvB,MAAMM,EAAkBC,gBAAcF,GAChCA,EAAKT,IAAIY,8BACTA,6BAA2BH,GAM3BI,EAA2B,CAC7BC,MAAM,EACNC,MAAOR,EAAe,IAMpBS,EAAgBC,EAAoBA,qBAGtCT,GAASA,EAAML,SAAWI,EAAeJ,OACnCK,EACAU,gBAAcX,GACpBF,GAGEc,EAAoBC,EAAAA,YAAeJ,EAAeT,EAAgB,CACpEE,KAAMY,MAAMC,QAAQZ,GACdA,EACAb,EAAcU,EAAgBG,KAGxC,MAAO,CACHa,mBAAoBlB,EACpBmB,KAAOC,IACHZ,EAAME,MAAQI,EAAkBM,GAChCZ,EAAMC,KAAOW,GAAKpB,EACXQ,GAGnB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../waapi/utils/linear.mjs.js"),s=require("./utils/calc-duration.mjs.js"),e=require("./utils/create-generator-easing.mjs.js"),n=require("../../../../../motion-utils/dist/es/time-conversion.mjs.js"),a=require("../../../../../motion-utils/dist/es/clamp.mjs.js"),o=require("../../../../../motion-utils/dist/es/errors.mjs.js");const i={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function r(t,s){return t*Math.sqrt(1-s*s)}const u=12;const l=.001;function c(t){let s,e,{duration:c=i.duration,bounce:d=i.bounce,velocity:m=i.velocity,mass:p=i.mass}=t;o.warning(c<=n.secondsToMilliseconds(i.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let h=1-d;h=a.clamp(i.minDamping,i.maxDamping,h),c=a.clamp(i.minDuration,i.maxDuration,n.millisecondsToSeconds(c)),h<1?(s=t=>{const s=t*h,e=s*c,n=s-m,a=r(t,h),o=Math.exp(-e);return l-n/a*o},e=t=>{const e=t*h*c,n=e*m+m,a=Math.pow(h,2)*Math.pow(t,2)*c,o=Math.exp(-e),i=r(Math.pow(t,2),h);return(-s(t)+l>0?-1:1)*((n-a)*o)/i}):(s=t=>Math.exp(-t*c)*((t-m)*c+1)-l,e=t=>Math.exp(-t*c)*(c*c*(m-t)));const M=function(t,s,e){let n=e;for(let e=1;e<u;e++)n-=t(n)/s(n);return n}(s,e,5/c);if(c=n.secondsToMilliseconds(c),isNaN(M))return{stiffness:i.stiffness,damping:i.damping,duration:c};{const t=Math.pow(M,2)*p;return{stiffness:t,damping:2*h*Math.sqrt(p*t),duration:c}}}const d=["duration","bounce"],m=["stiffness","damping","mass"];function p(t,s){return s.some((s=>void 0!==t[s]))}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.visualDuration,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.bounce;const u="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:o}:e;let{restSpeed:l,restDelta:h}=u;const M=u.keyframes[0],f=u.keyframes[u.keyframes.length-1],g={done:!1,value:M},{stiffness:v,damping:D,mass:x,duration:y,velocity:b,isResolvedFromDuration:j}=function(t){let s={velocity:i.velocity,stiffness:i.stiffness,damping:i.damping,mass:i.mass,isResolvedFromDuration:!1,...t};if(!p(t,m)&&p(t,d))if(s.velocity=0,t.visualDuration){const e=t.visualDuration,n=2*Math.PI/(1.2*e),o=n*n,r=2*a.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(o);s={...s,mass:i.mass,stiffness:o,damping:r}}else{const e=c({...t,velocity:0});s={...s,...e,mass:i.mass},s.isResolvedFromDuration=!0}return s}({...u,velocity:-n.millisecondsToSeconds(u.velocity||0)}),q=b||0,T=D/(2*Math.sqrt(v*x)),S=f-M,w=n.millisecondsToSeconds(Math.sqrt(v/x)),k=Math.abs(S)<5;let F,G,R,E,N,O;if(l||(l=k?i.restSpeed.granular:i.restSpeed.default),h||(h=k?i.restDelta.granular:i.restDelta.default),T<1)R=r(w,T),E=(q+T*w*S)/R,F=t=>{const s=Math.exp(-T*w*t);return f-s*(E*Math.sin(R*t)+S*Math.cos(R*t))},N=T*w*E+S*R,O=T*w*S-E*R,G=t=>Math.exp(-T*w*t)*(N*Math.sin(R*t)+O*Math.cos(R*t));else if(1===T){F=t=>f-Math.exp(-w*t)*(S+(q+w*S)*t);const t=q+w*S;G=s=>Math.exp(-w*s)*(w*t*s-q)}else{const t=w*Math.sqrt(T*T-1);F=s=>{const e=Math.exp(-T*w*s),n=Math.min(t*s,300);return f-e*((q+T*w*S)*Math.sinh(n)+t*S*Math.cosh(n))/t};const s=(q+T*w*S)/t,e=T*w*s-S*t,n=T*w*S-s*t;G=s=>{const a=Math.exp(-T*w*s),o=Math.min(t*s,300);return a*(e*Math.sinh(o)+n*Math.cosh(o))}}const P={calculatedDuration:j&&y||null,velocity:t=>n.secondsToMilliseconds(G(t)),next:t=>{if(!j&&T<1){const s=Math.exp(-T*w*t),e=Math.sin(R*t),a=Math.cos(R*t),o=f-s*(E*e+S*a),i=n.secondsToMilliseconds(s*(N*e+O*a));return g.done=Math.abs(i)<=l&&Math.abs(f-o)<=h,g.value=g.done?f:o,g}const s=F(t);if(j)g.done=t>=y;else{const e=n.secondsToMilliseconds(G(t));g.done=Math.abs(e)<=l&&Math.abs(f-s)<=h}return g.value=g.done?f:s,g},toString:()=>{const e=Math.min(s.calcGeneratorDuration(P),s.maxGeneratorDuration),n=t.generateLinearEasing((t=>P.next(e*t).value),e,30);return e+"ms "+n},toTransition:()=>{}};return P}h.applyToOptions=t=>{const s=e.createGeneratorEasing(t,100,h);return t.ease=s.ease,t.duration=n.secondsToMilliseconds(s.duration),t.type="keyframes",t},exports.spring=h;
|
|
2
|
+
//# sourceMappingURL=spring.mjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spring.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/spring.mjs"],"sourcesContent":["import { millisecondsToSeconds, clamp, secondsToMilliseconds, warning } from 'motion-utils';\nimport { generateLinearEasing } from '../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs';\nimport { createGeneratorEasing } from './utils/create-generator-easing.mjs';\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n};\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n // Time-defined springs should ignore inherited velocity.\n // Velocity from interrupted animations can cause findSpring()\n // to compute wildly different spring parameters, leading to\n // massive oscillation on small-range animations.\n springOptions.velocity = 0;\n if (options.visualDuration) {\n const visualDuration = options.visualDuration;\n const root = (2 * Math.PI) / (visualDuration * 1.2);\n const stiffness = root * root;\n const damping = 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness);\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n };\n }\n else {\n const derived = findSpring({ ...options, velocity: 0 });\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n };\n springOptions.isResolvedFromDuration = true;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n let { restSpeed, restDelta } = options;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n restDelta || (restDelta = isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n let resolveSpring;\n let resolveVelocity;\n // Underdamped coefficients, hoisted for use in the inlined next() hot path\n let angularFreq;\n let A;\n let sinCoeff;\n let cosCoeff;\n if (dampingRatio < 1) {\n angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n A =\n (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq;\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (A * Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n // Analytical derivative of underdamped spring (px/ms)\n sinCoeff =\n dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;\n cosCoeff =\n dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return envelope *\n (sinCoeff * Math.sin(angularFreq * t) +\n cosCoeff * Math.cos(angularFreq * t));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const C = initialVelocity + undampedAngularFreq * initialDelta;\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * C * t - initialVelocity);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n // Analytical derivative of overdamped spring (px/ms)\n const P = (initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n dampedAngularFreq;\n const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;\n const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;\n resolveVelocity = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return envelope *\n (sinhCoeff * Math.sinh(freqForT) +\n coshCoeff * Math.cosh(freqForT));\n };\n }\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n /**\n * For underdamped physics springs we need both position and\n * velocity each tick. Compute shared trig values once to avoid\n * duplicate Math.exp/sin/cos calls on the hot path.\n */\n if (!isResolvedFromDuration && dampingRatio < 1) {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n const sin = Math.sin(angularFreq * t);\n const cos = Math.cos(angularFreq * t);\n const current = target -\n envelope *\n (A * sin + initialDelta * cos);\n const currentVelocity = secondsToMilliseconds(envelope *\n (sinCoeff * sin + cosCoeff * cos));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n state.value = state.done ? target : current;\n return state;\n }\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= restSpeed &&\n Math.abs(target - current) <= restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n toString: () => {\n const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n return calculatedDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n"],"names":["springDefaults","stiffness","damping","mass","velocity","duration","bounce","visualDuration","restSpeed","granular","default","restDelta","minDuration","maxDuration","minDamping","maxDamping","calcAngularFreq","undampedFreq","dampingRatio","Math","sqrt","rootIterations","safeMin","findSpring","_ref","envelope","derivative","warning","secondsToMilliseconds","clamp","millisecondsToSeconds","exponentialDecay","delta","a","b","c","exp","d","e","pow","f","g","initialGuess","result","i","approximateRoot","isNaN","durationKeys","physicsKeys","isSpringType","options","keys","some","key","undefined","spring","optionsOrVisualDuration","arguments","length","keyframes","origin","target","state","done","value","isResolvedFromDuration","springOptions","root","PI","derived","getSpringOptions","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","abs","resolveSpring","resolveVelocity","angularFreq","A","sinCoeff","cosCoeff","t","sin","cos","C","dampedAngularFreq","freqForT","min","sinh","cosh","P","sinhCoeff","coshCoeff","generator","calculatedDuration","next","current","currentVelocity","toString","calcGeneratorDuration","maxGeneratorDuration","easing","generateLinearEasing","progress","toTransition","applyToOptions","generatorOptions","createGeneratorEasing","ease","type"],"mappings":"qZAoBA,MAAMA,EAAiB,CAEnBC,UAAW,IACXC,QAAS,GACTC,KAAM,EACNC,SAAU,EAGVC,SAAU,IACVC,OAAQ,GACRC,eAAgB,GAGhBC,UAAW,CACPC,SAAU,IACVC,QAAS,GAEbC,UAAW,CACPF,SAAU,KACVC,QAAS,IAIbE,YAAa,IACbC,YAAa,GACbC,WAAY,IACZC,WAAY,GAGhB,SAASC,EAAgBC,EAAsBC,GAC3C,OAAOD,EAAeE,KAAKC,KAAK,EAAIF,EAAeA,EACvD,CAEA,MAAMG,EAAiB,GAgBvB,MAAMC,EAAU,KAEhB,SAASC,EAAUC,GAKH,IACRC,EACAC,GAPYrB,SAChBA,EAAWL,EAAeK,SAAQC,OAClCA,EAASN,EAAeM,OAAMF,SAC9BA,EAAWJ,EAAeI,SAAQD,KAClCA,EAAOH,EAAeG,MACVqB,EAIZG,EAAOA,QACHtB,GAAYuB,wBAAsB5B,EAAea,aACjD,6CACA,yBAGJ,IAAIK,EAAe,EAAIZ,EAKvBY,EAAeW,EAAKA,MAChB7B,EAAec,WACfd,EAAee,WACfG,GAEJb,EAAWwB,EAAAA,MACP7B,EAAeY,YACfZ,EAAea,YACfiB,EAAAA,sBAAsBzB,IAGtBa,EAAe,GAIfO,EAAYR,IACR,MAAMc,EAAmBd,EAAeC,EAClCc,EAAQD,EAAmB1B,EAC3B4B,EAAIF,EAAmB3B,EACvB8B,EAAIlB,EAAgBC,EAAcC,GAClCiB,EAAIhB,KAAKiB,KAAKJ,GACpB,OAAOV,EAAWW,EAAIC,EAAKC,CAAC,EAGhCT,EAAcT,IACV,MACMe,EADmBf,EAAeC,EACPb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AAMC,KAAOF,EAASoC,EAE7BnC,CAAK,EAEhBqC,SAAUA,KACN,MAAMJ,EAAqB5E,KAAKqE,IAC5BY,EAAqBA,sBAACN,GACtBO,EAAAA,sBAGEC,EAASC,EAAAA,sBACVC,GACGV,EAAUE,KAAKD,EAAqBS,GAAUxC,OAClD+B,EACA,IAGJ,OAAOA,EAAqB,MAAQO,CAAM,EAE9CG,aAAcA,QAGlB,OAAOX,CACX,CAEAvC,EAAOmD,eAAkBxD,IACrB,MAAMyD,EAAmBC,EAAqBA,sBAAC1D,EAAgB,IAAKK,GAKpE,OAHAL,EAAQ2D,KAAOF,EAAiBE,KAChC3D,EAAQ7C,SAAWuB,EAAAA,sBAAsB+E,EAAiBtG,UAC1D6C,EAAQ4D,KAAO,YACR5D,CAAO"}
|
package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calc-duration.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs"],"sourcesContent":["/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n"],"names":["maxGeneratorDuration","generator","duration","state","next","done","Infinity"],"mappings":"
|
|
1
|
+
{"version":3,"file":"calc-duration.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs"],"sourcesContent":["/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n"],"names":["maxGeneratorDuration","generator","duration","state","next","done","Infinity"],"mappings":"oEAMO,MAAMA,EAAuB,kCAC9B,SACFC,GAEA,IAAIC,EAAW,EAEXC,EAAQF,EAAUG,KAAKF,GAC3B,MAAQC,EAAME,MAAQH,EAAWF,GAC7BE,GAHa,GAIbC,EAAQF,EAAUG,KAAKF,GAG3B,OAAOA,GAAYF,EAAuBM,IAAWJ,CACzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-generator-easing.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs"],"sourcesContent":["import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n"],"names":["options","scale","arguments","length","undefined","generator","keyframes","duration","Math","min","calcGeneratorDuration","maxGeneratorDuration","type","ease","progress","next","value","millisecondsToSeconds"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-generator-easing.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs"],"sourcesContent":["import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n//# sourceMappingURL=create-generator-easing.mjs.map\n"],"names":["options","scale","arguments","length","undefined","generator","keyframes","duration","Math","min","calcGeneratorDuration","maxGeneratorDuration","type","ease","progress","next","value","millisecondsToSeconds"],"mappings":"qNAOM,SACFA,GAEiC,IADjCC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAGR,MAAMG,GAF2BH,UAAAC,OAAAD,EAAAA,kBAAAE,GAEC,IAAKJ,EAASM,UAAW,CAAC,EAAGL,KACzDM,EAAWC,KAAKC,IAClBC,EAAqBA,sBAACL,GACtBM,EAAAA,sBAGJ,MAAO,CACHC,KAAM,YACNC,KAAOC,GACIT,EAAUU,KAAKR,EAAWO,GAAUE,MAAQf,EAEvDM,SAAUU,EAAqBA,sBAACV,GAExC"}
|
package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-generator.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs"],"sourcesContent":["function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n"],"names":["type"],"mappings":"
|
|
1
|
+
{"version":3,"file":"is-generator.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs"],"sourcesContent":["function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n"],"names":["type"],"mappings":"wFAEM,SACFA,GAEA,MAAuB,mBAATA,GAAuB,mBAAoBA,CAC7D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../motion-utils/dist/es/velocity-per-second.mjs.js");exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../../motion-utils/dist/es/velocity-per-second.mjs.js");exports.getGeneratorVelocity=function(t,o,r){const s=Math.max(o-5,0);return e.velocityPerSecond(r-t(s),o-s)};
|
|
2
2
|
//# sourceMappingURL=velocity.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velocity.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs"],"sourcesContent":["import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction
|
|
1
|
+
{"version":3,"file":"velocity.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs"],"sourcesContent":["import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction getGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n"],"names":["getGeneratorVelocity","resolveValue","t","current","prevT","Math","max","velocityPerSecond"],"mappings":"oLAIgBA,SACZC,EACAC,EACAC,GAEA,MAAMC,EAAQC,KAAKC,IAAIJ,EAPI,EAOwB,GACnD,OAAOK,EAAAA,kBAAkBJ,EAAUF,EAAaG,GAAQF,EAAIE,EAChE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../AsyncMotionValueAnimation.mjs.js"),i=require("../JSAnimation.mjs.js"),t=require("../utils/get-value-transition.mjs.js"),n=require("../utils/make-animation-instant.mjs.js"),o=require("../utils/default-transitions.mjs.js"),s=require("../keyframes/get-final.mjs.js"),a=require("../utils/is-transition-defined.mjs.js"),r=require("../../frameloop/frame.mjs.js"),l=require("../../../../../motion-utils/dist/es/time-conversion.mjs.js"),m=require("../../../../../motion-utils/dist/es/global-config.mjs.js");exports.animateMotionValue=function(u,d,y){let p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},f=arguments.length>4?arguments[4]:void 0,j=arguments.length>5?arguments[5]:void 0;return c=>{const g=t.getValueTransition(p,u)||{},A=g.delay||p.delay||0;let{elapsed:v=0}=p;v-=l.secondsToMilliseconds(A);const k={keyframes:Array.isArray(y)?y:[null,y],ease:"easeOut",velocity:d.getVelocity(),...g,delay:-v,onUpdate:e=>{d.set(e),g.onUpdate&&g.onUpdate(e)},onComplete:()=>{c(),g.onComplete&&g.onComplete()},name:u,motionValue:d,element:j?void 0:f};a.isTransitionDefined(g)||Object.assign(k,o.getDefaultTransition(u,k)),k.duration&&(k.duration=l.secondsToMilliseconds(k.duration)),k.repeatDelay&&(k.repeatDelay=l.secondsToMilliseconds(k.repeatDelay)),void 0!==k.from&&(k.keyframes[0]=k.from);let q=!1;if((!1===k.type||0===k.duration&&!k.repeatDelay)&&(n.makeAnimationInstant(k),0===k.delay&&(q=!0)),(m.MotionGlobalConfig.instantAnimations||m.MotionGlobalConfig.skipAnimations||f?.shouldSkipAnimations||g.skipAnimations)&&(q=!0,n.makeAnimationInstant(k),k.delay=0),k.allowFlatten=!g.type&&!g.ease,q&&!j&&void 0!==d.get()){const e=s.getFinalKeyframe(k.keyframes,g);if(void 0!==e)return void r.frame.update((()=>{k.onUpdate(e),k.onComplete()}))}return g.isSync?new i.JSAnimation(k):new e.AsyncMotionValueAnimation(k)}};
|
|
2
|
+
//# sourceMappingURL=motion-value.mjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion-value.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs"],"sourcesContent":["import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs';\nimport { JSAnimation } from '../JSAnimation.mjs';\nimport { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { makeAnimationInstant } from '../utils/make-animation-instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getFinalKeyframe } from '../keyframes/get-final.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n makeAnimationInstant(options);\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations) {\n shouldSkip = true;\n makeAnimationInstant(options);\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n//# sourceMappingURL=motion-value.mjs.map\n"],"names":["name","value","target","transition","arguments","length","undefined","element","isHandoff","onComplete","valueTransition","getValueTransition","delay","elapsed","secondsToMilliseconds","options","keyframes","Array","isArray","ease","velocity","getVelocity","onUpdate","v","set","motionValue","isTransitionDefined","Object","assign","getDefaultTransition","duration","repeatDelay","from","shouldSkip","type","makeAnimationInstant","MotionGlobalConfig","instantAnimations","skipAnimations","shouldSkipAnimations","allowFlatten","get","finalKeyframe","getFinalKeyframe","frame","update","isSync","JSAnimation","AsyncMotionValueAnimation"],"mappings":"omBAmBI,SACIA,EACAC,EACAC,GAAkC,IAClCC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAqD,CAAA,EACrDG,EAA4BH,UAAAC,OAAAD,EAAAA,kBAAAE,EAC5BE,EAAmBJ,UAAAC,OAAAD,EAAAA,kBAAAE,EAAA,OAEt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MA,YALAE,EAAKA,MAACC,QAAO,KACT9B,EAAQO,SAAUoB,GAClB3B,EAAQN,YAAa,GAKjC,CAEA,OAAOC,EAAgBoC,OACjB,IAAIC,EAAWA,YAAChC,GAChB,IAAIiC,EAAAA,0BAA0BjC,EAAQ,CAChD"}
|
package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/get-value-transition.mjs.js"),t=require("../utils/resolve-transition.mjs.js"),i=require("../../render/utils/keys-position.mjs.js"),n=require("../../render/utils/setters.mjs.js"),s=require("../../value/will-change/add-will-change.mjs.js"),a=require("../optimized-appear/get-appear-id.mjs.js"),o=require("./motion-value.mjs.js"),r=require("../../frameloop/frame.mjs.js");function l(e,t){let{protectedKeys:i,needsAnimating:n}=e;const s=i.hasOwnProperty(t)&&!0!==n[t];return n[t]=!1,s}exports.animateTarget=function(u,m){let{delay:d=0,transitionOverride:c,type:p}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{transition:f,transitionEnd:g,...j}=m;const v=u.getDefaultTransition();f=f?t.resolveTransition(f,v):v;const y=f?.reduceMotion,h=f?.skipAnimations;c&&(f=c);const A=[],q=p&&u.animationState&&u.animationState.getState()[p],w=f?.path;w&&w.animateVisualElement(u,j,f,d,A);for(const t in j){const n=u.getValue(t,u.latestValues[t]??null),m=j[t];if(void 0===m||q&&l(q,t))continue;const c={delay:d,...e.getValueTransition(f||{},t)};h&&(c.skipAnimations=!0);const p=n.get();if(void 0!==p&&!n.isAnimating()&&!Array.isArray(m)&&m===p&&!c.velocity){r.frame.update((()=>n.set(m)));continue}let g=!1;if(window.MotionHandoffAnimation){const e=a.getOptimisedAppearId(u);if(e){const i=window.MotionHandoffAnimation(e,t,r.frame);null!==i&&(c.startTime=i,g=!0)}}s.addValueToWillChange(u,t);const v=y??u.shouldReduceMotion;n.start(o.animateMotionValue(t,n,m,v&&i.positionalKeys.has(t)?{type:!1}:c,u,g));const w=n.animation;w&&A.push(w)}if(g){const e=()=>r.frame.update((()=>{g&&n.setTarget(u,g)}));A.length?Promise.all(A).then(e):e()}return A};
|
|
2
|
+
//# sourceMappingURL=visual-element-target.mjs.js.map
|
package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-element-target.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs"],"sourcesContent":["import { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { resolveTransition } from '../utils/resolve-transition.mjs';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition, transitionEnd, ...target } = targetAndTransition;\n const defaultTransition = visualElement.getDefaultTransition();\n transition = transition\n ? resolveTransition(transition, defaultTransition)\n : defaultTransition;\n const reduceMotion = transition?.reduceMotion;\n const skipAnimations = transition?.skipAnimations;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n const path = transition?.path;\n if (path) {\n // path mutates `target` to claim x/y; loop below skips them.\n path.animateVisualElement(visualElement, target, transition, delay, animations);\n }\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n if (skipAnimations)\n valueTransition.skipAnimations = true;\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n frame.update(() => value.set(valueTarget));\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n const shouldReduceMotion = reduceMotion ?? visualElement.shouldReduceMotion;\n value.start(animateMotionValue(key, value, valueTarget, shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n if (animations.length) {\n Promise.all(animations).then(applyTransitionEnd);\n }\n else {\n applyTransitionEnd();\n }\n }\n return animations;\n}\n\nexport { animateTarget };\n//# sourceMappingURL=visual-element-target.mjs.map\n"],"names":["shouldBlockAnimation","_ref","key","protectedKeys","needsAnimating","shouldBlock","hasOwnProperty","animateTarget","visualElement","targetAndTransition","delay","transitionOverride","type","arguments","length","undefined","transition","transitionEnd","target","defaultTransition","getDefaultTransition","resolveTransition","reduceMotion","skipAnimations","animations","animationTypeState","animationState","getState","path","animateVisualElement","value","getValue","latestValues","valueTarget","valueTransition","getValueTransition","currentValue","get","isAnimating","Array","isArray","velocity","frame","update","set","isHandoff","window","MotionHandoffAnimation","appearId","getOptimisedAppearId","startTime","addValueToWillChange","shouldReduceMotion","start","animateMotionValue","positionalKeys","has","animation","push","applyTransitionEnd","setTarget","Promise","all","then"],"mappings":"6cAqBA,SAASA,EAAoBC,EAEzBC,GAAW,IADXC,cAAEA,EAAaC,eAAEA,GAAoCH,EAGrD,MAAMI,EACFF,EAAcG,eAAeJ,KAAgC,IAAxBE,EAAeF,GAGxD,OADAE,EAAeF,IAAO,EACfG,CACX,uBAEgBE,SACZC,EACAC,GAC2E,IAA3EC,MAAEA,EAAQ,EAACC,mBAAEA,EAAkBC,KAAEA,GAAIC,UAAAC,OAAAD,QAAAE,IAAAF,aAAAA,UAAA,GAAoC,IAErEG,WACAA,EAAUC,cACVA,KACGC,GACHT,EAEJ,MAAMU,EAAoBX,EAAcY,uBACxCJ,EAAaA,EACPK,EAAiBA,kBAACL,EAAYG,GAC9BA,EAEN,MAAMG,EAAgBN,GAA2CM,aAC3DC,EAAiBP,GAAYO,eAE/BZ,IAAoBK,EAAaL,GAErC,MAAMa,EAAkD,GAElDC,EACFb,GACAJ,EAAckB,gBACdlB,EAAckB,eAAeC,WAAWf,GAEtCgB,EAAQZ,GAAkDY,KAC5DA,GAEAA,EAAKC,qBACDrB,EACAU,EACAF,EACAN,EACAc,GAIR,IAAK,MAAMtB,KAAOgB,EAAQ,CACtB,MAAMY,EAAQtB,EAAcuB,SACxB7B,EACAM,EAAcwB,aAAa9B,IAAQ,MAEjC+B,EAAcf,EAAOhB,GAE3B,QACoBa,IAAhBkB,GACCR,GACGzB,EAAqByB,EAAoBvB,GAE7C,SAGJ,MAAMgC,EAAkB,CACpBxB,WACGyB,qBAAmBnB,GAAc,CAAE,EAAEd,IAGxCqB,IAAgBW,EAAgBX,gBAAiB,GAOrD,MAAMa,EAAeN,EAAMO,MAC3B,QACqBtB,IAAjBqB,IACCN,EAAMQ,gBACNC,MAAMC,QAAQP,IACfA,IAAgBG,IACfF,EAAgBO,SACnB,CACEC,EAAKA,MAACC,QAAO,IAAMb,EAAMc,IAAIX,KAC7B,QACJ,CAMA,IAAIY,GAAY,EAChB,GAAIC,OAAOC,uBAAwB,CAC/B,MAAMC,EAAWC,uBAAqBzC,GAEtC,GAAIwC,EAAU,CACV,MAAME,EAAYJ,OAAOC,uBACrBC,EACA9C,EACAwC,EAAAA,OAGc,OAAdQ,IACAhB,EAAgBgB,UAAYA,EAC5BL,GAAY,EAEpB,CACJ,CAEAM,uBAAqB3C,EAAeN,GAEpC,MAAMkD,EACF9B,GAAgBd,EAAc4C,mBAElCtB,EAAMuB,MACFC,qBACIpD,EACA4B,EACAG,EACAmB,GAAsBG,EAAcA,eAACC,IAAItD,GACnC,CAAEU,MAAM,GACRsB,EACN1B,EACAqC,IAIR,MAAMY,EAAY3B,EAAM2B,UAEpBA,GACAjC,EAAWkC,KAAKD,EAExB,CAEA,GAAIxC,EAAe,CACf,MAAM0C,EAAqBA,IACvBjB,QAAMC,QAAO,KACT1B,GAAiB2C,EAASA,UAACpD,EAAeS,EAAc,IAG5DO,EAAWV,OACX+C,QAAQC,IAAItC,GAAYuC,KAAKJ,GAE7BA,GAER,CAEA,OAAOnC,CACX"}
|
package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/resolve-dynamic-variants.mjs.js"),t=require("../utils/calc-child-stagger.mjs.js"),i=require("./visual-element-target.mjs.js");function n(r,o){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=e.resolveVariant(r,o,"exit"===a.type?r.presenceContext?.custom:void 0);let{transition:s=r.getDefaultTransition()||{}}=l||{};a.transitionOverride&&(s=a.transitionOverride);const d=l?()=>Promise.all(i.animateTarget(r,l,a)):()=>Promise.resolve(),v=r.variantChildren&&r.variantChildren.size?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const{delayChildren:i=0,staggerChildren:l,staggerDirection:d}=s;return function(e,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=arguments.length>6?arguments[6]:void 0;const d=[];for(const v of e.variantChildren)v.notify("AnimationStart",i),d.push(n(v,i,{...s,delay:r+("function"==typeof o?0:o)+t.calcChildStagger(e.variantChildren,v,o,a,l)}).then((()=>v.notify("AnimationComplete",i))));return Promise.all(d)}(r,o,e,i,l,d,a)}:()=>Promise.resolve(),{when:c}=s;if(c){const[e,t]="beforeChildren"===c?[d,v]:[v,d];return e().then((()=>t()))}return Promise.all([d(),v(a.delay)])}exports.animateVariant=n;
|
|
2
|
+
//# sourceMappingURL=visual-element-variant.mjs.js.map
|
package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-element-variant.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { calcChildStagger } from '../utils/calc-child-stagger.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, forwardDelay, delayChildren, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delay = 0, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n for (const child of visualElement.variantChildren) {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delay +\n (typeof delayChildren === \"function\" ? 0 : delayChildren) +\n calcChildStagger(visualElement.variantChildren, child, delayChildren, staggerChildren, staggerDirection),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n }\n return Promise.all(animations);\n}\n\nexport { animateVariant };\n//# sourceMappingURL=visual-element-variant.mjs.map\n"],"names":["animateVariant","visualElement","variant","options","arguments","length","undefined","resolved","resolveVariant","type","presenceContext","custom","transition","getDefaultTransition","transitionOverride","getAnimation","Promise","all","animateTarget","resolve","getChildAnimations","variantChildren","size","forwardDelay","delayChildren","staggerChildren","staggerDirection","delay","animations","child","notify","push","calcChildStagger","then","animateChildren","when","first","last"],"mappings":"oOAOM,SAAUA,EACZC,EACAC,GAC2C,IAA3CC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAyC,CAAA,EAEzC,MAA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ACAvB,EAER,EACA,IAAMa,QAAQG,WAMlBgB,KAAEA,GAASvB,EACjB,GAAIuB,EAAM,CACN,MAAOC,EAAOC,GACD,mBAATF,EACM,CAACpB,EAAcK,GACf,CAACA,EAAoBL,GAE/B,OAAOqB,IAAQH,MAAK,IAAMI,MAE1B,OAAOrB,QAAQC,IAAI,CAACF,IAAgBK,EAAmBjB,EAAQwB,QAEvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-element.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs"],"sourcesContent":["import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n//# sourceMappingURL=visual-element.mjs.map\n"],"names":["visualElement","definition","animation","options","arguments","length","undefined","notify","Array","isArray","animations","map","variant","animateVariant","Promise","all","resolvedDefinition","resolveVariant","custom","animateTarget","then"],"mappings":"8PAOM,SACFA,EACAC,GAC2C,IAGvCC,EAHJC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAyC,CAAA,EAKzC,GAHAJ,EAAcO,OAAO,iBAAkBN,GAGnCO,MAAMC,QAAQR,GAAa,CAC3B,MAAMS,EAAaT,EAAWU,KAAKC,GAC/BC,EAAcA,eAACb,EAAeY,EAAST,KAE3CD,EAAYY,QAAQC,IAAIL,EAC5B,MAAO,GAA0B,iBAAfT,EACdC,EAAYW,EAAAA,eAAeb,EAAeC,EAAYE,OACnD,CACH,MAAMa,EACoB,mBAAff,EACDgB,EAAcA,eAACjB,EAAeC,EAAYE,EAAQe,QAClDjB,EAEVC,EAAYY,QAAQC,IAChBI,EAAAA,cAAcnB,EAAegB,EAAoBb,GAEzD,CAEA,OAAOD,EAAUkB,MAAK,KAClBpB,EAAcO,OAAO,oBAAqBN,EAAW,GAE7D"}
|
package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/keys-position.mjs.js"),s=require("../../value/types/dimensions.mjs.js"),r=require("../utils/css-variables-conversion.mjs.js"),t=require("../utils/is-css-variable.mjs.js"),i=require("./KeyframesResolver.mjs.js"),n=require("./utils/is-none.mjs.js"),a=require("./utils/make-none-animatable.mjs.js"),o=require("./utils/unit-conversion.mjs.js");class l extends i.KeyframeResolver{constructor(e,s,r,t,i){super(e,s,r,t,i,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:n,name:a}=this;if(!n||!n.current)return;super.readKeyframes();for(let e=0;e<i.length;e++){let s=i[e];if("string"==typeof s&&(s=s.trim(),t.isCSSVariableToken(s))){const t=r.getVariableValue(s,n.current);void 0!==t&&(i[e]=t),e===i.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!e.positionalKeys.has(a)||2!==i.length)return;const[l,u]=i,m=s.findDimensionValueType(l),f=s.findDimensionValueType(u);if(m!==f)if(o.isNumOrPxType(m)&&o.isNumOrPxType(f))for(let e=0;e<i.length;e++){const s=i[e];"string"==typeof s&&(i[e]=parseFloat(s))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,r=[];for(let s=0;s<e.length;s++)(null===e[s]||n.isNone(e[s]))&&r.push(s);r.length&&a.makeNoneKeyframesAnimatable(e,r,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=o.positionalValues[r](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const t=s[s.length-1];void 0!==t&&e.getValue(r,t).jump(t,!1)}measureEndState(){const{element:e,name:s,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const t=e.getValue(s);t&&t.jump(this.measuredOrigin,!1);const i=r.length-1,n=r[i];r[i]=o.positionalValues[s](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach((s=>{let[r,t]=s;e.getValue(r).set(t)})),this.resolveNoneKeyframes()}}exports.DOMKeyframesResolver=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../render/utils/keys-position.mjs.js"),s=require("../../value/types/dimensions.mjs.js"),r=require("../utils/css-variables-conversion.mjs.js"),t=require("../utils/is-css-variable.mjs.js"),i=require("./KeyframesResolver.mjs.js"),n=require("./utils/is-none.mjs.js"),a=require("./utils/make-none-animatable.mjs.js"),o=require("./utils/unit-conversion.mjs.js");class l extends i.KeyframeResolver{constructor(e,s,r,t,i){super(e,s,r,t,i,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:n,name:a}=this;if(!n||!n.current)return;super.readKeyframes();for(let e=0;e<i.length;e++){let s=i[e];if("string"==typeof s&&(s=s.trim(),t.isCSSVariableToken(s))){const t=r.getVariableValue(s,n.current);void 0!==t&&(i[e]=t),e===i.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!e.positionalKeys.has(a)||2!==i.length)return;const[l,u]=i,m=s.findDimensionValueType(l),f=s.findDimensionValueType(u);if(t.containsCSSVariable(l)!==t.containsCSSVariable(u)&&o.positionalValues[a])this.needsMeasurement=!0;else if(m!==f)if(o.isNumOrPxType(m)&&o.isNumOrPxType(f))for(let e=0;e<i.length;e++){const s=i[e];"string"==typeof s&&(i[e]=parseFloat(s))}else o.positionalValues[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,r=[];for(let s=0;s<e.length;s++)(null===e[s]||n.isNone(e[s]))&&r.push(s);r.length&&a.makeNoneKeyframesAnimatable(e,r,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=o.positionalValues[r](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const t=s[s.length-1];void 0!==t&&e.getValue(r,t).jump(t,!1)}measureEndState(){const{element:e,name:s,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const t=e.getValue(s);t&&t.jump(this.measuredOrigin,!1);const i=r.length-1,n=r[i];r[i]=o.positionalValues[s](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach((s=>{let[r,t]=s;e.getValue(r).set(t)})),this.resolveNoneKeyframes()}}exports.DOMKeyframesResolver=l;
|
|
2
2
|
//# sourceMappingURL=DOMKeyframesResolver.mjs.js.map
|