framer-motion 12.23.26 → 12.23.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.js +2 -1
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/debug.js +1 -0
- package/dist/cjs/debug.js.map +1 -0
- package/dist/cjs/dom-mini.js +1 -0
- package/dist/cjs/dom-mini.js.map +1 -0
- package/dist/cjs/dom.js +1 -0
- package/dist/cjs/dom.js.map +1 -0
- package/dist/cjs/{feature-bundle-kvRbMDEA.js → feature-bundle-Dt2VtvSZ.js} +3 -2
- package/dist/cjs/feature-bundle-Dt2VtvSZ.js.map +1 -0
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/m.js +1 -0
- package/dist/cjs/m.js.map +1 -0
- package/dist/cjs/mini.js +1 -0
- package/dist/cjs/mini.js.map +1 -0
- package/dist/dom-mini.js +1 -1
- package/dist/dom.js +1 -1
- package/dist/es/animation/animate/index.mjs +1 -0
- package/dist/es/animation/animate/index.mjs.map +1 -0
- package/dist/es/animation/animate/resolve-subjects.mjs +1 -0
- package/dist/es/animation/animate/resolve-subjects.mjs.map +1 -0
- package/dist/es/animation/animate/sequence.mjs +1 -0
- package/dist/es/animation/animate/sequence.mjs.map +1 -0
- package/dist/es/animation/animate/single-value.mjs +1 -0
- package/dist/es/animation/animate/single-value.mjs.map +1 -0
- package/dist/es/animation/animate/subject.mjs +1 -0
- package/dist/es/animation/animate/subject.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/animate-elements.mjs +1 -0
- package/dist/es/animation/animators/waapi/animate-elements.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/animate-sequence.mjs +1 -0
- package/dist/es/animation/animators/waapi/animate-sequence.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/animate-style.mjs +1 -0
- package/dist/es/animation/animators/waapi/animate-style.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +1 -0
- package/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.map +1 -0
- package/dist/es/animation/hooks/animation-controls.mjs +1 -0
- package/dist/es/animation/hooks/animation-controls.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animate-style.mjs +1 -0
- package/dist/es/animation/hooks/use-animate-style.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animate.mjs +1 -0
- package/dist/es/animation/hooks/use-animate.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animated-state.mjs +1 -0
- package/dist/es/animation/hooks/use-animated-state.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animation.mjs +1 -0
- package/dist/es/animation/hooks/use-animation.mjs.map +1 -0
- package/dist/es/animation/interfaces/motion-value.mjs +1 -0
- package/dist/es/animation/interfaces/motion-value.mjs.map +1 -0
- package/dist/es/animation/interfaces/visual-element-target.mjs +1 -0
- package/dist/es/animation/interfaces/visual-element-target.mjs.map +1 -0
- package/dist/es/animation/interfaces/visual-element-variant.mjs +1 -0
- package/dist/es/animation/interfaces/visual-element-variant.mjs.map +1 -0
- package/dist/es/animation/interfaces/visual-element.mjs +1 -0
- package/dist/es/animation/interfaces/visual-element.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/data-id.mjs +1 -0
- package/dist/es/animation/optimized-appear/data-id.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/get-appear-id.mjs +1 -0
- package/dist/es/animation/optimized-appear/get-appear-id.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/handoff.mjs +1 -0
- package/dist/es/animation/optimized-appear/handoff.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/start.mjs +1 -0
- package/dist/es/animation/optimized-appear/start.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/store-id.mjs +1 -0
- package/dist/es/animation/optimized-appear/store-id.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/store.mjs +1 -0
- package/dist/es/animation/optimized-appear/store.mjs.map +1 -0
- package/dist/es/animation/sequence/create.mjs +1 -0
- package/dist/es/animation/sequence/create.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +1 -0
- package/dist/es/animation/sequence/utils/calc-repeat-duration.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/calc-time.mjs +1 -0
- package/dist/es/animation/sequence/utils/calc-time.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/edit.mjs +1 -0
- package/dist/es/animation/sequence/utils/edit.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/normalize-times.mjs +1 -0
- package/dist/es/animation/sequence/utils/normalize-times.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/sort.mjs +1 -0
- package/dist/es/animation/sequence/utils/sort.mjs.map +1 -0
- package/dist/es/animation/utils/calc-child-stagger.mjs +1 -0
- package/dist/es/animation/utils/calc-child-stagger.mjs.map +1 -0
- package/dist/es/animation/utils/create-visual-element.mjs +1 -0
- package/dist/es/animation/utils/create-visual-element.mjs.map +1 -0
- package/dist/es/animation/utils/default-transitions.mjs +1 -0
- package/dist/es/animation/utils/default-transitions.mjs.map +1 -0
- package/dist/es/animation/utils/is-animation-controls.mjs +1 -0
- package/dist/es/animation/utils/is-animation-controls.mjs.map +1 -0
- package/dist/es/animation/utils/is-dom-keyframes.mjs +1 -0
- package/dist/es/animation/utils/is-dom-keyframes.mjs.map +1 -0
- package/dist/es/animation/utils/is-keyframes-target.mjs +1 -0
- package/dist/es/animation/utils/is-keyframes-target.mjs.map +1 -0
- package/dist/es/animation/utils/is-transition-defined.mjs +1 -0
- package/dist/es/animation/utils/is-transition-defined.mjs.map +1 -0
- package/dist/es/client.mjs +1 -0
- package/dist/es/client.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/PopChild.mjs +1 -0
- package/dist/es/components/AnimatePresence/PopChild.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/PresenceChild.mjs +1 -0
- package/dist/es/components/AnimatePresence/PresenceChild.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/index.mjs +1 -0
- package/dist/es/components/AnimatePresence/index.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/use-presence-data.mjs +1 -0
- package/dist/es/components/AnimatePresence/use-presence-data.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/use-presence.mjs +1 -0
- package/dist/es/components/AnimatePresence/use-presence.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/utils.mjs +1 -0
- package/dist/es/components/AnimatePresence/utils.mjs.map +1 -0
- package/dist/es/components/AnimateSharedLayout.mjs +1 -0
- package/dist/es/components/AnimateSharedLayout.mjs.map +1 -0
- package/dist/es/components/LayoutGroup/index.mjs +1 -0
- package/dist/es/components/LayoutGroup/index.mjs.map +1 -0
- package/dist/es/components/LazyMotion/index.mjs +1 -0
- package/dist/es/components/LazyMotion/index.mjs.map +1 -0
- package/dist/es/components/MotionConfig/index.mjs +1 -0
- package/dist/es/components/MotionConfig/index.mjs.map +1 -0
- package/dist/es/components/Reorder/Group.mjs +1 -0
- package/dist/es/components/Reorder/Group.mjs.map +1 -0
- package/dist/es/components/Reorder/Item.mjs +1 -0
- package/dist/es/components/Reorder/Item.mjs.map +1 -0
- package/dist/es/components/Reorder/namespace.mjs +1 -0
- package/dist/es/components/Reorder/namespace.mjs.map +1 -0
- package/dist/es/components/Reorder/utils/check-reorder.mjs +1 -0
- package/dist/es/components/Reorder/utils/check-reorder.mjs.map +1 -0
- package/dist/es/context/DeprecatedLayoutGroupContext.mjs +1 -0
- package/dist/es/context/DeprecatedLayoutGroupContext.mjs.map +1 -0
- package/dist/es/context/LayoutGroupContext.mjs +1 -0
- package/dist/es/context/LayoutGroupContext.mjs.map +1 -0
- package/dist/es/context/LazyContext.mjs +1 -0
- package/dist/es/context/LazyContext.mjs.map +1 -0
- package/dist/es/context/MotionConfigContext.mjs +1 -0
- package/dist/es/context/MotionConfigContext.mjs.map +1 -0
- package/dist/es/context/MotionContext/create.mjs +1 -0
- package/dist/es/context/MotionContext/create.mjs.map +1 -0
- package/dist/es/context/MotionContext/index.mjs +1 -0
- package/dist/es/context/MotionContext/index.mjs.map +1 -0
- package/dist/es/context/MotionContext/utils.mjs +1 -0
- package/dist/es/context/MotionContext/utils.mjs.map +1 -0
- package/dist/es/context/PresenceContext.mjs +1 -0
- package/dist/es/context/PresenceContext.mjs.map +1 -0
- package/dist/es/context/ReorderContext.mjs +1 -0
- package/dist/es/context/ReorderContext.mjs.map +1 -0
- package/dist/es/context/SwitchLayoutGroupContext.mjs +1 -0
- package/dist/es/context/SwitchLayoutGroupContext.mjs.map +1 -0
- package/dist/es/debug.mjs +1 -0
- package/dist/es/debug.mjs.map +1 -0
- package/dist/es/dom-mini.mjs +1 -0
- package/dist/es/dom-mini.mjs.map +1 -0
- package/dist/es/dom.mjs +1 -0
- package/dist/es/dom.mjs.map +1 -0
- package/dist/es/events/add-dom-event.mjs +1 -0
- package/dist/es/events/add-dom-event.mjs.map +1 -0
- package/dist/es/events/add-pointer-event.mjs +1 -0
- package/dist/es/events/add-pointer-event.mjs.map +1 -0
- package/dist/es/events/event-info.mjs +1 -0
- package/dist/es/events/event-info.mjs.map +1 -0
- package/dist/es/events/use-dom-event.mjs +1 -0
- package/dist/es/events/use-dom-event.mjs.map +1 -0
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +1 -0
- package/dist/es/gestures/drag/VisualElementDragControls.mjs.map +1 -0
- package/dist/es/gestures/drag/index.mjs +1 -0
- package/dist/es/gestures/drag/index.mjs.map +1 -0
- package/dist/es/gestures/drag/use-drag-controls.mjs +1 -0
- package/dist/es/gestures/drag/use-drag-controls.mjs.map +1 -0
- package/dist/es/gestures/drag/utils/constraints.mjs +1 -0
- package/dist/es/gestures/drag/utils/constraints.mjs.map +1 -0
- package/dist/es/gestures/focus.mjs +1 -0
- package/dist/es/gestures/focus.mjs.map +1 -0
- package/dist/es/gestures/hover.mjs +1 -0
- package/dist/es/gestures/hover.mjs.map +1 -0
- package/dist/es/gestures/pan/PanSession.mjs +1 -0
- package/dist/es/gestures/pan/PanSession.mjs.map +1 -0
- package/dist/es/gestures/pan/index.mjs +1 -0
- package/dist/es/gestures/pan/index.mjs.map +1 -0
- package/dist/es/gestures/press.mjs +1 -0
- package/dist/es/gestures/press.mjs.map +1 -0
- package/dist/es/index.mjs +1 -0
- package/dist/es/index.mjs.map +1 -0
- package/dist/es/m.mjs +1 -0
- package/dist/es/m.mjs.map +1 -0
- package/dist/es/mini.mjs +1 -0
- package/dist/es/mini.mjs.map +1 -0
- package/dist/es/motion/features/Feature.mjs +1 -0
- package/dist/es/motion/features/Feature.mjs.map +1 -0
- package/dist/es/motion/features/animation/exit.mjs +1 -0
- package/dist/es/motion/features/animation/exit.mjs.map +1 -0
- package/dist/es/motion/features/animation/index.mjs +1 -0
- package/dist/es/motion/features/animation/index.mjs.map +1 -0
- package/dist/es/motion/features/animations.mjs +1 -0
- package/dist/es/motion/features/animations.mjs.map +1 -0
- package/dist/es/motion/features/definitions.mjs +1 -0
- package/dist/es/motion/features/definitions.mjs.map +1 -0
- package/dist/es/motion/features/drag.mjs +1 -0
- package/dist/es/motion/features/drag.mjs.map +1 -0
- package/dist/es/motion/features/gestures.mjs +1 -0
- package/dist/es/motion/features/gestures.mjs.map +1 -0
- package/dist/es/motion/features/layout/MeasureLayout.mjs +1 -0
- package/dist/es/motion/features/layout/MeasureLayout.mjs.map +1 -0
- package/dist/es/motion/features/layout.mjs +1 -0
- package/dist/es/motion/features/layout.mjs.map +1 -0
- package/dist/es/motion/features/load-features.mjs +1 -0
- package/dist/es/motion/features/load-features.mjs.map +1 -0
- package/dist/es/motion/features/viewport/index.mjs +1 -0
- package/dist/es/motion/features/viewport/index.mjs.map +1 -0
- package/dist/es/motion/features/viewport/observers.mjs +1 -0
- package/dist/es/motion/features/viewport/observers.mjs.map +1 -0
- package/dist/es/motion/index.mjs +1 -0
- package/dist/es/motion/index.mjs.map +1 -0
- package/dist/es/motion/utils/is-forced-motion-value.mjs +1 -0
- package/dist/es/motion/utils/is-forced-motion-value.mjs.map +1 -0
- package/dist/es/motion/utils/is-motion-component.mjs +1 -0
- package/dist/es/motion/utils/is-motion-component.mjs.map +1 -0
- package/dist/es/motion/utils/symbol.mjs +1 -0
- package/dist/es/motion/utils/symbol.mjs.map +1 -0
- package/dist/es/motion/utils/unwrap-motion-component.mjs +1 -0
- package/dist/es/motion/utils/unwrap-motion-component.mjs.map +1 -0
- package/dist/es/motion/utils/use-motion-ref.mjs +1 -0
- package/dist/es/motion/utils/use-motion-ref.mjs.map +1 -0
- package/dist/es/motion/utils/use-visual-element.mjs +1 -0
- package/dist/es/motion/utils/use-visual-element.mjs.map +1 -0
- package/dist/es/motion/utils/use-visual-state.mjs +1 -0
- package/dist/es/motion/utils/use-visual-state.mjs.map +1 -0
- package/dist/es/motion/utils/valid-prop.mjs +1 -0
- package/dist/es/motion/utils/valid-prop.mjs.map +1 -0
- package/dist/es/projection/animation/mix-values.mjs +1 -0
- package/dist/es/projection/animation/mix-values.mjs.map +1 -0
- package/dist/es/projection/geometry/conversion.mjs +1 -0
- package/dist/es/projection/geometry/conversion.mjs.map +1 -0
- package/dist/es/projection/geometry/copy.mjs +1 -0
- package/dist/es/projection/geometry/copy.mjs.map +1 -0
- package/dist/es/projection/geometry/delta-apply.mjs +2 -1
- package/dist/es/projection/geometry/delta-apply.mjs.map +1 -0
- package/dist/es/projection/geometry/delta-calc.mjs +1 -0
- package/dist/es/projection/geometry/delta-calc.mjs.map +1 -0
- package/dist/es/projection/geometry/delta-remove.mjs +1 -0
- package/dist/es/projection/geometry/delta-remove.mjs.map +1 -0
- package/dist/es/projection/geometry/models.mjs +1 -0
- package/dist/es/projection/geometry/models.mjs.map +1 -0
- package/dist/es/projection/geometry/utils.mjs +1 -0
- package/dist/es/projection/geometry/utils.mjs.map +1 -0
- package/dist/es/projection/node/DocumentProjectionNode.mjs +1 -0
- package/dist/es/projection/node/DocumentProjectionNode.mjs.map +1 -0
- package/dist/es/projection/node/HTMLProjectionNode.mjs +1 -0
- package/dist/es/projection/node/HTMLProjectionNode.mjs.map +1 -0
- package/dist/es/projection/node/create-projection-node.mjs +2 -1
- package/dist/es/projection/node/create-projection-node.mjs.map +1 -0
- package/dist/es/projection/node/group.mjs +1 -0
- package/dist/es/projection/node/group.mjs.map +1 -0
- package/dist/es/projection/node/state.mjs +1 -0
- package/dist/es/projection/node/state.mjs.map +1 -0
- package/dist/es/projection/shared/stack.mjs +1 -0
- package/dist/es/projection/shared/stack.mjs.map +1 -0
- package/dist/es/projection/styles/scale-border-radius.mjs +1 -0
- package/dist/es/projection/styles/scale-border-radius.mjs.map +1 -0
- package/dist/es/projection/styles/scale-box-shadow.mjs +1 -0
- package/dist/es/projection/styles/scale-box-shadow.mjs.map +1 -0
- package/dist/es/projection/styles/scale-correction.mjs +1 -0
- package/dist/es/projection/styles/scale-correction.mjs.map +1 -0
- package/dist/es/projection/styles/transform.mjs +1 -0
- package/dist/es/projection/styles/transform.mjs.map +1 -0
- package/dist/es/projection/use-instant-layout-transition.mjs +1 -0
- package/dist/es/projection/use-instant-layout-transition.mjs.map +1 -0
- package/dist/es/projection/use-reset-projection.mjs +1 -0
- package/dist/es/projection/use-reset-projection.mjs.map +1 -0
- package/dist/es/projection/utils/each-axis.mjs +1 -0
- package/dist/es/projection/utils/each-axis.mjs.map +1 -0
- package/dist/es/projection/utils/has-transform.mjs +1 -0
- package/dist/es/projection/utils/has-transform.mjs.map +1 -0
- package/dist/es/projection/utils/measure.mjs +1 -0
- package/dist/es/projection/utils/measure.mjs.map +1 -0
- package/dist/es/projection.mjs +1 -0
- package/dist/es/projection.mjs.map +1 -0
- package/dist/es/render/VisualElement.mjs +1 -0
- package/dist/es/render/VisualElement.mjs.map +1 -0
- package/dist/es/render/components/create-proxy.mjs +1 -0
- package/dist/es/render/components/create-proxy.mjs.map +1 -0
- package/dist/es/render/components/m/create.mjs +1 -0
- package/dist/es/render/components/m/create.mjs.map +1 -0
- package/dist/es/render/components/m/elements.mjs +1 -0
- package/dist/es/render/components/m/elements.mjs.map +1 -0
- package/dist/es/render/components/m/proxy.mjs +1 -0
- package/dist/es/render/components/m/proxy.mjs.map +1 -0
- package/dist/es/render/components/motion/create.mjs +1 -0
- package/dist/es/render/components/motion/create.mjs.map +1 -0
- package/dist/es/render/components/motion/elements.mjs +1 -0
- package/dist/es/render/components/motion/elements.mjs.map +1 -0
- package/dist/es/render/components/motion/feature-bundle.mjs +1 -0
- package/dist/es/render/components/motion/feature-bundle.mjs.map +1 -0
- package/dist/es/render/components/motion/proxy.mjs +1 -0
- package/dist/es/render/components/motion/proxy.mjs.map +1 -0
- package/dist/es/render/dom/DOMVisualElement.mjs +1 -0
- package/dist/es/render/dom/DOMVisualElement.mjs.map +1 -0
- package/dist/es/render/dom/create-visual-element.mjs +1 -0
- package/dist/es/render/dom/create-visual-element.mjs.map +1 -0
- package/dist/es/render/dom/features-animation.mjs +1 -0
- package/dist/es/render/dom/features-animation.mjs.map +1 -0
- package/dist/es/render/dom/features-max.mjs +1 -0
- package/dist/es/render/dom/features-max.mjs.map +1 -0
- package/dist/es/render/dom/features-min.mjs +1 -0
- package/dist/es/render/dom/features-min.mjs.map +1 -0
- package/dist/es/render/dom/scroll/attach-animation.mjs +1 -0
- package/dist/es/render/dom/scroll/attach-animation.mjs.map +1 -0
- package/dist/es/render/dom/scroll/attach-function.mjs +1 -0
- package/dist/es/render/dom/scroll/attach-function.mjs.map +1 -0
- package/dist/es/render/dom/scroll/index.mjs +1 -0
- package/dist/es/render/dom/scroll/index.mjs.map +1 -0
- package/dist/es/render/dom/scroll/info.mjs +1 -0
- package/dist/es/render/dom/scroll/info.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/edge.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/edge.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/index.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/index.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/inset.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/inset.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/offset.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/offset.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/presets.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/presets.mjs.map +1 -0
- package/dist/es/render/dom/scroll/on-scroll-handler.mjs +1 -0
- package/dist/es/render/dom/scroll/on-scroll-handler.mjs.map +1 -0
- package/dist/es/render/dom/scroll/track.mjs +1 -0
- package/dist/es/render/dom/scroll/track.mjs.map +1 -0
- package/dist/es/render/dom/scroll/utils/get-timeline.mjs +1 -0
- package/dist/es/render/dom/scroll/utils/get-timeline.mjs.map +1 -0
- package/dist/es/render/dom/use-render.mjs +1 -0
- package/dist/es/render/dom/use-render.mjs.map +1 -0
- package/dist/es/render/dom/utils/camel-to-dash.mjs +1 -0
- package/dist/es/render/dom/utils/camel-to-dash.mjs.map +1 -0
- package/dist/es/render/dom/utils/filter-props.mjs +1 -0
- package/dist/es/render/dom/utils/filter-props.mjs.map +1 -0
- package/dist/es/render/dom/utils/is-svg-component.mjs +1 -0
- package/dist/es/render/dom/utils/is-svg-component.mjs.map +1 -0
- package/dist/es/render/dom/viewport/index.mjs +1 -0
- package/dist/es/render/dom/viewport/index.mjs.map +1 -0
- package/dist/es/render/html/HTMLVisualElement.mjs +1 -0
- package/dist/es/render/html/HTMLVisualElement.mjs.map +1 -0
- package/dist/es/render/html/use-html-visual-state.mjs +1 -0
- package/dist/es/render/html/use-html-visual-state.mjs.map +1 -0
- package/dist/es/render/html/use-props.mjs +1 -0
- package/dist/es/render/html/use-props.mjs.map +1 -0
- package/dist/es/render/html/utils/build-styles.mjs +1 -0
- package/dist/es/render/html/utils/build-styles.mjs.map +1 -0
- package/dist/es/render/html/utils/build-transform.mjs +1 -0
- package/dist/es/render/html/utils/build-transform.mjs.map +1 -0
- package/dist/es/render/html/utils/create-render-state.mjs +1 -0
- package/dist/es/render/html/utils/create-render-state.mjs.map +1 -0
- package/dist/es/render/html/utils/render.mjs +1 -0
- package/dist/es/render/html/utils/render.mjs.map +1 -0
- package/dist/es/render/html/utils/scrape-motion-values.mjs +1 -0
- package/dist/es/render/html/utils/scrape-motion-values.mjs.map +1 -0
- package/dist/es/render/object/ObjectVisualElement.mjs +1 -0
- package/dist/es/render/object/ObjectVisualElement.mjs.map +1 -0
- package/dist/es/render/store.mjs +1 -0
- package/dist/es/render/store.mjs.map +1 -0
- package/dist/es/render/svg/SVGVisualElement.mjs +1 -0
- package/dist/es/render/svg/SVGVisualElement.mjs.map +1 -0
- package/dist/es/render/svg/lowercase-elements.mjs +1 -0
- package/dist/es/render/svg/lowercase-elements.mjs.map +1 -0
- package/dist/es/render/svg/use-props.mjs +1 -0
- package/dist/es/render/svg/use-props.mjs.map +1 -0
- package/dist/es/render/svg/use-svg-visual-state.mjs +1 -0
- package/dist/es/render/svg/use-svg-visual-state.mjs.map +1 -0
- package/dist/es/render/svg/utils/build-attrs.mjs +1 -0
- package/dist/es/render/svg/utils/build-attrs.mjs.map +1 -0
- package/dist/es/render/svg/utils/camel-case-attrs.mjs +1 -0
- package/dist/es/render/svg/utils/camel-case-attrs.mjs.map +1 -0
- package/dist/es/render/svg/utils/create-render-state.mjs +1 -0
- package/dist/es/render/svg/utils/create-render-state.mjs.map +1 -0
- package/dist/es/render/svg/utils/is-svg-tag.mjs +1 -0
- package/dist/es/render/svg/utils/is-svg-tag.mjs.map +1 -0
- package/dist/es/render/svg/utils/path.mjs +1 -0
- package/dist/es/render/svg/utils/path.mjs.map +1 -0
- package/dist/es/render/svg/utils/render.mjs +1 -0
- package/dist/es/render/svg/utils/render.mjs.map +1 -0
- package/dist/es/render/svg/utils/scrape-motion-values.mjs +1 -0
- package/dist/es/render/svg/utils/scrape-motion-values.mjs.map +1 -0
- package/dist/es/render/utils/animation-state.mjs +1 -0
- package/dist/es/render/utils/animation-state.mjs.map +1 -0
- package/dist/es/render/utils/compare-by-depth.mjs +1 -0
- package/dist/es/render/utils/compare-by-depth.mjs.map +1 -0
- package/dist/es/render/utils/flat-tree.mjs +1 -0
- package/dist/es/render/utils/flat-tree.mjs.map +1 -0
- package/dist/es/render/utils/get-variant-context.mjs +1 -0
- package/dist/es/render/utils/get-variant-context.mjs.map +1 -0
- package/dist/es/render/utils/is-controlling-variants.mjs +1 -0
- package/dist/es/render/utils/is-controlling-variants.mjs.map +1 -0
- package/dist/es/render/utils/is-variant-label.mjs +1 -0
- package/dist/es/render/utils/is-variant-label.mjs.map +1 -0
- package/dist/es/render/utils/motion-values.mjs +1 -0
- package/dist/es/render/utils/motion-values.mjs.map +1 -0
- package/dist/es/render/utils/resolve-dynamic-variants.mjs +1 -0
- package/dist/es/render/utils/resolve-dynamic-variants.mjs.map +1 -0
- package/dist/es/render/utils/resolve-variants.mjs +1 -0
- package/dist/es/render/utils/resolve-variants.mjs.map +1 -0
- package/dist/es/render/utils/setters.mjs +1 -0
- package/dist/es/render/utils/setters.mjs.map +1 -0
- package/dist/es/render/utils/variant-props.mjs +1 -0
- package/dist/es/render/utils/variant-props.mjs.map +1 -0
- package/dist/es/utils/delay.mjs +1 -0
- package/dist/es/utils/delay.mjs.map +1 -0
- package/dist/es/utils/distance.mjs +1 -0
- package/dist/es/utils/distance.mjs.map +1 -0
- package/dist/es/utils/get-context-window.mjs +1 -0
- package/dist/es/utils/get-context-window.mjs.map +1 -0
- package/dist/es/utils/is-browser.mjs +1 -0
- package/dist/es/utils/is-browser.mjs.map +1 -0
- package/dist/es/utils/is-ref-object.mjs +1 -0
- package/dist/es/utils/is-ref-object.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/index.mjs +1 -0
- package/dist/es/utils/reduced-motion/index.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/state.mjs +1 -0
- package/dist/es/utils/reduced-motion/state.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion.mjs +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion.mjs.map +1 -0
- package/dist/es/utils/shallow-compare.mjs +1 -0
- package/dist/es/utils/shallow-compare.mjs.map +1 -0
- package/dist/es/utils/use-animation-frame.mjs +1 -0
- package/dist/es/utils/use-animation-frame.mjs.map +1 -0
- package/dist/es/utils/use-composed-ref.mjs +1 -0
- package/dist/es/utils/use-composed-ref.mjs.map +1 -0
- package/dist/es/utils/use-constant.mjs +1 -0
- package/dist/es/utils/use-constant.mjs.map +1 -0
- package/dist/es/utils/use-cycle.mjs +1 -0
- package/dist/es/utils/use-cycle.mjs.map +1 -0
- package/dist/es/utils/use-force-update.mjs +1 -0
- package/dist/es/utils/use-force-update.mjs.map +1 -0
- package/dist/es/utils/use-in-view.mjs +1 -0
- package/dist/es/utils/use-in-view.mjs.map +1 -0
- package/dist/es/utils/use-instant-transition.mjs +1 -0
- package/dist/es/utils/use-instant-transition.mjs.map +1 -0
- package/dist/es/utils/use-is-mounted.mjs +1 -0
- package/dist/es/utils/use-is-mounted.mjs.map +1 -0
- package/dist/es/utils/use-isomorphic-effect.mjs +1 -0
- package/dist/es/utils/use-isomorphic-effect.mjs.map +1 -0
- package/dist/es/utils/use-motion-value-event.mjs +1 -0
- package/dist/es/utils/use-motion-value-event.mjs.map +1 -0
- package/dist/es/utils/use-page-in-view.mjs +1 -0
- package/dist/es/utils/use-page-in-view.mjs.map +1 -0
- package/dist/es/utils/use-unmount-effect.mjs +1 -0
- package/dist/es/utils/use-unmount-effect.mjs.map +1 -0
- package/dist/es/value/scroll/use-element-scroll.mjs +1 -0
- package/dist/es/value/scroll/use-element-scroll.mjs.map +1 -0
- package/dist/es/value/scroll/use-viewport-scroll.mjs +1 -0
- package/dist/es/value/scroll/use-viewport-scroll.mjs.map +1 -0
- package/dist/es/value/use-combine-values.mjs +1 -0
- package/dist/es/value/use-combine-values.mjs.map +1 -0
- package/dist/es/value/use-computed.mjs +1 -0
- package/dist/es/value/use-computed.mjs.map +1 -0
- package/dist/es/value/use-inverted-scale.mjs +1 -0
- package/dist/es/value/use-inverted-scale.mjs.map +1 -0
- package/dist/es/value/use-motion-template.mjs +1 -0
- package/dist/es/value/use-motion-template.mjs.map +1 -0
- package/dist/es/value/use-motion-value.mjs +1 -0
- package/dist/es/value/use-motion-value.mjs.map +1 -0
- package/dist/es/value/use-scroll.mjs +1 -0
- package/dist/es/value/use-scroll.mjs.map +1 -0
- package/dist/es/value/use-spring.mjs +1 -0
- package/dist/es/value/use-spring.mjs.map +1 -0
- package/dist/es/value/use-time.mjs +1 -0
- package/dist/es/value/use-time.mjs.map +1 -0
- package/dist/es/value/use-transform.mjs +1 -0
- package/dist/es/value/use-transform.mjs.map +1 -0
- package/dist/es/value/use-velocity.mjs +1 -0
- package/dist/es/value/use-velocity.mjs.map +1 -0
- package/dist/es/value/use-will-change/WillChangeMotionValue.mjs +1 -0
- package/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map +1 -0
- package/dist/es/value/use-will-change/add-will-change.mjs +1 -0
- package/dist/es/value/use-will-change/add-will-change.mjs.map +1 -0
- package/dist/es/value/use-will-change/index.mjs +1 -0
- package/dist/es/value/use-will-change/index.mjs.map +1 -0
- package/dist/es/value/use-will-change/is.mjs +1 -0
- package/dist/es/value/use-will-change/is.mjs.map +1 -0
- package/dist/es/value/utils/resolve-motion-value.mjs +1 -0
- package/dist/es/value/utils/resolve-motion-value.mjs.map +1 -0
- package/dist/framer-motion.dev.js +28 -5
- package/dist/framer-motion.js +1 -1
- package/dist/m.d.ts +1 -1
- package/dist/mini.js +1 -1
- package/dist/size-rollup-animate.js +2 -1
- package/dist/size-rollup-animate.js.map +1 -0
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -0
- package/dist/size-rollup-m.js.map +1 -0
- package/dist/size-rollup-motion.js +2 -1
- package/dist/size-rollup-motion.js.map +1 -0
- package/dist/size-rollup-scroll.js +2 -1
- package/dist/size-rollup-scroll.js.map +1 -0
- package/dist/size-rollup-waapi-animate.js +2 -1
- package/dist/size-rollup-waapi-animate.js.map +1 -0
- package/dist/types/client.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/{types.d-DagZKalS.d.ts → types.d-C8SDx5n-.d.ts} +1 -1
- package/package.json +4 -4
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const e=(e,t,n)=>n>t?t:n<e?e:n;const t={};function n(e){return"object"==typeof e&&null!==e}function r(e){let t;return()=>(void 0===t&&(t=e()),t)}const s=e=>e,o=(e,t)=>n=>t(e(n)),i=(...e)=>e.reduce(o),a=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};const c=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],u={value:null,addProjectionMetrics:null};function l(e,n){let r=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,a=c.reduce((e,t)=>(e[t]=function(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){i.has(t)&&(f.schedule(t),e()),c++,t(a)}const f={schedule:(e,t=!1,o=!1)=>{const a=o&&s?n:r;return t&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{a=e,s?o=!0:(s=!0,[n,r]=[r,n],n.forEach(l),t&&u.value&&u.value.frameloop[t].push(c),c=0,n.clear(),s=!1,o&&(o=!1,f.process(e)))}};return f}(i,t),e),{}),{setup:l,read:f,resolveKeyframes:g,preUpdate:h,update:d,preRender:p,render:m,postRender:v}=a,y=()=>{const i=t.useManualTiming?o.timestamp:performance.now();r=!1,t.useManualTiming||(o.delta=s?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,l.process(o),f.process(o),g.process(o),h.process(o),d.process(o),p.process(o),m.process(o),v.process(o),o.isProcessing=!1,r&&n&&(s=!1,e(y))};return{schedule:c.reduce((t,n)=>{const i=a[n];return t[n]=(t,n=!1,a=!1)=>(r||(r=!0,s=!0,o.isProcessing||e(y)),i.schedule(t,n,a)),t},{}),cancel:e=>{for(let t=0;t<c.length;t++)a[c[t]].cancel(e)},state:o,steps:a}}const{schedule:f,cancel:g,state:h,steps:d}=l("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:s,!0),p=(e=>t=>"string"==typeof t&&t.startsWith(e))("var(--"),m=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,v={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},y={...v,transform:t=>e(0,1,t)},b=e=>Math.round(1e5*e)/1e5,w=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,E=(e,t)=>n=>Boolean("string"==typeof n&&x.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),W=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[s,o,i,a]=r.match(w);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==a?parseFloat(a):1}},L={...v,transform:t=>Math.round((t=>e(0,255,t))(t))},M={test:E("rgb","red"),parse:W("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+L.transform(e)+", "+L.transform(t)+", "+L.transform(n)+", "+b(y.transform(r))+")"};const A={test:E("#"),parse:function(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}},transform:M.transform},B=(e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}))("%"),S={test:E("hsl","hue"),parse:W("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+B.transform(b(t))+", "+B.transform(b(n))+", "+b(y.transform(r))+")"},O={test:e=>M.test(e)||A.test(e)||S.test(e),parse:e=>M.test(e)?M.parse(e):S.test(e)?S.parse(e):A.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?M.transform(e):S.transform(e),getAnimatableNone:e=>{const t=O.parse(e);return t.alpha=0,O.transform(t)}},T=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const z="number",H="color",F=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function N(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const i=t.replace(F,e=>(O.test(e)?(r.color.push(o),s.push(H),n.push(O.parse(e))):e.startsWith("var(")?(r.var.push(o),s.push("var"),n.push(e)):(r.number.push(o),s.push(z),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:i,indexes:r,types:s}}function P(e){return N(e).values}function $(e){const{split:t,types:n}=N(e),r=t.length;return e=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],void 0!==e[o]){const t=n[o];s+=t===z?b(e[o]):t===H?O.transform(e[o]):e[o]}return s}}const R=e=>"number"==typeof e?0:O.test(e)?O.getAnimatableNone(e):e;const k={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(w)?.length||0)+(e.match(T)?.length||0)>0},parse:P,createTransformer:$,getAnimatableNone:function(e){const t=P(e);return $(e)(t.map(R))}};function j(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function q(e,t){return n=>n>0?t:e}const I=(e,t,n)=>e+(t-e)*n,U=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},G=[A,M,S];function C(e){const t=(n=e,G.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===S&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let s=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;s=j(a,r,e+1/3),o=j(a,r,e),i=j(a,r,e-1/3)}else s=o=i=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(r)),r}const K=(e,t)=>{const n=C(e),r=C(t);if(!n||!r)return q(e,t);const s={...n};return e=>(s.red=U(n.red,r.red,e),s.green=U(n.green,r.green,e),s.blue=U(n.blue,r.blue,e),s.alpha=I(n.alpha,r.alpha,e),M.transform(s))},V=new Set(["none","hidden"]);function D(e,t){return n=>I(e,t,n)}function J(e){return"number"==typeof e?D:"string"==typeof e?p(t=e)&&m.test(t.split("/*")[0].trim())?q:O.test(e)?K:Y:Array.isArray(e)?Q:"object"==typeof e?O.test(e)?K:X:q;var t}function Q(e,t){const n=[...e],r=n.length,s=e.map((e,n)=>J(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=s[t](e);return n}}function X(e,t){const n={...e,...t},r={};for(const s in n)void 0!==e[s]&&void 0!==t[s]&&(r[s]=J(e[s])(e[s],t[s]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Y=(e,t)=>{const n=k.createTransformer(t),r=N(e),s=N(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?V.has(e)&&!s.values.length||V.has(t)&&!r.values.length?function(e,t){return V.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):i(Q(function(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],a=e.values[i]??0;n[s]=a,r[o]++}return n}(r,s),s.values),n):q(e,t)};function Z(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return I(e,t,n);return J(e)(e,t)}function _(n,r,{clamp:o=!0,ease:c,mixer:u}={}){const l=n.length;if(r.length,1===l)return()=>r[0];if(2===l&&r[0]===r[1])return()=>r[1];const f=n[0]===n[1];n[0]>n[l-1]&&(n=[...n].reverse(),r=[...r].reverse());const g=function(e,n,r){const o=[],a=r||t.mix||Z,c=e.length-1;for(let t=0;t<c;t++){let r=a(e[t],e[t+1]);if(n){const e=Array.isArray(n)?n[t]||s:n;r=i(e,r)}o.push(r)}return o}(r,c,u),h=g.length,d=e=>{if(f&&e<n[0])return r[0];let t=0;if(h>1)for(;t<n.length-2&&!(e<n[t+1]);t++);const s=a(n[t],n[t+1],e);return g[t](s)};return o?t=>d(e(n[0],n[l-1],t)):d}function ee(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=a(0,t,r);e.push(I(n,1,s))}}(t,e.length-1),t}const te=r(()=>void 0!==window.ScrollTimeline);function ne(e){return n(e)&&"offsetHeight"in e}const re=new WeakMap;let se;const oe=(e,t,r)=>(s,o)=>{return o&&o[0]?o[0][e+"Size"]:n(i=s)&&"ownerSVGElement"in i&&"getBBox"in s?s.getBBox()[t]:s[r];var i},ie=oe("inline","width","offsetWidth"),ae=oe("block","height","offsetHeight");function ce({target:e,borderBoxSize:t}){re.get(e)?.forEach(n=>{n(e,{get width(){return ie(e,t)},get height(){return ae(e,t)}})})}function ue(e){e.forEach(ce)}function le(e,t){se||"undefined"!=typeof ResizeObserver&&(se=new ResizeObserver(ue));const n=function(e){if(e instanceof EventTarget)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e);return n.forEach(e=>{let n=re.get(e);n||(n=new Set,re.set(e,n)),n.add(t),se?.observe(e)}),()=>{n.forEach(e=>{const n=re.get(e);n?.delete(t),n?.size||se?.unobserve(e)})}}const fe=new Set;let ge;function he(e){return fe.add(e),ge||(ge=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};fe.forEach(t=>t(e))},window.addEventListener("resize",ge)),()=>{fe.delete(e),fe.size||"function"!=typeof ge||(window.removeEventListener("resize",ge),ge=void 0)}}function de(e,t){let n;const r=()=>{const{currentTime:r}=t,s=(null===r?0:r.value)/100;n!==s&&e(s),n=s};return f.preUpdate(r,!0),()=>g(r)}const pe={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function me(e,t,n,r){const s=n[t],{length:o,position:i}=pe[t],c=s.current,u=n.time;s.current=e[`scroll${i}`],s.scrollLength=e[`scroll${o}`]-e[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=a(0,s.scrollLength,s.current);const l=r-u;var f,g;s.velocity=l>50?0:(f=s.current-c,(g=l)?f*(1e3/g):0)}const ve={start:0,center:.5,end:1};function ye(e,t,n=0){let r=0;if(e in ve&&(e=ve[e]),"string"==typeof e){const t=parseFloat(e);e.endsWith("px")?r=t:e.endsWith("%")?e=t/100:e.endsWith("vw")?r=t/100*document.documentElement.clientWidth:e.endsWith("vh")?r=t/100*document.documentElement.clientHeight:e=t}return"number"==typeof e&&(r=t*e),n+r}const be=[0,0];function we(e,t,n,r){let s=Array.isArray(e)?e:be,o=0,i=0;return"number"==typeof e?s=[e,e]:"string"==typeof e&&(s=(e=e.trim()).includes(" ")?e.split(" "):[e,ve[e]?e:"0"]),o=ye(s[0],n,r),i=ye(s[1],t),o-i}const xe={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ee={x:0,y:0};function We(t,n,r){const{offset:s=xe.All}=r,{target:o=t,axis:i="y"}=r,a="y"===i?"height":"width",c=o!==t?function(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(ne(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if("svg"===r.tagName){const e=r.getBoundingClientRect();r=r.parentElement;const t=r.getBoundingClientRect();n.x+=e.left-t.left,n.y+=e.top-t.top}else{if(!(r instanceof SVGGraphicsElement))break;{const{x:e,y:t}=r.getBBox();n.x+=e,n.y+=t;let s=null,o=r.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=r.parentNode;r=s}}return n}(o,t):Ee,u=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(e){return"getBBox"in e&&"svg"!==e.tagName?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}(o),l={width:t.clientWidth,height:t.clientHeight};n[i].offset.length=0;let f=!n[i].interpolate;const g=s.length;for(let e=0;e<g;e++){const t=we(s[e],l[a],u[a],c[i]);f||t===n[i].interpolatorOffsets[e]||(f=!0),n[i].offset[e]=t}f&&(n[i].interpolate=_(n[i].offset,ee(s),{clamp:!1}),n[i].interpolatorOffsets=[...n[i].offset]),n[i].progress=e(0,1,n[i].interpolate(n[i].current))}function Le(e,t,n,r={}){return{measure:t=>{!function(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}(e,r.target,n),function(e,t,n){me(e,"x",t,n),me(e,"y",t,n),t.time=n}(e,n,t),(r.offset||r.target)&&We(e,n,r)},notify:()=>t(n)}}const Me=new WeakMap,Ae=new WeakMap,Be=new WeakMap,Se=e=>e===document.scrollingElement?window:e;function Oe(e,{container:t=document.scrollingElement,...n}={}){if(!t)return s;let r=Be.get(t);r||(r=new Set,Be.set(t,r));const o=Le(t,e,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(r.add(o),!Me.has(t)){const e=()=>{for(const e of r)e.measure(h.timestamp);f.preUpdate(n)},n=()=>{for(const e of r)e.notify()},s=()=>f.read(e);Me.set(t,s);const o=Se(t);window.addEventListener("resize",s,{passive:!0}),t!==document.documentElement&&Ae.set(t,(a=s,"function"==typeof(i=t)?he(i):le(i,a))),o.addEventListener("scroll",s,{passive:!0}),s()}var i,a;const c=Me.get(t);return f.read(c,!1,!0),()=>{g(c);const e=Be.get(t);if(!e)return;if(e.delete(o),e.size)return;const n=Me.get(t);Me.delete(t),n&&(Se(t).removeEventListener("scroll",n),Ae.get(t)?.(),window.removeEventListener("resize",n))}}const Te=new Map;function ze({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const s=Te.get(t)??new Map;Te.set(t,s);const o=n.target??"self",i=s.get(o)??{},a=r+(n.offset??[]).join(",");return i[a]||(i[a]=!n.target&&te()?new ScrollTimeline({source:t,axis:r}):function(e){const t={value:0},n=Oe(n=>{t.value=100*n[e.axis].progress},e);return{currentTime:t,cancel:n}}({container:t,...n})),i[a]}function He(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return s;const o={axis:t,container:n,...r};return"function"==typeof e?function(e,t){return function(e){return 2===e.length}(e)?Oe(n=>{e(n[t.axis].progress,n)},t):de(e,ze(t))}(e,o):function(e,t){const n=ze(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:e=>(e.pause(),de(t=>{e.time=e.iterationDuration*t},n))})}(e,o)}export{He as scroll};
|
|
1
|
+
const e=(e,t,n)=>n>t?t:n<e?e:n;function t(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let n=()=>{},r=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(n=(e,n,r)=>{e||"undefined"==typeof console||console.warn(t(n,r))},r=(e,n,r)=>{if(!e)throw new Error(t(n,r))});const s={};function o(e){return"object"==typeof e&&null!==e}function i(e){let t;return()=>(void 0===t&&(t=e()),t)}const a=e=>e,c=(e,t)=>n=>t(e(n)),l=(...e)=>e.reduce(c),u=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};const f=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],d={value:null,addProjectionMetrics:null};function h(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=f.reduce((e,t)=>(e[t]=function(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){i.has(t)&&(u.schedule(t),e()),c++,t(a)}const u={schedule:(e,t=!1,o=!1)=>{const a=o&&s?n:r;return t&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{a=e,s?o=!0:(s=!0,[n,r]=[r,n],n.forEach(l),t&&d.value&&d.value.frameloop[t].push(c),c=0,n.clear(),s=!1,o&&(o=!1,u.process(e)))}};return u}(i,t),e),{}),{setup:c,read:l,resolveKeyframes:u,preUpdate:h,update:p,preRender:g,render:m,postRender:v}=a,y=()=>{const i=s.useManualTiming?o.timestamp:performance.now();n=!1,s.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,c.process(o),l.process(o),u.process(o),h.process(o),p.process(o),g.process(o),m.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))};return{schedule:f.reduce((t,s)=>{const i=a[s];return t[s]=(t,s=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(y)),i.schedule(t,s,a)),t},{}),cancel:e=>{for(let t=0;t<f.length;t++)a[f[t]].cancel(e)},state:o,steps:a}}const{schedule:p,cancel:g,state:m,steps:v}=h("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:a,!0),y=(e=>t=>"string"==typeof t&&t.startsWith(e))("var(--"),b=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,w={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},x={...w,transform:t=>e(0,1,t)},E=e=>Math.round(1e5*e)/1e5,W=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const L=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,M=(e,t)=>n=>Boolean("string"==typeof n&&L.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),A=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[s,o,i,a]=r.match(W);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==a?parseFloat(a):1}},B={...w,transform:t=>Math.round((t=>e(0,255,t))(t))},S={test:M("rgb","red"),parse:A("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+B.transform(e)+", "+B.transform(t)+", "+B.transform(n)+", "+E(x.transform(r))+")"};const O={test:M("#"),parse:function(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}},transform:S.transform},$=(e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}))("%"),T={test:M("hsl","hue"),parse:A("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$.transform(E(t))+", "+$.transform(E(n))+", "+E(x.transform(r))+")"},F={test:e=>S.test(e)||O.test(e)||T.test(e),parse:e=>S.test(e)?S.parse(e):T.test(e)?T.parse(e):O.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?S.transform(e):T.transform(e),getAnimatableNone:e=>{const t=F.parse(e);return t.alpha=0,F.transform(t)}},N=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const z="number",H="color",P=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function k(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const i=t.replace(P,e=>(F.test(e)?(r.color.push(o),s.push(H),n.push(F.parse(e))):e.startsWith("var(")?(r.var.push(o),s.push("var"),n.push(e)):(r.number.push(o),s.push(z),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:i,indexes:r,types:s}}function R(e){return k(e).values}function q(e){const{split:t,types:n}=k(e),r=t.length;return e=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],void 0!==e[o]){const t=n[o];s+=t===z?E(e[o]):t===H?F.transform(e[o]):e[o]}return s}}const j=e=>"number"==typeof e?0:F.test(e)?F.getAnimatableNone(e):e;const U={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(W)?.length||0)+(e.match(N)?.length||0)>0},parse:R,createTransformer:q,getAnimatableNone:function(e){const t=R(e);return q(e)(t.map(j))}};function I(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function C(e,t){return n=>n>0?t:e}const G=(e,t,n)=>e+(t-e)*n,V=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},D=[O,S,T];function K(e){const t=(r=e,D.find(e=>e.test(r)));var r;if(n(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let s=t.parse(e);return t===T&&(s=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let s=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;s=I(a,r,e+1/3),o=I(a,r,e),i=I(a,r,e-1/3)}else s=o=i=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(s)),s}const _=(e,t)=>{const n=K(e),r=K(t);if(!n||!r)return C(e,t);const s={...n};return e=>(s.red=V(n.red,r.red,e),s.green=V(n.green,r.green,e),s.blue=V(n.blue,r.blue,e),s.alpha=G(n.alpha,r.alpha,e),S.transform(s))},J=new Set(["none","hidden"]);function Q(e,t){return n=>G(e,t,n)}function X(e){return"number"==typeof e?Q:"string"==typeof e?y(t=e)&&b.test(t.split("/*")[0].trim())?C:F.test(e)?_:ee:Array.isArray(e)?Y:"object"==typeof e?F.test(e)?_:Z:C;var t}function Y(e,t){const n=[...e],r=n.length,s=e.map((e,n)=>X(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=s[t](e);return n}}function Z(e,t){const n={...e,...t},r={};for(const s in n)void 0!==e[s]&&void 0!==t[s]&&(r[s]=X(e[s])(e[s],t[s]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const ee=(e,t)=>{const r=U.createTransformer(t),s=k(e),o=k(t);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?J.has(e)&&!o.values.length||J.has(t)&&!s.values.length?function(e,t){return J.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):l(Y(function(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],a=e.values[i]??0;n[s]=a,r[o]++}return n}(s,o),o.values),r):(n(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),C(e,t))};function te(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return G(e,t,n);return X(e)(e,t)}function ne(t,n,{clamp:o=!0,ease:i,mixer:c}={}){const f=t.length;if(r(f===n.length,"Both input and output ranges must be the same length","range-length"),1===f)return()=>n[0];if(2===f&&n[0]===n[1])return()=>n[1];const d=t[0]===t[1];t[0]>t[f-1]&&(t=[...t].reverse(),n=[...n].reverse());const h=function(e,t,n){const r=[],o=n||s.mix||te,i=e.length-1;for(let n=0;n<i;n++){let s=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||a:t;s=l(e,s)}r.push(s)}return r}(n,i,c),p=h.length,g=e=>{if(d&&e<t[0])return n[0];let r=0;if(p>1)for(;r<t.length-2&&!(e<t[r+1]);r++);const s=u(t[r],t[r+1],e);return h[r](s)};return o?n=>g(e(t[0],t[f-1],n)):g}function re(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=u(0,t,r);e.push(G(n,1,s))}}(t,e.length-1),t}const se=i(()=>void 0!==window.ScrollTimeline);function oe(e){return o(e)&&"offsetHeight"in e}const ie=new WeakMap;let ae;const ce=(e,t,n)=>(r,s)=>{return s&&s[0]?s[0][e+"Size"]:o(i=r)&&"ownerSVGElement"in i&&"getBBox"in r?r.getBBox()[t]:r[n];var i},le=ce("inline","width","offsetWidth"),ue=ce("block","height","offsetHeight");function fe({target:e,borderBoxSize:t}){ie.get(e)?.forEach(n=>{n(e,{get width(){return le(e,t)},get height(){return ue(e,t)}})})}function de(e){e.forEach(fe)}function he(e,t){ae||"undefined"!=typeof ResizeObserver&&(ae=new ResizeObserver(de));const n=function(e){if(e instanceof EventTarget)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e);return n.forEach(e=>{let n=ie.get(e);n||(n=new Set,ie.set(e,n)),n.add(t),ae?.observe(e)}),()=>{n.forEach(e=>{const n=ie.get(e);n?.delete(t),n?.size||ae?.unobserve(e)})}}const pe=new Set;let ge;function me(e){return pe.add(e),ge||(ge=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};pe.forEach(t=>t(e))},window.addEventListener("resize",ge)),()=>{pe.delete(e),pe.size||"function"!=typeof ge||(window.removeEventListener("resize",ge),ge=void 0)}}function ve(e,t){let n;const r=()=>{const{currentTime:r}=t,s=(null===r?0:r.value)/100;n!==s&&e(s),n=s};return p.preUpdate(r,!0),()=>g(r)}const ye={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function be(e,t,n,r){const s=n[t],{length:o,position:i}=ye[t],a=s.current,c=n.time;s.current=e[`scroll${i}`],s.scrollLength=e[`scroll${o}`]-e[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=u(0,s.scrollLength,s.current);const l=r-c;var f,d;s.velocity=l>50?0:(f=s.current-a,(d=l)?f*(1e3/d):0)}const we={start:0,center:.5,end:1};function xe(e,t,n=0){let r=0;if(e in we&&(e=we[e]),"string"==typeof e){const t=parseFloat(e);e.endsWith("px")?r=t:e.endsWith("%")?e=t/100:e.endsWith("vw")?r=t/100*document.documentElement.clientWidth:e.endsWith("vh")?r=t/100*document.documentElement.clientHeight:e=t}return"number"==typeof e&&(r=t*e),n+r}const Ee=[0,0];function We(e,t,n,r){let s=Array.isArray(e)?e:Ee,o=0,i=0;return"number"==typeof e?s=[e,e]:"string"==typeof e&&(s=(e=e.trim()).includes(" ")?e.split(" "):[e,we[e]?e:"0"]),o=xe(s[0],n,r),i=xe(s[1],t),o-i}const Le={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Me={x:0,y:0};function Ae(t,n,r){const{offset:s=Le.All}=r,{target:o=t,axis:i="y"}=r,a="y"===i?"height":"width",c=o!==t?function(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(oe(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if("svg"===r.tagName){const e=r.getBoundingClientRect();r=r.parentElement;const t=r.getBoundingClientRect();n.x+=e.left-t.left,n.y+=e.top-t.top}else{if(!(r instanceof SVGGraphicsElement))break;{const{x:e,y:t}=r.getBBox();n.x+=e,n.y+=t;let s=null,o=r.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=r.parentNode;r=s}}return n}(o,t):Me,l=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(e){return"getBBox"in e&&"svg"!==e.tagName?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};n[i].offset.length=0;let f=!n[i].interpolate;const d=s.length;for(let e=0;e<d;e++){const t=We(s[e],u[a],l[a],c[i]);f||t===n[i].interpolatorOffsets[e]||(f=!0),n[i].offset[e]=t}f&&(n[i].interpolate=ne(n[i].offset,re(s),{clamp:!1}),n[i].interpolatorOffsets=[...n[i].offset]),n[i].progress=e(0,1,n[i].interpolate(n[i].current))}function Be(e,t,n,r={}){return{measure:t=>{!function(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}(e,r.target,n),function(e,t,n){be(e,"x",t,n),be(e,"y",t,n),t.time=n}(e,n,t),(r.offset||r.target)&&Ae(e,n,r)},notify:()=>t(n)}}const Se=new WeakMap,Oe=new WeakMap,$e=new WeakMap,Te=e=>e===document.scrollingElement?window:e;function Fe(e,{container:t=document.scrollingElement,...n}={}){if(!t)return a;let r=$e.get(t);r||(r=new Set,$e.set(t,r));const s=Be(t,e,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(r.add(s),!Se.has(t)){const e=()=>{for(const e of r)e.measure(m.timestamp);p.preUpdate(n)},n=()=>{for(const e of r)e.notify()},s=()=>p.read(e);Se.set(t,s);const a=Te(t);window.addEventListener("resize",s,{passive:!0}),t!==document.documentElement&&Oe.set(t,(i=s,"function"==typeof(o=t)?me(o):he(o,i))),a.addEventListener("scroll",s,{passive:!0}),s()}var o,i;const c=Se.get(t);return p.read(c,!1,!0),()=>{g(c);const e=$e.get(t);if(!e)return;if(e.delete(s),e.size)return;const n=Se.get(t);Se.delete(t),n&&(Te(t).removeEventListener("scroll",n),Oe.get(t)?.(),window.removeEventListener("resize",n))}}const Ne=new Map;function ze({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const s=Ne.get(t)??new Map;Ne.set(t,s);const o=n.target??"self",i=s.get(o)??{},a=r+(n.offset??[]).join(",");return i[a]||(i[a]=!n.target&&se()?new ScrollTimeline({source:t,axis:r}):function(e){const t={value:0},n=Fe(n=>{t.value=100*n[e.axis].progress},e);return{currentTime:t,cancel:n}}({container:t,...n})),i[a]}function He(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return a;const s={axis:t,container:n,...r};return"function"==typeof e?function(e,t){return function(e){return 2===e.length}(e)?Fe(n=>{e(n[t.axis].progress,n)},t):ve(e,ze(t))}(e,s):function(e,t){const n=ze(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:e=>(e.pause(),ve(t=>{e.time=e.iterationDuration*t},n))})}(e,s)}export{He as scroll};
|
|
2
|
+
//# sourceMappingURL=size-rollup-scroll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size-rollup-scroll.js","sources":["../../motion-utils/dist/es/clamp.mjs","../../motion-utils/dist/es/format-error-message.mjs","../../motion-utils/dist/es/errors.mjs","../../motion-utils/dist/es/global-config.mjs","../../motion-utils/dist/es/is-object.mjs","../../motion-utils/dist/es/memo.mjs","../../motion-utils/dist/es/noop.mjs","../../motion-utils/dist/es/pipe.mjs","../../motion-utils/dist/es/progress.mjs","../../motion-dom/dist/es/frameloop/order.mjs","../../motion-dom/dist/es/stats/buffer.mjs","../../motion-dom/dist/es/frameloop/batcher.mjs","../../motion-dom/dist/es/frameloop/render-step.mjs","../../motion-dom/dist/es/frameloop/frame.mjs","../../motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../motion-dom/dist/es/value/types/numbers/index.mjs","../../motion-dom/dist/es/value/types/utils/sanitize.mjs","../../motion-dom/dist/es/value/types/utils/float-regex.mjs","../../motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../motion-dom/dist/es/value/types/color/utils.mjs","../../motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../motion-dom/dist/es/value/types/color/rgba.mjs","../../motion-dom/dist/es/value/types/color/hex.mjs","../../motion-dom/dist/es/value/types/numbers/units.mjs","../../motion-dom/dist/es/value/types/color/hsla.mjs","../../motion-dom/dist/es/value/types/color/index.mjs","../../motion-dom/dist/es/value/types/utils/color-regex.mjs","../../motion-dom/dist/es/value/types/complex/index.mjs","../../motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../motion-dom/dist/es/utils/mix/immediate.mjs","../../motion-dom/dist/es/utils/mix/number.mjs","../../motion-dom/dist/es/utils/mix/color.mjs","../../motion-dom/dist/es/utils/mix/visibility.mjs","../../motion-dom/dist/es/utils/mix/complex.mjs","../../motion-dom/dist/es/utils/mix/index.mjs","../../motion-dom/dist/es/utils/interpolate.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../motion-dom/dist/es/utils/is-html-element.mjs","../../motion-dom/dist/es/resize/handle-element.mjs","../../motion-dom/dist/es/utils/is-svg-element.mjs","../../motion-dom/dist/es/utils/resolve-elements.mjs","../../motion-dom/dist/es/resize/handle-window.mjs","../../motion-dom/dist/es/scroll/observe.mjs","../lib/render/dom/scroll/info.js","../../motion-utils/dist/es/velocity-per-second.mjs","../lib/render/dom/scroll/offsets/edge.js","../lib/render/dom/scroll/offsets/offset.js","../lib/render/dom/scroll/offsets/presets.js","../lib/render/dom/scroll/offsets/index.js","../lib/render/dom/scroll/offsets/inset.js","../lib/render/dom/scroll/on-scroll-handler.js","../lib/render/dom/scroll/track.js","../../motion-dom/dist/es/resize/index.mjs","../lib/render/dom/scroll/utils/get-timeline.js","../lib/render/dom/scroll/index.js","../lib/render/dom/scroll/attach-function.js","../lib/render/dom/scroll/attach-animation.js"],"sourcesContent":["const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n","function isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\n\nexport { isObject };\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n","const statsBuffer = {\n value: null,\n addProjectionMetrics: null,\n};\n\nexport { statsBuffer };\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!MotionGlobalConfig.useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n","import { statsBuffer } from '../stats/buffer.mjs';\n\nfunction createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (!queue.has(callback))\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { split, types } = analyseComplexValue(source);\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n","import { memo } from 'motion-utils';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memo(() => window.ScrollTimeline !== undefined);\n\nexport { supportsScrollTimeline };\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nfunction isHTMLElement(element) {\n return isObject(element) && \"offsetHeight\" in element;\n}\n\nexport { isHTMLElement };\n","import { isSVGElement } from '../utils/is-svg-element.mjs';\nimport { resolveElements } from '../utils/resolve-elements.mjs';\n\nconst resizeHandlers = new WeakMap();\nlet observer;\nconst getSize = (borderBoxAxis, svgAxis, htmlAxis) => (target, borderBoxSize) => {\n if (borderBoxSize && borderBoxSize[0]) {\n return borderBoxSize[0][(borderBoxAxis + \"Size\")];\n }\n else if (isSVGElement(target) && \"getBBox\" in target) {\n return target.getBBox()[svgAxis];\n }\n else {\n return target[htmlAxis];\n }\n};\nconst getWidth = /*@__PURE__*/ getSize(\"inline\", \"width\", \"offsetWidth\");\nconst getHeight = /*@__PURE__*/ getSize(\"block\", \"height\", \"offsetHeight\");\nfunction notifyTarget({ target, borderBoxSize }) {\n resizeHandlers.get(target)?.forEach((handler) => {\n handler(target, {\n get width() {\n return getWidth(target, borderBoxSize);\n },\n get height() {\n return getHeight(target, borderBoxSize);\n },\n });\n });\n}\nfunction notifyAll(entries) {\n entries.forEach(notifyTarget);\n}\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\")\n return;\n observer = new ResizeObserver(notifyAll);\n}\nfunction resizeElement(target, handler) {\n if (!observer)\n createResizeObserver();\n const elements = resolveElements(target);\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element);\n if (!elementHandlers) {\n elementHandlers = new Set();\n resizeHandlers.set(element, elementHandlers);\n }\n elementHandlers.add(handler);\n observer?.observe(element);\n });\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element);\n elementHandlers?.delete(handler);\n if (!elementHandlers?.size) {\n observer?.unobserve(element);\n }\n });\n };\n}\n\nexport { resizeElement };\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector);\n}\n\nexport { resolveElements };\n","const windowCallbacks = new Set();\nlet windowResizeHandler;\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const info = {\n get width() {\n return window.innerWidth;\n },\n get height() {\n return window.innerHeight;\n },\n };\n windowCallbacks.forEach((callback) => callback(info));\n };\n window.addEventListener(\"resize\", windowResizeHandler);\n}\nfunction resizeWindow(callback) {\n windowCallbacks.add(callback);\n if (!windowResizeHandler)\n createWindowResizeHandler();\n return () => {\n windowCallbacks.delete(callback);\n if (!windowCallbacks.size &&\n typeof windowResizeHandler === \"function\") {\n window.removeEventListener(\"resize\", windowResizeHandler);\n windowResizeHandler = undefined;\n }\n };\n}\n\nexport { resizeWindow };\n","import { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nfunction observeTimeline(update, timeline) {\n let prevProgress;\n const onFrame = () => {\n const { currentTime } = timeline;\n const percentage = currentTime === null ? 0 : currentTime.value;\n const progress = percentage / 100;\n if (prevProgress !== progress) {\n update(progress);\n }\n prevProgress = progress;\n };\n frame.preUpdate(onFrame, true);\n return () => cancelFrame(onFrame);\n}\n\nexport { observeTimeline };\n","import { progress, velocityPerSecond } from \"motion-utils\";\n/**\n * A time in milliseconds, beyond which we consider the scroll velocity to be 0.\n */\nconst maxElapsed = 50;\nconst createAxisInfo = () => ({\n current: 0,\n offset: [],\n progress: 0,\n scrollLength: 0,\n targetOffset: 0,\n targetLength: 0,\n containerLength: 0,\n velocity: 0,\n});\nexport const createScrollInfo = () => ({\n time: 0,\n x: createAxisInfo(),\n y: createAxisInfo(),\n});\nconst keys = {\n x: {\n length: \"Width\",\n position: \"Left\",\n },\n y: {\n length: \"Height\",\n position: \"Top\",\n },\n};\nfunction updateAxisInfo(element, axisName, info, time) {\n const axis = info[axisName];\n const { length, position } = keys[axisName];\n const prev = axis.current;\n const prevTime = info.time;\n axis.current = element[`scroll${position}`];\n axis.scrollLength = element[`scroll${length}`] - element[`client${length}`];\n axis.offset.length = 0;\n axis.offset[0] = 0;\n axis.offset[1] = axis.scrollLength;\n axis.progress = progress(0, axis.scrollLength, axis.current);\n const elapsed = time - prevTime;\n axis.velocity =\n elapsed > maxElapsed\n ? 0\n : velocityPerSecond(axis.current - prev, elapsed);\n}\nexport function updateScrollInfo(element, info, time) {\n updateAxisInfo(element, \"x\", info, time);\n updateAxisInfo(element, \"y\", info, time);\n info.time = time;\n}\n//# sourceMappingURL=info.js.map","/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","export const namedEdges = {\n start: 0,\n center: 0.5,\n end: 1,\n};\nexport function resolveEdge(edge, length, inset = 0) {\n let delta = 0;\n /**\n * If we have this edge defined as a preset, replace the definition\n * with the numerical value.\n */\n if (edge in namedEdges) {\n edge = namedEdges[edge];\n }\n /**\n * Handle unit values\n */\n if (typeof edge === \"string\") {\n const asNumber = parseFloat(edge);\n if (edge.endsWith(\"px\")) {\n delta = asNumber;\n }\n else if (edge.endsWith(\"%\")) {\n edge = asNumber / 100;\n }\n else if (edge.endsWith(\"vw\")) {\n delta = (asNumber / 100) * document.documentElement.clientWidth;\n }\n else if (edge.endsWith(\"vh\")) {\n delta = (asNumber / 100) * document.documentElement.clientHeight;\n }\n else {\n edge = asNumber;\n }\n }\n /**\n * If the edge is defined as a number, handle as a progress value.\n */\n if (typeof edge === \"number\") {\n delta = length * edge;\n }\n return inset + delta;\n}\n//# sourceMappingURL=edge.js.map","import { namedEdges, resolveEdge } from \"./edge\";\nconst defaultOffset = [0, 0];\nexport function resolveOffset(offset, containerLength, targetLength, targetInset) {\n let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset;\n let targetPoint = 0;\n let containerPoint = 0;\n if (typeof offset === \"number\") {\n /**\n * If we're provided offset: [0, 0.5, 1] then each number x should become\n * [x, x], so we default to the behaviour of mapping 0 => 0 of both target\n * and container etc.\n */\n offsetDefinition = [offset, offset];\n }\n else if (typeof offset === \"string\") {\n offset = offset.trim();\n if (offset.includes(\" \")) {\n offsetDefinition = offset.split(\" \");\n }\n else {\n /**\n * If we're provided a definition like \"100px\" then we want to apply\n * that only to the top of the target point, leaving the container at 0.\n * Whereas a named offset like \"end\" should be applied to both.\n */\n offsetDefinition = [offset, namedEdges[offset] ? offset : `0`];\n }\n }\n targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset);\n containerPoint = resolveEdge(offsetDefinition[1], containerLength);\n return targetPoint - containerPoint;\n}\n//# sourceMappingURL=offset.js.map","export const ScrollOffset = {\n Enter: [\n [0, 1],\n [1, 1],\n ],\n Exit: [\n [0, 0],\n [1, 0],\n ],\n Any: [\n [1, 0],\n [0, 1],\n ],\n All: [\n [0, 0],\n [1, 1],\n ],\n};\n//# sourceMappingURL=presets.js.map","import { defaultOffset, interpolate } from \"motion-dom\";\nimport { clamp } from \"motion-utils\";\nimport { calcInset } from \"./inset\";\nimport { resolveOffset } from \"./offset\";\nimport { ScrollOffset } from \"./presets\";\nconst point = { x: 0, y: 0 };\nfunction getTargetSize(target) {\n return \"getBBox\" in target && target.tagName !== \"svg\"\n ? target.getBBox()\n : { width: target.clientWidth, height: target.clientHeight };\n}\nexport function resolveOffsets(container, info, options) {\n const { offset: offsetDefinition = ScrollOffset.All } = options;\n const { target = container, axis = \"y\" } = options;\n const lengthLabel = axis === \"y\" ? \"height\" : \"width\";\n const inset = target !== container ? calcInset(target, container) : point;\n /**\n * Measure the target and container. If they're the same thing then we\n * use the container's scrollWidth/Height as the target, from there\n * all other calculations can remain the same.\n */\n const targetSize = target === container\n ? { width: container.scrollWidth, height: container.scrollHeight }\n : getTargetSize(target);\n const containerSize = {\n width: container.clientWidth,\n height: container.clientHeight,\n };\n /**\n * Reset the length of the resolved offset array rather than creating a new one.\n * TODO: More reusable data structures for targetSize/containerSize would also be good.\n */\n info[axis].offset.length = 0;\n /**\n * Populate the offset array by resolving the user's offset definition into\n * a list of pixel scroll offets.\n */\n let hasChanged = !info[axis].interpolate;\n const numOffsets = offsetDefinition.length;\n for (let i = 0; i < numOffsets; i++) {\n const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]);\n if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) {\n hasChanged = true;\n }\n info[axis].offset[i] = offset;\n }\n /**\n * If the pixel scroll offsets have changed, create a new interpolator function\n * to map scroll value into a progress.\n */\n if (hasChanged) {\n info[axis].interpolate = interpolate(info[axis].offset, defaultOffset(offsetDefinition), { clamp: false });\n info[axis].interpolatorOffsets = [...info[axis].offset];\n }\n info[axis].progress = clamp(0, 1, info[axis].interpolate(info[axis].current));\n}\n//# sourceMappingURL=index.js.map","import { isHTMLElement } from \"motion-dom\";\nexport function calcInset(element, container) {\n const inset = { x: 0, y: 0 };\n let current = element;\n while (current && current !== container) {\n if (isHTMLElement(current)) {\n inset.x += current.offsetLeft;\n inset.y += current.offsetTop;\n current = current.offsetParent;\n }\n else if (current.tagName === \"svg\") {\n /**\n * This isn't an ideal approach to measuring the offset of <svg /> tags.\n * It would be preferable, given they behave like HTMLElements in most ways\n * to use offsetLeft/Top. But these don't exist on <svg />. Likewise we\n * can't use .getBBox() like most SVG elements as these provide the offset\n * relative to the SVG itself, which for <svg /> is usually 0x0.\n */\n const svgBoundingBox = current.getBoundingClientRect();\n current = current.parentElement;\n const parentBoundingBox = current.getBoundingClientRect();\n inset.x += svgBoundingBox.left - parentBoundingBox.left;\n inset.y += svgBoundingBox.top - parentBoundingBox.top;\n }\n else if (current instanceof SVGGraphicsElement) {\n const { x, y } = current.getBBox();\n inset.x += x;\n inset.y += y;\n let svg = null;\n let parent = current.parentNode;\n while (!svg) {\n if (parent.tagName === \"svg\") {\n svg = parent;\n }\n parent = current.parentNode;\n }\n current = svg;\n }\n else {\n break;\n }\n }\n return inset;\n}\n//# sourceMappingURL=inset.js.map","import { warnOnce } from \"motion-utils\";\nimport { updateScrollInfo } from \"./info\";\nimport { resolveOffsets } from \"./offsets/index\";\nfunction measure(container, target = container, info) {\n /**\n * Find inset of target within scrollable container\n */\n info.x.targetOffset = 0;\n info.y.targetOffset = 0;\n if (target !== container) {\n let node = target;\n while (node && node !== container) {\n info.x.targetOffset += node.offsetLeft;\n info.y.targetOffset += node.offsetTop;\n node = node.offsetParent;\n }\n }\n info.x.targetLength =\n target === container ? target.scrollWidth : target.clientWidth;\n info.y.targetLength =\n target === container ? target.scrollHeight : target.clientHeight;\n info.x.containerLength = container.clientWidth;\n info.y.containerLength = container.clientHeight;\n /**\n * In development mode ensure scroll containers aren't position: static as this makes\n * it difficult to measure their relative positions.\n */\n if (process.env.NODE_ENV !== \"production\") {\n if (container && target && target !== container) {\n warnOnce(getComputedStyle(container).position !== \"static\", \"Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.\");\n }\n }\n}\nexport function createOnScrollHandler(element, onScroll, info, options = {}) {\n return {\n measure: (time) => {\n measure(element, options.target, info);\n updateScrollInfo(element, info, time);\n if (options.offset || options.target) {\n resolveOffsets(element, info, options);\n }\n },\n notify: () => onScroll(info),\n };\n}\n//# sourceMappingURL=on-scroll-handler.js.map","import { cancelFrame, frame, frameData, resize } from \"motion-dom\";\nimport { noop } from \"motion-utils\";\nimport { createScrollInfo } from \"./info\";\nimport { createOnScrollHandler } from \"./on-scroll-handler\";\nconst scrollListeners = new WeakMap();\nconst resizeListeners = new WeakMap();\nconst onScrollHandlers = new WeakMap();\nconst getEventTarget = (element) => element === document.scrollingElement ? window : element;\nexport function scrollInfo(onScroll, { container = document.scrollingElement, ...options } = {}) {\n if (!container)\n return noop;\n let containerHandlers = onScrollHandlers.get(container);\n /**\n * Get the onScroll handlers for this container.\n * If one isn't found, create a new one.\n */\n if (!containerHandlers) {\n containerHandlers = new Set();\n onScrollHandlers.set(container, containerHandlers);\n }\n /**\n * Create a new onScroll handler for the provided callback.\n */\n const info = createScrollInfo();\n const containerHandler = createOnScrollHandler(container, onScroll, info, options);\n containerHandlers.add(containerHandler);\n /**\n * Check if there's a scroll event listener for this container.\n * If not, create one.\n */\n if (!scrollListeners.has(container)) {\n const measureAll = () => {\n for (const handler of containerHandlers) {\n handler.measure(frameData.timestamp);\n }\n frame.preUpdate(notifyAll);\n };\n const notifyAll = () => {\n for (const handler of containerHandlers) {\n handler.notify();\n }\n };\n const listener = () => frame.read(measureAll);\n scrollListeners.set(container, listener);\n const target = getEventTarget(container);\n window.addEventListener(\"resize\", listener, { passive: true });\n if (container !== document.documentElement) {\n resizeListeners.set(container, resize(container, listener));\n }\n target.addEventListener(\"scroll\", listener, { passive: true });\n listener();\n }\n const listener = scrollListeners.get(container);\n frame.read(listener, false, true);\n return () => {\n cancelFrame(listener);\n /**\n * Check if we even have any handlers for this container.\n */\n const currentHandlers = onScrollHandlers.get(container);\n if (!currentHandlers)\n return;\n currentHandlers.delete(containerHandler);\n if (currentHandlers.size)\n return;\n /**\n * If no more handlers, remove the scroll listener too.\n */\n const scrollListener = scrollListeners.get(container);\n scrollListeners.delete(container);\n if (scrollListener) {\n getEventTarget(container).removeEventListener(\"scroll\", scrollListener);\n resizeListeners.get(container)?.();\n window.removeEventListener(\"resize\", scrollListener);\n }\n };\n}\n//# sourceMappingURL=track.js.map","import { resizeElement } from './handle-element.mjs';\nimport { resizeWindow } from './handle-window.mjs';\n\nfunction resize(a, b) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b);\n}\n\nexport { resize };\n","import { supportsScrollTimeline } from \"motion-dom\";\nimport { scrollInfo } from \"../track\";\nconst timelineCache = new Map();\nfunction scrollTimelineFallback(options) {\n const currentTime = { value: 0 };\n const cancel = scrollInfo((info) => {\n currentTime.value = info[options.axis].progress * 100;\n }, options);\n return { currentTime, cancel };\n}\nexport function getTimeline({ source, container, ...options }) {\n const { axis } = options;\n if (source)\n container = source;\n const containerCache = timelineCache.get(container) ?? new Map();\n timelineCache.set(container, containerCache);\n const targetKey = options.target ?? \"self\";\n const targetCache = containerCache.get(targetKey) ?? {};\n const axisKey = axis + (options.offset ?? []).join(\",\");\n if (!targetCache[axisKey]) {\n targetCache[axisKey] =\n !options.target && supportsScrollTimeline()\n ? new ScrollTimeline({ source: container, axis })\n : scrollTimelineFallback({ container, ...options });\n }\n return targetCache[axisKey];\n}\n//# sourceMappingURL=get-timeline.js.map","import { noop } from \"motion-utils\";\nimport { attachToAnimation } from \"./attach-animation\";\nimport { attachToFunction } from \"./attach-function\";\nexport function scroll(onScroll, { axis = \"y\", container = document.scrollingElement, ...options } = {}) {\n if (!container)\n return noop;\n const optionsWithDefaults = { axis, container, ...options };\n return typeof onScroll === \"function\"\n ? attachToFunction(onScroll, optionsWithDefaults)\n : attachToAnimation(onScroll, optionsWithDefaults);\n}\n//# sourceMappingURL=index.js.map","import { observeTimeline } from \"motion-dom\";\nimport { scrollInfo } from \"./track\";\nimport { getTimeline } from \"./utils/get-timeline\";\n/**\n * If the onScroll function has two arguments, it's expecting\n * more specific information about the scroll from scrollInfo.\n */\nfunction isOnScrollWithInfo(onScroll) {\n return onScroll.length === 2;\n}\nexport function attachToFunction(onScroll, options) {\n if (isOnScrollWithInfo(onScroll)) {\n return scrollInfo((info) => {\n onScroll(info[options.axis].progress, info);\n }, options);\n }\n else {\n return observeTimeline(onScroll, getTimeline(options));\n }\n}\n//# sourceMappingURL=attach-function.js.map","import { observeTimeline } from \"motion-dom\";\nimport { getTimeline } from \"./utils/get-timeline\";\nexport function attachToAnimation(animation, options) {\n const timeline = getTimeline(options);\n return animation.attachTimeline({\n timeline: options.target ? undefined : timeline,\n observe: (valueAnimation) => {\n valueAnimation.pause();\n return observeTimeline((progress) => {\n valueAnimation.time =\n valueAnimation.iterationDuration * progress;\n }, timeline);\n },\n });\n}\n//# sourceMappingURL=attach-animation.js.map"],"names":["clamp","min","max","v","formatErrorMessage","message","errorCode","warning","invariant","process","env","NODE_ENV","check","console","warn","Error","MotionGlobalConfig","isObject","value","memo","callback","result","undefined","noop","any","combineFunctions","a","b","pipe","transformers","reduce","progress","from","to","toFromDifference","stepsOrder","statsBuffer","addProjectionMetrics","createRenderBatcher","scheduleNextBatch","allowKeepAlive","runNextFrame","useDefaultElapsed","state","delta","timestamp","isProcessing","flagRunNextFrame","steps","acc","key","stepName","thisFrame","Set","nextFrame","flushNextFrame","toKeepAlive","WeakSet","latestFrameData","numCalls","triggerCallback","has","step","schedule","keepAlive","immediate","queue","add","cancel","delete","frameData","forEach","frameloop","push","clear","createRenderStep","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","useManualTiming","performance","now","Math","i","length","frame","cancelFrame","frameSteps","requestAnimationFrame","startsAsVariableToken","token","startsWith","checkStringStartsWith","singleCssVariableRegex","number","test","parse","parseFloat","transform","alpha","sanitize","round","floatRegex","singleColorRegex","isColorString","type","testProp","Boolean","isNullish","Object","prototype","hasOwnProperty","call","splitColor","aName","bName","cName","c","match","rgbUnit","clampRgbUnit","rgba","red","green","blue","alpha$1","hex","r","g","substring","parseInt","percent","unit","endsWith","split","createUnitType","hsla","hue","saturation","lightness","color","getAnimatableNone","parsed","colorRegex","NUMBER_TOKEN","COLOR_TOKEN","complexRegex","analyseComplexValue","originalValue","toString","values","indexes","var","types","replace","parsedValue","parseComplexValue","createTransformer","source","numSections","output","convertNumbersToZero","complex","isNaN","transformer","map","hueToRgb","p","q","t","mixImmediate","mixNumber","mixLinearColor","fromExpo","expo","sqrt","colorTypes","asRGBA","find","model","hslaToRgba","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixNumber$1","getMixer","trim","mixComplex","Array","isArray","mixArray","mixObject","numValues","blendValue","origin","target","template","originStats","targetStats","mixVisibility","orderedOrigin","pointers","originIndex","originValue","matchOrder","mix","mixer","interpolate","input","isClamp","ease","inputLength","isZeroDeltaRange","reverse","mixers","customMixer","mixerFactory","numMixers","easingFunction","createMixers","interpolator","progressInRange","defaultOffset","arr","offset","remaining","offsetProgress","fillOffset","supportsScrollTimeline","window","ScrollTimeline","isHTMLElement","element","resizeHandlers","WeakMap","observer","getSize","borderBoxAxis","svgAxis","htmlAxis","borderBoxSize","getBBox","getWidth","getHeight","notifyTarget","get","handler","width","height","notifyAll","entries","resizeElement","ResizeObserver","elements","elementOrSelector","EventTarget","document","querySelectorAll","resolveElements","elementHandlers","set","observe","size","unobserve","windowCallbacks","windowResizeHandler","resizeWindow","info","innerWidth","innerHeight","addEventListener","removeEventListener","observeTimeline","timeline","prevProgress","onFrame","currentTime","keys","x","position","y","updateAxisInfo","axisName","time","axis","prev","current","prevTime","scrollLength","elapsed","velocity","frameDuration","namedEdges","start","center","end","resolveEdge","edge","inset","asNumber","documentElement","clientWidth","clientHeight","resolveOffset","containerLength","targetLength","targetInset","offsetDefinition","targetPoint","containerPoint","includes","ScrollOffset","Enter","Exit","Any","All","point","resolveOffsets","container","options","lengthLabel","offsetLeft","offsetTop","offsetParent","tagName","svgBoundingBox","getBoundingClientRect","parentElement","parentBoundingBox","left","top","SVGGraphicsElement","svg","parent","parentNode","calcInset","targetSize","scrollWidth","scrollHeight","getTargetSize","containerSize","hasChanged","numOffsets","interpolatorOffsets","createOnScrollHandler","onScroll","measure","targetOffset","node","updateScrollInfo","notify","scrollListeners","resizeListeners","onScrollHandlers","getEventTarget","scrollingElement","scrollInfo","containerHandlers","containerHandler","measureAll","listener","passive","currentHandlers","scrollListener","timelineCache","Map","getTimeline","containerCache","targetKey","targetCache","axisKey","join","scrollTimelineFallback","scroll","optionsWithDefaults","isOnScrollWithInfo","attachToFunction","animation","attachTimeline","valueAnimation","pause","iterationDuration","attachToAnimation"],"mappings":"AAAA,MAAMA,EAAQ,CAACC,EAAKC,EAAKC,IACjBA,EAAID,EACGA,EACPC,EAAIF,EACGA,EACJE,ECLX,SAASC,EAAmBC,EAASC,GACjC,OAAOA,EACD,GAAGD,2FAAiGC,IACpGD,CACV,CCFA,IAAIE,EAAU,OACVC,EAAY,OACO,oBAAZC,SACmB,eAA1BA,QAAQC,KAAKC,WACbJ,EAAU,CAACK,EAAOP,EAASC,KAClBM,GAA4B,oBAAZC,SACjBA,QAAQC,KAAKV,EAAmBC,EAASC,KAGjDE,EAAY,CAACI,EAAOP,EAASC,KACzB,IAAKM,EACD,MAAM,IAAIG,MAAMX,EAAmBC,EAASC,MCbxD,MAAMU,EAAqB,CAAE,ECA7B,SAASC,EAASC,GACd,MAAwB,iBAAVA,GAAgC,OAAVA,CACxC,CCDA,SAASC,EAAKC,GACV,IAAIC,EACJ,MAAO,UACYC,IAAXD,IACAA,EAASD,KACNC,EAEf,CCPA,MAAME,EAAQC,GAAQA,ECMhBC,EAAmB,CAACC,EAAGC,IAAOxB,GAAMwB,EAAED,EAAEvB,IACxC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AckBwT,CAAuB,CAAEtD,eAAcC,KAE9CkD,EAAYC,EACvB,CCvBO,SAASG,GAAO5B,GAAU7D,KAAEA,EAAO,IAAGkC,UAAEA,EAAY9D,SAASmG,oBAAqBpC,GAAY,IACjG,IAAKD,EACD,OAAO/S,EACX,MAAMuW,EAAsB,CAAE1F,OAAMkC,eAAcC,GAClD,MAA2B,mBAAb0B,ECGX,SAA0BA,EAAU1B,GACvC,OAJJ,SAA4B0B,GACxB,OAA2B,IAApBA,EAASvQ,MACpB,CAEQqS,CAAmB9B,GACZW,GAAYzF,IACf8E,EAAS9E,EAAKoD,EAAQnC,MAAMrQ,SAAUoP,IACvCoD,GAGI/C,GAAgByE,EAAUqB,GAAY/C,GAErD,CDXUyD,CAAiB/B,EAAU6B,GEN9B,SAA2BG,EAAW1D,GACzC,MAAM9C,EAAW6F,GAAY/C,GAC7B,OAAO0D,EAAUC,eAAe,CAC5BzG,SAAU8C,EAAQ5H,YAASrL,EAAYmQ,EACvCZ,QAAUsH,IACNA,EAAeC,QACR5G,GAAiBzP,IACpBoW,EAAehG,KACXgG,EAAeE,kBAAoBtW,GACxC0P,KAGf,CFLU6G,CAAkBrC,EAAU6B,EACtC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let t=()=>{};function e(t){let e;return()=>(void 0===e&&(e=t()),e)}"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t=(t,e,i)=>{if(!t)throw new Error(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,i))});const i=t=>t,n=t=>1e3*t,s=t=>t/1e3,o=t=>null!==t;class a{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}function r(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const l=t=>t.startsWith("--");const u=e(()=>void 0!==window.ScrollTimeline),h={};function d(t,i){const n=e(t);return()=>h[i]??n()}const m=d(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),c=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,p={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:c([0,.65,.55,1]),circOut:c([.55,0,1,.45]),backIn:c([.31,.01,.66,-.59]),backOut:c([.33,1.53,.69,.99])};function f(t,e){return t?"function"==typeof t?m()?((t,e,i=10)=>{let n="";const s=Math.max(Math.round(e/i),2);for(let e=0;e<s;e++)n+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`})(t,e):"ease-out":(t=>Array.isArray(t)&&"number"==typeof t[0])(t)?c(t):Array.isArray(t)?t.map(t=>f(t,e)||p.easeOut):p[t]:void 0}class g extends a{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:i,name:n,keyframes:s,pseudoElement:a,allowFlatten:r=!1,finalKeyframe:u,onComplete:h}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=r,this.options=e,t("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const d=function({type:t,...e}){return function(t){return"function"==typeof t&&"applyToOptions"in t}(t)&&m()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(e);this.animation=function(t,e,i,{delay:n=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:r="easeOut",times:l}={},u){const h={[e]:i};l&&(h.offset=l);const d=f(r,s);Array.isArray(d)&&(h.easing=d);const m={delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"};return u&&(m.pseudoElement=u),t.animate(h,m)}(i,n,s,d,a),!1===d.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const t=function(t,{repeat:e,repeatType:i="loop"},n,s=1){const a=t.filter(o),r=s<0||e&&"loop"!==i&&e%2==1?0:a.length-1;return r&&void 0!==n?n:a[r]}(s,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,i){l(e)?t.style.setProperty(e,i):t.style[e]=i}(i,n,t),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return s(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+s(t)}get time(){return s(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=n(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&u()?(this.animation.timeline=t,i):e(this)}}class y{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return T(this.animations,"duration")}get iterationDuration(){return T(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function T(t,e){let i=0;for(let n=0;n<t.length;n++){const s=t[n][e];null!==s&&s>i&&(i=s)}return i}class b extends y{then(t,e){return this.finished.finally(t).then(()=>{})}}const A=new WeakMap,v=(t,e="")=>`${t}:${e}`;function w(t){const e=A.get(t)||new Map;return A.set(t,e),e}function E(t,e){return t?.[e]??t?.default??t}const R=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);function S(t,e){for(let i=0;i<t.length;i++)"number"==typeof t[i]&&R.has(e)&&(t[i]=t[i]+"px")}function k(t,e){const i=window.getComputedStyle(t);return l(e)?i.getPropertyValue(e):i[e]}function F(e,i,s,o){const a=function(t,e){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const n=i.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t)}(e,o),l=a.length;t(Boolean(l),"No valid elements provided.","no-valid-elements");const u=[];for(let t=0;t<l;t++){const e=a[t],o={...s};"function"==typeof o.delay&&(o.delay=o.delay(t,l));for(const t in i){let s=i[t];Array.isArray(s)||(s=[s]);const a={...E(o,t)};a.duration&&(a.duration=n(a.duration)),a.delay&&(a.delay=n(a.delay));const r=w(e),l=v(t,a.pseudoElement||""),h=r.get(l);h&&h.stop(),u.push({map:r,key:l,unresolvedKeyframes:s,options:{...a,element:e,name:t,allowFlatten:!o.type&&!o.ease}})}}for(let t=0;t<u.length;t++){const{unresolvedKeyframes:e,options:i}=u[t],{element:n,name:s,pseudoElement:o}=i;o||null!==e[0]||(e[0]=k(n,s)),r(e),S(e,s),!o&&e.length<2&&e.unshift(k(n,s)),i.keyframes=e}const h=[];for(let t=0;t<u.length;t++){const{map:e,key:i,options:n}=u[t],s=new g(n);e.set(i,s),s.finished.finally(()=>e.delete(i)),h.push(s)}return h}const M=t=>function(e,i,n){return new b(F(e,i,n,t))},O=M();export{O as animateMini,M as createScopedWaapiAnimate};
|
|
2
|
+
//# sourceMappingURL=size-rollup-waapi-animate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size-rollup-waapi-animate.js","sources":["../../motion-utils/dist/es/errors.mjs","../../motion-utils/dist/es/memo.mjs","../../motion-utils/dist/es/format-error-message.mjs","../../motion-utils/dist/es/noop.mjs","../../motion-utils/dist/es/time-conversion.mjs","../../motion-dom/dist/es/animation/keyframes/get-final.mjs","../../motion-dom/dist/es/animation/utils/WithPromise.mjs","../../motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../../motion-dom/dist/es/render/dom/is-css-var.mjs","../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../motion-dom/dist/es/utils/supports/flags.mjs","../../motion-dom/dist/es/utils/supports/memo.mjs","../../motion-dom/dist/es/utils/supports/linear-easing.mjs","../../motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../../motion-dom/dist/es/animation/waapi/easing/supported.mjs","../../motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../../motion-dom/dist/es/animation/waapi/utils/linear.mjs","../../motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../../motion-dom/dist/es/animation/NativeAnimation.mjs","../../motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../../motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../../motion-dom/dist/es/render/dom/style-set.mjs","../../motion-dom/dist/es/animation/GroupAnimation.mjs","../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs","../../motion-dom/dist/es/animation/utils/active-animations.mjs","../../motion-dom/dist/es/animation/utils/get-value-transition.mjs","../../motion-dom/dist/es/animation/waapi/utils/px-values.mjs","../../motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs","../../motion-dom/dist/es/render/dom/style-computed.mjs","../lib/animation/animators/waapi/animate-elements.js","../../motion-dom/dist/es/utils/resolve-elements.mjs","../lib/animation/animators/waapi/animate-style.js"],"sourcesContent":["import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","function formatErrorMessage(message, errorCode) {\n return errorCode\n ? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`\n : message;\n}\n\nexport { formatErrorMessage };\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n","class WithPromise {\n constructor() {\n this.updateFinished();\n }\n get finished() {\n return this._finished;\n }\n updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve;\n });\n }\n notifyFinished() {\n this.resolve();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n","import { memo } from 'motion-utils';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memo(() => window.ScrollTimeline !== undefined);\n\nexport { supportsScrollTimeline };\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","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\", `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 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 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 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 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","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n","import { activeAnimations } from '../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n if (statsBuffer.value) {\n activeAnimations.waapi++;\n }\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n const animation = element.animate(keyframeOptions, options);\n if (statsBuffer.value) {\n animation.finished.finally(() => {\n activeAnimations.waapi--;\n });\n }\n return animation;\n}\n\nexport { startWaapiAnimation };\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n","class GroupAnimation {\n constructor(animations) {\n // Bound to accomadate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline) {\n const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get state() {\n return this.getAll(\"state\");\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n return getMax(this.animations, \"duration\");\n }\n get iterationDuration() {\n return getMax(this.animations, \"iterationDuration\");\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\nfunction getMax(animations, propName) {\n let max = 0;\n for (let i = 0; i < animations.length; i++) {\n const value = animations[i][propName];\n if (value !== null && value > max) {\n max = value;\n }\n }\n return max;\n}\n\nexport { GroupAnimation };\n","import { GroupAnimation } from './GroupAnimation.mjs';\n\nclass GroupAnimationWithThen extends GroupAnimation {\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n}\n\nexport { GroupAnimationWithThen };\n","const animationMaps = new WeakMap();\nconst animationMapKey = (name, pseudoElement = \"\") => `${name}:${pseudoElement}`;\nfunction getAnimationMap(element) {\n const map = animationMaps.get(element) || new Map();\n animationMaps.set(element, map);\n return map;\n}\n\nexport { animationMapKey, getAnimationMap };\n","function getValueTransition(transition, key) {\n return (transition?.[key] ??\n transition?.[\"default\"] ??\n transition);\n}\n\nexport { getValueTransition };\n","const pxValues = new Set([\n // Border props\n \"borderWidth\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderRadius\",\n \"radius\",\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\",\n // Positioning props\n \"width\",\n \"maxWidth\",\n \"height\",\n \"maxHeight\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n // Spacing props\n \"padding\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n // Misc\n \"backgroundPositionX\",\n \"backgroundPositionY\",\n]);\n\nexport { pxValues };\n","import { pxValues } from '../../waapi/utils/px-values.mjs';\n\nfunction applyPxDefaults(keyframes, name) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"number\" && pxValues.has(name)) {\n keyframes[i] = keyframes[i] + \"px\";\n }\n }\n}\n\nexport { applyPxDefaults };\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction getComputedStyle(element, name) {\n const computedStyle = window.getComputedStyle(element);\n return isCSSVar(name)\n ? computedStyle.getPropertyValue(name)\n : computedStyle[name];\n}\n\nexport { getComputedStyle };\n","import { animationMapKey, applyPxDefaults, fillWildcards, getAnimationMap, getComputedStyle, getValueTransition, NativeAnimation, resolveElements, } from \"motion-dom\";\nimport { invariant, secondsToMilliseconds } from \"motion-utils\";\nexport function animateElements(elementOrSelector, keyframes, options, scope) {\n const elements = resolveElements(elementOrSelector, scope);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid elements provided.\", \"no-valid-elements\");\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions = [];\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n const elementTransition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements);\n }\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName];\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes];\n }\n const valueOptions = {\n ...getValueTransition(elementTransition, valueName),\n };\n valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration));\n valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay));\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element);\n const key = animationMapKey(valueName, valueOptions.pseudoElement || \"\");\n const currentAnimation = map.get(key);\n currentAnimation && currentAnimation.stop();\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten: !elementTransition.type && !elementTransition.ease,\n },\n });\n }\n }\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];\n const { element, name, pseudoElement } = animationOptions;\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name);\n }\n fillWildcards(unresolvedKeyframes);\n applyPxDefaults(unresolvedKeyframes, name);\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name));\n }\n animationOptions.keyframes = unresolvedKeyframes;\n }\n /**\n * Step 3: Create new animations (write)\n */\n const animations = [];\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i];\n const animation = new NativeAnimation(animationOptions);\n map.set(key, animation);\n animation.finished.finally(() => map.delete(key));\n animations.push(animation);\n }\n return animations;\n}\n//# sourceMappingURL=animate-elements.js.map","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector);\n}\n\nexport { resolveElements };\n","import { GroupAnimationWithThen, } from \"motion-dom\";\nimport { animateElements } from \"./animate-elements\";\nexport const createScopedWaapiAnimate = (scope) => {\n function scopedAnimate(elementOrSelector, keyframes, options) {\n return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));\n }\n return scopedAnimate;\n};\nexport const animateMini = /*@__PURE__*/ createScopedWaapiAnimate();\n//# sourceMappingURL=animate-style.js.map"],"names":["invariant","memo","callback","result","undefined","process","env","NODE_ENV","check","message","errorCode","Error","formatErrorMessage","noop","any","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","isNotNull","value","WithPromise","constructor","this","updateFinished","finished","_finished","Promise","resolve","notifyFinished","then","onResolve","onReject","fillWildcards","keyframes","i","length","isCSSVar","name","startsWith","supportsScrollTimeline","window","ScrollTimeline","supportsFlags","memoSupports","supportsFlag","memoized","supportsLinearEasing","document","createElement","animate","opacity","easing","e","cubicBezierAsString","a","b","c","d","supportedWaapiEasing","linear","ease","easeIn","easeOut","easeInOut","circIn","circOut","backIn","backOut","mapEasingToNativeEasing","duration","resolution","points","numPoints","Math","max","round","substring","generateLinearEasing","Array","isArray","isBezierDefinition","map","segmentEasing","NativeAnimation","options","super","finishedTime","isStopped","element","pseudoElement","allowFlatten","finalKeyframe","onComplete","isPseudoElement","Boolean","type","transition","isGenerator","applyToOptions","applyGeneratorOptions","animation","valueName","delay","repeat","repeatType","times","keyframeOptions","offset","fill","iterations","direction","startWaapiAnimation","autoplay","pause","onfinish","time","keyframe","speed","resolvedKeyframes","filter","index","getFinalKeyframe","updateMotionValue","style","setProperty","setStyle","cancel","play","state","complete","finish","stop","commitStyles","effect","getComputedTiming","Number","iterationDuration","currentTime","newTime","playbackRate","newSpeed","playState","startTime","newStartTime","attachTimeline","timeline","observe","updateTiming","GroupAnimation","animations","runAll","all","getAll","propName","setAll","newValue","subscriptions","forEach","getMax","methodName","controls","GroupAnimationWithThen","_onReject","finally","animationMaps","WeakMap","animationMapKey","getAnimationMap","get","Map","set","getValueTransition","key","pxValues","Set","applyPxDefaults","has","getComputedStyle","computedStyle","getPropertyValue","animateElements","elementOrSelector","scope","elements","EventTarget","root","current","querySelectorAll","from","resolveElements","numElements","animationDefinitions","elementTransition","valueKeyframes","valueOptions","currentAnimation","push","unresolvedKeyframes","animationOptions","unshift","delete","createScopedWaapiAnimate","animateMini"],"mappings":"AAGA,IAAIA,EAAY,OCFhB,SAASC,EAAKC,GACV,IAAIC,EACJ,MAAO,UACYC,IAAXD,IACAA,EAASD,KACNC,EAEf,CDJuB,oBAAZE,SACmB,eAA1BA,QAAQC,KAAKC,WAMbP,EAAY,CAACQ,EAAOC,EAASC,KACzB,IAAKF,EACD,MAAM,IAAIG,MEbtB,SAA4BF,EAASC,GACjC,OAAOA,EACD,GAAGD,2FAAiGC,IACpGD,CACV,CFS4BG,CAAmBH,EAASC,MGZxD,MAAMG,EAAQC,GAAQA,ECMhBC,EAAyBC,GAAsB,IAAVA,EAErCC,EAAyBC,GAAiBA,EAAe,ICTzDC,EAAaC,GAAoB,OAAVA,ECA7B,MAAMC,EACF,WAAAC,GACIC,KAAKC,gBACR,CACD,YAAIC,GACA,OAAOF,KAAKG,SACf,CACD,cAAAF,GACID,KAAKG,UAAY,IAAIC,QAASC,IAC1BL,KAAKK,QAAUA,GAEtB,CACD,cAAAC,GACIN,KAAKK,SACR,CAMD,IAAAE,CAAKC,EAAWC,GACZ,OAA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AI,EAAGA,EAAI6J,EAAqB5J,OAAQD,IAAK,CAClD,MAAMmK,oBAAEA,EAAqBjH,QAASkH,GAAqBP,EAAqB7J,IAC1EsD,QAAEA,EAAOnD,KAAEA,EAAIoD,cAAEA,GAAkB6G,EACpC7G,GAA4C,OAA3B4G,EAAoB,KACtCA,EAAoB,GAAKpB,EAAiBzF,EAASnD,IAEvDL,EAAcqK,GACdtB,EAAgBsB,EAAqBhK,IAOhCoD,GAAiB4G,EAAoBlK,OAAS,GAC/CkK,EAAoBE,QAAQtB,EAAiBzF,EAASnD,IAE1DiK,EAAiBrK,UAAYoK,CAChC,CAID,MAAMhD,EAAa,GACnB,IAAK,IAAInH,EAAI,EAAGA,EAAI6J,EAAqB5J,OAAQD,IAAK,CAClD,MAAM+C,IAAEA,EAAG2F,IAAEA,EAAKxF,QAASkH,GAAqBP,EAAqB7J,GAC/DkE,EAAY,IAAIjB,EAAgBmH,GACtCrH,EAAIyF,IAAIE,EAAKxE,GACbA,EAAU5E,SAAS2I,QAAQ,IAAMlF,EAAIuH,OAAO5B,IAC5CvB,EAAW+C,KAAKhG,EACnB,CACD,OAAOiD,CACX,CEnGY,MAACoD,EAA4BnB,GACrC,SAAuBD,EAAmBpJ,EAAWmD,GACjD,OAAO,IAAI6E,EAAuBmB,EAAgBC,EAAmBpJ,EAAWmD,EAASkG,GAC5F,EAGQoB,EAA4BD"}
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as ForwardRefComponent, c as HTMLMotionProps, n as SVGMotionProps } from '../types.d-
|
|
1
|
+
import { F as ForwardRefComponent, c as HTMLMotionProps, n as SVGMotionProps } from '../types.d-C8SDx5n-.js';
|
|
2
2
|
import 'motion-dom';
|
|
3
3
|
import 'motion-utils';
|
|
4
4
|
import 'react';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export * from 'motion-dom';
|
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { useEffect, RefObject } from 'react';
|
|
8
|
-
import { V as VariantLabels, a as VisualElement, M as MotionProps, C as CreateVisualElement, b as MotionConfigContext, H as HTMLElements, c as HTMLMotionProps, D as DOMMotionComponents, d as HTMLMotionComponents, S as SVGMotionComponents, e as VisualElementAnimationOptions, I as IProjectionNode, R as ResolvedValues, f as HTMLRenderState } from '../types.d-
|
|
9
|
-
export { A as AnimationType, p as FlatTree, F as ForwardRefComponent, j as MotionStyle, k as MotionTransform, P as PresenceContext, l as SVGAttributesAsMotionValues, n as SVGMotionProps, g as ScrapeMotionValuesFromProps, i as SwitchLayoutGroupContext, h as VisualState, m as makeUseVisualState, o as optimizedAppearDataAttribute } from '../types.d-
|
|
8
|
+
import { V as VariantLabels, a as VisualElement, M as MotionProps, C as CreateVisualElement, b as MotionConfigContext, H as HTMLElements, c as HTMLMotionProps, D as DOMMotionComponents, d as HTMLMotionComponents, S as SVGMotionComponents, e as VisualElementAnimationOptions, I as IProjectionNode, R as ResolvedValues, f as HTMLRenderState } from '../types.d-C8SDx5n-.js';
|
|
9
|
+
export { A as AnimationType, p as FlatTree, F as ForwardRefComponent, j as MotionStyle, k as MotionTransform, P as PresenceContext, l as SVGAttributesAsMotionValues, n as SVGMotionProps, g as ScrapeMotionValuesFromProps, i as SwitchLayoutGroupContext, h as VisualState, m as makeUseVisualState, o as optimizedAppearDataAttribute } from '../types.d-C8SDx5n-.js';
|
|
10
10
|
import { Easing, EasingFunction, Point, Axis, Box } from 'motion-utils';
|
|
11
11
|
export * from 'motion-utils';
|
|
12
12
|
export { MotionGlobalConfig } from 'motion-utils';
|
|
@@ -21,7 +21,7 @@ type MakeMotionHelper<T> = {
|
|
|
21
21
|
};
|
|
22
22
|
type MakeCustomValueTypeHelper<T> = MakeMotionHelper<T>;
|
|
23
23
|
type MakeMotion<T> = MakeCustomValueTypeHelper<T>;
|
|
24
|
-
type MotionCSS = MakeMotion<Omit<CSSProperties, "rotate" | "scale" | "perspective">>;
|
|
24
|
+
type MotionCSS = MakeMotion<Omit<CSSProperties, "rotate" | "scale" | "perspective" | "x" | "y" | "z">>;
|
|
25
25
|
/**
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framer-motion",
|
|
3
|
-
"version": "12.23.
|
|
3
|
+
"version": "12.23.28",
|
|
4
4
|
"description": "A simple and powerful JavaScript animation library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.mjs",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"measure": "rollup -c ./rollup.size.config.mjs"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"motion-dom": "^12.23.
|
|
91
|
-
"motion-utils": "^12.23.
|
|
90
|
+
"motion-dom": "^12.23.28",
|
|
91
|
+
"motion-utils": "^12.23.28",
|
|
92
92
|
"tslib": "^2.4.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"maxSize": "2.26 kB"
|
|
143
143
|
}
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "c003679de6cbda9333f712d6c0106f6ca6645217"
|
|
146
146
|
}
|