motion-v 0.9.0 → 0.10.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +172 -132
- package/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/animation/hooks/use-animate.mjs +1 -1
- package/dist/es/components/animate-presence/AnimatePresence.vue.mjs +1 -1
- package/dist/es/components/motion/Motion.vue.mjs +3 -2
- package/dist/es/components/reorder/utils.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +14 -11
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +8 -8
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +4 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -2
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +6 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +5 -5
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/utils/map.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/batcher.mjs +6 -18
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/frame.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/index-legacy.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/frameloop/order.mjs +17 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/render-step.mjs +8 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +22 -35
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +14 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/VisualElement.mjs +6 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/render/svg/utils/measure.mjs +15 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/stats/buffer.mjs +7 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/delay.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/interpolate.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/offsets/fill.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/hover.mjs +11 -11
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/supports/memo.mjs +2 -2
- package/dist/es/external/.pnpm/motion-dom@12.0.0/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +6 -0
- package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.0.0}/external/motion-utils/dist/es/memo.mjs +1 -0
- package/dist/es/external/.pnpm/motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.0.0}/external/motion-utils/dist/es/progress.mjs +1 -1
- package/dist/es/external/.pnpm/motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs +6 -0
- package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +2 -2
- package/dist/es/features/gestures/drag/index.mjs +4 -3
- package/dist/es/features/gestures/focus/index.mjs +1 -1
- package/dist/es/features/gestures/hover/index.mjs +4 -4
- package/dist/es/features/gestures/in-view/index.mjs +3 -3
- package/dist/es/features/gestures/pan/PanSession.mjs +3 -3
- package/dist/es/features/gestures/pan/index.mjs +3 -3
- package/dist/es/features/gestures/press/index.mjs +4 -4
- package/dist/es/features/layout/config.mjs +2 -2
- package/dist/es/features/layout/layout.mjs +6 -5
- package/dist/es/features/layout/projection.mjs +2 -2
- package/dist/es/features/svg.mjs +1 -1
- package/dist/es/index.mjs +37 -33
- package/dist/es/state/animate-updates.mjs +3 -3
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +2 -2
- package/dist/es/utils/use-animation-frame.mjs +1 -1
- package/dist/es/utils/use-in-view.mjs +1 -1
- package/dist/es/value/use-combine-values.mjs +2 -2
- package/dist/es/value/use-computed.mjs +1 -1
- package/dist/es/value/use-scroll.mjs +2 -2
- package/dist/es/value/use-spring.mjs +3 -3
- package/dist/es/value/use-time.mjs +1 -1
- package/dist/es/value/use-transform.mjs +1 -1
- package/dist/es/value/use-velocity.mjs +2 -2
- package/package.json +3 -4
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -6
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -8
- package/dist/es/external/.pnpm/motion-dom@11.16.4/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +0 -6
- package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/noop.mjs +0 -4
- package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/time-conversion.mjs +0 -6
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/back.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/keys-position.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/keys-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +1 -1
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/setters.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/warn-once.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/resolve-elements.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.0.0}/external/motion-utils/dist/es/errors.mjs +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const core = require("@vueuse/core");
|
|
5
5
|
const heyListen = require("hey-listen");
|
|
6
|
-
const noop = (any) => any;
|
|
6
|
+
const noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
|
|
7
7
|
let warning = noop;
|
|
8
8
|
exports.invariant = noop;
|
|
9
9
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -18,6 +18,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
+
// @__NO_SIDE_EFFECTS__
|
|
21
22
|
function memo(callback) {
|
|
22
23
|
let result;
|
|
23
24
|
return () => {
|
|
@@ -26,13 +27,13 @@ function memo(callback) {
|
|
|
26
27
|
return result;
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
const progress$1 = (from, to, value) => {
|
|
30
|
+
const progress$1 = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
30
31
|
const toFromDifference = to - from;
|
|
31
32
|
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
|
|
32
33
|
};
|
|
33
|
-
const secondsToMilliseconds$1 = (seconds) => seconds * 1e3;
|
|
34
|
-
const millisecondsToSeconds$1 = (milliseconds) => milliseconds / 1e3;
|
|
35
|
-
const supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
34
|
+
const secondsToMilliseconds$1 = /* @__NO_SIDE_EFFECTS__ */ (seconds) => seconds * 1e3;
|
|
35
|
+
const millisecondsToSeconds$1 = /* @__NO_SIDE_EFFECTS__ */ (milliseconds) => milliseconds / 1e3;
|
|
36
|
+
const supportsScrollTimeline = /* @__PURE__ */ memo(() => window.ScrollTimeline !== void 0);
|
|
36
37
|
class BaseGroupPlaybackControls {
|
|
37
38
|
constructor(animations) {
|
|
38
39
|
this.stop = () => this.runAll("stop");
|
|
@@ -135,7 +136,7 @@ function createGeneratorEasing(options, scale2 = 100, createGenerator) {
|
|
|
135
136
|
ease: (progress2) => {
|
|
136
137
|
return generator.next(duration * progress2).value / scale2;
|
|
137
138
|
},
|
|
138
|
-
duration: millisecondsToSeconds$1(duration)
|
|
139
|
+
duration: /* @__PURE__ */ millisecondsToSeconds$1(duration)
|
|
139
140
|
};
|
|
140
141
|
}
|
|
141
142
|
function isGenerator(type) {
|
|
@@ -152,18 +153,18 @@ class NativeAnimationControls {
|
|
|
152
153
|
get duration() {
|
|
153
154
|
var _a, _b, _c;
|
|
154
155
|
const durationInMs = ((_b = (_a = this.animation) === null || _a === void 0 ? void 0 : _a.effect) === null || _b === void 0 ? void 0 : _b.getComputedTiming().duration) || ((_c = this.options) === null || _c === void 0 ? void 0 : _c.duration) || 300;
|
|
155
|
-
return millisecondsToSeconds$1(Number(durationInMs));
|
|
156
|
+
return /* @__PURE__ */ millisecondsToSeconds$1(Number(durationInMs));
|
|
156
157
|
}
|
|
157
158
|
get time() {
|
|
158
159
|
var _a;
|
|
159
160
|
if (this.animation) {
|
|
160
|
-
return millisecondsToSeconds$1(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
|
|
161
|
+
return /* @__PURE__ */ millisecondsToSeconds$1(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
|
|
161
162
|
}
|
|
162
163
|
return 0;
|
|
163
164
|
}
|
|
164
165
|
set time(newTime) {
|
|
165
166
|
if (this.animation) {
|
|
166
|
-
this.animation.currentTime = secondsToMilliseconds$1(newTime);
|
|
167
|
+
this.animation.currentTime = /* @__PURE__ */ secondsToMilliseconds$1(newTime);
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
get speed() {
|
|
@@ -224,7 +225,7 @@ const supportsFlags = {
|
|
|
224
225
|
linearEasing: void 0
|
|
225
226
|
};
|
|
226
227
|
function memoSupports(callback, supportsFlag) {
|
|
227
|
-
const memoized = memo(callback);
|
|
228
|
+
const memoized = /* @__PURE__ */ memo(callback);
|
|
228
229
|
return () => {
|
|
229
230
|
var _a;
|
|
230
231
|
return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized();
|
|
@@ -242,7 +243,7 @@ const generateLinearEasing = (easing, duration, resolution = 10) => {
|
|
|
242
243
|
let points = "";
|
|
243
244
|
const numPoints = Math.max(Math.round(duration / resolution), 2);
|
|
244
245
|
for (let i = 0; i < numPoints; i++) {
|
|
245
|
-
points += easing(progress$1(0, numPoints - 1, i)) + ", ";
|
|
246
|
+
points += easing(/* @__PURE__ */ progress$1(0, numPoints - 1, i)) + ", ";
|
|
246
247
|
}
|
|
247
248
|
return `linear(${points.substring(0, points.length - 2)})`;
|
|
248
249
|
};
|
|
@@ -306,26 +307,26 @@ function setupGesture(elementOrSelector, options) {
|
|
|
306
307
|
const cancel = () => gestureAbortController.abort();
|
|
307
308
|
return [elements, eventOptions, cancel];
|
|
308
309
|
}
|
|
309
|
-
function
|
|
310
|
-
return (event
|
|
311
|
-
if (event.pointerType === "touch" || isDragActive())
|
|
312
|
-
return;
|
|
313
|
-
callback(event);
|
|
314
|
-
};
|
|
310
|
+
function isValidHover(event) {
|
|
311
|
+
return !(event.pointerType === "touch" || isDragActive());
|
|
315
312
|
}
|
|
316
313
|
function hover(elementOrSelector, onHoverStart, options = {}) {
|
|
317
314
|
const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);
|
|
318
|
-
const onPointerEnter =
|
|
315
|
+
const onPointerEnter = (enterEvent) => {
|
|
316
|
+
if (!isValidHover(enterEvent))
|
|
317
|
+
return;
|
|
319
318
|
const { target } = enterEvent;
|
|
320
|
-
const onHoverEnd = onHoverStart(enterEvent);
|
|
319
|
+
const onHoverEnd = onHoverStart(target, enterEvent);
|
|
321
320
|
if (typeof onHoverEnd !== "function" || !target)
|
|
322
321
|
return;
|
|
323
|
-
const onPointerLeave =
|
|
322
|
+
const onPointerLeave = (leaveEvent) => {
|
|
323
|
+
if (!isValidHover(leaveEvent))
|
|
324
|
+
return;
|
|
324
325
|
onHoverEnd(leaveEvent);
|
|
325
326
|
target.removeEventListener("pointerleave", onPointerLeave);
|
|
326
|
-
}
|
|
327
|
+
};
|
|
327
328
|
target.addEventListener("pointerleave", onPointerLeave, eventOptions);
|
|
328
|
-
}
|
|
329
|
+
};
|
|
329
330
|
elements.forEach((element) => {
|
|
330
331
|
element.addEventListener("pointerenter", onPointerEnter, eventOptions);
|
|
331
332
|
});
|
|
@@ -396,7 +397,7 @@ function press(elementOrSelector, onPressStart, options = {}) {
|
|
|
396
397
|
if (!isValidPressEvent(startEvent) || isPressing.has(element))
|
|
397
398
|
return;
|
|
398
399
|
isPressing.add(element);
|
|
399
|
-
const onPressEnd = onPressStart(startEvent);
|
|
400
|
+
const onPressEnd = onPressStart(element, startEvent);
|
|
400
401
|
const onPointerEnd = (endEvent, success) => {
|
|
401
402
|
window.removeEventListener("pointerup", onPointerUp);
|
|
402
403
|
window.removeEventListener("pointercancel", onPointerCancel);
|
|
@@ -475,10 +476,10 @@ const safeMin = 1e-3;
|
|
|
475
476
|
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
|
|
476
477
|
let envelope;
|
|
477
478
|
let derivative;
|
|
478
|
-
warning(duration <= secondsToMilliseconds$1(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
|
|
479
|
+
warning(duration <= /* @__PURE__ */ secondsToMilliseconds$1(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
|
|
479
480
|
let dampingRatio = 1 - bounce;
|
|
480
481
|
dampingRatio = clamp$1(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
|
|
481
|
-
duration = clamp$1(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds$1(duration));
|
|
482
|
+
duration = clamp$1(springDefaults.minDuration, springDefaults.maxDuration, /* @__PURE__ */ millisecondsToSeconds$1(duration));
|
|
482
483
|
if (dampingRatio < 1) {
|
|
483
484
|
envelope = (undampedFreq2) => {
|
|
484
485
|
const exponentialDecay = undampedFreq2 * dampingRatio;
|
|
@@ -512,7 +513,7 @@ function findSpring({ duration = springDefaults.duration, bounce = springDefault
|
|
|
512
513
|
}
|
|
513
514
|
const initialGuess = 5 / duration;
|
|
514
515
|
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
|
|
515
|
-
duration = secondsToMilliseconds$1(duration);
|
|
516
|
+
duration = /* @__PURE__ */ secondsToMilliseconds$1(duration);
|
|
516
517
|
if (isNaN(undampedFreq)) {
|
|
517
518
|
return {
|
|
518
519
|
stiffness: springDefaults.stiffness,
|
|
@@ -589,12 +590,12 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
|
|
|
589
590
|
const state2 = { done: false, value: origin };
|
|
590
591
|
const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
|
|
591
592
|
...options,
|
|
592
|
-
velocity:
|
|
593
|
+
velocity: -/* @__PURE__ */ millisecondsToSeconds$1(options.velocity || 0)
|
|
593
594
|
});
|
|
594
595
|
const initialVelocity = velocity || 0;
|
|
595
596
|
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
596
597
|
const initialDelta = target - origin;
|
|
597
|
-
const undampedAngularFreq = millisecondsToSeconds$1(Math.sqrt(stiffness / mass));
|
|
598
|
+
const undampedAngularFreq = /* @__PURE__ */ millisecondsToSeconds$1(Math.sqrt(stiffness / mass));
|
|
598
599
|
const isGranularScale = Math.abs(initialDelta) < 5;
|
|
599
600
|
restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
|
|
600
601
|
restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
|
|
@@ -622,7 +623,7 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
|
|
|
622
623
|
if (!isResolvedFromDuration) {
|
|
623
624
|
let currentVelocity = 0;
|
|
624
625
|
if (dampingRatio < 1) {
|
|
625
|
-
currentVelocity = t === 0 ? secondsToMilliseconds$1(initialVelocity) : calcGeneratorVelocity(resolveSpring, t, current);
|
|
626
|
+
currentVelocity = t === 0 ? /* @__PURE__ */ secondsToMilliseconds$1(initialVelocity) : calcGeneratorVelocity(resolveSpring, t, current);
|
|
626
627
|
}
|
|
627
628
|
const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
|
|
628
629
|
const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;
|
|
@@ -657,7 +658,7 @@ const mixNumber$2 = (from, to, progress2) => {
|
|
|
657
658
|
function fillOffset(offset, remaining) {
|
|
658
659
|
const min = offset[offset.length - 1];
|
|
659
660
|
for (let i = 1; i <= remaining; i++) {
|
|
660
|
-
const offsetProgress = progress$1(0, remaining, i);
|
|
661
|
+
const offsetProgress = /* @__PURE__ */ progress$1(0, remaining, i);
|
|
661
662
|
offset.push(mixNumber$2(min, 1, offsetProgress));
|
|
662
663
|
}
|
|
663
664
|
}
|
|
@@ -780,7 +781,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
780
781
|
}
|
|
781
782
|
const springTransition = { ...remainingTransition };
|
|
782
783
|
if (duration !== void 0) {
|
|
783
|
-
springTransition.duration = secondsToMilliseconds$1(duration);
|
|
784
|
+
springTransition.duration = /* @__PURE__ */ secondsToMilliseconds$1(duration);
|
|
784
785
|
}
|
|
785
786
|
const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);
|
|
786
787
|
ease2 = springEasing.ease;
|
|
@@ -844,7 +845,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
844
845
|
for (let i = 0; i < valueSequence.length; i++) {
|
|
845
846
|
const { at, value, easing } = valueSequence[i];
|
|
846
847
|
keyframes2.push(value);
|
|
847
|
-
valueOffset.push(progress$1(0, totalDuration, at));
|
|
848
|
+
valueOffset.push(/* @__PURE__ */ progress$1(0, totalDuration, at));
|
|
848
849
|
valueEasing.push(easing || "easeOut");
|
|
849
850
|
}
|
|
850
851
|
if (valueOffset[0] !== 0) {
|
|
@@ -938,7 +939,25 @@ const MotionGlobalConfig = {
|
|
|
938
939
|
skipAnimations: false,
|
|
939
940
|
useManualTiming: false
|
|
940
941
|
};
|
|
941
|
-
|
|
942
|
+
const stepsOrder = [
|
|
943
|
+
"read",
|
|
944
|
+
// Read
|
|
945
|
+
"resolveKeyframes",
|
|
946
|
+
// Write/Read/Write/Read
|
|
947
|
+
"update",
|
|
948
|
+
// Compute
|
|
949
|
+
"preRender",
|
|
950
|
+
// Compute
|
|
951
|
+
"render",
|
|
952
|
+
// Write
|
|
953
|
+
"postRender"
|
|
954
|
+
// Compute
|
|
955
|
+
];
|
|
956
|
+
const statsBuffer = {
|
|
957
|
+
value: null,
|
|
958
|
+
addProjectionMetrics: null
|
|
959
|
+
};
|
|
960
|
+
function createRenderStep(runNextFrame, stepName) {
|
|
942
961
|
let thisFrame = /* @__PURE__ */ new Set();
|
|
943
962
|
let nextFrame = /* @__PURE__ */ new Set();
|
|
944
963
|
let isProcessing = false;
|
|
@@ -949,11 +968,13 @@ function createRenderStep(runNextFrame) {
|
|
|
949
968
|
timestamp: 0,
|
|
950
969
|
isProcessing: false
|
|
951
970
|
};
|
|
971
|
+
let numCalls = 0;
|
|
952
972
|
function triggerCallback(callback) {
|
|
953
973
|
if (toKeepAlive.has(callback)) {
|
|
954
974
|
step.schedule(callback);
|
|
955
975
|
runNextFrame();
|
|
956
976
|
}
|
|
977
|
+
numCalls++;
|
|
957
978
|
callback(latestFrameData);
|
|
958
979
|
}
|
|
959
980
|
const step = {
|
|
@@ -988,6 +1009,10 @@ function createRenderStep(runNextFrame) {
|
|
|
988
1009
|
isProcessing = true;
|
|
989
1010
|
[thisFrame, nextFrame] = [nextFrame, thisFrame];
|
|
990
1011
|
thisFrame.forEach(triggerCallback);
|
|
1012
|
+
if (stepName && statsBuffer.value) {
|
|
1013
|
+
statsBuffer.value.frameloop[stepName].push(numCalls);
|
|
1014
|
+
}
|
|
1015
|
+
numCalls = 0;
|
|
991
1016
|
thisFrame.clear();
|
|
992
1017
|
isProcessing = false;
|
|
993
1018
|
if (flushNextFrame) {
|
|
@@ -998,20 +1023,6 @@ function createRenderStep(runNextFrame) {
|
|
|
998
1023
|
};
|
|
999
1024
|
return step;
|
|
1000
1025
|
}
|
|
1001
|
-
const stepsOrder = [
|
|
1002
|
-
"read",
|
|
1003
|
-
// Read
|
|
1004
|
-
"resolveKeyframes",
|
|
1005
|
-
// Write/Read/Write/Read
|
|
1006
|
-
"update",
|
|
1007
|
-
// Compute
|
|
1008
|
-
"preRender",
|
|
1009
|
-
// Compute
|
|
1010
|
-
"render",
|
|
1011
|
-
// Write
|
|
1012
|
-
"postRender"
|
|
1013
|
-
// Compute
|
|
1014
|
-
];
|
|
1015
1026
|
const maxElapsed$1 = 40;
|
|
1016
1027
|
function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
1017
1028
|
let runNextFrame = false;
|
|
@@ -1023,14 +1034,16 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
1023
1034
|
};
|
|
1024
1035
|
const flagRunNextFrame = () => runNextFrame = true;
|
|
1025
1036
|
const steps2 = stepsOrder.reduce((acc, key) => {
|
|
1026
|
-
acc[key] = createRenderStep(flagRunNextFrame);
|
|
1037
|
+
acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : void 0);
|
|
1027
1038
|
return acc;
|
|
1028
1039
|
}, {});
|
|
1029
1040
|
const { read, resolveKeyframes, update, preRender, render, postRender } = steps2;
|
|
1030
1041
|
const processBatch = () => {
|
|
1031
1042
|
const timestamp = performance.now();
|
|
1032
1043
|
runNextFrame = false;
|
|
1033
|
-
|
|
1044
|
+
{
|
|
1045
|
+
state2.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state2.timestamp, maxElapsed$1), 1);
|
|
1046
|
+
}
|
|
1034
1047
|
state2.timestamp = timestamp;
|
|
1035
1048
|
state2.isProcessing = true;
|
|
1036
1049
|
read.process(state2);
|
|
@@ -1137,7 +1150,7 @@ class MotionValue {
|
|
|
1137
1150
|
* @internal
|
|
1138
1151
|
*/
|
|
1139
1152
|
constructor(init, options = {}) {
|
|
1140
|
-
this.version = "
|
|
1153
|
+
this.version = "12.4.0";
|
|
1141
1154
|
this.canTrackVelocity = null;
|
|
1142
1155
|
this.events = {};
|
|
1143
1156
|
this.updateAndNotify = (v, render = true) => {
|
|
@@ -2222,8 +2235,8 @@ class BaseAnimation {
|
|
|
2222
2235
|
const { name, type, velocity, delay: delay2, onComplete, onUpdate, isGenerator: isGenerator2 } = this.options;
|
|
2223
2236
|
if (!isGenerator2 && !canAnimate(keyframes2, name, type, velocity)) {
|
|
2224
2237
|
if (!delay2) {
|
|
2225
|
-
onUpdate
|
|
2226
|
-
onComplete
|
|
2238
|
+
onUpdate && onUpdate(getFinalKeyframe(keyframes2, this.options, finalKeyframe));
|
|
2239
|
+
onComplete && onComplete();
|
|
2227
2240
|
this.resolveFinishedPromise();
|
|
2228
2241
|
return;
|
|
2229
2242
|
} else {
|
|
@@ -2545,7 +2558,7 @@ function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer
|
|
|
2545
2558
|
break;
|
|
2546
2559
|
}
|
|
2547
2560
|
}
|
|
2548
|
-
const progressInRange = progress$1(input[i], input[i + 1], v);
|
|
2561
|
+
const progressInRange = /* @__PURE__ */ progress$1(input[i], input[i + 1], v);
|
|
2549
2562
|
return mixers[i](progressInRange);
|
|
2550
2563
|
};
|
|
2551
2564
|
return isClamp ? (v) => interpolator(clamp$1(input[0], input[inputLength - 1], v)) : interpolator;
|
|
@@ -2749,13 +2762,13 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2749
2762
|
}
|
|
2750
2763
|
get duration() {
|
|
2751
2764
|
const { resolved } = this;
|
|
2752
|
-
return resolved ? millisecondsToSeconds$1(resolved.calculatedDuration) : 0;
|
|
2765
|
+
return resolved ? /* @__PURE__ */ millisecondsToSeconds$1(resolved.calculatedDuration) : 0;
|
|
2753
2766
|
}
|
|
2754
2767
|
get time() {
|
|
2755
|
-
return millisecondsToSeconds$1(this.currentTime);
|
|
2768
|
+
return /* @__PURE__ */ millisecondsToSeconds$1(this.currentTime);
|
|
2756
2769
|
}
|
|
2757
2770
|
set time(newTime) {
|
|
2758
|
-
newTime = secondsToMilliseconds$1(newTime);
|
|
2771
|
+
newTime = /* @__PURE__ */ secondsToMilliseconds$1(newTime);
|
|
2759
2772
|
this.currentTime = newTime;
|
|
2760
2773
|
if (this.holdTime !== null || this.speed === 0) {
|
|
2761
2774
|
this.holdTime = newTime;
|
|
@@ -2770,7 +2783,7 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2770
2783
|
const hasChanged2 = this.playbackSpeed !== newSpeed;
|
|
2771
2784
|
this.playbackSpeed = newSpeed;
|
|
2772
2785
|
if (hasChanged2) {
|
|
2773
|
-
this.time = millisecondsToSeconds$1(this.currentTime);
|
|
2786
|
+
this.time = /* @__PURE__ */ millisecondsToSeconds$1(this.currentTime);
|
|
2774
2787
|
}
|
|
2775
2788
|
}
|
|
2776
2789
|
play() {
|
|
@@ -2871,7 +2884,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
2871
2884
|
const easing = mapEasingToNativeEasing(ease2, duration);
|
|
2872
2885
|
if (Array.isArray(easing))
|
|
2873
2886
|
keyframeOptions.easing = easing;
|
|
2874
|
-
|
|
2887
|
+
const animation = element.animate(keyframeOptions, {
|
|
2875
2888
|
delay: delay2,
|
|
2876
2889
|
duration,
|
|
2877
2890
|
easing: !Array.isArray(easing) ? easing : "linear",
|
|
@@ -2879,6 +2892,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
2879
2892
|
iterations: repeat + 1,
|
|
2880
2893
|
direction: repeatType === "reverse" ? "alternate" : "normal"
|
|
2881
2894
|
});
|
|
2895
|
+
return animation;
|
|
2882
2896
|
}
|
|
2883
2897
|
const supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
2884
2898
|
const sampleDelta = 10;
|
|
@@ -2925,9 +2939,8 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
2925
2939
|
this.resolver.scheduleResolve();
|
|
2926
2940
|
}
|
|
2927
2941
|
initPlayback(keyframes2, finalKeyframe) {
|
|
2928
|
-
var _a;
|
|
2929
2942
|
let { duration = 300, times, ease: ease2, type, motionValue: motionValue2, name, startTime } = this.options;
|
|
2930
|
-
if (!
|
|
2943
|
+
if (!motionValue2.owner || !motionValue2.owner.current) {
|
|
2931
2944
|
return false;
|
|
2932
2945
|
}
|
|
2933
2946
|
if (typeof ease2 === "string" && supportsLinearEasing() && isUnsupportedEase(ease2)) {
|
|
@@ -2973,21 +2986,21 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
2973
2986
|
if (!resolved)
|
|
2974
2987
|
return 0;
|
|
2975
2988
|
const { duration } = resolved;
|
|
2976
|
-
return millisecondsToSeconds$1(duration);
|
|
2989
|
+
return /* @__PURE__ */ millisecondsToSeconds$1(duration);
|
|
2977
2990
|
}
|
|
2978
2991
|
get time() {
|
|
2979
2992
|
const { resolved } = this;
|
|
2980
2993
|
if (!resolved)
|
|
2981
2994
|
return 0;
|
|
2982
2995
|
const { animation } = resolved;
|
|
2983
|
-
return millisecondsToSeconds$1(animation.currentTime || 0);
|
|
2996
|
+
return /* @__PURE__ */ millisecondsToSeconds$1(animation.currentTime || 0);
|
|
2984
2997
|
}
|
|
2985
2998
|
set time(newTime) {
|
|
2986
2999
|
const { resolved } = this;
|
|
2987
3000
|
if (!resolved)
|
|
2988
3001
|
return;
|
|
2989
3002
|
const { animation } = resolved;
|
|
2990
|
-
animation.currentTime = secondsToMilliseconds$1(newTime);
|
|
3003
|
+
animation.currentTime = /* @__PURE__ */ secondsToMilliseconds$1(newTime);
|
|
2991
3004
|
}
|
|
2992
3005
|
get speed() {
|
|
2993
3006
|
const { resolved } = this;
|
|
@@ -3077,7 +3090,7 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3077
3090
|
times,
|
|
3078
3091
|
isGenerator: true
|
|
3079
3092
|
});
|
|
3080
|
-
const sampleTime = secondsToMilliseconds$1(this.time);
|
|
3093
|
+
const sampleTime = /* @__PURE__ */ secondsToMilliseconds$1(this.time);
|
|
3081
3094
|
motionValue2.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
|
|
3082
3095
|
}
|
|
3083
3096
|
const { onStop } = this.options;
|
|
@@ -3098,11 +3111,15 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3098
3111
|
}
|
|
3099
3112
|
static supports(options) {
|
|
3100
3113
|
const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type } = options;
|
|
3101
|
-
|
|
3114
|
+
if (!motionValue2 || !motionValue2.owner || !(motionValue2.owner.current instanceof HTMLElement)) {
|
|
3115
|
+
return false;
|
|
3116
|
+
}
|
|
3117
|
+
const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
|
|
3118
|
+
return supportsWaapi() && name && acceleratedValues.has(name) && /**
|
|
3102
3119
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
3103
3120
|
* no way to read the value from WAAPI every frame.
|
|
3104
3121
|
*/
|
|
3105
|
-
!
|
|
3122
|
+
!onUpdate && !transformTemplate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
3106
3123
|
}
|
|
3107
3124
|
}
|
|
3108
3125
|
const underDampedSpring = {
|
|
@@ -3141,7 +3158,7 @@ const animateMotionValue = (name, value, target, transition = {}, element, isHan
|
|
|
3141
3158
|
const valueTransition = getValueTransition$1(transition, name) || {};
|
|
3142
3159
|
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
3143
3160
|
let { elapsed = 0 } = transition;
|
|
3144
|
-
elapsed = elapsed - secondsToMilliseconds$1(delay2);
|
|
3161
|
+
elapsed = elapsed - /* @__PURE__ */ secondsToMilliseconds$1(delay2);
|
|
3145
3162
|
let options = {
|
|
3146
3163
|
keyframes: Array.isArray(target) ? target : [null, target],
|
|
3147
3164
|
ease: "easeOut",
|
|
@@ -3167,10 +3184,10 @@ const animateMotionValue = (name, value, target, transition = {}, element, isHan
|
|
|
3167
3184
|
};
|
|
3168
3185
|
}
|
|
3169
3186
|
if (options.duration) {
|
|
3170
|
-
options.duration = secondsToMilliseconds$1(options.duration);
|
|
3187
|
+
options.duration = /* @__PURE__ */ secondsToMilliseconds$1(options.duration);
|
|
3171
3188
|
}
|
|
3172
3189
|
if (options.repeatDelay) {
|
|
3173
|
-
options.repeatDelay = secondsToMilliseconds$1(options.repeatDelay);
|
|
3190
|
+
options.repeatDelay = /* @__PURE__ */ secondsToMilliseconds$1(options.repeatDelay);
|
|
3174
3191
|
}
|
|
3175
3192
|
if (options.from !== void 0) {
|
|
3176
3193
|
options.keyframes[0] = options.from;
|
|
@@ -3338,7 +3355,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3338
3355
|
if (isMotionValue$1(nextValue)) {
|
|
3339
3356
|
element.addValue(key, nextValue);
|
|
3340
3357
|
if (process.env.NODE_ENV === "development") {
|
|
3341
|
-
warnOnce(nextValue.version === "
|
|
3358
|
+
warnOnce(nextValue.version === "12.4.0", `Attempting to mix Motion versions ${nextValue.version} with 12.4.0 may not work as expected.`);
|
|
3342
3359
|
}
|
|
3343
3360
|
} else if (isMotionValue$1(prevValue)) {
|
|
3344
3361
|
element.addValue(key, motionValue(nextValue, { owner: element }));
|
|
@@ -3410,7 +3427,8 @@ class VisualElement {
|
|
|
3410
3427
|
frame.render(this.render, false, true);
|
|
3411
3428
|
}
|
|
3412
3429
|
};
|
|
3413
|
-
const { latestValues, renderState } = visualState;
|
|
3430
|
+
const { latestValues, renderState, onUpdate } = visualState;
|
|
3431
|
+
this.onUpdate = onUpdate;
|
|
3414
3432
|
this.latestValues = latestValues;
|
|
3415
3433
|
this.baseTarget = { ...latestValues };
|
|
3416
3434
|
this.initialValues = props.initial ? { ...latestValues } : {};
|
|
@@ -3458,7 +3476,6 @@ class VisualElement {
|
|
|
3458
3476
|
this.update(this.props, this.presenceContext);
|
|
3459
3477
|
}
|
|
3460
3478
|
unmount() {
|
|
3461
|
-
visualElementStore.delete(this.current);
|
|
3462
3479
|
this.projection && this.projection.unmount();
|
|
3463
3480
|
cancelFrame(this.notifyUpdate);
|
|
3464
3481
|
cancelFrame(this.render);
|
|
@@ -3483,6 +3500,9 @@ class VisualElement {
|
|
|
3483
3500
|
this.valueSubscriptions.get(key)();
|
|
3484
3501
|
}
|
|
3485
3502
|
const valueIsTransform = transformProps.has(key);
|
|
3503
|
+
if (valueIsTransform && this.onBindTransform) {
|
|
3504
|
+
this.onBindTransform();
|
|
3505
|
+
}
|
|
3486
3506
|
const removeOnChange = value.on("change", (latestValue) => {
|
|
3487
3507
|
this.latestValues[key] = latestValue;
|
|
3488
3508
|
this.props.onUpdate && frame.preRender(this.notifyUpdate);
|
|
@@ -3576,6 +3596,7 @@ class VisualElement {
|
|
|
3576
3596
|
if (this.handleChildMotionValue) {
|
|
3577
3597
|
this.handleChildMotionValue();
|
|
3578
3598
|
}
|
|
3599
|
+
this.onUpdate && this.onUpdate(this);
|
|
3579
3600
|
}
|
|
3580
3601
|
getProps() {
|
|
3581
3602
|
return this.props;
|
|
@@ -3818,14 +3839,6 @@ function buildHTMLStyles(state2, latestValues, transformTemplate) {
|
|
|
3818
3839
|
style2.transformOrigin = `${originX} ${originY} ${originZ}`;
|
|
3819
3840
|
}
|
|
3820
3841
|
}
|
|
3821
|
-
function calcOrigin$1(origin, offset, size) {
|
|
3822
|
-
return typeof origin === "string" ? origin : px.transform(offset + size * origin);
|
|
3823
|
-
}
|
|
3824
|
-
function calcSVGTransformOrigin(dimensions, originX, originY) {
|
|
3825
|
-
const pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
|
|
3826
|
-
const pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
|
|
3827
|
-
return `${pxOriginX} ${pxOriginY}`;
|
|
3828
|
-
}
|
|
3829
3842
|
const dashKeys = {
|
|
3830
3843
|
offset: "stroke-dashoffset",
|
|
3831
3844
|
array: "stroke-dasharray"
|
|
@@ -3842,6 +3855,14 @@ function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true
|
|
|
3842
3855
|
const pathSpacing = px.transform(spacing);
|
|
3843
3856
|
attrs[keys2.array] = `${pathLength} ${pathSpacing}`;
|
|
3844
3857
|
}
|
|
3858
|
+
function calcOrigin$1(origin, offset, size) {
|
|
3859
|
+
return typeof origin === "string" ? origin : px.transform(offset + size * origin);
|
|
3860
|
+
}
|
|
3861
|
+
function calcSVGTransformOrigin(dimensions, originX, originY) {
|
|
3862
|
+
const pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
|
|
3863
|
+
const pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
|
|
3864
|
+
return `${pxOriginX} ${pxOriginY}`;
|
|
3865
|
+
}
|
|
3845
3866
|
function buildSVGAttrs(state2, {
|
|
3846
3867
|
attrX,
|
|
3847
3868
|
attrY,
|
|
@@ -3908,6 +3929,18 @@ const camelCaseAttributes = /* @__PURE__ */ new Set([
|
|
|
3908
3929
|
"lengthAdjust"
|
|
3909
3930
|
]);
|
|
3910
3931
|
const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg";
|
|
3932
|
+
function updateSVGDimensions(instance, renderState) {
|
|
3933
|
+
try {
|
|
3934
|
+
renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect();
|
|
3935
|
+
} catch (e) {
|
|
3936
|
+
renderState.dimensions = {
|
|
3937
|
+
x: 0,
|
|
3938
|
+
y: 0,
|
|
3939
|
+
width: 0,
|
|
3940
|
+
height: 0
|
|
3941
|
+
};
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3911
3944
|
function renderHTML(element, { style: style2, vars }, styleProp, projection) {
|
|
3912
3945
|
Object.assign(element.style, style2, projection && projection.getProjectionStyles(styleProp));
|
|
3913
3946
|
for (const key in vars) {
|
|
@@ -3922,7 +3955,12 @@ function renderSVG(element, renderState, _styleProp, projection) {
|
|
|
3922
3955
|
}
|
|
3923
3956
|
const scaleCorrectors = {};
|
|
3924
3957
|
function addScaleCorrector(correctors) {
|
|
3925
|
-
|
|
3958
|
+
for (const key in correctors) {
|
|
3959
|
+
scaleCorrectors[key] = correctors[key];
|
|
3960
|
+
if (isCSSVariableName(key)) {
|
|
3961
|
+
scaleCorrectors[key].isCSSVariable = true;
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3926
3964
|
}
|
|
3927
3965
|
function isForcedMotionValue(key, { layout, layoutId }) {
|
|
3928
3966
|
return transformProps.has(key) || key.startsWith("origin") || (layout || layoutId !== void 0) && (!!scaleCorrectors[key] || key === "opacity");
|
|
@@ -3954,6 +3992,11 @@ class SVGVisualElement extends DOMVisualElement {
|
|
|
3954
3992
|
this.type = "svg";
|
|
3955
3993
|
this.isSVGTag = false;
|
|
3956
3994
|
this.measureInstanceViewportBox = createBox$1;
|
|
3995
|
+
this.updateDimensions = () => {
|
|
3996
|
+
if (this.current && !this.renderState.dimensions) {
|
|
3997
|
+
updateSVGDimensions(this.current, this.renderState);
|
|
3998
|
+
}
|
|
3999
|
+
};
|
|
3957
4000
|
}
|
|
3958
4001
|
getBaseTargetFromProps(props, key) {
|
|
3959
4002
|
return props[key];
|
|
@@ -3969,6 +4012,11 @@ class SVGVisualElement extends DOMVisualElement {
|
|
|
3969
4012
|
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
3970
4013
|
return scrapeMotionValuesFromProps(props, prevProps, visualElement);
|
|
3971
4014
|
}
|
|
4015
|
+
onBindTransform() {
|
|
4016
|
+
if (this.current && !this.renderState.dimensions) {
|
|
4017
|
+
frame.postRender(this.updateDimensions);
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
3972
4020
|
build(renderState, latestValues, props) {
|
|
3973
4021
|
buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);
|
|
3974
4022
|
}
|
|
@@ -4225,7 +4273,7 @@ function animateSequence(sequence, options, scope) {
|
|
|
4225
4273
|
return animations;
|
|
4226
4274
|
}
|
|
4227
4275
|
function isSequence(value) {
|
|
4228
|
-
return Array.isArray(value) && Array.isArray
|
|
4276
|
+
return Array.isArray(value) && value.some(Array.isArray);
|
|
4229
4277
|
}
|
|
4230
4278
|
function createScopedAnimate(scope) {
|
|
4231
4279
|
function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {
|
|
@@ -4245,7 +4293,7 @@ function createScopedAnimate(scope) {
|
|
|
4245
4293
|
}
|
|
4246
4294
|
const animate = createScopedAnimate();
|
|
4247
4295
|
function setCSSVar(element, name, value) {
|
|
4248
|
-
element.style.setProperty(
|
|
4296
|
+
element.style.setProperty(name, value);
|
|
4249
4297
|
}
|
|
4250
4298
|
function setStyle(element, name, value) {
|
|
4251
4299
|
element.style[name] = value;
|
|
@@ -4294,7 +4342,7 @@ class NativeAnimation extends NativeAnimationControls {
|
|
|
4294
4342
|
if (isGenerator(options.type)) {
|
|
4295
4343
|
const generatorOptions = createGeneratorEasing(options, 100, options.type);
|
|
4296
4344
|
options.ease = supportsLinearEasing() ? generatorOptions.ease : defaultEasing;
|
|
4297
|
-
options.duration = secondsToMilliseconds$1(generatorOptions.duration);
|
|
4345
|
+
options.duration = /* @__PURE__ */ secondsToMilliseconds$1(generatorOptions.duration);
|
|
4298
4346
|
options.type = "keyframes";
|
|
4299
4347
|
} else {
|
|
4300
4348
|
options.ease = options.ease || defaultEasing;
|
|
@@ -4309,8 +4357,8 @@ class NativeAnimation extends NativeAnimationControls {
|
|
|
4309
4357
|
this.options = options;
|
|
4310
4358
|
this.updateFinishedPromise();
|
|
4311
4359
|
this.removeAnimation = () => {
|
|
4312
|
-
|
|
4313
|
-
|
|
4360
|
+
const elementState = state.get(element);
|
|
4361
|
+
elementState && elementState.delete(valueName);
|
|
4314
4362
|
};
|
|
4315
4363
|
};
|
|
4316
4364
|
if (!supportsWaapi()) {
|
|
@@ -4367,8 +4415,8 @@ function animateElements(elementOrSelector, keyframes2, options, scope) {
|
|
|
4367
4415
|
const valueOptions = {
|
|
4368
4416
|
...getValueTransition$1(elementTransition, valueName)
|
|
4369
4417
|
};
|
|
4370
|
-
valueOptions.duration = valueOptions.duration ? secondsToMilliseconds$1(valueOptions.duration) : valueOptions.duration;
|
|
4371
|
-
valueOptions.delay = secondsToMilliseconds$1(valueOptions.delay || 0);
|
|
4418
|
+
valueOptions.duration = valueOptions.duration ? /* @__PURE__ */ secondsToMilliseconds$1(valueOptions.duration) : valueOptions.duration;
|
|
4419
|
+
valueOptions.delay = /* @__PURE__ */ secondsToMilliseconds$1(valueOptions.delay || 0);
|
|
4372
4420
|
animations.push(new NativeAnimation(element, valueName, valueKeyframes, valueOptions));
|
|
4373
4421
|
}
|
|
4374
4422
|
}
|
|
@@ -4520,7 +4568,7 @@ function updateAxisInfo(element, axisName, info, time2) {
|
|
|
4520
4568
|
axis.offset.length = 0;
|
|
4521
4569
|
axis.offset[0] = 0;
|
|
4522
4570
|
axis.offset[1] = axis.scrollLength;
|
|
4523
|
-
axis.progress = progress$1(0, axis.scrollLength, axis.current);
|
|
4571
|
+
axis.progress = /* @__PURE__ */ progress$1(0, axis.scrollLength, axis.current);
|
|
4524
4572
|
const elapsed = time2 - prevTime;
|
|
4525
4573
|
axis.velocity = elapsed > maxElapsed ? 0 : velocityPerSecond(axis.current - prev, elapsed);
|
|
4526
4574
|
}
|
|
@@ -4826,7 +4874,7 @@ function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount =
|
|
|
4826
4874
|
if (entry.isIntersecting === Boolean(onEnd))
|
|
4827
4875
|
return;
|
|
4828
4876
|
if (entry.isIntersecting) {
|
|
4829
|
-
const newOnEnd = onStart(entry);
|
|
4877
|
+
const newOnEnd = onStart(entry.target, entry);
|
|
4830
4878
|
if (typeof newOnEnd === "function") {
|
|
4831
4879
|
activeIntersections.set(entry.target, newOnEnd);
|
|
4832
4880
|
} else {
|
|
@@ -4888,7 +4936,7 @@ function delay(callback, timeout) {
|
|
|
4888
4936
|
return () => cancelFrame(checkElapsed);
|
|
4889
4937
|
}
|
|
4890
4938
|
function delayInSeconds(callback, timeout) {
|
|
4891
|
-
return delay(callback, secondsToMilliseconds$1(timeout));
|
|
4939
|
+
return delay(callback, /* @__PURE__ */ secondsToMilliseconds$1(timeout));
|
|
4892
4940
|
}
|
|
4893
4941
|
const distance = (a, b) => Math.abs(a - b);
|
|
4894
4942
|
function distance2D(a, b) {
|
|
@@ -5361,7 +5409,7 @@ class HoverGesture extends Feature {
|
|
|
5361
5409
|
return;
|
|
5362
5410
|
this.unmount = hover(
|
|
5363
5411
|
element,
|
|
5364
|
-
(startEvent) => {
|
|
5412
|
+
(_, startEvent) => {
|
|
5365
5413
|
handleHoverEvent$1(this.state, startEvent, "Start");
|
|
5366
5414
|
return (endEvent) => {
|
|
5367
5415
|
handleHoverEvent$1(this.state, endEvent, "End");
|
|
@@ -5402,7 +5450,7 @@ class PressGesture extends Feature {
|
|
|
5402
5450
|
return;
|
|
5403
5451
|
this.unmount = press(
|
|
5404
5452
|
element,
|
|
5405
|
-
(startEvent) => {
|
|
5453
|
+
(_, startEvent) => {
|
|
5406
5454
|
handlePressEvent(this.state, startEvent, "Start");
|
|
5407
5455
|
return (endEvent, { success }) => handlePressEvent(
|
|
5408
5456
|
this.state,
|
|
@@ -5440,7 +5488,7 @@ class InViewGesture extends Feature {
|
|
|
5440
5488
|
const { once, ...viewOptions } = this.state.getOptions().inViewOptions || {};
|
|
5441
5489
|
this.unmount = inView(
|
|
5442
5490
|
element,
|
|
5443
|
-
(entry) => {
|
|
5491
|
+
(_, entry) => {
|
|
5444
5492
|
handleHoverEvent(this.state, entry, "Enter");
|
|
5445
5493
|
if (!once) {
|
|
5446
5494
|
return (endEvent) => {
|
|
@@ -6283,11 +6331,12 @@ class DragGesture extends Feature {
|
|
|
6283
6331
|
this.controls = new VisualElementDragControls(state2.visualElement);
|
|
6284
6332
|
}
|
|
6285
6333
|
mount() {
|
|
6334
|
+
var _a;
|
|
6286
6335
|
const { dragControls } = this.state.options;
|
|
6287
6336
|
if (dragControls) {
|
|
6288
6337
|
this.removeGroupControls = dragControls.subscribe(this.controls);
|
|
6289
6338
|
}
|
|
6290
|
-
this.removeListeners = this.controls.addListeners() || noop;
|
|
6339
|
+
this.removeListeners = ((_a = this.controls) == null ? void 0 : _a.addListeners()) || noop;
|
|
6291
6340
|
}
|
|
6292
6341
|
unmount() {
|
|
6293
6342
|
this.removeGroupControls();
|
|
@@ -6417,11 +6466,11 @@ class LayoutFeature extends Feature {
|
|
|
6417
6466
|
(_a = layoutGroup == null ? void 0 : layoutGroup.group) == null ? void 0 : _a.add(projection);
|
|
6418
6467
|
}
|
|
6419
6468
|
globalProjectionState.hasEverUpdated = true;
|
|
6420
|
-
this.didUpdate();
|
|
6421
6469
|
}
|
|
6422
6470
|
}
|
|
6423
6471
|
beforeUnmount() {
|
|
6424
|
-
|
|
6472
|
+
var _a;
|
|
6473
|
+
const projection = (_a = this.state.visualElement) == null ? void 0 : _a.projection;
|
|
6425
6474
|
if (projection) {
|
|
6426
6475
|
this.state.willUpdate("beforeUnmount");
|
|
6427
6476
|
if (this.state.options.layoutId) {
|
|
@@ -6433,8 +6482,9 @@ class LayoutFeature extends Feature {
|
|
|
6433
6482
|
}
|
|
6434
6483
|
}
|
|
6435
6484
|
unmount() {
|
|
6485
|
+
var _a;
|
|
6436
6486
|
const layoutGroup = this.state.options.layoutGroup;
|
|
6437
|
-
const projection = this.state.visualElement.projection;
|
|
6487
|
+
const projection = (_a = this.state.visualElement) == null ? void 0 : _a.projection;
|
|
6438
6488
|
if ((layoutGroup == null ? void 0 : layoutGroup.group) && projection)
|
|
6439
6489
|
layoutGroup.group.remove(projection);
|
|
6440
6490
|
this.didUpdate();
|
|
@@ -6573,7 +6623,7 @@ function compress(min, max, easing) {
|
|
|
6573
6623
|
return 0;
|
|
6574
6624
|
if (p > max)
|
|
6575
6625
|
return 1;
|
|
6576
|
-
return easing(progress$1(min, max, p));
|
|
6626
|
+
return easing(/* @__PURE__ */ progress$1(min, max, p));
|
|
6577
6627
|
};
|
|
6578
6628
|
}
|
|
6579
6629
|
function copyAxisInto(axis, originAxis) {
|
|
@@ -6815,13 +6865,6 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
6815
6865
|
function eachAxis(callback) {
|
|
6816
6866
|
return [callback("x"), callback("y")];
|
|
6817
6867
|
}
|
|
6818
|
-
const metrics = {
|
|
6819
|
-
type: "projectionFrame",
|
|
6820
|
-
totalNodes: 0,
|
|
6821
|
-
resolvedTargetDeltas: 0,
|
|
6822
|
-
recalculatedProjection: 0
|
|
6823
|
-
};
|
|
6824
|
-
const isDebug = typeof window !== "undefined" && window.MotionDebug !== void 0;
|
|
6825
6868
|
const transformAxes = ["", "X", "Y", "Z"];
|
|
6826
6869
|
const hiddenVisibility = { visibility: "hidden" };
|
|
6827
6870
|
const animationTarget = 1e3;
|
|
@@ -6887,16 +6930,10 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6887
6930
|
};
|
|
6888
6931
|
this.updateProjection = () => {
|
|
6889
6932
|
this.projectionUpdateScheduled = false;
|
|
6890
|
-
if (isDebug) {
|
|
6891
|
-
metrics.totalNodes = metrics.resolvedTargetDeltas = metrics.recalculatedProjection = 0;
|
|
6892
|
-
}
|
|
6893
6933
|
this.nodes.forEach(propagateDirtyNodes);
|
|
6894
6934
|
this.nodes.forEach(resolveTargetDelta);
|
|
6895
6935
|
this.nodes.forEach(calcProjection);
|
|
6896
6936
|
this.nodes.forEach(cleanDirtyNodes);
|
|
6897
|
-
if (isDebug) {
|
|
6898
|
-
window.MotionDebug.record(metrics);
|
|
6899
|
-
}
|
|
6900
6937
|
};
|
|
6901
6938
|
this.resolvedRelativeTargetAt = 0;
|
|
6902
6939
|
this.hasProjected = false;
|
|
@@ -6961,7 +6998,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6961
6998
|
this.root.registerSharedNode(layoutId, this);
|
|
6962
6999
|
}
|
|
6963
7000
|
if (this.options.animate !== false && visualElement && (layoutId || layout)) {
|
|
6964
|
-
this.addEventListener("didUpdate", ({ delta, hasLayoutChanged,
|
|
7001
|
+
this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout }) => {
|
|
6965
7002
|
if (this.isTreeAnimationBlocked()) {
|
|
6966
7003
|
this.target = void 0;
|
|
6967
7004
|
this.relativeTarget = void 0;
|
|
@@ -6969,9 +7006,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6969
7006
|
}
|
|
6970
7007
|
const layoutTransition = this.options.transition || visualElement.getDefaultTransition() || defaultLayoutTransition;
|
|
6971
7008
|
const { onLayoutAnimationStart, onLayoutAnimationComplete } = visualElement.getProps();
|
|
6972
|
-
const
|
|
6973
|
-
const hasOnlyRelativeTargetChanged = !hasLayoutChanged &&
|
|
6974
|
-
if (this.options.layoutRoot || this.resumeFrom
|
|
7009
|
+
const hasTargetChanged = !this.targetLayout || !boxEqualsRounded(this.targetLayout, newLayout);
|
|
7010
|
+
const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged;
|
|
7011
|
+
if (this.options.layoutRoot || this.resumeFrom || hasOnlyRelativeTargetChanged || hasLayoutChanged && (hasTargetChanged || !this.currentAnimation)) {
|
|
6975
7012
|
if (this.resumeFrom) {
|
|
6976
7013
|
this.resumingFrom = this.resumeFrom;
|
|
6977
7014
|
this.resumingFrom.resumingFrom = void 0;
|
|
@@ -7120,6 +7157,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7120
7157
|
if (this.snapshot || !this.instance)
|
|
7121
7158
|
return;
|
|
7122
7159
|
this.snapshot = this.measure();
|
|
7160
|
+
if (this.snapshot && !calcLength(this.snapshot.measuredBox.x) && !calcLength(this.snapshot.measuredBox.y)) {
|
|
7161
|
+
this.snapshot = void 0;
|
|
7162
|
+
}
|
|
7123
7163
|
}
|
|
7124
7164
|
updateLayout() {
|
|
7125
7165
|
if (!this.instance)
|
|
@@ -7352,9 +7392,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7352
7392
|
this.relativeParent = this.relativeTarget = void 0;
|
|
7353
7393
|
}
|
|
7354
7394
|
}
|
|
7355
|
-
if (isDebug) {
|
|
7356
|
-
metrics.resolvedTargetDeltas++;
|
|
7357
|
-
}
|
|
7358
7395
|
}
|
|
7359
7396
|
getClosestProjectingParent() {
|
|
7360
7397
|
if (!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues)) {
|
|
@@ -7420,9 +7457,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7420
7457
|
this.scheduleRender();
|
|
7421
7458
|
this.notifyListeners("projectionUpdate", target);
|
|
7422
7459
|
}
|
|
7423
|
-
if (isDebug) {
|
|
7424
|
-
metrics.recalculatedProjection++;
|
|
7425
|
-
}
|
|
7426
7460
|
}
|
|
7427
7461
|
hide() {
|
|
7428
7462
|
this.isVisible = false;
|
|
@@ -7507,6 +7541,8 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7507
7541
|
this.mixTargetDelta(latest);
|
|
7508
7542
|
options.onUpdate && options.onUpdate(latest);
|
|
7509
7543
|
},
|
|
7544
|
+
onStop: () => {
|
|
7545
|
+
},
|
|
7510
7546
|
onComplete: () => {
|
|
7511
7547
|
options.onComplete && options.onComplete();
|
|
7512
7548
|
this.completeAnimation();
|
|
@@ -7678,7 +7714,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7678
7714
|
for (const key in scaleCorrectors) {
|
|
7679
7715
|
if (valuesToRender[key] === void 0)
|
|
7680
7716
|
continue;
|
|
7681
|
-
const { correct, applyTo } = scaleCorrectors[key];
|
|
7717
|
+
const { correct, applyTo, isCSSVariable } = scaleCorrectors[key];
|
|
7682
7718
|
const corrected = styles.transform === "none" ? valuesToRender[key] : correct(valuesToRender[key], lead);
|
|
7683
7719
|
if (applyTo) {
|
|
7684
7720
|
const num = applyTo.length;
|
|
@@ -7686,7 +7722,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7686
7722
|
styles[applyTo[i]] = corrected;
|
|
7687
7723
|
}
|
|
7688
7724
|
} else {
|
|
7689
|
-
|
|
7725
|
+
if (isCSSVariable) {
|
|
7726
|
+
this.options.visualElement.renderState.vars[key] = corrected;
|
|
7727
|
+
} else {
|
|
7728
|
+
styles[key] = corrected;
|
|
7729
|
+
}
|
|
7690
7730
|
}
|
|
7691
7731
|
}
|
|
7692
7732
|
if (this.options.layoutId) {
|
|
@@ -7745,7 +7785,7 @@ function notifyLayoutUpdate(node) {
|
|
|
7745
7785
|
calcBoxDelta(visualDelta, layout, snapshot.layoutBox);
|
|
7746
7786
|
}
|
|
7747
7787
|
const hasLayoutChanged = !isDeltaZero(layoutDelta);
|
|
7748
|
-
let
|
|
7788
|
+
let hasRelativeLayoutChanged = false;
|
|
7749
7789
|
if (!node.resumeFrom) {
|
|
7750
7790
|
const relativeParent = node.getClosestProjectingParent();
|
|
7751
7791
|
if (relativeParent && !relativeParent.resumeFrom) {
|
|
@@ -7756,7 +7796,7 @@ function notifyLayoutUpdate(node) {
|
|
|
7756
7796
|
const relativeLayout = createBox$1();
|
|
7757
7797
|
calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);
|
|
7758
7798
|
if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {
|
|
7759
|
-
|
|
7799
|
+
hasRelativeLayoutChanged = true;
|
|
7760
7800
|
}
|
|
7761
7801
|
if (relativeParent.options.layoutRoot) {
|
|
7762
7802
|
node.relativeTarget = relativeLayout;
|
|
@@ -7772,7 +7812,7 @@ function notifyLayoutUpdate(node) {
|
|
|
7772
7812
|
delta: visualDelta,
|
|
7773
7813
|
layoutDelta,
|
|
7774
7814
|
hasLayoutChanged,
|
|
7775
|
-
|
|
7815
|
+
hasRelativeLayoutChanged
|
|
7776
7816
|
});
|
|
7777
7817
|
} else if (node.isLead()) {
|
|
7778
7818
|
const { onExitComplete } = node.options;
|
|
@@ -7781,9 +7821,6 @@ function notifyLayoutUpdate(node) {
|
|
|
7781
7821
|
node.options.transition = void 0;
|
|
7782
7822
|
}
|
|
7783
7823
|
function propagateDirtyNodes(node) {
|
|
7784
|
-
if (isDebug) {
|
|
7785
|
-
metrics.totalNodes++;
|
|
7786
|
-
}
|
|
7787
7824
|
if (!node.parent)
|
|
7788
7825
|
return;
|
|
7789
7826
|
if (!node.isProjecting()) {
|
|
@@ -8511,7 +8548,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8511
8548
|
state2.update(getMotionProps());
|
|
8512
8549
|
});
|
|
8513
8550
|
function getProps() {
|
|
8514
|
-
|
|
8551
|
+
var _a, _b;
|
|
8552
|
+
const isSVG = ((_a = state2.visualElement) == null ? void 0 : _a.type) === "svg";
|
|
8515
8553
|
const attrsProps = { ...attrs };
|
|
8516
8554
|
Object.keys(attrs).forEach((key) => {
|
|
8517
8555
|
if (isMotionValue(attrs[key]))
|
|
@@ -8519,7 +8557,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8519
8557
|
});
|
|
8520
8558
|
let styleProps = {
|
|
8521
8559
|
...props.style,
|
|
8522
|
-
...isSVG ? {} : state2.visualElement.latestValues
|
|
8560
|
+
...isSVG ? {} : (_b = state2.visualElement) == null ? void 0 : _b.latestValues
|
|
8523
8561
|
};
|
|
8524
8562
|
if (isSVG) {
|
|
8525
8563
|
const { attributes, style: style2 } = convertSvgStyleToAttributes(state2.target);
|
|
@@ -9571,6 +9609,7 @@ exports.frame = frame;
|
|
|
9571
9609
|
exports.frameData = frameData;
|
|
9572
9610
|
exports.frameSteps = frameSteps;
|
|
9573
9611
|
exports.getContextWindow = getContextWindow;
|
|
9612
|
+
exports.hover = hover;
|
|
9574
9613
|
exports.inView = inView;
|
|
9575
9614
|
exports.inertia = inertia;
|
|
9576
9615
|
exports.injectLayoutGroup = injectLayoutGroup;
|
|
@@ -9586,6 +9625,7 @@ exports.motion = motion;
|
|
|
9586
9625
|
exports.motionValue = motionValue;
|
|
9587
9626
|
exports.noop = noop;
|
|
9588
9627
|
exports.pipe = pipe;
|
|
9628
|
+
exports.press = press;
|
|
9589
9629
|
exports.progress = progress$1;
|
|
9590
9630
|
exports.provideLayoutGroup = provideLayoutGroup;
|
|
9591
9631
|
exports.provideMotion = provideMotion;
|