motion-v 0.11.0-beta.6 → 0.11.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/README.md +90 -16
- package/dist/cjs/index.js +343 -198
- package/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/animation/hooks/use-animate.mjs +1 -1
- package/dist/es/components/RowValue.d.ts +3 -1
- package/dist/es/components/animate-presence/use-pop-layout.mjs +1 -1
- package/dist/es/components/motion/Motion.d.ts +11 -1
- package/dist/es/components/motion/Motion.vue.mjs +36 -7
- package/dist/es/components/motion-config/MotionConfig.vue.mjs +4 -2
- package/dist/es/components/motion-config/types.d.ts +2 -0
- package/dist/es/components/reorder/Group.vue.mjs +8 -4
- package/dist/es/components/reorder/Item.d.ts +2 -2
- package/dist/es/components/reorder/Item.vue.mjs +8 -4
- package/dist/es/components/reorder/utils.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +14 -11
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +7 -7
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +8 -8
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +4 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -2
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +6 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/create.mjs +5 -5
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/utils/map.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/batcher.mjs +6 -18
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/frame.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/index-legacy.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/order.mjs +17 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/render-step.mjs +8 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +22 -35
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +14 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/VisualElement.mjs +6 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/svg/utils/measure.mjs +15 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/stats/buffer.mjs +7 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/delay.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/interpolate.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/offsets/fill.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/hover.mjs +11 -11
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/index.mjs +74 -0
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/capture-pointer.mjs +12 -0
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/resolve-elements.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/memo.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.4.10}/external/motion-utils/dist/es/memo.mjs +1 -0
- package/dist/es/external/.pnpm/motion-utils@12.4.10/external/motion-utils/dist/es/noop.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.4.10}/external/motion-utils/dist/es/progress.mjs +1 -1
- package/dist/es/external/.pnpm/motion-utils@12.4.10/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 +2 -2
- package/dist/es/features/gestures/focus/index.mjs +3 -3
- package/dist/es/features/gestures/focus/types.d.ts +7 -0
- package/dist/es/features/gestures/hover/index.mjs +7 -7
- package/dist/es/features/gestures/hover/types.d.ts +7 -0
- package/dist/es/features/gestures/in-view/index.mjs +6 -6
- package/dist/es/features/gestures/in-view/types.d.ts +7 -0
- 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 +6 -6
- package/dist/es/features/gestures/press/types.d.ts +7 -0
- package/dist/es/features/layout/config.mjs +2 -2
- package/dist/es/features/layout/layout.mjs +2 -2
- package/dist/es/features/layout/projection.mjs +2 -2
- package/dist/es/features/svg.mjs +1 -1
- package/dist/es/index.mjs +38 -34
- package/dist/es/state/animate-updates.d.ts +1 -1
- package/dist/es/state/animate-updates.mjs +24 -16
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.d.ts +10 -0
- package/dist/es/state/motion-state.mjs +25 -8
- package/dist/es/state/utils/is-variant-labels.mjs +1 -1
- package/dist/es/types/state.d.ts +1 -1
- 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.d.ts +2 -1
- package/dist/es/value/use-spring.mjs +12 -6
- package/dist/es/value/use-time.mjs +1 -1
- package/dist/es/value/use-transform.mjs +12 -4
- package/dist/es/value/use-velocity.mjs +2 -2
- package/dist/resolver/index.cjs +25 -0
- package/dist/resolver/index.d.cts +5 -0
- package/dist/resolver/index.d.mts +5 -0
- package/dist/resolver/index.mjs +23 -0
- package/package.json +17 -18
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -6
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -8
- package/dist/es/external/.pnpm/motion-dom@11.16.4/external/motion-dom/dist/es/gestures/press/index.mjs +0 -51
- package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/noop.mjs +0 -4
- package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/time-conversion.mjs +0 -6
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/single-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/back.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/keys-position.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/keys-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/store.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +1 -1
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/setters.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/warn-once.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.4.10}/external/motion-utils/dist/es/errors.mjs +0 -0
|
@@ -4,10 +4,10 @@ import { transformResetValue } from "./transform.mjs";
|
|
|
4
4
|
import { motionEvent } from "./event.mjs";
|
|
5
5
|
import { isDef } from "@vueuse/core";
|
|
6
6
|
import { isAnimationControls } from "../animation/utils.mjs";
|
|
7
|
-
import { animate } from "../external/.pnpm/framer-motion@
|
|
8
|
-
import { noop } from "../external/.pnpm/motion-utils@
|
|
9
|
-
import "../external/.pnpm/motion-utils@
|
|
10
|
-
const STATE_TYPES = ["initial", "animate", "
|
|
7
|
+
import { animate } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/animation/animate/index.mjs";
|
|
8
|
+
import { noop } from "../external/.pnpm/motion-utils@12.4.10/external/motion-utils/dist/es/noop.mjs";
|
|
9
|
+
import "../external/.pnpm/motion-utils@12.4.10/external/motion-utils/dist/es/errors.mjs";
|
|
10
|
+
const STATE_TYPES = ["initial", "animate", "whileInView", "whileHover", "whilePress", "whileDrag", "whileFocus", "exit"];
|
|
11
11
|
function animateUpdates({
|
|
12
12
|
controlActiveState = void 0,
|
|
13
13
|
controlDelay = 0,
|
|
@@ -17,46 +17,54 @@ function animateUpdates({
|
|
|
17
17
|
} = {}) {
|
|
18
18
|
const prevTarget = this.target;
|
|
19
19
|
this.target = { ...this.baseTarget };
|
|
20
|
-
|
|
20
|
+
let animationOptions = {};
|
|
21
21
|
const transition = { ...this.options.transition };
|
|
22
22
|
if (directAnimate)
|
|
23
|
-
resolveDirectAnimation.call(this, directAnimate, directTransition, animationOptions);
|
|
23
|
+
animationOptions = resolveDirectAnimation.call(this, directAnimate, directTransition, animationOptions);
|
|
24
24
|
else
|
|
25
|
-
resolveStateAnimation.call(this, controlActiveState,
|
|
25
|
+
animationOptions = resolveStateAnimation.call(this, controlActiveState, transition);
|
|
26
26
|
const factories = createAnimationFactories.call(this, prevTarget, animationOptions, controlDelay);
|
|
27
|
-
const { getChildAnimations, childAnimations } = setupChildAnimations.call(this, transition,
|
|
27
|
+
const { getChildAnimations, childAnimations } = setupChildAnimations.call(this, transition, this.activeStates, isFallback);
|
|
28
28
|
return executeAnimations.call(this, factories, getChildAnimations, childAnimations, transition, controlActiveState);
|
|
29
29
|
}
|
|
30
|
-
function resolveDirectAnimation(directAnimate, directTransition
|
|
30
|
+
function resolveDirectAnimation(directAnimate, directTransition) {
|
|
31
31
|
const variant = resolveVariant(directAnimate, this.options.variants, this.options.custom);
|
|
32
32
|
if (!variant)
|
|
33
|
-
return;
|
|
33
|
+
return {};
|
|
34
34
|
const transition = { ...this.options.transition, ...directTransition || variant.transition };
|
|
35
|
+
const animationOptions = {};
|
|
35
36
|
Object.entries(variant).forEach(([key, value]) => {
|
|
36
37
|
if (key === "transition")
|
|
37
38
|
return;
|
|
38
39
|
this.target[key] = value;
|
|
39
40
|
animationOptions[key] = getOptions(transition, key);
|
|
40
41
|
});
|
|
42
|
+
return animationOptions;
|
|
41
43
|
}
|
|
42
|
-
function resolveStateAnimation(controlActiveState,
|
|
44
|
+
function resolveStateAnimation(controlActiveState, transition) {
|
|
43
45
|
if (controlActiveState)
|
|
44
46
|
this.activeStates = { ...this.activeStates, ...controlActiveState };
|
|
47
|
+
const transitionOptions = {};
|
|
45
48
|
STATE_TYPES.forEach((name) => {
|
|
46
49
|
if (!this.activeStates[name] || isAnimationControls(this.options[name]))
|
|
47
50
|
return;
|
|
48
|
-
const definition =
|
|
49
|
-
|
|
51
|
+
const definition = this.options[name];
|
|
52
|
+
let variant = isDef(definition) ? resolveVariant(definition, this.options.variants, this.options.custom) : void 0;
|
|
53
|
+
if (this.visualElement.isVariantNode) {
|
|
54
|
+
const controlVariant = resolveVariant(this.context[name], this.options.variants, this.options.custom);
|
|
55
|
+
variant = controlVariant ? Object.assign(controlVariant || {}, variant) : variant;
|
|
56
|
+
}
|
|
50
57
|
if (!variant)
|
|
51
58
|
return;
|
|
52
|
-
|
|
59
|
+
Object.assign(transition, variant.transition);
|
|
53
60
|
Object.entries(variant).forEach(([key, value]) => {
|
|
54
61
|
if (key === "transition")
|
|
55
62
|
return;
|
|
56
63
|
this.target[key] = value;
|
|
57
|
-
|
|
64
|
+
transitionOptions[key] = getOptions(transition, key);
|
|
58
65
|
});
|
|
59
66
|
});
|
|
67
|
+
return transitionOptions;
|
|
60
68
|
}
|
|
61
69
|
function createAnimationFactories(prevTarget, animationOptions, controlDelay) {
|
|
62
70
|
const factories = [];
|
|
@@ -80,7 +88,7 @@ function createAnimationFactories(prevTarget, animationOptions, controlDelay) {
|
|
|
80
88
|
}
|
|
81
89
|
function setupChildAnimations(transition, controlActiveState, isFallback) {
|
|
82
90
|
var _a;
|
|
83
|
-
if (!((_a = this.visualElement.variantChildren) == null ? void 0 : _a.size) || controlActiveState)
|
|
91
|
+
if (!((_a = this.visualElement.variantChildren) == null ? void 0 : _a.size) || !controlActiveState)
|
|
84
92
|
return { getChildAnimations: () => Promise.resolve(), childAnimations: [] };
|
|
85
93
|
const { staggerChildren = 0, staggerDirection = 1, delayChildren = 0 } = transition || {};
|
|
86
94
|
const maxStaggerDuration = (this.visualElement.variantChildren.size - 1) * staggerChildren;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isSVGElement } from "./utils.mjs";
|
|
2
|
-
import { HTMLVisualElement } from "../external/.pnpm/framer-motion@
|
|
3
|
-
import { SVGVisualElement } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { HTMLVisualElement } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs";
|
|
3
|
+
import { SVGVisualElement } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs";
|
|
4
4
|
function createVisualElement(Component, options) {
|
|
5
5
|
return isSVGElement(Component) ? new SVGVisualElement(options) : new HTMLVisualElement(options);
|
|
6
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MotionStateContext, Options } from '../types';
|
|
2
2
|
import { DOMKeyframesDefinition, VisualElement } from 'framer-motion';
|
|
3
|
+
import { frame } from 'framer-motion/dom';
|
|
3
4
|
import { StateType, animateUpdates } from './animate-updates';
|
|
4
5
|
export declare const mountedStates: WeakMap<Element, MotionState>;
|
|
5
6
|
/**
|
|
@@ -15,6 +16,13 @@ export declare class MotionState {
|
|
|
15
16
|
isVShow: boolean;
|
|
16
17
|
private children?;
|
|
17
18
|
activeStates: Partial<Record<StateType, boolean>>;
|
|
19
|
+
/**
|
|
20
|
+
* Current animation process reference
|
|
21
|
+
* Tracks the ongoing animation process for mount/update animations
|
|
22
|
+
* Enables delayed animation loading and parent-child animation orchestration
|
|
23
|
+
* Allows parent variant elements to control child element animations
|
|
24
|
+
*/
|
|
25
|
+
currentProcess: ReturnType<typeof frame.render> | null;
|
|
18
26
|
depth: number;
|
|
19
27
|
baseTarget: DOMKeyframesDefinition;
|
|
20
28
|
target: DOMKeyframesDefinition;
|
|
@@ -27,6 +35,8 @@ export declare class MotionState {
|
|
|
27
35
|
updateOptions(): void;
|
|
28
36
|
beforeMount(): void;
|
|
29
37
|
mount(element: HTMLElement, options: Options, notAnimate?: boolean): void;
|
|
38
|
+
clearAnimation(): void;
|
|
39
|
+
startAnimation(): void;
|
|
30
40
|
beforeUnmount(): void;
|
|
31
41
|
unmount(unMountChildren?: boolean): void;
|
|
32
42
|
private unmountChild;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { invariant } from "hey-listen";
|
|
2
|
-
import { visualElementStore } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { visualElementStore } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/store.mjs";
|
|
3
3
|
import { resolveVariant, isAnimateChanged } from "./utils.mjs";
|
|
4
4
|
import { FeatureManager } from "../features/feature-manager.mjs";
|
|
5
5
|
import { createVisualElement } from "./create-visual-element.mjs";
|
|
6
6
|
import { doneCallbacks } from "../components/presence.mjs";
|
|
7
7
|
import { animateUpdates } from "./animate-updates.mjs";
|
|
8
8
|
import { isVariantLabels } from "./utils/is-variant-labels.mjs";
|
|
9
|
-
import { frame } from "../external/.pnpm/framer-motion@
|
|
9
|
+
import { frame, cancelFrame } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
10
10
|
const mountedStates = /* @__PURE__ */ new WeakMap();
|
|
11
11
|
let id = 0;
|
|
12
12
|
const mountedLayoutIds = /* @__PURE__ */ new Set();
|
|
@@ -21,6 +21,7 @@ class MotionState {
|
|
|
21
21
|
initial: true,
|
|
22
22
|
animate: true
|
|
23
23
|
};
|
|
24
|
+
this.currentProcess = null;
|
|
24
25
|
this._context = null;
|
|
25
26
|
this.animateUpdates = animateUpdates;
|
|
26
27
|
this.id = `motion-state-${id++}`;
|
|
@@ -28,16 +29,16 @@ class MotionState {
|
|
|
28
29
|
this.parent = parent;
|
|
29
30
|
(_a = parent == null ? void 0 : parent.children) == null ? void 0 : _a.add(this);
|
|
30
31
|
this.depth = (parent == null ? void 0 : parent.depth) + 1 || 0;
|
|
31
|
-
const initialVariantSource =
|
|
32
|
+
const initialVariantSource = this.context.initial === false ? "animate" : "initial";
|
|
32
33
|
this.initTarget(initialVariantSource);
|
|
33
34
|
this.visualElement = createVisualElement(this.options.as, {
|
|
34
35
|
presenceContext: null,
|
|
35
36
|
parent: parent == null ? void 0 : parent.visualElement,
|
|
36
37
|
props: {
|
|
37
38
|
...this.options,
|
|
38
|
-
whileHover: this.options.
|
|
39
|
-
whileTap: this.options.
|
|
40
|
-
whileInView: this.options.
|
|
39
|
+
whileHover: this.options.whileHover,
|
|
40
|
+
whileTap: this.options.whilePress,
|
|
41
|
+
whileInView: this.options.whileInView
|
|
41
42
|
},
|
|
42
43
|
visualState: {
|
|
43
44
|
renderState: {
|
|
@@ -106,7 +107,7 @@ class MotionState {
|
|
|
106
107
|
this.updateOptions();
|
|
107
108
|
this.featureManager.mount();
|
|
108
109
|
if (!notAnimate && this.options.animate) {
|
|
109
|
-
this.
|
|
110
|
+
this.startAnimation();
|
|
110
111
|
}
|
|
111
112
|
if (this.options.layoutId) {
|
|
112
113
|
mountedLayoutIds.add(this.options.layoutId);
|
|
@@ -115,6 +116,22 @@ class MotionState {
|
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
118
|
}
|
|
119
|
+
clearAnimation() {
|
|
120
|
+
var _a;
|
|
121
|
+
this.currentProcess && cancelFrame(this.currentProcess);
|
|
122
|
+
this.currentProcess = null;
|
|
123
|
+
(_a = this.visualElement.variantChildren) == null ? void 0 : _a.forEach((child) => {
|
|
124
|
+
child.state.clearAnimation();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
// update trigger animation
|
|
128
|
+
startAnimation() {
|
|
129
|
+
this.clearAnimation();
|
|
130
|
+
this.currentProcess = frame.render(() => {
|
|
131
|
+
this.currentProcess = null;
|
|
132
|
+
this.animateUpdates();
|
|
133
|
+
});
|
|
134
|
+
}
|
|
118
135
|
// Called before unmounting, executes in child-to-parent order
|
|
119
136
|
beforeUnmount() {
|
|
120
137
|
this.featureManager.beforeUnmount();
|
|
@@ -156,7 +173,7 @@ class MotionState {
|
|
|
156
173
|
this.updateOptions();
|
|
157
174
|
this.featureManager.update();
|
|
158
175
|
if (hasAnimateChange) {
|
|
159
|
-
this.
|
|
176
|
+
this.startAnimation();
|
|
160
177
|
}
|
|
161
178
|
}
|
|
162
179
|
// Set animation state active status and propagate to children
|
package/dist/es/types/state.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface Options<T = any> extends LayoutOptions, PressProps, HoverProps,
|
|
|
57
57
|
onUpdate?: (latest: ResolvedValues) => void;
|
|
58
58
|
}
|
|
59
59
|
export interface MotionStateContext {
|
|
60
|
-
initial?: VariantLabels;
|
|
60
|
+
initial?: VariantLabels | boolean;
|
|
61
61
|
animate?: VariantLabels;
|
|
62
62
|
inView?: VariantLabels;
|
|
63
63
|
hover?: VariantLabels;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onBeforeUpdate, onUnmounted } from "vue";
|
|
2
|
-
import { frame, cancelFrame } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { frame, cancelFrame } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
3
3
|
function useAnimationFrame(callback) {
|
|
4
4
|
let initialTimestamp = 0;
|
|
5
5
|
const provideTimeSinceStart = ({ timestamp, delta }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, watch, isRef, unref } from "vue";
|
|
2
|
-
import { inView } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { inView } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/dom/viewport/index.mjs";
|
|
3
3
|
function useInView(domRef, options) {
|
|
4
4
|
const isInView = ref(false);
|
|
5
5
|
watch([domRef, () => isRef(options) ? options.value : options], (_v1, _v2) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onUnmounted } from "vue";
|
|
2
|
-
import { motionValue } from "../external/.pnpm/framer-motion@
|
|
3
|
-
import { cancelFrame, frame } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
|
|
3
|
+
import { cancelFrame, frame } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
4
4
|
function useCombineMotionValues(combineValues) {
|
|
5
5
|
const value = motionValue(combineValues());
|
|
6
6
|
const updateValue = () => value.set(combineValues());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCombineMotionValues } from "./use-combine-values.mjs";
|
|
2
|
-
import { collectMotionValues } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { collectMotionValues } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
|
|
3
3
|
import { onBeforeUpdate } from "vue";
|
|
4
4
|
function useComputed(computed) {
|
|
5
5
|
collectMotionValues.current = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, watch } from "vue";
|
|
2
2
|
import { warning } from "hey-listen";
|
|
3
|
-
import { motionValue } from "../external/.pnpm/framer-motion@
|
|
4
|
-
import { scroll } from "../external/.pnpm/framer-motion@
|
|
3
|
+
import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
|
|
4
|
+
import { scroll } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/dom/scroll/index.mjs";
|
|
5
5
|
function refWarning(name, ref) {
|
|
6
6
|
warning(
|
|
7
7
|
Boolean(!ref || ref.value),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
1
2
|
import { MotionValue } from 'framer-motion/dom';
|
|
2
3
|
import { SpringOptions } from 'framer-motion';
|
|
3
|
-
export declare function useSpring(source: MotionValue<string> | MotionValue<number> | number, config?: SpringOptions): MotionValue<number>;
|
|
4
|
+
export declare function useSpring(source: MotionValue<string> | MotionValue<number> | number, config?: SpringOptions | ComputedRef<SpringOptions> | Ref<SpringOptions>): MotionValue<number>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { watch } from "vue";
|
|
2
|
-
import { animateValue } from "../external/.pnpm/framer-motion@
|
|
3
|
-
import { motionValue } from "../external/.pnpm/framer-motion@
|
|
4
|
-
import { frame, frameData } from "../external/.pnpm/framer-motion@
|
|
1
|
+
import { watch, isRef } from "vue";
|
|
2
|
+
import { animateValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs";
|
|
3
|
+
import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
|
|
4
|
+
import { frame, frameData } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
5
5
|
import { isMotionValue } from "../utils/motion-value.mjs";
|
|
6
6
|
function toNumber(v) {
|
|
7
7
|
if (typeof v === "number")
|
|
@@ -28,17 +28,23 @@ function useSpring(source, config = {}) {
|
|
|
28
28
|
animation.sample(frameData.delta);
|
|
29
29
|
}
|
|
30
30
|
stopAnimation();
|
|
31
|
+
const springConfig = isRef(config) ? config.value : config;
|
|
31
32
|
activeSpringAnimation = animateValue({
|
|
32
33
|
keyframes: [value.get(), latestValue],
|
|
33
34
|
velocity: value.getVelocity(),
|
|
34
35
|
type: "spring",
|
|
35
36
|
restDelta: 1e-3,
|
|
36
37
|
restSpeed: 0.01,
|
|
37
|
-
...
|
|
38
|
+
...springConfig,
|
|
38
39
|
onUpdate: latestSetter
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
|
-
watch(() =>
|
|
42
|
+
watch(() => {
|
|
43
|
+
if (isRef(config)) {
|
|
44
|
+
return config.value;
|
|
45
|
+
}
|
|
46
|
+
return config;
|
|
47
|
+
}, () => {
|
|
42
48
|
value.attach((v, set) => {
|
|
43
49
|
latestValue = v;
|
|
44
50
|
latestSetter = set;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useAnimationFrame } from "../utils/use-animation-frame.mjs";
|
|
2
|
-
import { motionValue } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
|
|
3
3
|
function useTime() {
|
|
4
4
|
const time = motionValue(0);
|
|
5
5
|
useAnimationFrame((t) => time.set(t));
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { useComputed } from "./use-computed.mjs";
|
|
2
2
|
import { useCombineMotionValues } from "./use-combine-values.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { computed, isRef } from "vue";
|
|
4
|
+
import { transform } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/utils/transform.mjs";
|
|
4
5
|
function useTransform(input, inputRangeOrTransformer, outputRange, options) {
|
|
5
6
|
if (typeof input === "function") {
|
|
6
7
|
return useComputed(input);
|
|
7
8
|
}
|
|
8
|
-
const transformer =
|
|
9
|
+
const transformer = computed(() => {
|
|
10
|
+
return typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(isRef(inputRangeOrTransformer) ? inputRangeOrTransformer.value : inputRangeOrTransformer, outputRange, options);
|
|
11
|
+
});
|
|
9
12
|
return Array.isArray(input) ? useListTransform(
|
|
10
13
|
input,
|
|
11
14
|
transformer
|
|
12
|
-
) : useListTransform([input], ([latest]) =>
|
|
15
|
+
) : useListTransform([input], ([latest]) => {
|
|
16
|
+
if (isRef(transformer)) {
|
|
17
|
+
return transformer.value(latest);
|
|
18
|
+
}
|
|
19
|
+
return transformer(latest);
|
|
20
|
+
});
|
|
13
21
|
}
|
|
14
22
|
function useListTransform(values, transformer) {
|
|
15
23
|
const latest = [];
|
|
@@ -19,7 +27,7 @@ function useListTransform(values, transformer) {
|
|
|
19
27
|
for (let i = 0; i < numValues; i++) {
|
|
20
28
|
latest[i] = values[i].get();
|
|
21
29
|
}
|
|
22
|
-
return transformer(latest);
|
|
30
|
+
return isRef(transformer) ? transformer.value(latest) : transformer(latest);
|
|
23
31
|
});
|
|
24
32
|
subscribe(values);
|
|
25
33
|
return value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMotionValueEvent } from "./use-motion-value-event.mjs";
|
|
2
|
-
import { motionValue } from "../external/.pnpm/framer-motion@
|
|
3
|
-
import { frame } from "../external/.pnpm/framer-motion@
|
|
2
|
+
import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
|
|
3
|
+
import { frame } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs";
|
|
4
4
|
function useVelocity(value) {
|
|
5
5
|
const velocity = motionValue(value.getVelocity());
|
|
6
6
|
const updateVelocity = () => {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const components = /* @__PURE__ */ new Set([
|
|
4
|
+
"Motion",
|
|
5
|
+
"AnimatePresence",
|
|
6
|
+
"LayoutGroup",
|
|
7
|
+
"MotionConfig",
|
|
8
|
+
"ReorderGroup",
|
|
9
|
+
"ReorderItem"
|
|
10
|
+
]);
|
|
11
|
+
function index() {
|
|
12
|
+
return {
|
|
13
|
+
type: "component",
|
|
14
|
+
resolve: (name) => {
|
|
15
|
+
if (components.has(name)) {
|
|
16
|
+
return {
|
|
17
|
+
name,
|
|
18
|
+
from: "motion-v"
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
module.exports = index;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const components = /* @__PURE__ */ new Set([
|
|
2
|
+
"Motion",
|
|
3
|
+
"AnimatePresence",
|
|
4
|
+
"LayoutGroup",
|
|
5
|
+
"MotionConfig",
|
|
6
|
+
"ReorderGroup",
|
|
7
|
+
"ReorderItem"
|
|
8
|
+
]);
|
|
9
|
+
function index() {
|
|
10
|
+
return {
|
|
11
|
+
type: "component",
|
|
12
|
+
resolve: (name) => {
|
|
13
|
+
if (components.has(name)) {
|
|
14
|
+
return {
|
|
15
|
+
name,
|
|
16
|
+
from: "motion-v"
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { index as default };
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-v",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://github.com/
|
|
7
|
+
"homepage": "https://github.com/motiondivision/motion-vue",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/
|
|
10
|
+
"url": "https://github.com/motiondivision/motion-vue.git"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"vue",
|
|
14
14
|
"motion",
|
|
15
|
-
"motionone"
|
|
15
|
+
"motionone",
|
|
16
|
+
"framer-motion"
|
|
16
17
|
],
|
|
17
18
|
"sideEffects": false,
|
|
18
19
|
"exports": {
|
|
@@ -30,6 +31,16 @@
|
|
|
30
31
|
"types": "./dist/nuxt/index.d.cts",
|
|
31
32
|
"default": "./dist/nuxt/index.cjs"
|
|
32
33
|
}
|
|
34
|
+
},
|
|
35
|
+
"./resolver": {
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./dist/resolver/index.d.mts",
|
|
38
|
+
"default": "./dist/resolver/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./dist/resolver/index.d.cts",
|
|
42
|
+
"default": "./dist/resolver/index.cjs"
|
|
43
|
+
}
|
|
33
44
|
}
|
|
34
45
|
},
|
|
35
46
|
"main": "./dist/cjs/index.js",
|
|
@@ -56,22 +67,10 @@
|
|
|
56
67
|
},
|
|
57
68
|
"dependencies": {
|
|
58
69
|
"@vueuse/core": "^10.0.0",
|
|
59
|
-
"framer-motion": "
|
|
60
|
-
"hey-listen": "^1.0.8"
|
|
61
|
-
"motion-dom": "^11.16.4"
|
|
70
|
+
"framer-motion": "12.4.10",
|
|
71
|
+
"hey-listen": "^1.0.8"
|
|
62
72
|
},
|
|
63
73
|
"devDependencies": {
|
|
64
|
-
"@testing-library/vue": "^8.1.0",
|
|
65
|
-
"@vitejs/plugin-vue": "^5.1.4",
|
|
66
|
-
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
67
|
-
"@vitest/coverage-v8": "^1.4.0",
|
|
68
|
-
"@vue/test-utils": "^2.4.5",
|
|
69
|
-
"happy-dom": "^16.0.1",
|
|
70
|
-
"jsdom": "^24.0.0",
|
|
71
|
-
"rimraf": "^6.0.1",
|
|
72
|
-
"vite": "^5.4.8",
|
|
73
|
-
"vite-plugin-dts": "^4.2.4",
|
|
74
|
-
"vitest": "^1.6.1",
|
|
75
74
|
"vue": "3.4.38"
|
|
76
75
|
},
|
|
77
76
|
"scripts": {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import "../../../../../../../../../motion-utils@11.16.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
-
import { memo } from "../../../../../../../../../motion-utils@11.16.0/external/motion-utils/dist/es/memo.mjs";
|
|
3
|
-
const supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
4
|
-
export {
|
|
5
|
-
supportsWaapi
|
|
6
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { isDragActive } from "../drag/state/is-active.mjs";
|
|
2
|
-
import { isNodeOrChild } from "../utils/is-node-or-child.mjs";
|
|
3
|
-
import { isPrimaryPointer } from "../utils/is-primary-pointer.mjs";
|
|
4
|
-
import { setupGesture } from "../utils/setup.mjs";
|
|
5
|
-
import { isElementKeyboardAccessible } from "./utils/is-keyboard-accessible.mjs";
|
|
6
|
-
import { enableKeyboardPress } from "./utils/keyboard.mjs";
|
|
7
|
-
import { isPressing } from "./utils/state.mjs";
|
|
8
|
-
function isValidPressEvent(event) {
|
|
9
|
-
return isPrimaryPointer(event) && !isDragActive();
|
|
10
|
-
}
|
|
11
|
-
function press(elementOrSelector, onPressStart, options = {}) {
|
|
12
|
-
const [elements, eventOptions, cancelEvents] = setupGesture(elementOrSelector, options);
|
|
13
|
-
const startPress = (startEvent) => {
|
|
14
|
-
const element = startEvent.currentTarget;
|
|
15
|
-
if (!isValidPressEvent(startEvent) || isPressing.has(element))
|
|
16
|
-
return;
|
|
17
|
-
isPressing.add(element);
|
|
18
|
-
const onPressEnd = onPressStart(startEvent);
|
|
19
|
-
const onPointerEnd = (endEvent, success) => {
|
|
20
|
-
window.removeEventListener("pointerup", onPointerUp);
|
|
21
|
-
window.removeEventListener("pointercancel", onPointerCancel);
|
|
22
|
-
if (!isValidPressEvent(endEvent) || !isPressing.has(element)) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
isPressing.delete(element);
|
|
26
|
-
if (typeof onPressEnd === "function") {
|
|
27
|
-
onPressEnd(endEvent, { success });
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const onPointerUp = (upEvent) => {
|
|
31
|
-
onPointerEnd(upEvent, options.useGlobalTarget || isNodeOrChild(element, upEvent.target));
|
|
32
|
-
};
|
|
33
|
-
const onPointerCancel = (cancelEvent) => {
|
|
34
|
-
onPointerEnd(cancelEvent, false);
|
|
35
|
-
};
|
|
36
|
-
window.addEventListener("pointerup", onPointerUp, eventOptions);
|
|
37
|
-
window.addEventListener("pointercancel", onPointerCancel, eventOptions);
|
|
38
|
-
};
|
|
39
|
-
elements.forEach((element) => {
|
|
40
|
-
if (!isElementKeyboardAccessible(element) && element.getAttribute("tabindex") === null) {
|
|
41
|
-
element.tabIndex = 0;
|
|
42
|
-
}
|
|
43
|
-
const target = options.useGlobalTarget ? window : element;
|
|
44
|
-
target.addEventListener("pointerdown", startPress, eventOptions);
|
|
45
|
-
element.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions), eventOptions);
|
|
46
|
-
});
|
|
47
|
-
return cancelEvents;
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
press
|
|
51
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|