motion-v 0.10.0-beta.1 → 0.10.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 +283 -250
- package/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/animation/hooks/use-animate.mjs +1 -1
- package/dist/es/components/LayoutGroup.d.ts +15 -1
- package/dist/es/components/LayoutGroup.vue.mjs +1 -1
- package/dist/es/components/RowValue.d.ts +16 -0
- package/dist/es/components/RowValue.vue.mjs +25 -0
- package/dist/es/components/RowValue.vue2.mjs +4 -0
- package/dist/es/components/animate-presence/AnimatePresence.d.ts +6 -0
- package/dist/es/components/animate-presence/AnimatePresence.vue.mjs +17 -9
- package/dist/es/components/animate-presence/types.d.ts +2 -0
- package/dist/es/components/animate-presence/use-pop-layout.mjs +10 -9
- package/dist/es/components/group.mjs +1 -0
- package/dist/es/components/index.d.ts +2 -0
- package/dist/es/components/motion/Motion.vue.mjs +2 -3
- package/dist/es/components/motion/NameSpace.d.ts +5 -2
- package/dist/es/components/reorder/Group.vue.mjs +3 -1
- package/dist/es/components/reorder/utils.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animate/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +11 -14
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +8 -8
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +3 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -2
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +6 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/sequence/create.mjs +5 -5
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/utils/map.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/frameloop/batcher.mjs +18 -6
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/frameloop/frame.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/frameloop/index-legacy.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/frameloop/render-step.mjs +1 -8
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +35 -22
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +8 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/VisualElement.mjs +2 -6
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +0 -12
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/delay.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/interpolate.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/offsets/fill.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/hover.mjs +11 -11
- package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/press/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/utils/supports/memo.mjs +2 -2
- package/dist/es/external/.pnpm/motion-dom@11.16.4/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +6 -0
- package/dist/es/external/.pnpm/{motion-utils@12.0.0 → motion-utils@11.16.0}/external/motion-utils/dist/es/memo.mjs +0 -1
- package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/noop.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-utils@12.0.0 → motion-utils@11.16.0}/external/motion-utils/dist/es/progress.mjs +1 -1
- package/dist/es/external/.pnpm/motion-utils@11.16.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 +3 -4
- 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.d.ts +0 -1
- package/dist/es/features/layout/layout.mjs +17 -12
- package/dist/es/features/layout/projection.mjs +2 -2
- package/dist/es/features/svg.mjs +1 -1
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.mjs +43 -41
- 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.d.ts +4 -3
- package/dist/es/state/motion-state.mjs +45 -39
- package/dist/es/state/utils.d.ts +1 -0
- package/dist/es/state/utils.mjs +22 -1
- package/dist/es/types/motion-values.d.ts +4 -2
- package/dist/es/utils/delay.d.ts +1 -0
- package/dist/es/utils/delay.mjs +8 -0
- package/dist/es/utils/use-animation-frame.mjs +1 -1
- package/dist/es/utils/use-in-view.mjs +1 -1
- package/dist/es/value/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 +5 -4
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -6
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/frameloop/order.mjs +0 -17
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -14
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/render/svg/utils/measure.mjs +0 -15
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/stats/buffer.mjs +0 -7
- package/dist/es/external/.pnpm/motion-dom@12.0.0/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +0 -6
- package/dist/es/external/.pnpm/motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs +0 -4
- package/dist/es/external/.pnpm/motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs +0 -6
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animate/single-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/back.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/utils/keys-position.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/utils/keys-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/store.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +1 -1
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/setters.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/warn-once.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.0 → framer-motion@11.16.6}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/utils/resolve-elements.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.0.0 → motion-dom@11.16.4}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.0.0 → motion-utils@11.16.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 =
|
|
6
|
+
const noop = (any) => any;
|
|
7
7
|
let warning = noop;
|
|
8
8
|
exports.invariant = noop;
|
|
9
9
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -18,7 +18,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
// @__NO_SIDE_EFFECTS__
|
|
22
21
|
function memo(callback) {
|
|
23
22
|
let result;
|
|
24
23
|
return () => {
|
|
@@ -27,13 +26,13 @@ function memo(callback) {
|
|
|
27
26
|
return result;
|
|
28
27
|
};
|
|
29
28
|
}
|
|
30
|
-
const progress$1 =
|
|
29
|
+
const progress$1 = (from, to, value) => {
|
|
31
30
|
const toFromDifference = to - from;
|
|
32
31
|
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
|
|
33
32
|
};
|
|
34
|
-
const secondsToMilliseconds$1 =
|
|
35
|
-
const millisecondsToSeconds$1 =
|
|
36
|
-
const supportsScrollTimeline =
|
|
33
|
+
const secondsToMilliseconds$1 = (seconds) => seconds * 1e3;
|
|
34
|
+
const millisecondsToSeconds$1 = (milliseconds) => milliseconds / 1e3;
|
|
35
|
+
const supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
37
36
|
class BaseGroupPlaybackControls {
|
|
38
37
|
constructor(animations) {
|
|
39
38
|
this.stop = () => this.runAll("stop");
|
|
@@ -136,7 +135,7 @@ function createGeneratorEasing(options, scale2 = 100, createGenerator) {
|
|
|
136
135
|
ease: (progress2) => {
|
|
137
136
|
return generator.next(duration * progress2).value / scale2;
|
|
138
137
|
},
|
|
139
|
-
duration:
|
|
138
|
+
duration: millisecondsToSeconds$1(duration)
|
|
140
139
|
};
|
|
141
140
|
}
|
|
142
141
|
function isGenerator(type) {
|
|
@@ -153,18 +152,18 @@ class NativeAnimationControls {
|
|
|
153
152
|
get duration() {
|
|
154
153
|
var _a, _b, _c;
|
|
155
154
|
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;
|
|
156
|
-
return
|
|
155
|
+
return millisecondsToSeconds$1(Number(durationInMs));
|
|
157
156
|
}
|
|
158
157
|
get time() {
|
|
159
158
|
var _a;
|
|
160
159
|
if (this.animation) {
|
|
161
|
-
return
|
|
160
|
+
return millisecondsToSeconds$1(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
|
|
162
161
|
}
|
|
163
162
|
return 0;
|
|
164
163
|
}
|
|
165
164
|
set time(newTime) {
|
|
166
165
|
if (this.animation) {
|
|
167
|
-
this.animation.currentTime =
|
|
166
|
+
this.animation.currentTime = secondsToMilliseconds$1(newTime);
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
get speed() {
|
|
@@ -225,7 +224,7 @@ const supportsFlags = {
|
|
|
225
224
|
linearEasing: void 0
|
|
226
225
|
};
|
|
227
226
|
function memoSupports(callback, supportsFlag) {
|
|
228
|
-
const memoized =
|
|
227
|
+
const memoized = memo(callback);
|
|
229
228
|
return () => {
|
|
230
229
|
var _a;
|
|
231
230
|
return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized();
|
|
@@ -243,7 +242,7 @@ const generateLinearEasing = (easing, duration, resolution = 10) => {
|
|
|
243
242
|
let points = "";
|
|
244
243
|
const numPoints = Math.max(Math.round(duration / resolution), 2);
|
|
245
244
|
for (let i = 0; i < numPoints; i++) {
|
|
246
|
-
points += easing(
|
|
245
|
+
points += easing(progress$1(0, numPoints - 1, i)) + ", ";
|
|
247
246
|
}
|
|
248
247
|
return `linear(${points.substring(0, points.length - 2)})`;
|
|
249
248
|
};
|
|
@@ -307,26 +306,26 @@ function setupGesture(elementOrSelector, options) {
|
|
|
307
306
|
const cancel = () => gestureAbortController.abort();
|
|
308
307
|
return [elements, eventOptions, cancel];
|
|
309
308
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
309
|
+
function filterEvents$1(callback) {
|
|
310
|
+
return (event) => {
|
|
311
|
+
if (event.pointerType === "touch" || isDragActive())
|
|
312
|
+
return;
|
|
313
|
+
callback(event);
|
|
314
|
+
};
|
|
312
315
|
}
|
|
313
316
|
function hover(elementOrSelector, onHoverStart, options = {}) {
|
|
314
317
|
const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);
|
|
315
|
-
const onPointerEnter = (enterEvent) => {
|
|
316
|
-
if (!isValidHover(enterEvent))
|
|
317
|
-
return;
|
|
318
|
+
const onPointerEnter = filterEvents$1((enterEvent) => {
|
|
318
319
|
const { target } = enterEvent;
|
|
319
|
-
const onHoverEnd = onHoverStart(
|
|
320
|
+
const onHoverEnd = onHoverStart(enterEvent);
|
|
320
321
|
if (typeof onHoverEnd !== "function" || !target)
|
|
321
322
|
return;
|
|
322
|
-
const onPointerLeave = (leaveEvent) => {
|
|
323
|
-
if (!isValidHover(leaveEvent))
|
|
324
|
-
return;
|
|
323
|
+
const onPointerLeave = filterEvents$1((leaveEvent) => {
|
|
325
324
|
onHoverEnd(leaveEvent);
|
|
326
325
|
target.removeEventListener("pointerleave", onPointerLeave);
|
|
327
|
-
};
|
|
326
|
+
});
|
|
328
327
|
target.addEventListener("pointerleave", onPointerLeave, eventOptions);
|
|
329
|
-
};
|
|
328
|
+
});
|
|
330
329
|
elements.forEach((element) => {
|
|
331
330
|
element.addEventListener("pointerenter", onPointerEnter, eventOptions);
|
|
332
331
|
});
|
|
@@ -397,7 +396,7 @@ function press(elementOrSelector, onPressStart, options = {}) {
|
|
|
397
396
|
if (!isValidPressEvent(startEvent) || isPressing.has(element))
|
|
398
397
|
return;
|
|
399
398
|
isPressing.add(element);
|
|
400
|
-
const onPressEnd = onPressStart(
|
|
399
|
+
const onPressEnd = onPressStart(startEvent);
|
|
401
400
|
const onPointerEnd = (endEvent, success) => {
|
|
402
401
|
window.removeEventListener("pointerup", onPointerUp);
|
|
403
402
|
window.removeEventListener("pointercancel", onPointerCancel);
|
|
@@ -476,10 +475,10 @@ const safeMin = 1e-3;
|
|
|
476
475
|
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
|
|
477
476
|
let envelope;
|
|
478
477
|
let derivative;
|
|
479
|
-
warning(duration <=
|
|
478
|
+
warning(duration <= secondsToMilliseconds$1(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
|
|
480
479
|
let dampingRatio = 1 - bounce;
|
|
481
480
|
dampingRatio = clamp$1(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
|
|
482
|
-
duration = clamp$1(springDefaults.minDuration, springDefaults.maxDuration,
|
|
481
|
+
duration = clamp$1(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds$1(duration));
|
|
483
482
|
if (dampingRatio < 1) {
|
|
484
483
|
envelope = (undampedFreq2) => {
|
|
485
484
|
const exponentialDecay = undampedFreq2 * dampingRatio;
|
|
@@ -513,7 +512,7 @@ function findSpring({ duration = springDefaults.duration, bounce = springDefault
|
|
|
513
512
|
}
|
|
514
513
|
const initialGuess = 5 / duration;
|
|
515
514
|
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
|
|
516
|
-
duration =
|
|
515
|
+
duration = secondsToMilliseconds$1(duration);
|
|
517
516
|
if (isNaN(undampedFreq)) {
|
|
518
517
|
return {
|
|
519
518
|
stiffness: springDefaults.stiffness,
|
|
@@ -590,12 +589,12 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
|
|
|
590
589
|
const state2 = { done: false, value: origin };
|
|
591
590
|
const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
|
|
592
591
|
...options,
|
|
593
|
-
velocity:
|
|
592
|
+
velocity: -millisecondsToSeconds$1(options.velocity || 0)
|
|
594
593
|
});
|
|
595
594
|
const initialVelocity = velocity || 0;
|
|
596
595
|
const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
|
|
597
596
|
const initialDelta = target - origin;
|
|
598
|
-
const undampedAngularFreq =
|
|
597
|
+
const undampedAngularFreq = millisecondsToSeconds$1(Math.sqrt(stiffness / mass));
|
|
599
598
|
const isGranularScale = Math.abs(initialDelta) < 5;
|
|
600
599
|
restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
|
|
601
600
|
restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
|
|
@@ -623,7 +622,7 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
|
|
|
623
622
|
if (!isResolvedFromDuration) {
|
|
624
623
|
let currentVelocity = 0;
|
|
625
624
|
if (dampingRatio < 1) {
|
|
626
|
-
currentVelocity = t === 0 ?
|
|
625
|
+
currentVelocity = t === 0 ? secondsToMilliseconds$1(initialVelocity) : calcGeneratorVelocity(resolveSpring, t, current);
|
|
627
626
|
}
|
|
628
627
|
const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
|
|
629
628
|
const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;
|
|
@@ -658,7 +657,7 @@ const mixNumber$2 = (from, to, progress2) => {
|
|
|
658
657
|
function fillOffset(offset, remaining) {
|
|
659
658
|
const min = offset[offset.length - 1];
|
|
660
659
|
for (let i = 1; i <= remaining; i++) {
|
|
661
|
-
const offsetProgress =
|
|
660
|
+
const offsetProgress = progress$1(0, remaining, i);
|
|
662
661
|
offset.push(mixNumber$2(min, 1, offsetProgress));
|
|
663
662
|
}
|
|
664
663
|
}
|
|
@@ -781,7 +780,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
781
780
|
}
|
|
782
781
|
const springTransition = { ...remainingTransition };
|
|
783
782
|
if (duration !== void 0) {
|
|
784
|
-
springTransition.duration =
|
|
783
|
+
springTransition.duration = secondsToMilliseconds$1(duration);
|
|
785
784
|
}
|
|
786
785
|
const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);
|
|
787
786
|
ease2 = springEasing.ease;
|
|
@@ -845,7 +844,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
845
844
|
for (let i = 0; i < valueSequence.length; i++) {
|
|
846
845
|
const { at, value, easing } = valueSequence[i];
|
|
847
846
|
keyframes2.push(value);
|
|
848
|
-
valueOffset.push(
|
|
847
|
+
valueOffset.push(progress$1(0, totalDuration, at));
|
|
849
848
|
valueEasing.push(easing || "easeOut");
|
|
850
849
|
}
|
|
851
850
|
if (valueOffset[0] !== 0) {
|
|
@@ -939,25 +938,7 @@ const MotionGlobalConfig = {
|
|
|
939
938
|
skipAnimations: false,
|
|
940
939
|
useManualTiming: false
|
|
941
940
|
};
|
|
942
|
-
|
|
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) {
|
|
941
|
+
function createRenderStep(runNextFrame) {
|
|
961
942
|
let thisFrame = /* @__PURE__ */ new Set();
|
|
962
943
|
let nextFrame = /* @__PURE__ */ new Set();
|
|
963
944
|
let isProcessing = false;
|
|
@@ -968,13 +949,11 @@ function createRenderStep(runNextFrame, stepName) {
|
|
|
968
949
|
timestamp: 0,
|
|
969
950
|
isProcessing: false
|
|
970
951
|
};
|
|
971
|
-
let numCalls = 0;
|
|
972
952
|
function triggerCallback(callback) {
|
|
973
953
|
if (toKeepAlive.has(callback)) {
|
|
974
954
|
step.schedule(callback);
|
|
975
955
|
runNextFrame();
|
|
976
956
|
}
|
|
977
|
-
numCalls++;
|
|
978
957
|
callback(latestFrameData);
|
|
979
958
|
}
|
|
980
959
|
const step = {
|
|
@@ -1009,10 +988,6 @@ function createRenderStep(runNextFrame, stepName) {
|
|
|
1009
988
|
isProcessing = true;
|
|
1010
989
|
[thisFrame, nextFrame] = [nextFrame, thisFrame];
|
|
1011
990
|
thisFrame.forEach(triggerCallback);
|
|
1012
|
-
if (stepName && statsBuffer.value) {
|
|
1013
|
-
statsBuffer.value.frameloop[stepName].push(numCalls);
|
|
1014
|
-
}
|
|
1015
|
-
numCalls = 0;
|
|
1016
991
|
thisFrame.clear();
|
|
1017
992
|
isProcessing = false;
|
|
1018
993
|
if (flushNextFrame) {
|
|
@@ -1023,6 +998,20 @@ function createRenderStep(runNextFrame, stepName) {
|
|
|
1023
998
|
};
|
|
1024
999
|
return step;
|
|
1025
1000
|
}
|
|
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
|
+
];
|
|
1026
1015
|
const maxElapsed$1 = 40;
|
|
1027
1016
|
function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
1028
1017
|
let runNextFrame = false;
|
|
@@ -1034,16 +1023,14 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
1034
1023
|
};
|
|
1035
1024
|
const flagRunNextFrame = () => runNextFrame = true;
|
|
1036
1025
|
const steps2 = stepsOrder.reduce((acc, key) => {
|
|
1037
|
-
acc[key] = createRenderStep(flagRunNextFrame
|
|
1026
|
+
acc[key] = createRenderStep(flagRunNextFrame);
|
|
1038
1027
|
return acc;
|
|
1039
1028
|
}, {});
|
|
1040
1029
|
const { read, resolveKeyframes, update, preRender, render, postRender } = steps2;
|
|
1041
1030
|
const processBatch = () => {
|
|
1042
1031
|
const timestamp = performance.now();
|
|
1043
1032
|
runNextFrame = false;
|
|
1044
|
-
|
|
1045
|
-
state2.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state2.timestamp, maxElapsed$1), 1);
|
|
1046
|
-
}
|
|
1033
|
+
state2.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state2.timestamp, maxElapsed$1), 1);
|
|
1047
1034
|
state2.timestamp = timestamp;
|
|
1048
1035
|
state2.isProcessing = true;
|
|
1049
1036
|
read.process(state2);
|
|
@@ -1150,7 +1137,7 @@ class MotionValue {
|
|
|
1150
1137
|
* @internal
|
|
1151
1138
|
*/
|
|
1152
1139
|
constructor(init, options = {}) {
|
|
1153
|
-
this.version = "
|
|
1140
|
+
this.version = "11.16.6";
|
|
1154
1141
|
this.canTrackVelocity = null;
|
|
1155
1142
|
this.events = {};
|
|
1156
1143
|
this.updateAndNotify = (v, render = true) => {
|
|
@@ -2235,8 +2222,8 @@ class BaseAnimation {
|
|
|
2235
2222
|
const { name, type, velocity, delay: delay2, onComplete, onUpdate, isGenerator: isGenerator2 } = this.options;
|
|
2236
2223
|
if (!isGenerator2 && !canAnimate(keyframes2, name, type, velocity)) {
|
|
2237
2224
|
if (!delay2) {
|
|
2238
|
-
onUpdate
|
|
2239
|
-
onComplete
|
|
2225
|
+
onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(getFinalKeyframe(keyframes2, this.options, finalKeyframe));
|
|
2226
|
+
onComplete === null || onComplete === void 0 ? void 0 : onComplete();
|
|
2240
2227
|
this.resolveFinishedPromise();
|
|
2241
2228
|
return;
|
|
2242
2229
|
} else {
|
|
@@ -2558,7 +2545,7 @@ function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer
|
|
|
2558
2545
|
break;
|
|
2559
2546
|
}
|
|
2560
2547
|
}
|
|
2561
|
-
const progressInRange =
|
|
2548
|
+
const progressInRange = progress$1(input[i], input[i + 1], v);
|
|
2562
2549
|
return mixers[i](progressInRange);
|
|
2563
2550
|
};
|
|
2564
2551
|
return isClamp ? (v) => interpolator(clamp$1(input[0], input[inputLength - 1], v)) : interpolator;
|
|
@@ -2762,13 +2749,13 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2762
2749
|
}
|
|
2763
2750
|
get duration() {
|
|
2764
2751
|
const { resolved } = this;
|
|
2765
|
-
return resolved ?
|
|
2752
|
+
return resolved ? millisecondsToSeconds$1(resolved.calculatedDuration) : 0;
|
|
2766
2753
|
}
|
|
2767
2754
|
get time() {
|
|
2768
|
-
return
|
|
2755
|
+
return millisecondsToSeconds$1(this.currentTime);
|
|
2769
2756
|
}
|
|
2770
2757
|
set time(newTime) {
|
|
2771
|
-
newTime =
|
|
2758
|
+
newTime = secondsToMilliseconds$1(newTime);
|
|
2772
2759
|
this.currentTime = newTime;
|
|
2773
2760
|
if (this.holdTime !== null || this.speed === 0) {
|
|
2774
2761
|
this.holdTime = newTime;
|
|
@@ -2783,7 +2770,7 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2783
2770
|
const hasChanged2 = this.playbackSpeed !== newSpeed;
|
|
2784
2771
|
this.playbackSpeed = newSpeed;
|
|
2785
2772
|
if (hasChanged2) {
|
|
2786
|
-
this.time =
|
|
2773
|
+
this.time = millisecondsToSeconds$1(this.currentTime);
|
|
2787
2774
|
}
|
|
2788
2775
|
}
|
|
2789
2776
|
play() {
|
|
@@ -2884,7 +2871,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
2884
2871
|
const easing = mapEasingToNativeEasing(ease2, duration);
|
|
2885
2872
|
if (Array.isArray(easing))
|
|
2886
2873
|
keyframeOptions.easing = easing;
|
|
2887
|
-
|
|
2874
|
+
return element.animate(keyframeOptions, {
|
|
2888
2875
|
delay: delay2,
|
|
2889
2876
|
duration,
|
|
2890
2877
|
easing: !Array.isArray(easing) ? easing : "linear",
|
|
@@ -2892,7 +2879,6 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
2892
2879
|
iterations: repeat + 1,
|
|
2893
2880
|
direction: repeatType === "reverse" ? "alternate" : "normal"
|
|
2894
2881
|
});
|
|
2895
|
-
return animation;
|
|
2896
2882
|
}
|
|
2897
2883
|
const supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
2898
2884
|
const sampleDelta = 10;
|
|
@@ -2939,8 +2925,9 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
2939
2925
|
this.resolver.scheduleResolve();
|
|
2940
2926
|
}
|
|
2941
2927
|
initPlayback(keyframes2, finalKeyframe) {
|
|
2928
|
+
var _a;
|
|
2942
2929
|
let { duration = 300, times, ease: ease2, type, motionValue: motionValue2, name, startTime } = this.options;
|
|
2943
|
-
if (!motionValue2.owner ||
|
|
2930
|
+
if (!((_a = motionValue2.owner) === null || _a === void 0 ? void 0 : _a.current)) {
|
|
2944
2931
|
return false;
|
|
2945
2932
|
}
|
|
2946
2933
|
if (typeof ease2 === "string" && supportsLinearEasing() && isUnsupportedEase(ease2)) {
|
|
@@ -2986,21 +2973,21 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
2986
2973
|
if (!resolved)
|
|
2987
2974
|
return 0;
|
|
2988
2975
|
const { duration } = resolved;
|
|
2989
|
-
return
|
|
2976
|
+
return millisecondsToSeconds$1(duration);
|
|
2990
2977
|
}
|
|
2991
2978
|
get time() {
|
|
2992
2979
|
const { resolved } = this;
|
|
2993
2980
|
if (!resolved)
|
|
2994
2981
|
return 0;
|
|
2995
2982
|
const { animation } = resolved;
|
|
2996
|
-
return
|
|
2983
|
+
return millisecondsToSeconds$1(animation.currentTime || 0);
|
|
2997
2984
|
}
|
|
2998
2985
|
set time(newTime) {
|
|
2999
2986
|
const { resolved } = this;
|
|
3000
2987
|
if (!resolved)
|
|
3001
2988
|
return;
|
|
3002
2989
|
const { animation } = resolved;
|
|
3003
|
-
animation.currentTime =
|
|
2990
|
+
animation.currentTime = secondsToMilliseconds$1(newTime);
|
|
3004
2991
|
}
|
|
3005
2992
|
get speed() {
|
|
3006
2993
|
const { resolved } = this;
|
|
@@ -3090,7 +3077,7 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3090
3077
|
times,
|
|
3091
3078
|
isGenerator: true
|
|
3092
3079
|
});
|
|
3093
|
-
const sampleTime =
|
|
3080
|
+
const sampleTime = secondsToMilliseconds$1(this.time);
|
|
3094
3081
|
motionValue2.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
|
|
3095
3082
|
}
|
|
3096
3083
|
const { onStop } = this.options;
|
|
@@ -3111,15 +3098,11 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3111
3098
|
}
|
|
3112
3099
|
static supports(options) {
|
|
3113
3100
|
const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type } = options;
|
|
3114
|
-
|
|
3115
|
-
return false;
|
|
3116
|
-
}
|
|
3117
|
-
const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
|
|
3118
|
-
return supportsWaapi() && name && acceleratedValues.has(name) && /**
|
|
3101
|
+
return supportsWaapi() && name && acceleratedValues.has(name) && motionValue2 && motionValue2.owner && motionValue2.owner.current instanceof HTMLElement && /**
|
|
3119
3102
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
3120
3103
|
* no way to read the value from WAAPI every frame.
|
|
3121
3104
|
*/
|
|
3122
|
-
!onUpdate && !
|
|
3105
|
+
!motionValue2.owner.getProps().onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
3123
3106
|
}
|
|
3124
3107
|
}
|
|
3125
3108
|
const underDampedSpring = {
|
|
@@ -3158,7 +3141,7 @@ const animateMotionValue = (name, value, target, transition = {}, element, isHan
|
|
|
3158
3141
|
const valueTransition = getValueTransition$1(transition, name) || {};
|
|
3159
3142
|
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
3160
3143
|
let { elapsed = 0 } = transition;
|
|
3161
|
-
elapsed = elapsed -
|
|
3144
|
+
elapsed = elapsed - secondsToMilliseconds$1(delay2);
|
|
3162
3145
|
let options = {
|
|
3163
3146
|
keyframes: Array.isArray(target) ? target : [null, target],
|
|
3164
3147
|
ease: "easeOut",
|
|
@@ -3184,10 +3167,10 @@ const animateMotionValue = (name, value, target, transition = {}, element, isHan
|
|
|
3184
3167
|
};
|
|
3185
3168
|
}
|
|
3186
3169
|
if (options.duration) {
|
|
3187
|
-
options.duration =
|
|
3170
|
+
options.duration = secondsToMilliseconds$1(options.duration);
|
|
3188
3171
|
}
|
|
3189
3172
|
if (options.repeatDelay) {
|
|
3190
|
-
options.repeatDelay =
|
|
3173
|
+
options.repeatDelay = secondsToMilliseconds$1(options.repeatDelay);
|
|
3191
3174
|
}
|
|
3192
3175
|
if (options.from !== void 0) {
|
|
3193
3176
|
options.keyframes[0] = options.from;
|
|
@@ -3355,7 +3338,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3355
3338
|
if (isMotionValue$1(nextValue)) {
|
|
3356
3339
|
element.addValue(key, nextValue);
|
|
3357
3340
|
if (process.env.NODE_ENV === "development") {
|
|
3358
|
-
warnOnce(nextValue.version === "
|
|
3341
|
+
warnOnce(nextValue.version === "11.16.6", `Attempting to mix Motion versions ${nextValue.version} with 11.16.6 may not work as expected.`);
|
|
3359
3342
|
}
|
|
3360
3343
|
} else if (isMotionValue$1(prevValue)) {
|
|
3361
3344
|
element.addValue(key, motionValue(nextValue, { owner: element }));
|
|
@@ -3427,8 +3410,7 @@ class VisualElement {
|
|
|
3427
3410
|
frame.render(this.render, false, true);
|
|
3428
3411
|
}
|
|
3429
3412
|
};
|
|
3430
|
-
const { latestValues, renderState
|
|
3431
|
-
this.onUpdate = onUpdate;
|
|
3413
|
+
const { latestValues, renderState } = visualState;
|
|
3432
3414
|
this.latestValues = latestValues;
|
|
3433
3415
|
this.baseTarget = { ...latestValues };
|
|
3434
3416
|
this.initialValues = props.initial ? { ...latestValues } : {};
|
|
@@ -3476,6 +3458,7 @@ class VisualElement {
|
|
|
3476
3458
|
this.update(this.props, this.presenceContext);
|
|
3477
3459
|
}
|
|
3478
3460
|
unmount() {
|
|
3461
|
+
visualElementStore.delete(this.current);
|
|
3479
3462
|
this.projection && this.projection.unmount();
|
|
3480
3463
|
cancelFrame(this.notifyUpdate);
|
|
3481
3464
|
cancelFrame(this.render);
|
|
@@ -3500,9 +3483,6 @@ class VisualElement {
|
|
|
3500
3483
|
this.valueSubscriptions.get(key)();
|
|
3501
3484
|
}
|
|
3502
3485
|
const valueIsTransform = transformProps.has(key);
|
|
3503
|
-
if (valueIsTransform && this.onBindTransform) {
|
|
3504
|
-
this.onBindTransform();
|
|
3505
|
-
}
|
|
3506
3486
|
const removeOnChange = value.on("change", (latestValue) => {
|
|
3507
3487
|
this.latestValues[key] = latestValue;
|
|
3508
3488
|
this.props.onUpdate && frame.preRender(this.notifyUpdate);
|
|
@@ -3596,7 +3576,6 @@ class VisualElement {
|
|
|
3596
3576
|
if (this.handleChildMotionValue) {
|
|
3597
3577
|
this.handleChildMotionValue();
|
|
3598
3578
|
}
|
|
3599
|
-
this.onUpdate && this.onUpdate(this);
|
|
3600
3579
|
}
|
|
3601
3580
|
getProps() {
|
|
3602
3581
|
return this.props;
|
|
@@ -3839,6 +3818,14 @@ function buildHTMLStyles(state2, latestValues, transformTemplate) {
|
|
|
3839
3818
|
style2.transformOrigin = `${originX} ${originY} ${originZ}`;
|
|
3840
3819
|
}
|
|
3841
3820
|
}
|
|
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
|
+
}
|
|
3842
3829
|
const dashKeys = {
|
|
3843
3830
|
offset: "stroke-dashoffset",
|
|
3844
3831
|
array: "stroke-dasharray"
|
|
@@ -3855,14 +3842,6 @@ function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true
|
|
|
3855
3842
|
const pathSpacing = px.transform(spacing);
|
|
3856
3843
|
attrs[keys2.array] = `${pathLength} ${pathSpacing}`;
|
|
3857
3844
|
}
|
|
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
|
-
}
|
|
3866
3845
|
function buildSVGAttrs(state2, {
|
|
3867
3846
|
attrX,
|
|
3868
3847
|
attrY,
|
|
@@ -3929,18 +3908,6 @@ const camelCaseAttributes = /* @__PURE__ */ new Set([
|
|
|
3929
3908
|
"lengthAdjust"
|
|
3930
3909
|
]);
|
|
3931
3910
|
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
|
-
}
|
|
3944
3911
|
function renderHTML(element, { style: style2, vars }, styleProp, projection) {
|
|
3945
3912
|
Object.assign(element.style, style2, projection && projection.getProjectionStyles(styleProp));
|
|
3946
3913
|
for (const key in vars) {
|
|
@@ -3955,12 +3922,7 @@ function renderSVG(element, renderState, _styleProp, projection) {
|
|
|
3955
3922
|
}
|
|
3956
3923
|
const scaleCorrectors = {};
|
|
3957
3924
|
function addScaleCorrector(correctors) {
|
|
3958
|
-
|
|
3959
|
-
scaleCorrectors[key] = correctors[key];
|
|
3960
|
-
if (isCSSVariableName(key)) {
|
|
3961
|
-
scaleCorrectors[key].isCSSVariable = true;
|
|
3962
|
-
}
|
|
3963
|
-
}
|
|
3925
|
+
Object.assign(scaleCorrectors, correctors);
|
|
3964
3926
|
}
|
|
3965
3927
|
function isForcedMotionValue(key, { layout, layoutId }) {
|
|
3966
3928
|
return transformProps.has(key) || key.startsWith("origin") || (layout || layoutId !== void 0) && (!!scaleCorrectors[key] || key === "opacity");
|
|
@@ -3992,11 +3954,6 @@ class SVGVisualElement extends DOMVisualElement {
|
|
|
3992
3954
|
this.type = "svg";
|
|
3993
3955
|
this.isSVGTag = false;
|
|
3994
3956
|
this.measureInstanceViewportBox = createBox$1;
|
|
3995
|
-
this.updateDimensions = () => {
|
|
3996
|
-
if (this.current && !this.renderState.dimensions) {
|
|
3997
|
-
updateSVGDimensions(this.current, this.renderState);
|
|
3998
|
-
}
|
|
3999
|
-
};
|
|
4000
3957
|
}
|
|
4001
3958
|
getBaseTargetFromProps(props, key) {
|
|
4002
3959
|
return props[key];
|
|
@@ -4012,11 +3969,6 @@ class SVGVisualElement extends DOMVisualElement {
|
|
|
4012
3969
|
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
4013
3970
|
return scrapeMotionValuesFromProps(props, prevProps, visualElement);
|
|
4014
3971
|
}
|
|
4015
|
-
onBindTransform() {
|
|
4016
|
-
if (this.current && !this.renderState.dimensions) {
|
|
4017
|
-
frame.postRender(this.updateDimensions);
|
|
4018
|
-
}
|
|
4019
|
-
}
|
|
4020
3972
|
build(renderState, latestValues, props) {
|
|
4021
3973
|
buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);
|
|
4022
3974
|
}
|
|
@@ -4273,7 +4225,7 @@ function animateSequence(sequence, options, scope) {
|
|
|
4273
4225
|
return animations;
|
|
4274
4226
|
}
|
|
4275
4227
|
function isSequence(value) {
|
|
4276
|
-
return Array.isArray(value) &&
|
|
4228
|
+
return Array.isArray(value) && Array.isArray(value[0]);
|
|
4277
4229
|
}
|
|
4278
4230
|
function createScopedAnimate(scope) {
|
|
4279
4231
|
function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {
|
|
@@ -4293,7 +4245,7 @@ function createScopedAnimate(scope) {
|
|
|
4293
4245
|
}
|
|
4294
4246
|
const animate = createScopedAnimate();
|
|
4295
4247
|
function setCSSVar(element, name, value) {
|
|
4296
|
-
element.style.setProperty(name
|
|
4248
|
+
element.style.setProperty(`--${name}`, value);
|
|
4297
4249
|
}
|
|
4298
4250
|
function setStyle(element, name, value) {
|
|
4299
4251
|
element.style[name] = value;
|
|
@@ -4342,7 +4294,7 @@ class NativeAnimation extends NativeAnimationControls {
|
|
|
4342
4294
|
if (isGenerator(options.type)) {
|
|
4343
4295
|
const generatorOptions = createGeneratorEasing(options, 100, options.type);
|
|
4344
4296
|
options.ease = supportsLinearEasing() ? generatorOptions.ease : defaultEasing;
|
|
4345
|
-
options.duration =
|
|
4297
|
+
options.duration = secondsToMilliseconds$1(generatorOptions.duration);
|
|
4346
4298
|
options.type = "keyframes";
|
|
4347
4299
|
} else {
|
|
4348
4300
|
options.ease = options.ease || defaultEasing;
|
|
@@ -4357,8 +4309,8 @@ class NativeAnimation extends NativeAnimationControls {
|
|
|
4357
4309
|
this.options = options;
|
|
4358
4310
|
this.updateFinishedPromise();
|
|
4359
4311
|
this.removeAnimation = () => {
|
|
4360
|
-
|
|
4361
|
-
|
|
4312
|
+
var _a;
|
|
4313
|
+
return (_a = state.get(element)) === null || _a === void 0 ? void 0 : _a.delete(valueName);
|
|
4362
4314
|
};
|
|
4363
4315
|
};
|
|
4364
4316
|
if (!supportsWaapi()) {
|
|
@@ -4415,8 +4367,8 @@ function animateElements(elementOrSelector, keyframes2, options, scope) {
|
|
|
4415
4367
|
const valueOptions = {
|
|
4416
4368
|
...getValueTransition$1(elementTransition, valueName)
|
|
4417
4369
|
};
|
|
4418
|
-
valueOptions.duration = valueOptions.duration ?
|
|
4419
|
-
valueOptions.delay =
|
|
4370
|
+
valueOptions.duration = valueOptions.duration ? secondsToMilliseconds$1(valueOptions.duration) : valueOptions.duration;
|
|
4371
|
+
valueOptions.delay = secondsToMilliseconds$1(valueOptions.delay || 0);
|
|
4420
4372
|
animations.push(new NativeAnimation(element, valueName, valueKeyframes, valueOptions));
|
|
4421
4373
|
}
|
|
4422
4374
|
}
|
|
@@ -4568,7 +4520,7 @@ function updateAxisInfo(element, axisName, info, time2) {
|
|
|
4568
4520
|
axis.offset.length = 0;
|
|
4569
4521
|
axis.offset[0] = 0;
|
|
4570
4522
|
axis.offset[1] = axis.scrollLength;
|
|
4571
|
-
axis.progress =
|
|
4523
|
+
axis.progress = progress$1(0, axis.scrollLength, axis.current);
|
|
4572
4524
|
const elapsed = time2 - prevTime;
|
|
4573
4525
|
axis.velocity = elapsed > maxElapsed ? 0 : velocityPerSecond(axis.current - prev, elapsed);
|
|
4574
4526
|
}
|
|
@@ -4874,7 +4826,7 @@ function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount =
|
|
|
4874
4826
|
if (entry.isIntersecting === Boolean(onEnd))
|
|
4875
4827
|
return;
|
|
4876
4828
|
if (entry.isIntersecting) {
|
|
4877
|
-
const newOnEnd = onStart(entry
|
|
4829
|
+
const newOnEnd = onStart(entry);
|
|
4878
4830
|
if (typeof newOnEnd === "function") {
|
|
4879
4831
|
activeIntersections.set(entry.target, newOnEnd);
|
|
4880
4832
|
} else {
|
|
@@ -4923,7 +4875,7 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2 } = {})
|
|
|
4923
4875
|
return startDelay + delay2;
|
|
4924
4876
|
};
|
|
4925
4877
|
}
|
|
4926
|
-
function delay(callback, timeout) {
|
|
4878
|
+
function delay$1(callback, timeout) {
|
|
4927
4879
|
const start = time.now();
|
|
4928
4880
|
const checkElapsed = ({ timestamp }) => {
|
|
4929
4881
|
const elapsed = timestamp - start;
|
|
@@ -4936,7 +4888,7 @@ function delay(callback, timeout) {
|
|
|
4936
4888
|
return () => cancelFrame(checkElapsed);
|
|
4937
4889
|
}
|
|
4938
4890
|
function delayInSeconds(callback, timeout) {
|
|
4939
|
-
return delay(callback,
|
|
4891
|
+
return delay$1(callback, secondsToMilliseconds$1(timeout));
|
|
4940
4892
|
}
|
|
4941
4893
|
const distance = (a, b) => Math.abs(a - b);
|
|
4942
4894
|
function distance2D(a, b) {
|
|
@@ -5060,7 +5012,7 @@ function shallowCompare(next, prev) {
|
|
|
5060
5012
|
return true;
|
|
5061
5013
|
}
|
|
5062
5014
|
function getOptions(options, key) {
|
|
5063
|
-
return options[key] ? { ...options, ...options[key] } : { ...options };
|
|
5015
|
+
return options[key] ? { ...options, ...options[key], [key]: void 0 } : { ...options };
|
|
5064
5016
|
}
|
|
5065
5017
|
function isCssVar(name) {
|
|
5066
5018
|
return name == null ? void 0 : name.startsWith("--");
|
|
@@ -5130,6 +5082,26 @@ const svgElementSet = new Set(svgElements);
|
|
|
5130
5082
|
function isSVGElement$1(as) {
|
|
5131
5083
|
return svgElementSet.has(as);
|
|
5132
5084
|
}
|
|
5085
|
+
function isAnimateChanged(oldOptions, newOptions) {
|
|
5086
|
+
const oldAnimate = oldOptions.animate;
|
|
5087
|
+
const newAnimate = newOptions.animate;
|
|
5088
|
+
if (oldAnimate === newAnimate)
|
|
5089
|
+
return false;
|
|
5090
|
+
if (!oldAnimate || !newAnimate)
|
|
5091
|
+
return true;
|
|
5092
|
+
if (typeof oldAnimate === "object" || typeof newAnimate === "object") {
|
|
5093
|
+
const oldKeys = Object.keys(oldAnimate);
|
|
5094
|
+
const newKeys = Object.keys(newAnimate);
|
|
5095
|
+
if (oldKeys.length !== newKeys.length)
|
|
5096
|
+
return true;
|
|
5097
|
+
return oldKeys.some((key) => {
|
|
5098
|
+
const oldVal = oldAnimate[key];
|
|
5099
|
+
const newVal = newAnimate[key];
|
|
5100
|
+
return oldVal !== newVal;
|
|
5101
|
+
});
|
|
5102
|
+
}
|
|
5103
|
+
return oldAnimate !== newAnimate;
|
|
5104
|
+
}
|
|
5133
5105
|
const rotation = {
|
|
5134
5106
|
syntax: "<angle>",
|
|
5135
5107
|
initialValue: "0deg",
|
|
@@ -5409,7 +5381,7 @@ class HoverGesture extends Feature {
|
|
|
5409
5381
|
return;
|
|
5410
5382
|
this.unmount = hover(
|
|
5411
5383
|
element,
|
|
5412
|
-
(
|
|
5384
|
+
(startEvent) => {
|
|
5413
5385
|
handleHoverEvent$1(this.state, startEvent, "Start");
|
|
5414
5386
|
return (endEvent) => {
|
|
5415
5387
|
handleHoverEvent$1(this.state, endEvent, "End");
|
|
@@ -5450,7 +5422,7 @@ class PressGesture extends Feature {
|
|
|
5450
5422
|
return;
|
|
5451
5423
|
this.unmount = press(
|
|
5452
5424
|
element,
|
|
5453
|
-
(
|
|
5425
|
+
(startEvent) => {
|
|
5454
5426
|
handlePressEvent(this.state, startEvent, "Start");
|
|
5455
5427
|
return (endEvent, { success }) => handlePressEvent(
|
|
5456
5428
|
this.state,
|
|
@@ -5488,7 +5460,7 @@ class InViewGesture extends Feature {
|
|
|
5488
5460
|
const { once, ...viewOptions } = this.state.getOptions().inViewOptions || {};
|
|
5489
5461
|
this.unmount = inView(
|
|
5490
5462
|
element,
|
|
5491
|
-
(
|
|
5463
|
+
(entry) => {
|
|
5492
5464
|
handleHoverEvent(this.state, entry, "Enter");
|
|
5493
5465
|
if (!once) {
|
|
5494
5466
|
return (endEvent) => {
|
|
@@ -6331,12 +6303,11 @@ class DragGesture extends Feature {
|
|
|
6331
6303
|
this.controls = new VisualElementDragControls(state2.visualElement);
|
|
6332
6304
|
}
|
|
6333
6305
|
mount() {
|
|
6334
|
-
var _a;
|
|
6335
6306
|
const { dragControls } = this.state.options;
|
|
6336
6307
|
if (dragControls) {
|
|
6337
6308
|
this.removeGroupControls = dragControls.subscribe(this.controls);
|
|
6338
6309
|
}
|
|
6339
|
-
this.removeListeners =
|
|
6310
|
+
this.removeListeners = this.controls.addListeners() || noop;
|
|
6340
6311
|
}
|
|
6341
6312
|
unmount() {
|
|
6342
6313
|
this.removeGroupControls();
|
|
@@ -6451,11 +6422,9 @@ class LayoutFeature extends Feature {
|
|
|
6451
6422
|
}
|
|
6452
6423
|
didUpdate() {
|
|
6453
6424
|
var _a, _b;
|
|
6454
|
-
if (this.state.options.layout || this.state.options.layoutId)
|
|
6425
|
+
if (this.state.options.layout || this.state.options.layoutId || this.state.options.drag)
|
|
6455
6426
|
(_b = (_a = this.state.visualElement.projection) == null ? void 0 : _a.root) == null ? void 0 : _b.didUpdate();
|
|
6456
6427
|
}
|
|
6457
|
-
beforeMount() {
|
|
6458
|
-
}
|
|
6459
6428
|
mount() {
|
|
6460
6429
|
var _a;
|
|
6461
6430
|
const options = this.state.options;
|
|
@@ -6463,14 +6432,15 @@ class LayoutFeature extends Feature {
|
|
|
6463
6432
|
if (options.layout || options.layoutId) {
|
|
6464
6433
|
const projection = this.state.visualElement.projection;
|
|
6465
6434
|
if (projection) {
|
|
6435
|
+
projection.promote();
|
|
6466
6436
|
(_a = layoutGroup == null ? void 0 : layoutGroup.group) == null ? void 0 : _a.add(projection);
|
|
6467
6437
|
}
|
|
6468
6438
|
globalProjectionState.hasEverUpdated = true;
|
|
6469
6439
|
}
|
|
6440
|
+
this.didUpdate();
|
|
6470
6441
|
}
|
|
6471
6442
|
beforeUnmount() {
|
|
6472
|
-
|
|
6473
|
-
const projection = (_a = this.state.visualElement) == null ? void 0 : _a.projection;
|
|
6443
|
+
const projection = this.state.visualElement.projection;
|
|
6474
6444
|
if (projection) {
|
|
6475
6445
|
this.state.willUpdate("beforeUnmount");
|
|
6476
6446
|
if (this.state.options.layoutId) {
|
|
@@ -6482,12 +6452,18 @@ class LayoutFeature extends Feature {
|
|
|
6482
6452
|
}
|
|
6483
6453
|
}
|
|
6484
6454
|
unmount() {
|
|
6485
|
-
var _a;
|
|
6455
|
+
var _a, _b;
|
|
6486
6456
|
const layoutGroup = this.state.options.layoutGroup;
|
|
6487
|
-
const projection =
|
|
6488
|
-
if (
|
|
6489
|
-
layoutGroup.group
|
|
6490
|
-
|
|
6457
|
+
const projection = this.state.visualElement.projection;
|
|
6458
|
+
if (projection) {
|
|
6459
|
+
if (layoutGroup == null ? void 0 : layoutGroup.group) {
|
|
6460
|
+
layoutGroup.group.remove(projection);
|
|
6461
|
+
}
|
|
6462
|
+
if ((_b = (_a = projection.getStack()) == null ? void 0 : _a.lead) == null ? void 0 : _b.animationProgress) {
|
|
6463
|
+
return;
|
|
6464
|
+
}
|
|
6465
|
+
this.didUpdate();
|
|
6466
|
+
}
|
|
6491
6467
|
}
|
|
6492
6468
|
}
|
|
6493
6469
|
function asyncHandler(handler) {
|
|
@@ -6623,7 +6599,7 @@ function compress(min, max, easing) {
|
|
|
6623
6599
|
return 0;
|
|
6624
6600
|
if (p > max)
|
|
6625
6601
|
return 1;
|
|
6626
|
-
return easing(
|
|
6602
|
+
return easing(progress$1(min, max, p));
|
|
6627
6603
|
};
|
|
6628
6604
|
}
|
|
6629
6605
|
function copyAxisInto(axis, originAxis) {
|
|
@@ -6865,6 +6841,13 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
6865
6841
|
function eachAxis(callback) {
|
|
6866
6842
|
return [callback("x"), callback("y")];
|
|
6867
6843
|
}
|
|
6844
|
+
const metrics = {
|
|
6845
|
+
type: "projectionFrame",
|
|
6846
|
+
totalNodes: 0,
|
|
6847
|
+
resolvedTargetDeltas: 0,
|
|
6848
|
+
recalculatedProjection: 0
|
|
6849
|
+
};
|
|
6850
|
+
const isDebug = typeof window !== "undefined" && window.MotionDebug !== void 0;
|
|
6868
6851
|
const transformAxes = ["", "X", "Y", "Z"];
|
|
6869
6852
|
const hiddenVisibility = { visibility: "hidden" };
|
|
6870
6853
|
const animationTarget = 1e3;
|
|
@@ -6930,10 +6913,16 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6930
6913
|
};
|
|
6931
6914
|
this.updateProjection = () => {
|
|
6932
6915
|
this.projectionUpdateScheduled = false;
|
|
6916
|
+
if (isDebug) {
|
|
6917
|
+
metrics.totalNodes = metrics.resolvedTargetDeltas = metrics.recalculatedProjection = 0;
|
|
6918
|
+
}
|
|
6933
6919
|
this.nodes.forEach(propagateDirtyNodes);
|
|
6934
6920
|
this.nodes.forEach(resolveTargetDelta);
|
|
6935
6921
|
this.nodes.forEach(calcProjection);
|
|
6936
6922
|
this.nodes.forEach(cleanDirtyNodes);
|
|
6923
|
+
if (isDebug) {
|
|
6924
|
+
window.MotionDebug.record(metrics);
|
|
6925
|
+
}
|
|
6937
6926
|
};
|
|
6938
6927
|
this.resolvedRelativeTargetAt = 0;
|
|
6939
6928
|
this.hasProjected = false;
|
|
@@ -6987,7 +6976,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6987
6976
|
attachResizeListener(instance, () => {
|
|
6988
6977
|
this.root.updateBlockedByResize = true;
|
|
6989
6978
|
cancelDelay && cancelDelay();
|
|
6990
|
-
cancelDelay = delay(resizeUnblockUpdate, 250);
|
|
6979
|
+
cancelDelay = delay$1(resizeUnblockUpdate, 250);
|
|
6991
6980
|
if (globalProjectionState.hasAnimatedSinceResize) {
|
|
6992
6981
|
globalProjectionState.hasAnimatedSinceResize = false;
|
|
6993
6982
|
this.nodes.forEach(finishAnimation);
|
|
@@ -6998,7 +6987,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6998
6987
|
this.root.registerSharedNode(layoutId, this);
|
|
6999
6988
|
}
|
|
7000
6989
|
if (this.options.animate !== false && visualElement && (layoutId || layout)) {
|
|
7001
|
-
this.addEventListener("didUpdate", ({ delta, hasLayoutChanged,
|
|
6990
|
+
this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout }) => {
|
|
7002
6991
|
if (this.isTreeAnimationBlocked()) {
|
|
7003
6992
|
this.target = void 0;
|
|
7004
6993
|
this.relativeTarget = void 0;
|
|
@@ -7006,9 +6995,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7006
6995
|
}
|
|
7007
6996
|
const layoutTransition = this.options.transition || visualElement.getDefaultTransition() || defaultLayoutTransition;
|
|
7008
6997
|
const { onLayoutAnimationStart, onLayoutAnimationComplete } = visualElement.getProps();
|
|
7009
|
-
const
|
|
7010
|
-
const hasOnlyRelativeTargetChanged = !hasLayoutChanged &&
|
|
7011
|
-
if (this.options.layoutRoot || this.resumeFrom || hasOnlyRelativeTargetChanged || hasLayoutChanged && (
|
|
6998
|
+
const targetChanged = !this.targetLayout || !boxEqualsRounded(this.targetLayout, newLayout) || hasRelativeTargetChanged;
|
|
6999
|
+
const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;
|
|
7000
|
+
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !this.currentAnimation)) {
|
|
7012
7001
|
if (this.resumeFrom) {
|
|
7013
7002
|
this.resumingFrom = this.resumeFrom;
|
|
7014
7003
|
this.resumingFrom.resumingFrom = void 0;
|
|
@@ -7157,9 +7146,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7157
7146
|
if (this.snapshot || !this.instance)
|
|
7158
7147
|
return;
|
|
7159
7148
|
this.snapshot = this.measure();
|
|
7160
|
-
if (this.snapshot && !calcLength(this.snapshot.measuredBox.x) && !calcLength(this.snapshot.measuredBox.y)) {
|
|
7161
|
-
this.snapshot = void 0;
|
|
7162
|
-
}
|
|
7163
7149
|
}
|
|
7164
7150
|
updateLayout() {
|
|
7165
7151
|
if (!this.instance)
|
|
@@ -7392,6 +7378,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7392
7378
|
this.relativeParent = this.relativeTarget = void 0;
|
|
7393
7379
|
}
|
|
7394
7380
|
}
|
|
7381
|
+
if (isDebug) {
|
|
7382
|
+
metrics.resolvedTargetDeltas++;
|
|
7383
|
+
}
|
|
7395
7384
|
}
|
|
7396
7385
|
getClosestProjectingParent() {
|
|
7397
7386
|
if (!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues)) {
|
|
@@ -7457,6 +7446,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7457
7446
|
this.scheduleRender();
|
|
7458
7447
|
this.notifyListeners("projectionUpdate", target);
|
|
7459
7448
|
}
|
|
7449
|
+
if (isDebug) {
|
|
7450
|
+
metrics.recalculatedProjection++;
|
|
7451
|
+
}
|
|
7460
7452
|
}
|
|
7461
7453
|
hide() {
|
|
7462
7454
|
this.isVisible = false;
|
|
@@ -7541,8 +7533,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7541
7533
|
this.mixTargetDelta(latest);
|
|
7542
7534
|
options.onUpdate && options.onUpdate(latest);
|
|
7543
7535
|
},
|
|
7544
|
-
onStop: () => {
|
|
7545
|
-
},
|
|
7546
7536
|
onComplete: () => {
|
|
7547
7537
|
options.onComplete && options.onComplete();
|
|
7548
7538
|
this.completeAnimation();
|
|
@@ -7714,7 +7704,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7714
7704
|
for (const key in scaleCorrectors) {
|
|
7715
7705
|
if (valuesToRender[key] === void 0)
|
|
7716
7706
|
continue;
|
|
7717
|
-
const { correct, applyTo
|
|
7707
|
+
const { correct, applyTo } = scaleCorrectors[key];
|
|
7718
7708
|
const corrected = styles.transform === "none" ? valuesToRender[key] : correct(valuesToRender[key], lead);
|
|
7719
7709
|
if (applyTo) {
|
|
7720
7710
|
const num = applyTo.length;
|
|
@@ -7722,11 +7712,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7722
7712
|
styles[applyTo[i]] = corrected;
|
|
7723
7713
|
}
|
|
7724
7714
|
} else {
|
|
7725
|
-
|
|
7726
|
-
this.options.visualElement.renderState.vars[key] = corrected;
|
|
7727
|
-
} else {
|
|
7728
|
-
styles[key] = corrected;
|
|
7729
|
-
}
|
|
7715
|
+
styles[key] = corrected;
|
|
7730
7716
|
}
|
|
7731
7717
|
}
|
|
7732
7718
|
if (this.options.layoutId) {
|
|
@@ -7785,7 +7771,7 @@ function notifyLayoutUpdate(node) {
|
|
|
7785
7771
|
calcBoxDelta(visualDelta, layout, snapshot.layoutBox);
|
|
7786
7772
|
}
|
|
7787
7773
|
const hasLayoutChanged = !isDeltaZero(layoutDelta);
|
|
7788
|
-
let
|
|
7774
|
+
let hasRelativeTargetChanged = false;
|
|
7789
7775
|
if (!node.resumeFrom) {
|
|
7790
7776
|
const relativeParent = node.getClosestProjectingParent();
|
|
7791
7777
|
if (relativeParent && !relativeParent.resumeFrom) {
|
|
@@ -7796,7 +7782,7 @@ function notifyLayoutUpdate(node) {
|
|
|
7796
7782
|
const relativeLayout = createBox$1();
|
|
7797
7783
|
calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);
|
|
7798
7784
|
if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {
|
|
7799
|
-
|
|
7785
|
+
hasRelativeTargetChanged = true;
|
|
7800
7786
|
}
|
|
7801
7787
|
if (relativeParent.options.layoutRoot) {
|
|
7802
7788
|
node.relativeTarget = relativeLayout;
|
|
@@ -7812,7 +7798,7 @@ function notifyLayoutUpdate(node) {
|
|
|
7812
7798
|
delta: visualDelta,
|
|
7813
7799
|
layoutDelta,
|
|
7814
7800
|
hasLayoutChanged,
|
|
7815
|
-
|
|
7801
|
+
hasRelativeTargetChanged
|
|
7816
7802
|
});
|
|
7817
7803
|
} else if (node.isLead()) {
|
|
7818
7804
|
const { onExitComplete } = node.options;
|
|
@@ -7821,6 +7807,9 @@ function notifyLayoutUpdate(node) {
|
|
|
7821
7807
|
node.options.transition = void 0;
|
|
7822
7808
|
}
|
|
7823
7809
|
function propagateDirtyNodes(node) {
|
|
7810
|
+
if (isDebug) {
|
|
7811
|
+
metrics.totalNodes++;
|
|
7812
|
+
}
|
|
7824
7813
|
if (!node.parent)
|
|
7825
7814
|
return;
|
|
7826
7815
|
if (!node.isProjecting()) {
|
|
@@ -8222,6 +8211,7 @@ function executeAnimations(factories, getChildAnimations, childAnimations, trans
|
|
|
8222
8211
|
}
|
|
8223
8212
|
const mountedStates = /* @__PURE__ */ new WeakMap();
|
|
8224
8213
|
let id = 0;
|
|
8214
|
+
const mountedLayoutIds = /* @__PURE__ */ new Set();
|
|
8225
8215
|
class MotionState {
|
|
8226
8216
|
constructor(options, parent) {
|
|
8227
8217
|
var _a;
|
|
@@ -8265,7 +8255,7 @@ class MotionState {
|
|
|
8265
8255
|
this.initTarget(initialVariantSource);
|
|
8266
8256
|
this.featureManager = new FeatureManager(this);
|
|
8267
8257
|
}
|
|
8268
|
-
// Get animation context, falling back to parent context
|
|
8258
|
+
// Get animation context, falling back to parent context for inheritance
|
|
8269
8259
|
get context() {
|
|
8270
8260
|
if (!this._context) {
|
|
8271
8261
|
const handler = {
|
|
@@ -8286,10 +8276,6 @@ class MotionState {
|
|
|
8286
8276
|
}
|
|
8287
8277
|
this.target = {};
|
|
8288
8278
|
}
|
|
8289
|
-
// Get initial animation state
|
|
8290
|
-
get initial() {
|
|
8291
|
-
return core.isDef(this.options.initial) ? this.options.initial : this.context.initial;
|
|
8292
|
-
}
|
|
8293
8279
|
// Update visual element with new options
|
|
8294
8280
|
updateOptions() {
|
|
8295
8281
|
this.visualElement.update({
|
|
@@ -8302,10 +8288,11 @@ class MotionState {
|
|
|
8302
8288
|
isPresent: !doneCallbacks.has(this.element)
|
|
8303
8289
|
});
|
|
8304
8290
|
}
|
|
8291
|
+
// Called before mounting, executes in parent-to-child order
|
|
8305
8292
|
beforeMount() {
|
|
8306
8293
|
this.featureManager.beforeMount();
|
|
8307
8294
|
}
|
|
8308
|
-
// Mount motion state to DOM element
|
|
8295
|
+
// Mount motion state to DOM element, handles parent-child relationships
|
|
8309
8296
|
mount(element, options, notAnimate = false) {
|
|
8310
8297
|
heyListen.invariant(
|
|
8311
8298
|
Boolean(element),
|
|
@@ -8324,51 +8311,58 @@ class MotionState {
|
|
|
8324
8311
|
if (!notAnimate && this.options.animate) {
|
|
8325
8312
|
this.animateUpdates();
|
|
8326
8313
|
}
|
|
8314
|
+
if (this.options.layoutId) {
|
|
8315
|
+
mountedLayoutIds.add(this.options.layoutId);
|
|
8316
|
+
frame.render(() => {
|
|
8317
|
+
mountedLayoutIds.clear();
|
|
8318
|
+
});
|
|
8319
|
+
}
|
|
8327
8320
|
}
|
|
8321
|
+
// Called before unmounting, executes in child-to-parent order
|
|
8328
8322
|
beforeUnmount() {
|
|
8329
8323
|
this.featureManager.beforeUnmount();
|
|
8330
8324
|
}
|
|
8331
8325
|
// Unmount motion state and optionally unmount children
|
|
8326
|
+
// Handles unmounting in the correct order based on component tree
|
|
8332
8327
|
unmount(unMountChildren = false) {
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
if (unMountChildren) {
|
|
8345
|
-
const unmountChild = (child) => {
|
|
8346
|
-
var _a2;
|
|
8347
|
-
child.unmount(true);
|
|
8348
|
-
(_a2 = child.children) == null ? void 0 : _a2.forEach(unmountChild);
|
|
8328
|
+
const shouldDelay = this.options.layoutId && !mountedLayoutIds.has(this.options.layoutId);
|
|
8329
|
+
const unmount = () => {
|
|
8330
|
+
if (unMountChildren) {
|
|
8331
|
+
Array.from(this.children).reverse().forEach(this.unmountChild);
|
|
8332
|
+
}
|
|
8333
|
+
const unmountState = () => {
|
|
8334
|
+
var _a, _b, _c;
|
|
8335
|
+
(_b = (_a = this.parent) == null ? void 0 : _a.children) == null ? void 0 : _b.delete(this);
|
|
8336
|
+
mountedStates.delete(this.element);
|
|
8337
|
+
this.featureManager.unmount();
|
|
8338
|
+
(_c = this.visualElement) == null ? void 0 : _c.unmount();
|
|
8349
8339
|
};
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8340
|
+
if (shouldDelay) {
|
|
8341
|
+
Promise.resolve().then(unmountState);
|
|
8342
|
+
} else {
|
|
8343
|
+
unmountState();
|
|
8344
|
+
}
|
|
8345
|
+
};
|
|
8346
|
+
unmount();
|
|
8347
|
+
}
|
|
8348
|
+
unmountChild(child) {
|
|
8349
|
+
child.unmount(true);
|
|
8353
8350
|
}
|
|
8351
|
+
// Called before updating, executes in parent-to-child order
|
|
8354
8352
|
beforeUpdate() {
|
|
8355
8353
|
this.featureManager.beforeUpdate();
|
|
8356
8354
|
}
|
|
8357
8355
|
// Update motion state with new options
|
|
8358
|
-
update(options
|
|
8359
|
-
const
|
|
8356
|
+
update(options) {
|
|
8357
|
+
const hasAnimateChange = isAnimateChanged(this.options, options);
|
|
8360
8358
|
this.options = options;
|
|
8361
|
-
let hasAnimateChange = false;
|
|
8362
|
-
if (prevAnimate !== JSON.stringify(options.animate)) {
|
|
8363
|
-
hasAnimateChange = true;
|
|
8364
|
-
}
|
|
8365
8359
|
this.updateOptions();
|
|
8366
8360
|
this.featureManager.update();
|
|
8367
|
-
if (hasAnimateChange
|
|
8361
|
+
if (hasAnimateChange) {
|
|
8368
8362
|
this.animateUpdates();
|
|
8369
8363
|
}
|
|
8370
8364
|
}
|
|
8371
|
-
// Set animation state active status
|
|
8365
|
+
// Set animation state active status and propagate to children
|
|
8372
8366
|
setActive(name, isActive, isAnimate = true) {
|
|
8373
8367
|
var _a;
|
|
8374
8368
|
if (!this.element || this.activeStates[name] === isActive)
|
|
@@ -8379,7 +8373,7 @@ class MotionState {
|
|
|
8379
8373
|
});
|
|
8380
8374
|
if (isAnimate) {
|
|
8381
8375
|
this.animateUpdates({
|
|
8382
|
-
isFallback: !isActive
|
|
8376
|
+
isFallback: !isActive && name !== "exit" && this.visualElement.isControllingVariants
|
|
8383
8377
|
});
|
|
8384
8378
|
}
|
|
8385
8379
|
}
|
|
@@ -8389,10 +8383,12 @@ class MotionState {
|
|
|
8389
8383
|
getOptions() {
|
|
8390
8384
|
return this.options;
|
|
8391
8385
|
}
|
|
8386
|
+
// Called before layout updates to prepare for changes
|
|
8392
8387
|
willUpdate(label) {
|
|
8393
8388
|
var _a;
|
|
8394
|
-
if (this.options.layout || this.options.layoutId)
|
|
8389
|
+
if (this.options.layout || this.options.layoutId) {
|
|
8395
8390
|
(_a = this.visualElement.projection) == null ? void 0 : _a.willUpdate();
|
|
8391
|
+
}
|
|
8396
8392
|
}
|
|
8397
8393
|
}
|
|
8398
8394
|
function getMotionElement(el) {
|
|
@@ -8415,7 +8411,7 @@ const [injectMotionConfig, provideMotionConfig] = createContext("MotionConfig");
|
|
|
8415
8411
|
function useMotionConfig() {
|
|
8416
8412
|
return injectMotionConfig(vue.computed(() => defaultConfig));
|
|
8417
8413
|
}
|
|
8418
|
-
const _sfc_main$
|
|
8414
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
8419
8415
|
...{
|
|
8420
8416
|
name: "Motion",
|
|
8421
8417
|
inheritAttrs: false
|
|
@@ -8548,8 +8544,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8548
8544
|
state2.update(getMotionProps());
|
|
8549
8545
|
});
|
|
8550
8546
|
function getProps() {
|
|
8551
|
-
|
|
8552
|
-
const isSVG = ((_a = state2.visualElement) == null ? void 0 : _a.type) === "svg";
|
|
8547
|
+
const isSVG = state2.visualElement.type === "svg";
|
|
8553
8548
|
const attrsProps = { ...attrs };
|
|
8554
8549
|
Object.keys(attrs).forEach((key) => {
|
|
8555
8550
|
if (isMotionValue(attrs[key]))
|
|
@@ -8557,7 +8552,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8557
8552
|
});
|
|
8558
8553
|
let styleProps = {
|
|
8559
8554
|
...props.style,
|
|
8560
|
-
...isSVG ? {} :
|
|
8555
|
+
...isSVG ? {} : state2.visualElement.latestValues
|
|
8561
8556
|
};
|
|
8562
8557
|
if (isSVG) {
|
|
8563
8558
|
const { attributes, style: style2 } = convertSvgStyleToAttributes(state2.target);
|
|
@@ -8609,7 +8604,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8609
8604
|
}
|
|
8610
8605
|
});
|
|
8611
8606
|
const componentCache = /* @__PURE__ */ new Map();
|
|
8612
|
-
const motion = new Proxy(_sfc_main$
|
|
8607
|
+
const motion = new Proxy(_sfc_main$6, {
|
|
8613
8608
|
get(target, prop) {
|
|
8614
8609
|
if (typeof prop === "symbol")
|
|
8615
8610
|
return target[prop];
|
|
@@ -8621,7 +8616,7 @@ const motion = new Proxy(_sfc_main$5, {
|
|
|
8621
8616
|
name: `motion.${component.$name}`,
|
|
8622
8617
|
setup(_, { attrs, slots }) {
|
|
8623
8618
|
return () => {
|
|
8624
|
-
return vue.h(_sfc_main$
|
|
8619
|
+
return vue.h(_sfc_main$6, {
|
|
8625
8620
|
...attrs,
|
|
8626
8621
|
as: component,
|
|
8627
8622
|
asChild: false
|
|
@@ -8637,7 +8632,7 @@ const motion = new Proxy(_sfc_main$5, {
|
|
|
8637
8632
|
name: `motion.${prop}`,
|
|
8638
8633
|
setup(_, { attrs, slots }) {
|
|
8639
8634
|
return () => {
|
|
8640
|
-
return vue.h(_sfc_main$
|
|
8635
|
+
return vue.h(_sfc_main$6, {
|
|
8641
8636
|
...attrs,
|
|
8642
8637
|
as: prop,
|
|
8643
8638
|
asChild: false
|
|
@@ -8656,12 +8651,17 @@ function usePopLayout(props) {
|
|
|
8656
8651
|
function addPopStyle(state2) {
|
|
8657
8652
|
if (props.mode !== "popLayout")
|
|
8658
8653
|
return;
|
|
8654
|
+
const parent = state2.element.offsetParent;
|
|
8655
|
+
const parentWidth = parent instanceof HTMLElement ? parent.offsetWidth || 0 : 0;
|
|
8659
8656
|
const size = {
|
|
8660
8657
|
height: state2.element.offsetHeight || 0,
|
|
8661
8658
|
width: state2.element.offsetWidth || 0,
|
|
8662
8659
|
top: state2.element.offsetTop,
|
|
8663
|
-
left: state2.element.offsetLeft
|
|
8660
|
+
left: state2.element.offsetLeft,
|
|
8661
|
+
right: 0
|
|
8664
8662
|
};
|
|
8663
|
+
size.right = parentWidth - size.width - size.left;
|
|
8664
|
+
const x = props.anchorX === "left" ? `left: ${size.left}` : `right: ${size.right}`;
|
|
8665
8665
|
state2.element.dataset.motionPopId = state2.id;
|
|
8666
8666
|
const style2 = document.createElement("style");
|
|
8667
8667
|
if (config.value.nonce) {
|
|
@@ -8669,11 +8669,6 @@ function usePopLayout(props) {
|
|
|
8669
8669
|
}
|
|
8670
8670
|
styles.set(state2, style2);
|
|
8671
8671
|
document.head.appendChild(style2);
|
|
8672
|
-
style2.textContent = `
|
|
8673
|
-
[data-motion-pop-id="${state2.id}"] {
|
|
8674
|
-
animation: pop 0.3s ease-in-out;
|
|
8675
|
-
}
|
|
8676
|
-
`;
|
|
8677
8672
|
if (style2.sheet) {
|
|
8678
8673
|
style2.sheet.insertRule(`
|
|
8679
8674
|
[data-motion-pop-id="${state2.id}"] {
|
|
@@ -8681,8 +8676,8 @@ function usePopLayout(props) {
|
|
|
8681
8676
|
width: ${size.width}px !important;
|
|
8682
8677
|
height: ${size.height}px !important;
|
|
8683
8678
|
top: ${size.top}px !important;
|
|
8684
|
-
|
|
8685
|
-
|
|
8679
|
+
${x}px !important;
|
|
8680
|
+
}
|
|
8686
8681
|
`);
|
|
8687
8682
|
}
|
|
8688
8683
|
}
|
|
@@ -8691,7 +8686,7 @@ function usePopLayout(props) {
|
|
|
8691
8686
|
if (!style2)
|
|
8692
8687
|
return;
|
|
8693
8688
|
styles.delete(state2);
|
|
8694
|
-
|
|
8689
|
+
frame.render(() => {
|
|
8695
8690
|
document.head.removeChild(style2);
|
|
8696
8691
|
});
|
|
8697
8692
|
}
|
|
@@ -8701,7 +8696,12 @@ function usePopLayout(props) {
|
|
|
8701
8696
|
styles
|
|
8702
8697
|
};
|
|
8703
8698
|
}
|
|
8704
|
-
|
|
8699
|
+
function delay(fn) {
|
|
8700
|
+
return Promise.resolve().then(() => {
|
|
8701
|
+
fn();
|
|
8702
|
+
});
|
|
8703
|
+
}
|
|
8704
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
8705
8705
|
...{
|
|
8706
8706
|
name: "AnimatePresence",
|
|
8707
8707
|
inheritAttrs: true
|
|
@@ -8713,7 +8713,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8713
8713
|
multiple: { type: Boolean, default: false },
|
|
8714
8714
|
as: {},
|
|
8715
8715
|
custom: {},
|
|
8716
|
-
onExitComplete: {}
|
|
8716
|
+
onExitComplete: {},
|
|
8717
|
+
unwrapElement: { type: Boolean, default: false },
|
|
8718
|
+
anchorX: { default: "left" }
|
|
8717
8719
|
},
|
|
8718
8720
|
setup(__props) {
|
|
8719
8721
|
const props = __props;
|
|
@@ -8725,21 +8727,27 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8725
8727
|
vue.onMounted(() => {
|
|
8726
8728
|
presenceContext.initial = void 0;
|
|
8727
8729
|
});
|
|
8730
|
+
const { addPopStyle, removePopStyle, styles } = usePopLayout(props);
|
|
8728
8731
|
function enter(el) {
|
|
8729
8732
|
const state2 = mountedStates.get(el);
|
|
8730
8733
|
if (!state2) {
|
|
8731
8734
|
return;
|
|
8732
8735
|
}
|
|
8736
|
+
removePopStyle(state2);
|
|
8733
8737
|
state2.isVShow = true;
|
|
8734
8738
|
removeDoneCallback(el);
|
|
8735
|
-
|
|
8739
|
+
delay(() => {
|
|
8740
|
+
state2.setActive("exit", false);
|
|
8741
|
+
});
|
|
8736
8742
|
}
|
|
8737
|
-
const { addPopStyle, removePopStyle, styles } = usePopLayout(props);
|
|
8738
8743
|
const exitDom = /* @__PURE__ */ new Map();
|
|
8739
8744
|
vue.onUnmounted(() => {
|
|
8740
8745
|
exitDom.clear();
|
|
8741
8746
|
});
|
|
8742
8747
|
function exit(el, done) {
|
|
8748
|
+
if (props.unwrapElement) {
|
|
8749
|
+
el = el.firstElementChild;
|
|
8750
|
+
}
|
|
8743
8751
|
const state2 = mountedStates.get(el);
|
|
8744
8752
|
if (!state2) {
|
|
8745
8753
|
return done();
|
|
@@ -8762,19 +8770,19 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8762
8770
|
if (!styles.has(state2)) {
|
|
8763
8771
|
state2.willUpdate("done");
|
|
8764
8772
|
} else {
|
|
8765
|
-
|
|
8766
|
-
removePopStyle(state2);
|
|
8767
|
-
});
|
|
8773
|
+
removePopStyle(state2);
|
|
8768
8774
|
}
|
|
8769
8775
|
done();
|
|
8770
|
-
if (!
|
|
8776
|
+
if (!el.isConnected) {
|
|
8771
8777
|
state2.unmount(true);
|
|
8772
8778
|
}
|
|
8773
8779
|
}
|
|
8774
8780
|
}
|
|
8775
8781
|
doneCallbacks.set(el, doneCallback);
|
|
8776
8782
|
el.addEventListener("motioncomplete", doneCallback);
|
|
8777
|
-
|
|
8783
|
+
delay(() => {
|
|
8784
|
+
state2.setActive("exit", true);
|
|
8785
|
+
});
|
|
8778
8786
|
}
|
|
8779
8787
|
const transitionProps = vue.computed(() => {
|
|
8780
8788
|
if (props.multiple) {
|
|
@@ -8799,7 +8807,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8799
8807
|
};
|
|
8800
8808
|
}
|
|
8801
8809
|
});
|
|
8802
|
-
const _sfc_main$
|
|
8810
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
8803
8811
|
...{
|
|
8804
8812
|
name: "MotionConfig",
|
|
8805
8813
|
inheritAttrs: false
|
|
@@ -8861,7 +8869,7 @@ function moveItem([...arr], fromIndex, toIndex) {
|
|
|
8861
8869
|
function useDefaultMotionValue(value, defaultValue = 0) {
|
|
8862
8870
|
return isMotionValue(value) ? value : motionValue(defaultValue);
|
|
8863
8871
|
}
|
|
8864
|
-
const _sfc_main$
|
|
8872
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
8865
8873
|
...{
|
|
8866
8874
|
name: "ReorderGroup",
|
|
8867
8875
|
inheritAttrs: false
|
|
@@ -8955,12 +8963,14 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8955
8963
|
order2.sort(compareMin);
|
|
8956
8964
|
},
|
|
8957
8965
|
updateOrder: (item, offset, velocity) => {
|
|
8966
|
+
var _a;
|
|
8958
8967
|
if (isReordering)
|
|
8959
8968
|
return;
|
|
8960
8969
|
const newOrder = checkReorder(order2, item, offset, velocity);
|
|
8961
8970
|
if (order2 !== newOrder) {
|
|
8962
8971
|
isReordering = true;
|
|
8963
|
-
props["onUpdate:values"](
|
|
8972
|
+
(_a = props["onUpdate:values"]) == null ? void 0 : _a.call(
|
|
8973
|
+
props,
|
|
8964
8974
|
newOrder.map(getValue).filter((value) => props.values.includes(value))
|
|
8965
8975
|
);
|
|
8966
8976
|
}
|
|
@@ -8974,7 +8984,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8974
8984
|
};
|
|
8975
8985
|
}
|
|
8976
8986
|
return (_ctx, _cache) => {
|
|
8977
|
-
return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$
|
|
8987
|
+
return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$6), vue.normalizeProps(vue.guardReactiveProps(bindProps())), {
|
|
8978
8988
|
default: vue.withCtx(() => [
|
|
8979
8989
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
8980
8990
|
vue.createTextVNode(" " + vue.toDisplayString(warning2()), 1)
|
|
@@ -9184,7 +9194,7 @@ function useVelocity(value) {
|
|
|
9184
9194
|
});
|
|
9185
9195
|
return velocity;
|
|
9186
9196
|
}
|
|
9187
|
-
const _sfc_main$
|
|
9197
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
9188
9198
|
...{
|
|
9189
9199
|
name: "ReorderItem",
|
|
9190
9200
|
inheritAttrs: false
|
|
@@ -9287,7 +9297,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9287
9297
|
return axis.value;
|
|
9288
9298
|
});
|
|
9289
9299
|
return (_ctx, _cache) => {
|
|
9290
|
-
return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$
|
|
9300
|
+
return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$6), vue.mergeProps(bindProps(), {
|
|
9291
9301
|
drag: drag.value,
|
|
9292
9302
|
"drag-snap-to-origin": true,
|
|
9293
9303
|
onDrag: _cache[0] || (_cache[0] = (event, gesturePoint) => {
|
|
@@ -9306,12 +9316,33 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9306
9316
|
};
|
|
9307
9317
|
}
|
|
9308
9318
|
});
|
|
9309
|
-
const ReorderGroup = _sfc_main$
|
|
9310
|
-
const ReorderItem = _sfc_main$
|
|
9319
|
+
const ReorderGroup = _sfc_main$3;
|
|
9320
|
+
const ReorderItem = _sfc_main$2;
|
|
9311
9321
|
const Reorder = {
|
|
9312
9322
|
Group: ReorderGroup,
|
|
9313
9323
|
Item: ReorderItem
|
|
9314
9324
|
};
|
|
9325
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
9326
|
+
__name: "RowValue",
|
|
9327
|
+
props: {
|
|
9328
|
+
value: {}
|
|
9329
|
+
},
|
|
9330
|
+
setup(__props) {
|
|
9331
|
+
const props = __props;
|
|
9332
|
+
const instance = vue.getCurrentInstance().proxy;
|
|
9333
|
+
vue.watchEffect((cleanup) => {
|
|
9334
|
+
const unSub = props.value.on("change", (value) => {
|
|
9335
|
+
if (instance.$el) {
|
|
9336
|
+
instance.$el.textContent = value;
|
|
9337
|
+
}
|
|
9338
|
+
});
|
|
9339
|
+
cleanup(unSub);
|
|
9340
|
+
});
|
|
9341
|
+
return (_ctx, _cache) => {
|
|
9342
|
+
return vue.toDisplayString(_ctx.value.get());
|
|
9343
|
+
};
|
|
9344
|
+
}
|
|
9345
|
+
});
|
|
9315
9346
|
function useForceUpdate() {
|
|
9316
9347
|
const key = vue.ref(0);
|
|
9317
9348
|
function forceUpdate() {
|
|
@@ -9341,6 +9372,7 @@ function nodeGroup() {
|
|
|
9341
9372
|
unsubscribe();
|
|
9342
9373
|
subscriptions.delete(node);
|
|
9343
9374
|
}
|
|
9375
|
+
dirtyAll();
|
|
9344
9376
|
},
|
|
9345
9377
|
dirty: dirtyAll
|
|
9346
9378
|
};
|
|
@@ -9378,7 +9410,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
9378
9410
|
__name: "LayoutGroup",
|
|
9379
9411
|
props: {
|
|
9380
9412
|
id: {},
|
|
9381
|
-
inherit: { type: [Boolean, String] }
|
|
9413
|
+
inherit: { type: [Boolean, String], default: true }
|
|
9382
9414
|
},
|
|
9383
9415
|
setup(__props) {
|
|
9384
9416
|
const props = __props;
|
|
@@ -9575,14 +9607,16 @@ class DragControls {
|
|
|
9575
9607
|
}
|
|
9576
9608
|
const createDragControls = () => new DragControls();
|
|
9577
9609
|
const useDragControls = createDragControls;
|
|
9578
|
-
exports.AnimatePresence = _sfc_main$
|
|
9610
|
+
exports.AnimatePresence = _sfc_main$5;
|
|
9579
9611
|
exports.LayoutGroup = _sfc_main;
|
|
9580
|
-
exports.Motion = _sfc_main$
|
|
9581
|
-
exports.MotionConfig = _sfc_main$
|
|
9612
|
+
exports.Motion = _sfc_main$6;
|
|
9613
|
+
exports.MotionConfig = _sfc_main$4;
|
|
9582
9614
|
exports.MotionValue = MotionValue;
|
|
9583
9615
|
exports.Reorder = Reorder;
|
|
9584
9616
|
exports.ReorderGroup = ReorderGroup;
|
|
9585
9617
|
exports.ReorderItem = ReorderItem;
|
|
9618
|
+
exports.RowValue = _sfc_main$1;
|
|
9619
|
+
exports.addScaleCorrector = addScaleCorrector;
|
|
9586
9620
|
exports.animate = animate;
|
|
9587
9621
|
exports.animateMini = animateMini;
|
|
9588
9622
|
exports.anticipate = anticipate;
|
|
@@ -9609,7 +9643,6 @@ exports.frame = frame;
|
|
|
9609
9643
|
exports.frameData = frameData;
|
|
9610
9644
|
exports.frameSteps = frameSteps;
|
|
9611
9645
|
exports.getContextWindow = getContextWindow;
|
|
9612
|
-
exports.hover = hover;
|
|
9613
9646
|
exports.inView = inView;
|
|
9614
9647
|
exports.inertia = inertia;
|
|
9615
9648
|
exports.injectLayoutGroup = injectLayoutGroup;
|
|
@@ -9623,9 +9656,9 @@ exports.mirrorEasing = mirrorEasing;
|
|
|
9623
9656
|
exports.mix = mix;
|
|
9624
9657
|
exports.motion = motion;
|
|
9625
9658
|
exports.motionValue = motionValue;
|
|
9659
|
+
exports.mountedStates = mountedStates;
|
|
9626
9660
|
exports.noop = noop;
|
|
9627
9661
|
exports.pipe = pipe;
|
|
9628
|
-
exports.press = press;
|
|
9629
9662
|
exports.progress = progress$1;
|
|
9630
9663
|
exports.provideLayoutGroup = provideLayoutGroup;
|
|
9631
9664
|
exports.provideMotion = provideMotion;
|