motion-v 0.5.0-beta.1 → 0.5.0
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 +1571 -608
- package/dist/es/animation/use-animate.mjs +1 -1
- package/dist/es/components/AnimatePresence.vue.mjs +1 -4
- package/dist/es/components/Motion.vue.mjs +50 -16
- package/dist/es/components/presence.mjs +2 -3
- package/dist/es/events/add-pointer-event.mjs +8 -0
- package/dist/es/events/event-info.mjs +16 -0
- package/dist/es/events/utils/is-primary-pointer.mjs +10 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +3 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +4 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +7 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +8 -2
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/linear.mjs +1 -2
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +32 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +9 -16
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +46 -17
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +23 -2
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +8 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/map.mjs +2 -2
- package/dist/es/external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/events/add-dom-event.mjs +7 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/frame.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/render-step.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +15 -0
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +13 -6
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -14
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/interpolate.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/features/feature-manager.mjs +26 -7
- package/dist/es/features/feature.mjs +10 -0
- package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +450 -0
- package/dist/es/features/gestures/drag/index.mjs +26 -0
- package/dist/es/features/gestures/drag/lock.mjs +42 -0
- package/dist/es/features/gestures/drag/utils/constraints.mjs +93 -0
- package/dist/es/features/gestures/drag/utils/is.mjs +6 -0
- package/dist/es/features/gestures/hover/index.mjs +40 -0
- package/dist/es/features/gestures/in-view/index.mjs +39 -0
- package/dist/es/features/gestures/pan/PanSession.mjs +150 -0
- package/dist/es/features/gestures/pan/index.mjs +69 -0
- package/dist/es/features/gestures/press/index.mjs +51 -0
- package/dist/es/features/layout/config.mjs +2 -2
- package/dist/es/features/layout/layout.mjs +24 -51
- package/dist/es/features/layout/projection.mjs +39 -0
- package/dist/es/features/svg.mjs +1 -1
- package/dist/es/index.mjs +41 -31
- package/dist/es/projection/conversion.mjs +31 -0
- package/dist/es/projection/geometry/delta-apply.mjs +7 -0
- package/dist/es/projection/geometry/delta-calc.mjs +6 -0
- package/dist/es/projection/geometry/models.mjs +11 -0
- package/dist/es/projection/utils/each-axis.mjs +6 -0
- package/dist/es/projection/utils/measure.mjs +20 -0
- package/dist/es/state/animate-variants-children.mjs +1 -1
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +31 -7
- package/dist/es/state/utils/is-present.mjs +7 -0
- package/dist/es/state/utils.mjs +0 -3
- package/dist/es/utils/clamp.mjs +10 -0
- package/dist/es/utils/get-context-window.mjs +6 -0
- package/dist/es/utils/mix/number.mjs +6 -0
- package/dist/es/utils/progress.mjs +7 -0
- package/dist/es/utils/time-conversion.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/types/numbers/units.mjs +11 -0
- 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 +3 -3
- 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/dist/es/value/use-will-change/add-will-change.mjs +10 -0
- package/dist/es/value/use-will-change/is.mjs +7 -0
- package/dist/src/animation/animation-controls.d.ts +7 -0
- package/dist/src/animation/types.d.ts +12 -0
- package/dist/src/animation/use-animation.d.ts +0 -0
- package/dist/src/components/AnimatePresence.d.ts +1 -1
- package/dist/src/events/add-dom-event.d.ts +1 -0
- package/dist/src/events/add-pointer-event.d.ts +2 -0
- package/dist/src/events/event-info.d.ts +4 -0
- package/dist/src/events/index.d.ts +5 -0
- package/dist/src/events/types.d.ts +5 -0
- package/dist/src/events/utils/index.d.ts +1 -0
- package/dist/src/events/utils/is-primary-pointer.d.ts +1 -0
- package/dist/src/features/feature-manager.d.ts +3 -0
- package/dist/src/features/feature.d.ts +6 -3
- package/dist/src/features/gestures/drag/VisualElementDragControls.d.ts +57 -0
- package/dist/src/features/gestures/drag/index.d.ts +8 -10
- package/dist/src/features/gestures/drag/lock.d.ts +4 -0
- package/dist/src/features/gestures/drag/types.d.ts +149 -70
- package/dist/src/features/gestures/drag/use-drag-controls.d.ts +73 -0
- package/dist/src/features/gestures/drag/utils/constraints.d.ts +55 -0
- package/dist/src/features/gestures/drag/utils/is.d.ts +1 -0
- package/dist/src/features/gestures/hover/index.d.ts +7 -0
- package/dist/src/features/gestures/hover/types.d.ts +8 -0
- package/dist/src/features/gestures/in-view/index.d.ts +7 -0
- package/dist/src/features/gestures/in-view/types.d.ts +18 -0
- package/dist/src/features/gestures/pan/PanSession.d.ts +139 -0
- package/dist/src/features/gestures/pan/index.d.ts +16 -0
- package/dist/src/features/gestures/pan/types.d.ts +7 -0
- package/dist/src/features/gestures/press/index.d.ts +9 -0
- package/dist/src/features/gestures/press/types.d.ts +13 -0
- package/dist/src/features/index.d.ts +1 -1
- package/dist/src/features/layout/layout.d.ts +3 -2
- package/dist/src/features/layout/projection.d.ts +7 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/projection/conversion.d.ts +14 -0
- package/dist/src/projection/geometry/delta-apply.d.ts +2 -0
- package/dist/src/projection/geometry/delta-calc.d.ts +2 -0
- package/dist/src/projection/geometry/models.d.ts +3 -0
- package/dist/src/projection/node/types.d.ts +16 -0
- package/dist/src/projection/utils/each-axis.d.ts +3 -0
- package/dist/src/projection/utils/measure.d.ts +3 -0
- package/dist/src/render/utils/setters.d.ts +3 -0
- package/dist/src/state/motion-state.d.ts +7 -3
- package/dist/src/state/utils/is-present.d.ts +2 -0
- package/dist/src/state/utils.d.ts +0 -1
- package/dist/src/types/framer-motion.d.ts +0 -78
- package/dist/src/types/state.d.ts +10 -23
- package/dist/src/utils/clamp.d.ts +1 -0
- package/dist/src/utils/get-context-window.d.ts +2 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/mix/number.d.ts +1 -0
- package/dist/src/utils/noop.d.ts +1 -0
- package/dist/src/utils/progress.d.ts +1 -0
- package/dist/src/utils/time-conversion.d.ts +8 -0
- package/dist/src/value/types/numbers/units.d.ts +30 -0
- package/dist/src/value/use-will-change/add-will-change.d.ts +2 -0
- package/dist/src/value/use-will-change/is.d.ts +2 -0
- package/dist/src/value/use-will-change/types.d.ts +4 -0
- package/package.json +8 -5
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +0 -23
- package/dist/es/external/.pnpm/hey-listen@1.0.8/external/hey-listen/dist/hey-listen.es.mjs +0 -20
- package/dist/es/features/events.mjs +0 -69
- package/dist/es/features/gestures/base.mjs +0 -19
- package/dist/es/features/gestures/hover.mjs +0 -46
- package/dist/es/features/gestures/in-view.mjs +0 -39
- package/dist/es/features/gestures/press.mjs +0 -37
- package/dist/es/utils/events.mjs +0 -8
- package/dist/src/features/events.d.ts +0 -6
- package/dist/src/features/gestures/hover.d.ts +0 -10
- package/dist/src/features/gestures/in-view.d.ts +0 -8
- package/dist/src/features/gestures/press.d.ts +0 -8
- /package/dist/es/{external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/events → events}/add-dom-event.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/back.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/batcher.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/index-legacy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/VisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/supports.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/html/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/setters.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/delay.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/memo.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/offsets/fill.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/progress.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/time-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/warn-once.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11 → framer-motion@11.15.0}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11/external/framer-motion/dist/es/utils → motion-utils@11.14.3/external/motion-utils/dist/es}/errors.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.11.11/external/framer-motion/dist/es/utils → motion-utils@11.14.3/external/motion-utils/dist/es}/noop.mjs +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, onUnmounted } from "vue";
|
|
2
|
-
import { createScopedAnimate } from "../external/.pnpm/framer-motion@11.
|
|
2
|
+
import { createScopedAnimate } from "../external/.pnpm/framer-motion@11.15.0/external/framer-motion/dist/es/animation/animate/index.mjs";
|
|
3
3
|
function useAnimate() {
|
|
4
4
|
const dom = ref(null);
|
|
5
5
|
const domProxy = new Proxy(dom, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, toRefs, openBlock, createBlock, resolveDynamicComponent, TransitionGroup, Transition, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { mountedStates } from "../state/motion-state.mjs";
|
|
3
|
-
import { provideAnimatePresence, doneCallbacks, removeDoneCallback
|
|
3
|
+
import { provideAnimatePresence, doneCallbacks, removeDoneCallback } from "./presence.mjs";
|
|
4
4
|
import { useLayoutGroup } from "./use-layout-group.mjs";
|
|
5
5
|
import { usePopLayout } from "./use-pop-layout.mjs";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -31,12 +31,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
}
|
|
32
32
|
removeDoneCallback(el);
|
|
33
33
|
state.setActive("exit", false);
|
|
34
|
-
unPresenceDom.value.delete(el);
|
|
35
34
|
}
|
|
36
35
|
const layoutGroup = useLayoutGroup(props);
|
|
37
36
|
const { addPopStyle, removePopStyle } = usePopLayout(props);
|
|
38
37
|
function exit(el, done) {
|
|
39
|
-
unPresenceDom.value.set(el, true);
|
|
40
38
|
const state = mountedStates.get(el);
|
|
41
39
|
if (!state) {
|
|
42
40
|
return done();
|
|
@@ -48,7 +46,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
46
|
removePopStyle(state);
|
|
49
47
|
if ((_a = e == null ? void 0 : e.detail) == null ? void 0 : _a.isExit) {
|
|
50
48
|
removeDoneCallback(el);
|
|
51
|
-
unPresenceDom.value.delete(el);
|
|
52
49
|
(_b = state.visualElement.projection) == null ? void 0 : _b.willUpdate();
|
|
53
50
|
(_c = layoutGroup.forceRender) == null ? void 0 : _c.call(layoutGroup);
|
|
54
51
|
done();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, mergeDefaults, ref, useAttrs, getCurrentInstance, onMounted, onUnmounted, onUpdated, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, mergeDefaults, ref, useAttrs, getCurrentInstance, onBeforeMount, onMounted, onBeforeUnmount, onUnmounted, onBeforeUpdate, onUpdated, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { injectMotion, injectLayoutGroup, provideMotion } from "./context.mjs";
|
|
3
3
|
import { convertSvgStyleToAttributes, createStyles } from "../state/style.mjs";
|
|
4
4
|
import { Primitive } from "./Primitive.mjs";
|
|
@@ -16,10 +16,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
16
16
|
as: {},
|
|
17
17
|
asChild: { type: Boolean },
|
|
18
18
|
custom: {},
|
|
19
|
-
inViewOptions: {},
|
|
20
|
-
inView: {},
|
|
21
|
-
press: {},
|
|
22
|
-
hover: {},
|
|
23
19
|
initial: { type: [String, Object, Boolean] },
|
|
24
20
|
animate: {},
|
|
25
21
|
exit: {},
|
|
@@ -27,19 +23,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
23
|
style: {},
|
|
28
24
|
transformTemplate: { type: Function },
|
|
29
25
|
transition: {},
|
|
30
|
-
|
|
31
|
-
onMotionComplete: { type: Function },
|
|
32
|
-
onHoverStart: { type: Function },
|
|
33
|
-
onHoverEnd: { type: Function },
|
|
34
|
-
onPressStart: { type: Function },
|
|
35
|
-
onPressEnd: { type: Function },
|
|
36
|
-
onViewEnter: { type: Function },
|
|
37
|
-
onViewLeave: { type: Function },
|
|
26
|
+
layoutGroup: {},
|
|
38
27
|
layout: { type: [Boolean, String] },
|
|
39
28
|
layoutId: {},
|
|
40
29
|
layoutScroll: { type: Boolean },
|
|
41
30
|
layoutRoot: { type: Boolean },
|
|
42
|
-
"data-framer-portal-id": {}
|
|
31
|
+
"data-framer-portal-id": {},
|
|
32
|
+
globalPressTarget: { type: Boolean },
|
|
33
|
+
press: {},
|
|
34
|
+
onPressStart: { type: Function },
|
|
35
|
+
onPress: { type: Function },
|
|
36
|
+
onPressCancel: { type: Function },
|
|
37
|
+
hover: {},
|
|
38
|
+
onHoverStart: { type: Function },
|
|
39
|
+
onHoverEnd: { type: Function },
|
|
40
|
+
inViewOptions: {},
|
|
41
|
+
inView: {},
|
|
42
|
+
onViewportEnter: { type: Function },
|
|
43
|
+
onViewportLeave: { type: Function },
|
|
44
|
+
drag: { type: [Boolean, String] },
|
|
45
|
+
dragSnapToOrigin: { type: Boolean },
|
|
46
|
+
dragDirectionLock: { type: Boolean },
|
|
47
|
+
dragPropagation: { type: Boolean },
|
|
48
|
+
dragConstraints: { type: [Boolean, Object] },
|
|
49
|
+
dragElastic: { type: [Boolean, Number, Object] },
|
|
50
|
+
dragMomentum: { type: Boolean },
|
|
51
|
+
dragTransition: {},
|
|
52
|
+
dragListener: { type: Boolean },
|
|
53
|
+
dragControls: {},
|
|
54
|
+
onDragStart: { type: Function },
|
|
55
|
+
onDragEnd: { type: Function },
|
|
56
|
+
onDrag: { type: Function },
|
|
57
|
+
onDirectionLock: { type: Function },
|
|
58
|
+
onDragTransitionEnd: { type: Function },
|
|
59
|
+
onMeasureDragConstraints: { type: Function },
|
|
60
|
+
onPanSessionStart: { type: Function },
|
|
61
|
+
onPanStart: { type: Function },
|
|
62
|
+
onPan: { type: Function },
|
|
63
|
+
onPanEnd: { type: Function }
|
|
43
64
|
}, {
|
|
44
65
|
as: "div",
|
|
45
66
|
asChild: false,
|
|
@@ -50,7 +71,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
71
|
layout: false,
|
|
51
72
|
layoutId: void 0,
|
|
52
73
|
layoutScroll: false,
|
|
53
|
-
layoutRoot: false
|
|
74
|
+
layoutRoot: false,
|
|
75
|
+
dragListener: true,
|
|
76
|
+
dragElastic: 0.2
|
|
54
77
|
}),
|
|
55
78
|
setup(__props) {
|
|
56
79
|
const props = __props;
|
|
@@ -61,23 +84,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
84
|
const state = new MotionState(
|
|
62
85
|
{
|
|
63
86
|
...attrs,
|
|
64
|
-
...props
|
|
87
|
+
...props,
|
|
88
|
+
layoutGroup
|
|
65
89
|
},
|
|
66
90
|
parentState
|
|
67
91
|
);
|
|
68
92
|
provideMotion(state);
|
|
69
93
|
const instance = getCurrentInstance().proxy;
|
|
94
|
+
onBeforeMount(() => {
|
|
95
|
+
state.beforeMount();
|
|
96
|
+
});
|
|
70
97
|
onMounted(() => {
|
|
71
98
|
state.mount(getMotionElement(instance.$el), {
|
|
72
99
|
...attrs,
|
|
73
100
|
...props,
|
|
101
|
+
layoutGroup,
|
|
74
102
|
initial: presenceInitial.value === false ? presenceInitial.value : props.initial === true ? void 0 : props.initial
|
|
75
103
|
});
|
|
76
104
|
});
|
|
105
|
+
onBeforeUnmount(() => {
|
|
106
|
+
state.beforeUnmount();
|
|
107
|
+
});
|
|
77
108
|
onUnmounted(() => {
|
|
78
109
|
if (safeUnmount(getMotionElement(instance.$el)))
|
|
79
110
|
state.unmount();
|
|
80
111
|
});
|
|
112
|
+
onBeforeUpdate(() => {
|
|
113
|
+
state.beforeUpdate();
|
|
114
|
+
});
|
|
81
115
|
onUpdated(() => {
|
|
82
116
|
state.update({
|
|
83
117
|
...attrs,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
2
|
import { createContext } from "../utils/createContext.mjs";
|
|
3
3
|
const doneCallbacks = /* @__PURE__ */ new WeakMap();
|
|
4
|
-
|
|
4
|
+
ref(/* @__PURE__ */ new WeakMap());
|
|
5
5
|
function removeDoneCallback(element) {
|
|
6
6
|
const prevDoneCallback = doneCallbacks.get(element);
|
|
7
7
|
if (prevDoneCallback) {
|
|
@@ -14,6 +14,5 @@ export {
|
|
|
14
14
|
doneCallbacks,
|
|
15
15
|
injectAnimatePresence,
|
|
16
16
|
provideAnimatePresence,
|
|
17
|
-
removeDoneCallback
|
|
18
|
-
unPresenceDom
|
|
17
|
+
removeDoneCallback
|
|
19
18
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { addPointerInfo } from "./event-info.mjs";
|
|
2
|
+
import { addDomEvent } from "./add-dom-event.mjs";
|
|
3
|
+
function addPointerEvent(target, eventName, handler, options) {
|
|
4
|
+
return addDomEvent(target, eventName, addPointerInfo(handler), options);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
addPointerEvent
|
|
8
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isPrimaryPointer } from "./utils/is-primary-pointer.mjs";
|
|
2
|
+
function extractEventInfo(event, pointType = "page") {
|
|
3
|
+
return {
|
|
4
|
+
point: {
|
|
5
|
+
x: event[`${pointType}X`],
|
|
6
|
+
y: event[`${pointType}Y`]
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function addPointerInfo(handler) {
|
|
11
|
+
return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
addPointerInfo,
|
|
15
|
+
extractEventInfo
|
|
16
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveElements } from "
|
|
1
|
+
import { resolveElements } from "motion-dom";
|
|
2
2
|
import { isDOMKeyframes } from "../utils/is-dom-keyframes.mjs";
|
|
3
3
|
function resolveSubjects(subject, keyframes, scope, selectorCache) {
|
|
4
4
|
if (typeof subject === "string" && isDOMKeyframes(keyframes)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { invariant } from "../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
1
2
|
import { visualElementStore } from "../../render/store.mjs";
|
|
2
|
-
import { invariant } from "../../utils/errors.mjs";
|
|
3
3
|
import { isMotionValue } from "../../value/utils/is-motion-value.mjs";
|
|
4
4
|
import { animateTarget } from "../interfaces/visual-element-target.mjs";
|
|
5
5
|
import { createDOMVisualElement, createObjectVisualElement } from "../utils/create-visual-element.mjs";
|
|
@@ -2,7 +2,8 @@ import { anticipate } from "../../easing/anticipate.mjs";
|
|
|
2
2
|
import { backInOut } from "../../easing/back.mjs";
|
|
3
3
|
import { circInOut } from "../../easing/circ.mjs";
|
|
4
4
|
import { DOMKeyframesResolver } from "../../render/dom/DOMKeyframesResolver.mjs";
|
|
5
|
-
import
|
|
5
|
+
import "../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
6
|
+
import { noop } from "../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/noop.mjs";
|
|
6
7
|
import { millisecondsToSeconds, secondsToMilliseconds } from "../../utils/time-conversion.mjs";
|
|
7
8
|
import { isGenerator } from "../generators/utils/is-generator.mjs";
|
|
8
9
|
import { BaseAnimation } from "./BaseAnimation.mjs";
|
|
@@ -84,6 +84,10 @@ class BaseAnimation {
|
|
|
84
84
|
then(resolve, reject) {
|
|
85
85
|
return this.currentFinishedPromise.then(resolve, reject);
|
|
86
86
|
}
|
|
87
|
+
flatten() {
|
|
88
|
+
this.options.type = "keyframes";
|
|
89
|
+
this.options.ease = "linear";
|
|
90
|
+
}
|
|
87
91
|
updateFinishedPromise() {
|
|
88
92
|
this.currentFinishedPromise = new Promise((resolve) => {
|
|
89
93
|
this.resolveFinishedPromise = resolve;
|
|
@@ -8,7 +8,7 @@ import { mix } from "../../utils/mix/index.mjs";
|
|
|
8
8
|
import { calcGeneratorDuration } from "../generators/utils/calc-duration.mjs";
|
|
9
9
|
import { millisecondsToSeconds, secondsToMilliseconds } from "../../utils/time-conversion.mjs";
|
|
10
10
|
import { clamp } from "../../utils/clamp.mjs";
|
|
11
|
-
import { invariant } from "
|
|
11
|
+
import { invariant } from "../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
12
12
|
import { frameloopDriver } from "./drivers/driver-frameloop.mjs";
|
|
13
13
|
import { getFinalKeyframe } from "./waapi/utils/get-final-keyframe.mjs";
|
|
14
14
|
import { isGenerator } from "../generators/utils/is-generator.mjs";
|
|
@@ -45,6 +45,12 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
45
45
|
this.resolver = new KeyframeResolver$1(keyframes2, onResolved, name, motionValue, element);
|
|
46
46
|
this.resolver.scheduleResolve();
|
|
47
47
|
}
|
|
48
|
+
flatten() {
|
|
49
|
+
super.flatten();
|
|
50
|
+
if (this._resolved) {
|
|
51
|
+
Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
48
54
|
initPlayback(keyframes$1) {
|
|
49
55
|
const { type = "keyframes", repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = this.options;
|
|
50
56
|
const generatorFactory = isGenerator(type) ? type : generators[type] || keyframes;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { warning } from "
|
|
1
|
+
import { warning } from "../../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
2
2
|
import { isGenerator } from "../../generators/utils/is-generator.mjs";
|
|
3
3
|
import { isAnimatable } from "../../utils/is-animatable.mjs";
|
|
4
4
|
function hasKeyframesChanged(keyframes) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { startWaapiAnimation } from "./index.mjs";
|
|
2
2
|
import { createGeneratorEasing } from "../../../easing/utils/create-generator-easing.mjs";
|
|
3
3
|
import { browserNumberValueTypes } from "../../../render/dom/value-types/number-browser.mjs";
|
|
4
|
-
import { invariant } from "
|
|
5
|
-
import { noop } from "
|
|
4
|
+
import { invariant } from "../../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
5
|
+
import { noop } from "../../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/noop.mjs";
|
|
6
6
|
import { secondsToMilliseconds, millisecondsToSeconds } from "../../../utils/time-conversion.mjs";
|
|
7
7
|
import { isGenerator } from "../../generators/utils/is-generator.mjs";
|
|
8
8
|
import { attachTimeline } from "./utils/attach-timeline.mjs";
|
|
@@ -107,6 +107,12 @@ class NativeAnimation {
|
|
|
107
107
|
get startTime() {
|
|
108
108
|
return this.animation ? this.animation.startTime : null;
|
|
109
109
|
}
|
|
110
|
+
flatten() {
|
|
111
|
+
var _a;
|
|
112
|
+
if (!this.animation)
|
|
113
|
+
return;
|
|
114
|
+
(_a = this.animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming({ easing: "linear" });
|
|
115
|
+
}
|
|
110
116
|
play() {
|
|
111
117
|
if (this.state === "finished") {
|
|
112
118
|
this.updateFinishedPromise();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveElements } from "
|
|
2
|
-
import { invariant } from "
|
|
1
|
+
import { resolveElements } from "motion-dom";
|
|
2
|
+
import { invariant } from "../../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
3
3
|
import { secondsToMilliseconds } from "../../../utils/time-conversion.mjs";
|
|
4
4
|
import { getValueTransition } from "../../utils/get-value-transition.mjs";
|
|
5
5
|
import { NativeAnimation } from "./NativeAnimation.mjs";
|
|
@@ -17,7 +17,7 @@ function animateElements(elementOrSelector, keyframes, options, scope) {
|
|
|
17
17
|
for (const valueName in keyframes) {
|
|
18
18
|
const valueKeyframes = keyframes[valueName];
|
|
19
19
|
const valueOptions = {
|
|
20
|
-
...getValueTransition(
|
|
20
|
+
...getValueTransition(elementTransition, valueName)
|
|
21
21
|
};
|
|
22
22
|
valueOptions.duration = valueOptions.duration ? secondsToMilliseconds(valueOptions.duration) : valueOptions.duration;
|
|
23
23
|
valueOptions.delay = secondsToMilliseconds(valueOptions.delay || 0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mapEasingToNativeEasing } from "./easing.mjs";
|
|
2
|
-
function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease, times } = {}) {
|
|
2
|
+
function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeInOut", times } = {}) {
|
|
3
3
|
const keyframeOptions = { [valueName]: keyframes };
|
|
4
4
|
if (times)
|
|
5
5
|
keyframeOptions.offset = times;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { progress } from "../../../../utils/progress.mjs";
|
|
2
|
-
const resolution = 10
|
|
3
|
-
const generateLinearEasing = (easing, duration) => {
|
|
2
|
+
const generateLinearEasing = (easing, duration, resolution = 10) => {
|
|
4
3
|
let points = "";
|
|
5
4
|
const numPoints = Math.max(Math.round(duration / resolution), 2);
|
|
6
5
|
for (let i = 0; i < numPoints; i++) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const springDefaults = {
|
|
2
|
+
// Default spring physics
|
|
3
|
+
stiffness: 100,
|
|
4
|
+
damping: 10,
|
|
5
|
+
mass: 1,
|
|
6
|
+
velocity: 0,
|
|
7
|
+
// Default duration/bounce-based options
|
|
8
|
+
duration: 800,
|
|
9
|
+
// in ms
|
|
10
|
+
bounce: 0.3,
|
|
11
|
+
visualDuration: 0.3,
|
|
12
|
+
// in seconds
|
|
13
|
+
// Rest thresholds
|
|
14
|
+
restSpeed: {
|
|
15
|
+
granular: 0.01,
|
|
16
|
+
default: 2
|
|
17
|
+
},
|
|
18
|
+
restDelta: {
|
|
19
|
+
granular: 5e-3,
|
|
20
|
+
default: 0.5
|
|
21
|
+
},
|
|
22
|
+
// Limits
|
|
23
|
+
minDuration: 0.01,
|
|
24
|
+
// in seconds
|
|
25
|
+
maxDuration: 10,
|
|
26
|
+
// in seconds
|
|
27
|
+
minDamping: 0.05,
|
|
28
|
+
maxDamping: 1
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
springDefaults
|
|
32
|
+
};
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { warning } from "
|
|
1
|
+
import { warning } from "../../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
2
2
|
import { clamp } from "../../../utils/clamp.mjs";
|
|
3
3
|
import { secondsToMilliseconds, millisecondsToSeconds } from "../../../utils/time-conversion.mjs";
|
|
4
|
+
import { springDefaults } from "./defaults.mjs";
|
|
4
5
|
const safeMin = 1e-3;
|
|
5
|
-
|
|
6
|
-
const maxDuration = 10;
|
|
7
|
-
const minDamping = 0.05;
|
|
8
|
-
const maxDamping = 1;
|
|
9
|
-
function findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1 }) {
|
|
6
|
+
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
|
|
10
7
|
let envelope;
|
|
11
8
|
let derivative;
|
|
12
|
-
warning(duration <= secondsToMilliseconds(maxDuration), "Spring duration must be 10 seconds or less");
|
|
9
|
+
warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
|
|
13
10
|
let dampingRatio = 1 - bounce;
|
|
14
|
-
dampingRatio = clamp(minDamping, maxDamping, dampingRatio);
|
|
15
|
-
duration = clamp(minDuration, maxDuration, millisecondsToSeconds(duration));
|
|
11
|
+
dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
|
|
12
|
+
duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
|
|
16
13
|
if (dampingRatio < 1) {
|
|
17
14
|
envelope = (undampedFreq2) => {
|
|
18
15
|
const exponentialDecay = undampedFreq2 * dampingRatio;
|
|
@@ -49,8 +46,8 @@ function findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1 }) {
|
|
|
49
46
|
duration = secondsToMilliseconds(duration);
|
|
50
47
|
if (isNaN(undampedFreq)) {
|
|
51
48
|
return {
|
|
52
|
-
stiffness:
|
|
53
|
-
damping:
|
|
49
|
+
stiffness: springDefaults.stiffness,
|
|
50
|
+
damping: springDefaults.damping,
|
|
54
51
|
duration
|
|
55
52
|
};
|
|
56
53
|
} else {
|
|
@@ -75,9 +72,5 @@ function calcAngularFreq(undampedFreq, dampingRatio) {
|
|
|
75
72
|
}
|
|
76
73
|
export {
|
|
77
74
|
calcAngularFreq,
|
|
78
|
-
findSpring
|
|
79
|
-
maxDamping,
|
|
80
|
-
maxDuration,
|
|
81
|
-
minDamping,
|
|
82
|
-
minDuration
|
|
75
|
+
findSpring
|
|
83
76
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { generateLinearEasing } from "../../animators/waapi/utils/linear.mjs";
|
|
1
2
|
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../utils/time-conversion.mjs";
|
|
2
3
|
import { calcGeneratorVelocity } from "../utils/velocity.mjs";
|
|
3
4
|
import { findSpring, calcAngularFreq } from "./find.mjs";
|
|
5
|
+
import { calcGeneratorDuration, maxGeneratorDuration } from "../utils/calc-duration.mjs";
|
|
6
|
+
import { clamp } from "../../../utils/clamp.mjs";
|
|
7
|
+
import { springDefaults } from "./defaults.mjs";
|
|
4
8
|
const durationKeys = ["duration", "bounce"];
|
|
5
9
|
const physicsKeys = ["stiffness", "damping", "mass"];
|
|
6
10
|
function isSpringType(options, keys) {
|
|
@@ -8,27 +12,46 @@ function isSpringType(options, keys) {
|
|
|
8
12
|
}
|
|
9
13
|
function getSpringOptions(options) {
|
|
10
14
|
let springOptions = {
|
|
11
|
-
velocity:
|
|
12
|
-
stiffness:
|
|
13
|
-
damping:
|
|
14
|
-
mass:
|
|
15
|
+
velocity: springDefaults.velocity,
|
|
16
|
+
stiffness: springDefaults.stiffness,
|
|
17
|
+
damping: springDefaults.damping,
|
|
18
|
+
mass: springDefaults.mass,
|
|
15
19
|
isResolvedFromDuration: false,
|
|
16
20
|
...options
|
|
17
21
|
};
|
|
18
22
|
if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (options.visualDuration) {
|
|
24
|
+
const visualDuration = options.visualDuration;
|
|
25
|
+
const root = 2 * Math.PI / (visualDuration * 1.2);
|
|
26
|
+
const stiffness = root * root;
|
|
27
|
+
const damping = 2 * clamp(0.05, 1, 1 - options.bounce) * Math.sqrt(stiffness);
|
|
28
|
+
springOptions = {
|
|
29
|
+
...springOptions,
|
|
30
|
+
mass: springDefaults.mass,
|
|
31
|
+
stiffness,
|
|
32
|
+
damping
|
|
33
|
+
};
|
|
34
|
+
} else {
|
|
35
|
+
const derived = findSpring(options);
|
|
36
|
+
springOptions = {
|
|
37
|
+
...springOptions,
|
|
38
|
+
...derived,
|
|
39
|
+
mass: springDefaults.mass
|
|
40
|
+
};
|
|
41
|
+
springOptions.isResolvedFromDuration = true;
|
|
42
|
+
}
|
|
26
43
|
}
|
|
27
44
|
return springOptions;
|
|
28
45
|
}
|
|
29
|
-
function spring(
|
|
30
|
-
const
|
|
31
|
-
|
|
46
|
+
function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {
|
|
47
|
+
const options = typeof optionsOrVisualDuration !== "object" ? {
|
|
48
|
+
visualDuration: optionsOrVisualDuration,
|
|
49
|
+
keyframes: [0, 1],
|
|
50
|
+
bounce
|
|
51
|
+
} : optionsOrVisualDuration;
|
|
52
|
+
let { restSpeed, restDelta } = options;
|
|
53
|
+
const origin = options.keyframes[0];
|
|
54
|
+
const target = options.keyframes[options.keyframes.length - 1];
|
|
32
55
|
const state = { done: false, value: origin };
|
|
33
56
|
const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
|
|
34
57
|
...options,
|
|
@@ -39,8 +62,8 @@ function spring({ keyframes, restDelta, restSpeed, ...options }) {
|
|
|
39
62
|
const initialDelta = target - origin;
|
|
40
63
|
const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
|
|
41
64
|
const isGranularScale = Math.abs(initialDelta) < 5;
|
|
42
|
-
restSpeed || (restSpeed = isGranularScale ?
|
|
43
|
-
restDelta || (restDelta = isGranularScale ?
|
|
65
|
+
restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
|
|
66
|
+
restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
|
|
44
67
|
let resolveSpring;
|
|
45
68
|
if (dampingRatio < 1) {
|
|
46
69
|
const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
|
|
@@ -58,7 +81,7 @@ function spring({ keyframes, restDelta, restSpeed, ...options }) {
|
|
|
58
81
|
return target - envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT)) / dampedAngularFreq;
|
|
59
82
|
};
|
|
60
83
|
}
|
|
61
|
-
|
|
84
|
+
const generator = {
|
|
62
85
|
calculatedDuration: isResolvedFromDuration ? duration || null : null,
|
|
63
86
|
next: (t) => {
|
|
64
87
|
const current = resolveSpring(t);
|
|
@@ -75,8 +98,14 @@ function spring({ keyframes, restDelta, restSpeed, ...options }) {
|
|
|
75
98
|
}
|
|
76
99
|
state.value = state.done ? target : current;
|
|
77
100
|
return state;
|
|
101
|
+
},
|
|
102
|
+
toString: () => {
|
|
103
|
+
const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
104
|
+
const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);
|
|
105
|
+
return calculatedDuration + "ms " + easing;
|
|
78
106
|
}
|
|
79
107
|
};
|
|
108
|
+
return generator;
|
|
80
109
|
}
|
|
81
110
|
export {
|
|
82
111
|
spring
|
|
@@ -9,7 +9,12 @@ import { isGenerator } from "../generators/utils/is-generator.mjs";
|
|
|
9
9
|
import { calcNextTime } from "./utils/calc-time.mjs";
|
|
10
10
|
import { addKeyframes } from "./utils/edit.mjs";
|
|
11
11
|
import { compareByTime } from "./utils/sort.mjs";
|
|
12
|
+
import { invariant } from "../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
13
|
+
import { normalizeTimes } from "./utils/normalize-times.mjs";
|
|
14
|
+
import { calculateRepeatDuration } from "./utils/calc-repeat-duration.mjs";
|
|
15
|
+
import { getEasingForSegment } from "../../easing/utils/get-easing-for-segment.mjs";
|
|
12
16
|
const defaultSegmentEasing = "easeInOut";
|
|
17
|
+
const MAX_REPEAT = 20;
|
|
13
18
|
function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) {
|
|
14
19
|
const defaultDuration = defaultTransition.duration || 0.3;
|
|
15
20
|
const animationDefinitions = /* @__PURE__ */ new Map();
|
|
@@ -35,7 +40,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
35
40
|
let maxDuration = 0;
|
|
36
41
|
const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {
|
|
37
42
|
const valueKeyframesAsList = keyframesAsList(valueKeyframes);
|
|
38
|
-
const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = "keyframes", ...remainingTransition } = valueTransition;
|
|
43
|
+
const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = "keyframes", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition;
|
|
39
44
|
let { ease = defaultTransition.ease || "easeOut", duration } = valueTransition;
|
|
40
45
|
const calculatedDelay = typeof delay === "function" ? delay(elementIndex, numSubjects) : delay;
|
|
41
46
|
const numKeyframes = valueKeyframesAsList.length;
|
|
@@ -56,13 +61,29 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
56
61
|
}
|
|
57
62
|
duration !== null && duration !== void 0 ? duration : duration = defaultDuration;
|
|
58
63
|
const startTime = currentTime + calculatedDelay;
|
|
59
|
-
const targetTime = startTime + duration;
|
|
60
64
|
if (times.length === 1 && times[0] === 0) {
|
|
61
65
|
times[1] = 1;
|
|
62
66
|
}
|
|
63
67
|
const remainder = times.length - valueKeyframesAsList.length;
|
|
64
68
|
remainder > 0 && fillOffset(times, remainder);
|
|
65
69
|
valueKeyframesAsList.length === 1 && valueKeyframesAsList.unshift(null);
|
|
70
|
+
if (repeat) {
|
|
71
|
+
invariant(repeat < MAX_REPEAT, "Repeat count too high, must be less than 20");
|
|
72
|
+
duration = calculateRepeatDuration(duration, repeat);
|
|
73
|
+
const originalKeyframes = [...valueKeyframesAsList];
|
|
74
|
+
const originalTimes = [...times];
|
|
75
|
+
ease = Array.isArray(ease) ? [...ease] : [ease];
|
|
76
|
+
const originalEase = [...ease];
|
|
77
|
+
for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) {
|
|
78
|
+
valueKeyframesAsList.push(...originalKeyframes);
|
|
79
|
+
for (let keyframeIndex = 0; keyframeIndex < originalKeyframes.length; keyframeIndex++) {
|
|
80
|
+
times.push(originalTimes[keyframeIndex] + (repeatIndex + 1));
|
|
81
|
+
ease.push(keyframeIndex === 0 ? "linear" : getEasingForSegment(originalEase, keyframeIndex - 1));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
normalizeTimes(times, repeat);
|
|
85
|
+
}
|
|
86
|
+
const targetTime = startTime + duration;
|
|
66
87
|
addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);
|
|
67
88
|
maxDuration = Math.max(calculatedDelay + duration, maxDuration);
|
|
68
89
|
totalDuration = Math.max(targetTime, totalDuration);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/noop.mjs";
|
|
2
3
|
const calcBezier = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;
|
|
3
4
|
const subdivisionPrecision = 1e-7;
|
|
4
5
|
const subdivisionMaxIterations = 12;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { invariant } from "
|
|
1
|
+
import { invariant } from "../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/noop.mjs";
|
|
2
3
|
import { cubicBezier } from "../cubic-bezier.mjs";
|
|
3
|
-
import { noop } from "../../utils/noop.mjs";
|
|
4
4
|
import { easeIn, easeInOut, easeOut } from "../ease.mjs";
|
|
5
5
|
import { circIn, circInOut, circOut } from "../circ.mjs";
|
|
6
6
|
import { backIn, backInOut, backOut } from "../back.mjs";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../motion-utils@11.14.3/external/motion-utils/dist/es/noop.mjs";
|
|
2
3
|
import { createRenderBatcher } from "./batcher.mjs";
|
|
3
4
|
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true);
|
|
4
5
|
export {
|