motion-v 0.12.0-beta.2 → 0.13.0-alpha.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 +478 -1218
- package/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/animation/hooks/use-animate.mjs +1 -1
- package/dist/es/animation/hooks/use-reduced-motion.mjs +9 -0
- package/dist/es/components/animate-presence/AnimatePresence.vue.mjs +27 -19
- package/dist/es/components/animate-presence/use-pop-layout.mjs +1 -1
- package/dist/es/components/motion/Motion.vue.mjs +1 -0
- package/dist/es/components/reorder/utils.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/index.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +4 -7
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +3 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +5 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +3 -6
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +9 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +3 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -5
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +1 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +4 -5
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/utils/map.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +27 -7
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/VisualElement.mjs +4 -5
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +3 -18
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +2 -3
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/html/utils/parse-transform.mjs +82 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +4 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/setters.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/delay.mjs +3 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/interpolate.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/offsets/fill.mjs +2 -2
- 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 +1 -1
- package/dist/es/features/gestures/hover/index.mjs +1 -3
- package/dist/es/features/gestures/in-view/index.mjs +2 -2
- 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 +30 -19
- 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/index.mjs +32 -42
- package/dist/es/state/animate-updates.mjs +6 -5
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +3 -3
- package/dist/es/state/utils.mjs +0 -1
- package/dist/es/utils/use-animation-frame.mjs +1 -1
- package/dist/es/utils/use-in-view.mjs +6 -3
- package/dist/es/value/use-combine-values.mjs +1 -2
- package/dist/es/value/use-computed.mjs +1 -1
- package/dist/es/value/use-scroll.mjs +26 -24
- package/dist/es/value/use-spring.mjs +2 -3
- package/dist/es/value/use-time.mjs +1 -1
- package/dist/es/value/use-transform.mjs +3 -5
- package/dist/es/value/use-velocity.mjs +1 -2
- package/dist/nuxt/index.cjs +39 -27
- package/dist/nuxt/index.d.cts +7 -3
- package/dist/nuxt/index.d.mts +7 -3
- package/dist/nuxt/index.mjs +39 -27
- package/package.json +4 -3
- package/dist/es/animation/hooks/animation-controls.d.ts +0 -8
- package/dist/es/animation/hooks/use-animate.d.ts +0 -8
- package/dist/es/animation/hooks/use-animation-controls.d.ts +0 -33
- package/dist/es/animation/index.d.ts +0 -2
- package/dist/es/animation/types.d.ts +0 -68
- package/dist/es/animation/utils.d.ts +0 -2
- package/dist/es/components/LayoutGroup.d.ts +0 -43
- package/dist/es/components/RowValue.d.ts +0 -18
- package/dist/es/components/animate-presence/AnimatePresence.d.ts +0 -49
- package/dist/es/components/animate-presence/index.d.ts +0 -2
- package/dist/es/components/animate-presence/types.d.ts +0 -9
- package/dist/es/components/animate-presence/use-pop-layout.d.ts +0 -7
- package/dist/es/components/animate-presence/use-presence.d.ts +0 -2
- package/dist/es/components/animate-presence/utils.d.ts +0 -0
- package/dist/es/components/context.d.ts +0 -16
- package/dist/es/components/group.d.ts +0 -7
- package/dist/es/components/hooks/use-motion-elm.d.ts +0 -13
- package/dist/es/components/index.d.ts +0 -6
- package/dist/es/components/motion/Motion.d.ts +0 -32
- package/dist/es/components/motion/NameSpace.d.ts +0 -14
- package/dist/es/components/motion/Primitive.d.ts +0 -48
- package/dist/es/components/motion/Slot.d.ts +0 -5
- package/dist/es/components/motion/index.d.ts +0 -2
- package/dist/es/components/motion/renderSlotFragments.d.ts +0 -2
- package/dist/es/components/motion/utils.d.ts +0 -7
- package/dist/es/components/motion-config/MotionConfig.d.ts +0 -39
- package/dist/es/components/motion-config/context.d.ts +0 -11
- package/dist/es/components/motion-config/index.d.ts +0 -2
- package/dist/es/components/motion-config/types.d.ts +0 -16
- package/dist/es/components/presence.d.ts +0 -7
- package/dist/es/components/reorder/Group.d.ts +0 -71
- package/dist/es/components/reorder/Item.d.ts +0 -36
- package/dist/es/components/reorder/context.d.ts +0 -8
- package/dist/es/components/reorder/index.d.ts +0 -8942
- package/dist/es/components/reorder/types.d.ts +0 -5
- package/dist/es/components/reorder/utils.d.ts +0 -6
- package/dist/es/components/use-force-update.d.ts +0 -2
- package/dist/es/components/use-layout-group.d.ts +0 -23
- package/dist/es/components/use-slot-change-index.d.ts +0 -1
- package/dist/es/constants/index.d.ts +0 -9
- package/dist/es/constants/index.mjs +0 -31
- package/dist/es/events/add-dom-event.d.ts +0 -1
- package/dist/es/events/add-pointer-event.d.ts +0 -2
- package/dist/es/events/event-info.d.ts +0 -4
- package/dist/es/events/index.d.ts +0 -5
- package/dist/es/events/types.d.ts +0 -5
- package/dist/es/events/utils/index.d.ts +0 -1
- package/dist/es/events/utils/is-primary-pointer.d.ts +0 -1
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/batcher.mjs +0 -63
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs +0 -10
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/index-legacy.mjs +0 -11
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -6
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/order.mjs +0 -17
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/render-step.mjs +0 -70
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -21
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/stats/buffer.mjs +0 -7
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -7
- package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs +0 -282
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs +0 -79
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -15
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +0 -17
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +0 -81
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -7
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -37
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +0 -13
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -11
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/hover.mjs +0 -30
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/index.mjs +0 -74
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -13
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -32
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -4
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/capture-pointer.mjs +0 -12
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -12
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -10
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -15
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/is-bezier-definition.mjs +0 -4
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/resolve-elements.mjs +0 -17
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -12
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/memo.mjs +0 -13
- package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +0 -6
- package/dist/es/features/animation/animation.d.ts +0 -13
- package/dist/es/features/feature-manager.d.ts +0 -12
- package/dist/es/features/feature.d.ts +0 -11
- package/dist/es/features/gestures/base.d.ts +0 -8
- package/dist/es/features/gestures/drag/VisualElementDragControls.d.ts +0 -57
- package/dist/es/features/gestures/drag/index.d.ts +0 -10
- package/dist/es/features/gestures/drag/lock.d.ts +0 -4
- package/dist/es/features/gestures/drag/types.d.ts +0 -225
- package/dist/es/features/gestures/drag/use-drag-controls.d.ts +0 -73
- package/dist/es/features/gestures/drag/utils/constraints.d.ts +0 -55
- package/dist/es/features/gestures/drag/utils/is.d.ts +0 -1
- package/dist/es/features/gestures/focus/index.d.ts +0 -7
- package/dist/es/features/gestures/focus/types.d.ts +0 -13
- package/dist/es/features/gestures/hover/index.d.ts +0 -7
- package/dist/es/features/gestures/hover/types.d.ts +0 -15
- package/dist/es/features/gestures/in-view/index.d.ts +0 -9
- package/dist/es/features/gestures/in-view/types.d.ts +0 -25
- package/dist/es/features/gestures/index.d.ts +0 -5
- package/dist/es/features/gestures/pan/PanSession.d.ts +0 -139
- package/dist/es/features/gestures/pan/index.d.ts +0 -16
- package/dist/es/features/gestures/pan/types.d.ts +0 -7
- package/dist/es/features/gestures/press/index.d.ts +0 -9
- package/dist/es/features/gestures/press/types.d.ts +0 -20
- package/dist/es/features/gestures/types.d.ts +0 -22
- package/dist/es/features/index.d.ts +0 -6
- package/dist/es/features/layout/config.d.ts +0 -8
- package/dist/es/features/layout/layout.d.ts +0 -11
- package/dist/es/features/layout/projection.d.ts +0 -9
- package/dist/es/features/layout/types.d.ts +0 -21
- package/dist/es/features/layout/utils.d.ts +0 -4
- package/dist/es/index.d.ts +0 -15
- package/dist/es/projection/conversion.d.ts +0 -14
- package/dist/es/projection/geometry/delta-apply.d.ts +0 -2
- package/dist/es/projection/geometry/delta-calc.d.ts +0 -2
- package/dist/es/projection/geometry/models.d.ts +0 -3
- package/dist/es/projection/node/types.d.ts +0 -16
- package/dist/es/projection/utils/each-axis.d.ts +0 -3
- package/dist/es/projection/utils/measure.d.ts +0 -3
- package/dist/es/render/utils/setters.d.ts +0 -3
- package/dist/es/shared/test.d.ts +0 -1
- package/dist/es/state/animate-updates.d.ts +0 -20
- package/dist/es/state/animate-variants-children.d.ts +0 -15
- package/dist/es/state/animation/index.d.ts +0 -0
- package/dist/es/state/animation/types.d.ts +0 -0
- package/dist/es/state/create-visual-element.d.ts +0 -1
- package/dist/es/state/event.d.ts +0 -6
- package/dist/es/state/index.d.ts +0 -1
- package/dist/es/state/motion-state.d.ts +0 -50
- package/dist/es/state/style.d.ts +0 -11
- package/dist/es/state/transform.d.ts +0 -25
- package/dist/es/state/utils/is-present.d.ts +0 -2
- package/dist/es/state/utils/is-variant-labels.d.ts +0 -2
- package/dist/es/state/utils.d.ts +0 -19
- package/dist/es/types/framer-motion.d.ts +0 -43
- package/dist/es/types/index.d.ts +0 -4
- package/dist/es/types/motion-values.d.ts +0 -93
- package/dist/es/types/state.d.ts +0 -79
- package/dist/es/types/transform.d.ts +0 -23
- package/dist/es/utils/clamp.d.ts +0 -1
- package/dist/es/utils/createContext.d.ts +0 -8
- package/dist/es/utils/delay.d.ts +0 -1
- package/dist/es/utils/get-context-window.d.ts +0 -2
- package/dist/es/utils/index.d.ts +0 -7
- package/dist/es/utils/mix/number.d.ts +0 -1
- package/dist/es/utils/motion-value.d.ts +0 -2
- package/dist/es/utils/noop.d.ts +0 -1
- package/dist/es/utils/progress.d.ts +0 -1
- package/dist/es/utils/time-conversion.d.ts +0 -8
- package/dist/es/utils/use-animation-frame.d.ts +0 -2
- package/dist/es/utils/use-dom-ref.d.ts +0 -1
- package/dist/es/utils/use-in-view.d.ts +0 -3
- package/dist/es/value/index.d.ts +0 -9
- package/dist/es/value/types/numbers/units.d.ts +0 -30
- package/dist/es/value/use-combine-values.d.ts +0 -6
- package/dist/es/value/use-computed.d.ts +0 -2
- package/dist/es/value/use-motion-template.d.ts +0 -21
- package/dist/es/value/use-motion-value-event.d.ts +0 -3
- package/dist/es/value/use-scroll.d.ts +0 -12
- package/dist/es/value/use-spring.d.ts +0 -4
- package/dist/es/value/use-time.d.ts +0 -1
- package/dist/es/value/use-transform.d.ts +0 -59
- package/dist/es/value/use-velocity.d.ts +0 -13
- package/dist/es/value/use-will-change/add-will-change.d.ts +0 -2
- package/dist/es/value/use-will-change/is.d.ts +0 -2
- package/dist/es/value/use-will-change/types.d.ts +0 -4
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/back.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +1 -1
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/keys-position.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/keys-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/measure.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/array.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/errors.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/memo.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/noop.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/progress.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/time-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/warn-once.mjs +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -3,6 +3,16 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const core = require("@vueuse/core");
|
|
5
5
|
const heyListen = require("hey-listen");
|
|
6
|
+
const motionDom = require("motion-dom");
|
|
7
|
+
function addUniqueItem(arr, item) {
|
|
8
|
+
if (arr.indexOf(item) === -1)
|
|
9
|
+
arr.push(item);
|
|
10
|
+
}
|
|
11
|
+
function removeItem(arr, item) {
|
|
12
|
+
const index = arr.indexOf(item);
|
|
13
|
+
if (index > -1)
|
|
14
|
+
arr.splice(index, 1);
|
|
15
|
+
}
|
|
6
16
|
const noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
|
|
7
17
|
let warning = noop;
|
|
8
18
|
exports.invariant = noop;
|
|
@@ -31,433 +41,45 @@ const progress$1 = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
|
|
|
31
41
|
const toFromDifference = to - from;
|
|
32
42
|
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
|
|
33
43
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class BaseGroupPlaybackControls {
|
|
38
|
-
constructor(animations) {
|
|
39
|
-
this.stop = () => this.runAll("stop");
|
|
40
|
-
this.animations = animations.filter(Boolean);
|
|
41
|
-
}
|
|
42
|
-
get finished() {
|
|
43
|
-
return Promise.all(this.animations.map((animation) => "finished" in animation ? animation.finished : animation));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* TODO: Filter out cancelled or stopped animations before returning
|
|
47
|
-
*/
|
|
48
|
-
getAll(propName) {
|
|
49
|
-
return this.animations[0][propName];
|
|
50
|
-
}
|
|
51
|
-
setAll(propName, newValue) {
|
|
52
|
-
for (let i = 0; i < this.animations.length; i++) {
|
|
53
|
-
this.animations[i][propName] = newValue;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
attachTimeline(timeline, fallback) {
|
|
57
|
-
const subscriptions = this.animations.map((animation) => {
|
|
58
|
-
if (supportsScrollTimeline() && animation.attachTimeline) {
|
|
59
|
-
return animation.attachTimeline(timeline);
|
|
60
|
-
} else if (typeof fallback === "function") {
|
|
61
|
-
return fallback(animation);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return () => {
|
|
65
|
-
subscriptions.forEach((cancel, i) => {
|
|
66
|
-
cancel && cancel();
|
|
67
|
-
this.animations[i].stop();
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
get time() {
|
|
72
|
-
return this.getAll("time");
|
|
73
|
-
}
|
|
74
|
-
set time(time2) {
|
|
75
|
-
this.setAll("time", time2);
|
|
76
|
-
}
|
|
77
|
-
get speed() {
|
|
78
|
-
return this.getAll("speed");
|
|
79
|
-
}
|
|
80
|
-
set speed(speed) {
|
|
81
|
-
this.setAll("speed", speed);
|
|
82
|
-
}
|
|
83
|
-
get startTime() {
|
|
84
|
-
return this.getAll("startTime");
|
|
85
|
-
}
|
|
86
|
-
get duration() {
|
|
87
|
-
let max = 0;
|
|
88
|
-
for (let i = 0; i < this.animations.length; i++) {
|
|
89
|
-
max = Math.max(max, this.animations[i].duration);
|
|
90
|
-
}
|
|
91
|
-
return max;
|
|
92
|
-
}
|
|
93
|
-
runAll(methodName) {
|
|
94
|
-
this.animations.forEach((controls) => controls[methodName]());
|
|
95
|
-
}
|
|
96
|
-
flatten() {
|
|
97
|
-
this.runAll("flatten");
|
|
98
|
-
}
|
|
99
|
-
play() {
|
|
100
|
-
this.runAll("play");
|
|
101
|
-
}
|
|
102
|
-
pause() {
|
|
103
|
-
this.runAll("pause");
|
|
104
|
-
}
|
|
105
|
-
cancel() {
|
|
106
|
-
this.runAll("cancel");
|
|
107
|
-
}
|
|
108
|
-
complete() {
|
|
109
|
-
this.runAll("complete");
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
class GroupPlaybackControls extends BaseGroupPlaybackControls {
|
|
113
|
-
then(onResolve, onReject) {
|
|
114
|
-
return Promise.all(this.animations).then(onResolve).catch(onReject);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
function getValueTransition$1(transition, key) {
|
|
118
|
-
return transition ? transition[key] || transition["default"] || transition : void 0;
|
|
119
|
-
}
|
|
120
|
-
const maxGeneratorDuration = 2e4;
|
|
121
|
-
function calcGeneratorDuration(generator) {
|
|
122
|
-
let duration = 0;
|
|
123
|
-
const timeStep = 50;
|
|
124
|
-
let state2 = generator.next(duration);
|
|
125
|
-
while (!state2.done && duration < maxGeneratorDuration) {
|
|
126
|
-
duration += timeStep;
|
|
127
|
-
state2 = generator.next(duration);
|
|
128
|
-
}
|
|
129
|
-
return duration >= maxGeneratorDuration ? Infinity : duration;
|
|
130
|
-
}
|
|
131
|
-
function createGeneratorEasing(options, scale2 = 100, createGenerator) {
|
|
132
|
-
const generator = createGenerator({ ...options, keyframes: [0, scale2] });
|
|
133
|
-
const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
134
|
-
return {
|
|
135
|
-
type: "keyframes",
|
|
136
|
-
ease: (progress2) => {
|
|
137
|
-
return generator.next(duration * progress2).value / scale2;
|
|
138
|
-
},
|
|
139
|
-
duration: /* @__PURE__ */ millisecondsToSeconds$1(duration)
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function isGenerator(type) {
|
|
143
|
-
return typeof type === "function";
|
|
144
|
-
}
|
|
145
|
-
function attachTimeline(animation, timeline) {
|
|
146
|
-
animation.timeline = timeline;
|
|
147
|
-
animation.onfinish = null;
|
|
148
|
-
}
|
|
149
|
-
class NativeAnimationControls {
|
|
150
|
-
constructor(animation) {
|
|
151
|
-
this.animation = animation;
|
|
152
|
-
}
|
|
153
|
-
get duration() {
|
|
154
|
-
var _a, _b, _c;
|
|
155
|
-
const durationInMs = ((_b = (_a = this.animation) === null || _a === void 0 ? void 0 : _a.effect) === null || _b === void 0 ? void 0 : _b.getComputedTiming().duration) || ((_c = this.options) === null || _c === void 0 ? void 0 : _c.duration) || 300;
|
|
156
|
-
return /* @__PURE__ */ millisecondsToSeconds$1(Number(durationInMs));
|
|
157
|
-
}
|
|
158
|
-
get time() {
|
|
159
|
-
var _a;
|
|
160
|
-
if (this.animation) {
|
|
161
|
-
return /* @__PURE__ */ millisecondsToSeconds$1(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
|
|
162
|
-
}
|
|
163
|
-
return 0;
|
|
164
|
-
}
|
|
165
|
-
set time(newTime) {
|
|
166
|
-
if (this.animation) {
|
|
167
|
-
this.animation.currentTime = /* @__PURE__ */ secondsToMilliseconds$1(newTime);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
get speed() {
|
|
171
|
-
return this.animation ? this.animation.playbackRate : 1;
|
|
172
|
-
}
|
|
173
|
-
set speed(newSpeed) {
|
|
174
|
-
if (this.animation) {
|
|
175
|
-
this.animation.playbackRate = newSpeed;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
get state() {
|
|
179
|
-
return this.animation ? this.animation.playState : "finished";
|
|
180
|
-
}
|
|
181
|
-
get startTime() {
|
|
182
|
-
return this.animation ? this.animation.startTime : null;
|
|
183
|
-
}
|
|
184
|
-
get finished() {
|
|
185
|
-
return this.animation ? this.animation.finished : Promise.resolve();
|
|
186
|
-
}
|
|
187
|
-
play() {
|
|
188
|
-
this.animation && this.animation.play();
|
|
189
|
-
}
|
|
190
|
-
pause() {
|
|
191
|
-
this.animation && this.animation.pause();
|
|
192
|
-
}
|
|
193
|
-
stop() {
|
|
194
|
-
if (!this.animation || this.state === "idle" || this.state === "finished") {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (this.animation.commitStyles) {
|
|
198
|
-
this.animation.commitStyles();
|
|
199
|
-
}
|
|
200
|
-
this.cancel();
|
|
201
|
-
}
|
|
202
|
-
flatten() {
|
|
203
|
-
var _a;
|
|
204
|
-
if (!this.animation)
|
|
205
|
-
return;
|
|
206
|
-
(_a = this.animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming({ easing: "linear" });
|
|
207
|
-
}
|
|
208
|
-
attachTimeline(timeline) {
|
|
209
|
-
if (this.animation)
|
|
210
|
-
attachTimeline(this.animation, timeline);
|
|
211
|
-
return noop;
|
|
212
|
-
}
|
|
213
|
-
complete() {
|
|
214
|
-
this.animation && this.animation.finish();
|
|
215
|
-
}
|
|
216
|
-
cancel() {
|
|
217
|
-
try {
|
|
218
|
-
this.animation && this.animation.cancel();
|
|
219
|
-
} catch (e) {
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
|
|
224
|
-
const supportsFlags = {
|
|
225
|
-
linearEasing: void 0
|
|
226
|
-
};
|
|
227
|
-
function memoSupports(callback, supportsFlag) {
|
|
228
|
-
const memoized = /* @__PURE__ */ memo(callback);
|
|
229
|
-
return () => {
|
|
230
|
-
var _a;
|
|
231
|
-
return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized();
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
const supportsLinearEasing = /* @__PURE__ */ memoSupports(() => {
|
|
235
|
-
try {
|
|
236
|
-
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
237
|
-
} catch (e) {
|
|
238
|
-
return false;
|
|
239
|
-
}
|
|
240
|
-
return true;
|
|
241
|
-
}, "linearEasing");
|
|
242
|
-
const generateLinearEasing = (easing, duration, resolution = 10) => {
|
|
243
|
-
let points = "";
|
|
244
|
-
const numPoints = Math.max(Math.round(duration / resolution), 2);
|
|
245
|
-
for (let i = 0; i < numPoints; i++) {
|
|
246
|
-
points += easing(/* @__PURE__ */ progress$1(0, numPoints - 1, i)) + ", ";
|
|
247
|
-
}
|
|
248
|
-
return `linear(${points.substring(0, points.length - 2)})`;
|
|
249
|
-
};
|
|
250
|
-
function isWaapiSupportedEasing(easing) {
|
|
251
|
-
return Boolean(typeof easing === "function" && supportsLinearEasing() || !easing || typeof easing === "string" && (easing in supportedWaapiEasing || supportsLinearEasing()) || isBezierDefinition(easing) || Array.isArray(easing) && easing.every(isWaapiSupportedEasing));
|
|
252
|
-
}
|
|
253
|
-
const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;
|
|
254
|
-
const supportedWaapiEasing = {
|
|
255
|
-
linear: "linear",
|
|
256
|
-
ease: "ease",
|
|
257
|
-
easeIn: "ease-in",
|
|
258
|
-
easeOut: "ease-out",
|
|
259
|
-
easeInOut: "ease-in-out",
|
|
260
|
-
circIn: /* @__PURE__ */ cubicBezierAsString([0, 0.65, 0.55, 1]),
|
|
261
|
-
circOut: /* @__PURE__ */ cubicBezierAsString([0.55, 0, 1, 0.45]),
|
|
262
|
-
backIn: /* @__PURE__ */ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),
|
|
263
|
-
backOut: /* @__PURE__ */ cubicBezierAsString([0.33, 1.53, 0.69, 0.99])
|
|
264
|
-
};
|
|
265
|
-
function mapEasingToNativeEasing(easing, duration) {
|
|
266
|
-
if (!easing) {
|
|
267
|
-
return void 0;
|
|
268
|
-
} else if (typeof easing === "function" && supportsLinearEasing()) {
|
|
269
|
-
return generateLinearEasing(easing, duration);
|
|
270
|
-
} else if (isBezierDefinition(easing)) {
|
|
271
|
-
return cubicBezierAsString(easing);
|
|
272
|
-
} else if (Array.isArray(easing)) {
|
|
273
|
-
return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) || supportedWaapiEasing.easeOut);
|
|
274
|
-
} else {
|
|
275
|
-
return supportedWaapiEasing[easing];
|
|
44
|
+
class SubscriptionManager {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.subscriptions = [];
|
|
276
47
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
y: false
|
|
281
|
-
};
|
|
282
|
-
function isDragActive() {
|
|
283
|
-
return isDragging.y;
|
|
284
|
-
}
|
|
285
|
-
function resolveElements(elementOrSelector, scope, selectorCache) {
|
|
286
|
-
var _a;
|
|
287
|
-
if (elementOrSelector instanceof EventTarget) {
|
|
288
|
-
return [elementOrSelector];
|
|
289
|
-
} else if (typeof elementOrSelector === "string") {
|
|
290
|
-
let root = document;
|
|
291
|
-
if (scope) {
|
|
292
|
-
root = scope.current;
|
|
293
|
-
}
|
|
294
|
-
const elements = (_a = selectorCache === null || selectorCache === void 0 ? void 0 : selectorCache[elementOrSelector]) !== null && _a !== void 0 ? _a : root.querySelectorAll(elementOrSelector);
|
|
295
|
-
return elements ? Array.from(elements) : [];
|
|
48
|
+
add(handler) {
|
|
49
|
+
addUniqueItem(this.subscriptions, handler);
|
|
50
|
+
return () => removeItem(this.subscriptions, handler);
|
|
296
51
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
const elements = resolveElements(elementOrSelector);
|
|
301
|
-
const gestureAbortController = new AbortController();
|
|
302
|
-
const eventOptions = {
|
|
303
|
-
passive: true,
|
|
304
|
-
...options,
|
|
305
|
-
signal: gestureAbortController.signal
|
|
306
|
-
};
|
|
307
|
-
const cancel = () => gestureAbortController.abort();
|
|
308
|
-
return [elements, eventOptions, cancel];
|
|
309
|
-
}
|
|
310
|
-
function isValidHover(event) {
|
|
311
|
-
return !(event.pointerType === "touch" || isDragActive());
|
|
312
|
-
}
|
|
313
|
-
function hover(elementOrSelector, onHoverStart, options = {}) {
|
|
314
|
-
const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);
|
|
315
|
-
const onPointerEnter = (enterEvent) => {
|
|
316
|
-
if (!isValidHover(enterEvent))
|
|
317
|
-
return;
|
|
318
|
-
const { target } = enterEvent;
|
|
319
|
-
const onHoverEnd = onHoverStart(target, enterEvent);
|
|
320
|
-
if (typeof onHoverEnd !== "function" || !target)
|
|
52
|
+
notify(a, b, c) {
|
|
53
|
+
const numSubscriptions = this.subscriptions.length;
|
|
54
|
+
if (!numSubscriptions)
|
|
321
55
|
return;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
};
|
|
330
|
-
elements.forEach((element) => {
|
|
331
|
-
element.addEventListener("pointerenter", onPointerEnter, eventOptions);
|
|
332
|
-
});
|
|
333
|
-
return cancel;
|
|
334
|
-
}
|
|
335
|
-
function capturePointer(event, action) {
|
|
336
|
-
const actionName = `${action}PointerCapture`;
|
|
337
|
-
if (event.target instanceof Element && actionName in event.target && event.pointerId !== void 0) {
|
|
338
|
-
try {
|
|
339
|
-
event.target[actionName](event.pointerId);
|
|
340
|
-
} catch (e) {
|
|
56
|
+
if (numSubscriptions === 1) {
|
|
57
|
+
this.subscriptions[0](a, b, c);
|
|
58
|
+
} else {
|
|
59
|
+
for (let i = 0; i < numSubscriptions; i++) {
|
|
60
|
+
const handler = this.subscriptions[i];
|
|
61
|
+
handler && handler(a, b, c);
|
|
62
|
+
}
|
|
341
63
|
}
|
|
342
64
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
if (!child) {
|
|
346
|
-
return false;
|
|
347
|
-
} else if (parent === child) {
|
|
348
|
-
return true;
|
|
349
|
-
} else {
|
|
350
|
-
return isNodeOrChild(parent, child.parentElement);
|
|
65
|
+
getSize() {
|
|
66
|
+
return this.subscriptions.length;
|
|
351
67
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
if (event.pointerType === "mouse") {
|
|
355
|
-
return typeof event.button !== "number" || event.button <= 0;
|
|
356
|
-
} else {
|
|
357
|
-
return event.isPrimary !== false;
|
|
68
|
+
clear() {
|
|
69
|
+
this.subscriptions.length = 0;
|
|
358
70
|
}
|
|
359
|
-
};
|
|
360
|
-
const focusableElements = /* @__PURE__ */ new Set([
|
|
361
|
-
"BUTTON",
|
|
362
|
-
"INPUT",
|
|
363
|
-
"SELECT",
|
|
364
|
-
"TEXTAREA",
|
|
365
|
-
"A"
|
|
366
|
-
]);
|
|
367
|
-
function isElementKeyboardAccessible(element) {
|
|
368
|
-
return focusableElements.has(element.tagName) || element.tabIndex !== -1;
|
|
369
71
|
}
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
return;
|
|
375
|
-
callback(event);
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
function firePointerEvent(target, type) {
|
|
379
|
-
target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true }));
|
|
72
|
+
const secondsToMilliseconds$1 = /* @__NO_SIDE_EFFECTS__ */ (seconds) => seconds * 1e3;
|
|
73
|
+
const millisecondsToSeconds$1 = /* @__NO_SIDE_EFFECTS__ */ (milliseconds) => milliseconds / 1e3;
|
|
74
|
+
function velocityPerSecond(velocity, frameDuration) {
|
|
75
|
+
return frameDuration ? velocity * (1e3 / frameDuration) : 0;
|
|
380
76
|
}
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
if (
|
|
77
|
+
const warned = /* @__PURE__ */ new Set();
|
|
78
|
+
function warnOnce(condition, message, element) {
|
|
79
|
+
if (condition || warned.has(message))
|
|
384
80
|
return;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
return;
|
|
388
|
-
firePointerEvent(element, "down");
|
|
389
|
-
const handleKeyup = filterEvents(() => {
|
|
390
|
-
firePointerEvent(element, "up");
|
|
391
|
-
});
|
|
392
|
-
const handleBlur = () => firePointerEvent(element, "cancel");
|
|
393
|
-
element.addEventListener("keyup", handleKeyup, eventOptions);
|
|
394
|
-
element.addEventListener("blur", handleBlur, eventOptions);
|
|
395
|
-
});
|
|
396
|
-
element.addEventListener("keydown", handleKeydown, eventOptions);
|
|
397
|
-
element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions);
|
|
398
|
-
};
|
|
399
|
-
function isValidPressEvent(event) {
|
|
400
|
-
return isPrimaryPointer$1(event) && !isDragActive();
|
|
401
|
-
}
|
|
402
|
-
function press(targetOrSelector, onPressStart, options = {}) {
|
|
403
|
-
const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);
|
|
404
|
-
const startPress = (startEvent) => {
|
|
405
|
-
const target = startEvent.currentTarget;
|
|
406
|
-
if (!target || !isValidPressEvent(startEvent) || isPressing.has(target))
|
|
407
|
-
return;
|
|
408
|
-
isPressing.add(target);
|
|
409
|
-
capturePointer(startEvent, "set");
|
|
410
|
-
const onPressEnd = onPressStart(target, startEvent);
|
|
411
|
-
const onPointerEnd = (endEvent, success) => {
|
|
412
|
-
target.removeEventListener("pointerup", onPointerUp);
|
|
413
|
-
target.removeEventListener("pointercancel", onPointerCancel);
|
|
414
|
-
capturePointer(endEvent, "release");
|
|
415
|
-
if (!isValidPressEvent(endEvent) || !isPressing.has(target)) {
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
isPressing.delete(target);
|
|
419
|
-
if (typeof onPressEnd === "function") {
|
|
420
|
-
onPressEnd(endEvent, { success });
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
const onPointerUp = (upEvent) => {
|
|
424
|
-
const isOutside = !upEvent.isTrusted ? false : checkOutside(upEvent, target instanceof Element ? target.getBoundingClientRect() : {
|
|
425
|
-
left: 0,
|
|
426
|
-
top: 0,
|
|
427
|
-
right: window.innerWidth,
|
|
428
|
-
bottom: window.innerHeight
|
|
429
|
-
});
|
|
430
|
-
if (isOutside) {
|
|
431
|
-
onPointerEnd(upEvent, false);
|
|
432
|
-
} else {
|
|
433
|
-
onPointerEnd(upEvent, !(target instanceof Element) || isNodeOrChild(target, upEvent.target));
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
const onPointerCancel = (cancelEvent) => {
|
|
437
|
-
onPointerEnd(cancelEvent, false);
|
|
438
|
-
};
|
|
439
|
-
target.addEventListener("pointerup", onPointerUp, eventOptions);
|
|
440
|
-
target.addEventListener("pointercancel", onPointerCancel, eventOptions);
|
|
441
|
-
target.addEventListener("lostpointercapture", onPointerCancel, eventOptions);
|
|
442
|
-
};
|
|
443
|
-
targets.forEach((target) => {
|
|
444
|
-
target = options.useGlobalTarget ? window : target;
|
|
445
|
-
let canAddKeyboardAccessibility = false;
|
|
446
|
-
if (target instanceof HTMLElement) {
|
|
447
|
-
canAddKeyboardAccessibility = true;
|
|
448
|
-
if (!isElementKeyboardAccessible(target) && target.getAttribute("tabindex") === null) {
|
|
449
|
-
target.tabIndex = 0;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
target.addEventListener("pointerdown", startPress, eventOptions);
|
|
453
|
-
if (canAddKeyboardAccessibility) {
|
|
454
|
-
target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions), eventOptions);
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
return cancelEvents;
|
|
458
|
-
}
|
|
459
|
-
function checkOutside(event, rect) {
|
|
460
|
-
return event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom;
|
|
81
|
+
console.warn(message);
|
|
82
|
+
warned.add(message);
|
|
461
83
|
}
|
|
462
84
|
const clamp$1 = (min, max, v) => {
|
|
463
85
|
if (v > max)
|
|
@@ -466,9 +88,6 @@ const clamp$1 = (min, max, v) => {
|
|
|
466
88
|
return min;
|
|
467
89
|
return v;
|
|
468
90
|
};
|
|
469
|
-
function velocityPerSecond(velocity, frameDuration) {
|
|
470
|
-
return frameDuration ? velocity * (1e3 / frameDuration) : 0;
|
|
471
|
-
}
|
|
472
91
|
const velocitySampleDuration = 5;
|
|
473
92
|
function calcGeneratorVelocity(resolveValue, t, current) {
|
|
474
93
|
const prevT = Math.max(t - velocitySampleDuration, 0);
|
|
@@ -666,8 +285,8 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
|
|
|
666
285
|
return state2;
|
|
667
286
|
},
|
|
668
287
|
toString: () => {
|
|
669
|
-
const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
670
|
-
const easing = generateLinearEasing((progress2) => generator.next(calculatedDuration * progress2).value, calculatedDuration, 30);
|
|
288
|
+
const calculatedDuration = Math.min(motionDom.calcGeneratorDuration(generator), motionDom.maxGeneratorDuration);
|
|
289
|
+
const easing = motionDom.generateLinearEasing((progress2) => generator.next(calculatedDuration * progress2).value, calculatedDuration, 30);
|
|
671
290
|
return calculatedDuration + "ms " + easing;
|
|
672
291
|
}
|
|
673
292
|
};
|
|
@@ -704,7 +323,7 @@ function isDOMKeyframes(keyframes2) {
|
|
|
704
323
|
}
|
|
705
324
|
function resolveSubjects(subject, keyframes2, scope, selectorCache) {
|
|
706
325
|
if (typeof subject === "string" && isDOMKeyframes(keyframes2)) {
|
|
707
|
-
return resolveElements(subject, scope, selectorCache);
|
|
326
|
+
return motionDom.resolveElements(subject, scope, selectorCache);
|
|
708
327
|
} else if (subject instanceof NodeList) {
|
|
709
328
|
return Array.from(subject);
|
|
710
329
|
} else if (Array.isArray(subject)) {
|
|
@@ -728,15 +347,6 @@ function calcNextTime(current, next, prev, labels) {
|
|
|
728
347
|
return (_a = labels.get(next)) !== null && _a !== void 0 ? _a : current;
|
|
729
348
|
}
|
|
730
349
|
}
|
|
731
|
-
function addUniqueItem(arr, item) {
|
|
732
|
-
if (arr.indexOf(item) === -1)
|
|
733
|
-
arr.push(item);
|
|
734
|
-
}
|
|
735
|
-
function removeItem(arr, item) {
|
|
736
|
-
const index = arr.indexOf(item);
|
|
737
|
-
if (index > -1)
|
|
738
|
-
arr.splice(index, 1);
|
|
739
|
-
}
|
|
740
350
|
function eraseKeyframes(sequence, startTime, endTime) {
|
|
741
351
|
for (let i = 0; i < sequence.length; i++) {
|
|
742
352
|
const keyframe = sequence[i];
|
|
@@ -803,7 +413,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
803
413
|
let { ease: ease2 = defaultTransition.ease || "easeOut", duration } = valueTransition;
|
|
804
414
|
const calculatedDelay = typeof delay2 === "function" ? delay2(elementIndex, numSubjects) : delay2;
|
|
805
415
|
const numKeyframes = valueKeyframesAsList.length;
|
|
806
|
-
const createGenerator = isGenerator(type) ? type : generators2 === null || generators2 === void 0 ? void 0 : generators2[type];
|
|
416
|
+
const createGenerator = motionDom.isGenerator(type) ? type : generators2 === null || generators2 === void 0 ? void 0 : generators2[type];
|
|
807
417
|
if (numKeyframes <= 2 && createGenerator) {
|
|
808
418
|
let absoluteDelta = 100;
|
|
809
419
|
if (numKeyframes === 2 && isNumberKeyframesArray(valueKeyframesAsList)) {
|
|
@@ -814,7 +424,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
|
|
|
814
424
|
if (duration !== void 0) {
|
|
815
425
|
springTransition.duration = /* @__PURE__ */ secondsToMilliseconds$1(duration);
|
|
816
426
|
}
|
|
817
|
-
const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);
|
|
427
|
+
const springEasing = motionDom.createGeneratorEasing(springTransition, absoluteDelta, createGenerator);
|
|
818
428
|
ease2 = springEasing.ease;
|
|
819
429
|
duration = springEasing.duration;
|
|
820
430
|
}
|
|
@@ -966,476 +576,6 @@ const isCustomValue = (v) => {
|
|
|
966
576
|
const resolveFinalValueInKeyframes = (v) => {
|
|
967
577
|
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
|
|
968
578
|
};
|
|
969
|
-
const MotionGlobalConfig = {
|
|
970
|
-
skipAnimations: false,
|
|
971
|
-
useManualTiming: false
|
|
972
|
-
};
|
|
973
|
-
const stepsOrder = [
|
|
974
|
-
"read",
|
|
975
|
-
// Read
|
|
976
|
-
"resolveKeyframes",
|
|
977
|
-
// Write/Read/Write/Read
|
|
978
|
-
"update",
|
|
979
|
-
// Compute
|
|
980
|
-
"preRender",
|
|
981
|
-
// Compute
|
|
982
|
-
"render",
|
|
983
|
-
// Write
|
|
984
|
-
"postRender"
|
|
985
|
-
// Compute
|
|
986
|
-
];
|
|
987
|
-
const statsBuffer = {
|
|
988
|
-
value: null,
|
|
989
|
-
addProjectionMetrics: null
|
|
990
|
-
};
|
|
991
|
-
function createRenderStep(runNextFrame, stepName) {
|
|
992
|
-
let thisFrame = /* @__PURE__ */ new Set();
|
|
993
|
-
let nextFrame = /* @__PURE__ */ new Set();
|
|
994
|
-
let isProcessing = false;
|
|
995
|
-
let flushNextFrame = false;
|
|
996
|
-
const toKeepAlive = /* @__PURE__ */ new WeakSet();
|
|
997
|
-
let latestFrameData = {
|
|
998
|
-
delta: 0,
|
|
999
|
-
timestamp: 0,
|
|
1000
|
-
isProcessing: false
|
|
1001
|
-
};
|
|
1002
|
-
let numCalls = 0;
|
|
1003
|
-
function triggerCallback(callback) {
|
|
1004
|
-
if (toKeepAlive.has(callback)) {
|
|
1005
|
-
step.schedule(callback);
|
|
1006
|
-
runNextFrame();
|
|
1007
|
-
}
|
|
1008
|
-
numCalls++;
|
|
1009
|
-
callback(latestFrameData);
|
|
1010
|
-
}
|
|
1011
|
-
const step = {
|
|
1012
|
-
/**
|
|
1013
|
-
* Schedule a process to run on the next frame.
|
|
1014
|
-
*/
|
|
1015
|
-
schedule: (callback, keepAlive = false, immediate = false) => {
|
|
1016
|
-
const addToCurrentFrame = immediate && isProcessing;
|
|
1017
|
-
const queue = addToCurrentFrame ? thisFrame : nextFrame;
|
|
1018
|
-
if (keepAlive)
|
|
1019
|
-
toKeepAlive.add(callback);
|
|
1020
|
-
if (!queue.has(callback))
|
|
1021
|
-
queue.add(callback);
|
|
1022
|
-
return callback;
|
|
1023
|
-
},
|
|
1024
|
-
/**
|
|
1025
|
-
* Cancel the provided callback from running on the next frame.
|
|
1026
|
-
*/
|
|
1027
|
-
cancel: (callback) => {
|
|
1028
|
-
nextFrame.delete(callback);
|
|
1029
|
-
toKeepAlive.delete(callback);
|
|
1030
|
-
},
|
|
1031
|
-
/**
|
|
1032
|
-
* Execute all schedule callbacks.
|
|
1033
|
-
*/
|
|
1034
|
-
process: (frameData2) => {
|
|
1035
|
-
latestFrameData = frameData2;
|
|
1036
|
-
if (isProcessing) {
|
|
1037
|
-
flushNextFrame = true;
|
|
1038
|
-
return;
|
|
1039
|
-
}
|
|
1040
|
-
isProcessing = true;
|
|
1041
|
-
[thisFrame, nextFrame] = [nextFrame, thisFrame];
|
|
1042
|
-
thisFrame.forEach(triggerCallback);
|
|
1043
|
-
if (stepName && statsBuffer.value) {
|
|
1044
|
-
statsBuffer.value.frameloop[stepName].push(numCalls);
|
|
1045
|
-
}
|
|
1046
|
-
numCalls = 0;
|
|
1047
|
-
thisFrame.clear();
|
|
1048
|
-
isProcessing = false;
|
|
1049
|
-
if (flushNextFrame) {
|
|
1050
|
-
flushNextFrame = false;
|
|
1051
|
-
step.process(frameData2);
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
};
|
|
1055
|
-
return step;
|
|
1056
|
-
}
|
|
1057
|
-
const maxElapsed$1 = 40;
|
|
1058
|
-
function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
1059
|
-
let runNextFrame = false;
|
|
1060
|
-
let useDefaultElapsed = true;
|
|
1061
|
-
const state2 = {
|
|
1062
|
-
delta: 0,
|
|
1063
|
-
timestamp: 0,
|
|
1064
|
-
isProcessing: false
|
|
1065
|
-
};
|
|
1066
|
-
const flagRunNextFrame = () => runNextFrame = true;
|
|
1067
|
-
const steps2 = stepsOrder.reduce((acc, key) => {
|
|
1068
|
-
acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : void 0);
|
|
1069
|
-
return acc;
|
|
1070
|
-
}, {});
|
|
1071
|
-
const { read, resolveKeyframes, update, preRender, render, postRender } = steps2;
|
|
1072
|
-
const processBatch = () => {
|
|
1073
|
-
const timestamp = performance.now();
|
|
1074
|
-
runNextFrame = false;
|
|
1075
|
-
{
|
|
1076
|
-
state2.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state2.timestamp, maxElapsed$1), 1);
|
|
1077
|
-
}
|
|
1078
|
-
state2.timestamp = timestamp;
|
|
1079
|
-
state2.isProcessing = true;
|
|
1080
|
-
read.process(state2);
|
|
1081
|
-
resolveKeyframes.process(state2);
|
|
1082
|
-
update.process(state2);
|
|
1083
|
-
preRender.process(state2);
|
|
1084
|
-
render.process(state2);
|
|
1085
|
-
postRender.process(state2);
|
|
1086
|
-
state2.isProcessing = false;
|
|
1087
|
-
if (runNextFrame && allowKeepAlive) {
|
|
1088
|
-
useDefaultElapsed = false;
|
|
1089
|
-
scheduleNextBatch(processBatch);
|
|
1090
|
-
}
|
|
1091
|
-
};
|
|
1092
|
-
const wake = () => {
|
|
1093
|
-
runNextFrame = true;
|
|
1094
|
-
useDefaultElapsed = true;
|
|
1095
|
-
if (!state2.isProcessing) {
|
|
1096
|
-
scheduleNextBatch(processBatch);
|
|
1097
|
-
}
|
|
1098
|
-
};
|
|
1099
|
-
const schedule = stepsOrder.reduce((acc, key) => {
|
|
1100
|
-
const step = steps2[key];
|
|
1101
|
-
acc[key] = (process2, keepAlive = false, immediate = false) => {
|
|
1102
|
-
if (!runNextFrame)
|
|
1103
|
-
wake();
|
|
1104
|
-
return step.schedule(process2, keepAlive, immediate);
|
|
1105
|
-
};
|
|
1106
|
-
return acc;
|
|
1107
|
-
}, {});
|
|
1108
|
-
const cancel = (process2) => {
|
|
1109
|
-
for (let i = 0; i < stepsOrder.length; i++) {
|
|
1110
|
-
steps2[stepsOrder[i]].cancel(process2);
|
|
1111
|
-
}
|
|
1112
|
-
};
|
|
1113
|
-
return { schedule, cancel, state: state2, steps: steps2 };
|
|
1114
|
-
}
|
|
1115
|
-
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true);
|
|
1116
|
-
let now;
|
|
1117
|
-
function clearTime() {
|
|
1118
|
-
now = void 0;
|
|
1119
|
-
}
|
|
1120
|
-
const time = {
|
|
1121
|
-
now: () => {
|
|
1122
|
-
if (now === void 0) {
|
|
1123
|
-
time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming ? frameData.timestamp : performance.now());
|
|
1124
|
-
}
|
|
1125
|
-
return now;
|
|
1126
|
-
},
|
|
1127
|
-
set: (newTime) => {
|
|
1128
|
-
now = newTime;
|
|
1129
|
-
queueMicrotask(clearTime);
|
|
1130
|
-
}
|
|
1131
|
-
};
|
|
1132
|
-
class SubscriptionManager {
|
|
1133
|
-
constructor() {
|
|
1134
|
-
this.subscriptions = [];
|
|
1135
|
-
}
|
|
1136
|
-
add(handler) {
|
|
1137
|
-
addUniqueItem(this.subscriptions, handler);
|
|
1138
|
-
return () => removeItem(this.subscriptions, handler);
|
|
1139
|
-
}
|
|
1140
|
-
notify(a, b, c) {
|
|
1141
|
-
const numSubscriptions = this.subscriptions.length;
|
|
1142
|
-
if (!numSubscriptions)
|
|
1143
|
-
return;
|
|
1144
|
-
if (numSubscriptions === 1) {
|
|
1145
|
-
this.subscriptions[0](a, b, c);
|
|
1146
|
-
} else {
|
|
1147
|
-
for (let i = 0; i < numSubscriptions; i++) {
|
|
1148
|
-
const handler = this.subscriptions[i];
|
|
1149
|
-
handler && handler(a, b, c);
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
getSize() {
|
|
1154
|
-
return this.subscriptions.length;
|
|
1155
|
-
}
|
|
1156
|
-
clear() {
|
|
1157
|
-
this.subscriptions.length = 0;
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
const warned = /* @__PURE__ */ new Set();
|
|
1161
|
-
function warnOnce(condition, message, element) {
|
|
1162
|
-
if (condition || warned.has(message))
|
|
1163
|
-
return;
|
|
1164
|
-
console.warn(message);
|
|
1165
|
-
warned.add(message);
|
|
1166
|
-
}
|
|
1167
|
-
const MAX_VELOCITY_DELTA = 30;
|
|
1168
|
-
const isFloat = (value) => {
|
|
1169
|
-
return !isNaN(parseFloat(value));
|
|
1170
|
-
};
|
|
1171
|
-
const collectMotionValues = {
|
|
1172
|
-
current: void 0
|
|
1173
|
-
};
|
|
1174
|
-
class MotionValue {
|
|
1175
|
-
/**
|
|
1176
|
-
* @param init - The initiating value
|
|
1177
|
-
* @param config - Optional configuration options
|
|
1178
|
-
*
|
|
1179
|
-
* - `transformer`: A function to transform incoming values with.
|
|
1180
|
-
*
|
|
1181
|
-
* @internal
|
|
1182
|
-
*/
|
|
1183
|
-
constructor(init, options = {}) {
|
|
1184
|
-
this.version = "12.4.10";
|
|
1185
|
-
this.canTrackVelocity = null;
|
|
1186
|
-
this.events = {};
|
|
1187
|
-
this.updateAndNotify = (v, render = true) => {
|
|
1188
|
-
const currentTime = time.now();
|
|
1189
|
-
if (this.updatedAt !== currentTime) {
|
|
1190
|
-
this.setPrevFrameValue();
|
|
1191
|
-
}
|
|
1192
|
-
this.prev = this.current;
|
|
1193
|
-
this.setCurrent(v);
|
|
1194
|
-
if (this.current !== this.prev && this.events.change) {
|
|
1195
|
-
this.events.change.notify(this.current);
|
|
1196
|
-
}
|
|
1197
|
-
if (render && this.events.renderRequest) {
|
|
1198
|
-
this.events.renderRequest.notify(this.current);
|
|
1199
|
-
}
|
|
1200
|
-
};
|
|
1201
|
-
this.hasAnimated = false;
|
|
1202
|
-
this.setCurrent(init);
|
|
1203
|
-
this.owner = options.owner;
|
|
1204
|
-
}
|
|
1205
|
-
setCurrent(current) {
|
|
1206
|
-
this.current = current;
|
|
1207
|
-
this.updatedAt = time.now();
|
|
1208
|
-
if (this.canTrackVelocity === null && current !== void 0) {
|
|
1209
|
-
this.canTrackVelocity = isFloat(this.current);
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
setPrevFrameValue(prevFrameValue = this.current) {
|
|
1213
|
-
this.prevFrameValue = prevFrameValue;
|
|
1214
|
-
this.prevUpdatedAt = this.updatedAt;
|
|
1215
|
-
}
|
|
1216
|
-
/**
|
|
1217
|
-
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
1218
|
-
*
|
|
1219
|
-
* It returns a function that, when called, will cancel the subscription.
|
|
1220
|
-
*
|
|
1221
|
-
* When calling `onChange` inside a React component, it should be wrapped with the
|
|
1222
|
-
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
|
|
1223
|
-
* from the `useEffect` function to ensure you don't add duplicate subscribers..
|
|
1224
|
-
*
|
|
1225
|
-
* ```jsx
|
|
1226
|
-
* export const MyComponent = () => {
|
|
1227
|
-
* const x = useMotionValue(0)
|
|
1228
|
-
* const y = useMotionValue(0)
|
|
1229
|
-
* const opacity = useMotionValue(1)
|
|
1230
|
-
*
|
|
1231
|
-
* useEffect(() => {
|
|
1232
|
-
* function updateOpacity() {
|
|
1233
|
-
* const maxXY = Math.max(x.get(), y.get())
|
|
1234
|
-
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
|
|
1235
|
-
* opacity.set(newOpacity)
|
|
1236
|
-
* }
|
|
1237
|
-
*
|
|
1238
|
-
* const unsubscribeX = x.on("change", updateOpacity)
|
|
1239
|
-
* const unsubscribeY = y.on("change", updateOpacity)
|
|
1240
|
-
*
|
|
1241
|
-
* return () => {
|
|
1242
|
-
* unsubscribeX()
|
|
1243
|
-
* unsubscribeY()
|
|
1244
|
-
* }
|
|
1245
|
-
* }, [])
|
|
1246
|
-
*
|
|
1247
|
-
* return <motion.div style={{ x }} />
|
|
1248
|
-
* }
|
|
1249
|
-
* ```
|
|
1250
|
-
*
|
|
1251
|
-
* @param subscriber - A function that receives the latest value.
|
|
1252
|
-
* @returns A function that, when called, will cancel this subscription.
|
|
1253
|
-
*
|
|
1254
|
-
* @deprecated
|
|
1255
|
-
*/
|
|
1256
|
-
onChange(subscription) {
|
|
1257
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1258
|
-
warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`);
|
|
1259
|
-
}
|
|
1260
|
-
return this.on("change", subscription);
|
|
1261
|
-
}
|
|
1262
|
-
on(eventName, callback) {
|
|
1263
|
-
if (!this.events[eventName]) {
|
|
1264
|
-
this.events[eventName] = new SubscriptionManager();
|
|
1265
|
-
}
|
|
1266
|
-
const unsubscribe = this.events[eventName].add(callback);
|
|
1267
|
-
if (eventName === "change") {
|
|
1268
|
-
return () => {
|
|
1269
|
-
unsubscribe();
|
|
1270
|
-
frame.read(() => {
|
|
1271
|
-
if (!this.events.change.getSize()) {
|
|
1272
|
-
this.stop();
|
|
1273
|
-
}
|
|
1274
|
-
});
|
|
1275
|
-
};
|
|
1276
|
-
}
|
|
1277
|
-
return unsubscribe;
|
|
1278
|
-
}
|
|
1279
|
-
clearListeners() {
|
|
1280
|
-
for (const eventManagers in this.events) {
|
|
1281
|
-
this.events[eventManagers].clear();
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
/**
|
|
1285
|
-
* Attaches a passive effect to the `MotionValue`.
|
|
1286
|
-
*
|
|
1287
|
-
* @internal
|
|
1288
|
-
*/
|
|
1289
|
-
attach(passiveEffect, stopPassiveEffect) {
|
|
1290
|
-
this.passiveEffect = passiveEffect;
|
|
1291
|
-
this.stopPassiveEffect = stopPassiveEffect;
|
|
1292
|
-
}
|
|
1293
|
-
/**
|
|
1294
|
-
* Sets the state of the `MotionValue`.
|
|
1295
|
-
*
|
|
1296
|
-
* @remarks
|
|
1297
|
-
*
|
|
1298
|
-
* ```jsx
|
|
1299
|
-
* const x = useMotionValue(0)
|
|
1300
|
-
* x.set(10)
|
|
1301
|
-
* ```
|
|
1302
|
-
*
|
|
1303
|
-
* @param latest - Latest value to set.
|
|
1304
|
-
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
1305
|
-
*
|
|
1306
|
-
* @public
|
|
1307
|
-
*/
|
|
1308
|
-
set(v, render = true) {
|
|
1309
|
-
if (!render || !this.passiveEffect) {
|
|
1310
|
-
this.updateAndNotify(v, render);
|
|
1311
|
-
} else {
|
|
1312
|
-
this.passiveEffect(v, this.updateAndNotify);
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
setWithVelocity(prev, current, delta) {
|
|
1316
|
-
this.set(current);
|
|
1317
|
-
this.prev = void 0;
|
|
1318
|
-
this.prevFrameValue = prev;
|
|
1319
|
-
this.prevUpdatedAt = this.updatedAt - delta;
|
|
1320
|
-
}
|
|
1321
|
-
/**
|
|
1322
|
-
* Set the state of the `MotionValue`, stopping any active animations,
|
|
1323
|
-
* effects, and resets velocity to `0`.
|
|
1324
|
-
*/
|
|
1325
|
-
jump(v, endAnimation = true) {
|
|
1326
|
-
this.updateAndNotify(v);
|
|
1327
|
-
this.prev = v;
|
|
1328
|
-
this.prevUpdatedAt = this.prevFrameValue = void 0;
|
|
1329
|
-
endAnimation && this.stop();
|
|
1330
|
-
if (this.stopPassiveEffect)
|
|
1331
|
-
this.stopPassiveEffect();
|
|
1332
|
-
}
|
|
1333
|
-
/**
|
|
1334
|
-
* Returns the latest state of `MotionValue`
|
|
1335
|
-
*
|
|
1336
|
-
* @returns - The latest state of `MotionValue`
|
|
1337
|
-
*
|
|
1338
|
-
* @public
|
|
1339
|
-
*/
|
|
1340
|
-
get() {
|
|
1341
|
-
if (collectMotionValues.current) {
|
|
1342
|
-
collectMotionValues.current.push(this);
|
|
1343
|
-
}
|
|
1344
|
-
return this.current;
|
|
1345
|
-
}
|
|
1346
|
-
/**
|
|
1347
|
-
* @public
|
|
1348
|
-
*/
|
|
1349
|
-
getPrevious() {
|
|
1350
|
-
return this.prev;
|
|
1351
|
-
}
|
|
1352
|
-
/**
|
|
1353
|
-
* Returns the latest velocity of `MotionValue`
|
|
1354
|
-
*
|
|
1355
|
-
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
1356
|
-
*
|
|
1357
|
-
* @public
|
|
1358
|
-
*/
|
|
1359
|
-
getVelocity() {
|
|
1360
|
-
const currentTime = time.now();
|
|
1361
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {
|
|
1362
|
-
return 0;
|
|
1363
|
-
}
|
|
1364
|
-
const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);
|
|
1365
|
-
return velocityPerSecond(parseFloat(this.current) - parseFloat(this.prevFrameValue), delta);
|
|
1366
|
-
}
|
|
1367
|
-
/**
|
|
1368
|
-
* Registers a new animation to control this `MotionValue`. Only one
|
|
1369
|
-
* animation can drive a `MotionValue` at one time.
|
|
1370
|
-
*
|
|
1371
|
-
* ```jsx
|
|
1372
|
-
* value.start()
|
|
1373
|
-
* ```
|
|
1374
|
-
*
|
|
1375
|
-
* @param animation - A function that starts the provided animation
|
|
1376
|
-
*
|
|
1377
|
-
* @internal
|
|
1378
|
-
*/
|
|
1379
|
-
start(startAnimation) {
|
|
1380
|
-
this.stop();
|
|
1381
|
-
return new Promise((resolve) => {
|
|
1382
|
-
this.hasAnimated = true;
|
|
1383
|
-
this.animation = startAnimation(resolve);
|
|
1384
|
-
if (this.events.animationStart) {
|
|
1385
|
-
this.events.animationStart.notify();
|
|
1386
|
-
}
|
|
1387
|
-
}).then(() => {
|
|
1388
|
-
if (this.events.animationComplete) {
|
|
1389
|
-
this.events.animationComplete.notify();
|
|
1390
|
-
}
|
|
1391
|
-
this.clearAnimation();
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* Stop the currently active animation.
|
|
1396
|
-
*
|
|
1397
|
-
* @public
|
|
1398
|
-
*/
|
|
1399
|
-
stop() {
|
|
1400
|
-
if (this.animation) {
|
|
1401
|
-
this.animation.stop();
|
|
1402
|
-
if (this.events.animationCancel) {
|
|
1403
|
-
this.events.animationCancel.notify();
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
this.clearAnimation();
|
|
1407
|
-
}
|
|
1408
|
-
/**
|
|
1409
|
-
* Returns `true` if this value is currently animating.
|
|
1410
|
-
*
|
|
1411
|
-
* @public
|
|
1412
|
-
*/
|
|
1413
|
-
isAnimating() {
|
|
1414
|
-
return !!this.animation;
|
|
1415
|
-
}
|
|
1416
|
-
clearAnimation() {
|
|
1417
|
-
delete this.animation;
|
|
1418
|
-
}
|
|
1419
|
-
/**
|
|
1420
|
-
* Destroy and clean up subscribers to this `MotionValue`.
|
|
1421
|
-
*
|
|
1422
|
-
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
1423
|
-
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
1424
|
-
* created a `MotionValue` via the `motionValue` function.
|
|
1425
|
-
*
|
|
1426
|
-
* @public
|
|
1427
|
-
*/
|
|
1428
|
-
destroy() {
|
|
1429
|
-
this.clearListeners();
|
|
1430
|
-
this.stop();
|
|
1431
|
-
if (this.stopPassiveEffect) {
|
|
1432
|
-
this.stopPassiveEffect();
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
function motionValue(init, options) {
|
|
1437
|
-
return new MotionValue(init, options);
|
|
1438
|
-
}
|
|
1439
579
|
function getValueState(visualElement) {
|
|
1440
580
|
const state2 = [{}, {}];
|
|
1441
581
|
visualElement === null || visualElement === void 0 ? void 0 : visualElement.values.forEach((value, key) => {
|
|
@@ -1466,7 +606,7 @@ function setMotionValue(visualElement, key, value) {
|
|
|
1466
606
|
if (visualElement.hasValue(key)) {
|
|
1467
607
|
visualElement.getValue(key).set(value);
|
|
1468
608
|
} else {
|
|
1469
|
-
visualElement.addValue(key, motionValue(value));
|
|
609
|
+
visualElement.addValue(key, motionDom.motionValue(value));
|
|
1470
610
|
}
|
|
1471
611
|
}
|
|
1472
612
|
function setTarget(visualElement, definition) {
|
|
@@ -1865,23 +1005,85 @@ function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, n
|
|
|
1865
1005
|
}
|
|
1866
1006
|
}
|
|
1867
1007
|
}
|
|
1868
|
-
const
|
|
1869
|
-
const
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1008
|
+
const radToDeg = (rad) => rad * 180 / Math.PI;
|
|
1009
|
+
const rotate = (v) => {
|
|
1010
|
+
const angle = radToDeg(Math.atan2(v[1], v[0]));
|
|
1011
|
+
return rebaseAngle(angle);
|
|
1012
|
+
};
|
|
1013
|
+
const matrix2dParsers = {
|
|
1014
|
+
x: 4,
|
|
1015
|
+
y: 5,
|
|
1016
|
+
translateX: 4,
|
|
1017
|
+
translateY: 5,
|
|
1018
|
+
scaleX: 0,
|
|
1019
|
+
scaleY: 3,
|
|
1020
|
+
scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,
|
|
1021
|
+
rotate,
|
|
1022
|
+
rotateZ: rotate,
|
|
1023
|
+
skewX: (v) => radToDeg(Math.atan(v[1])),
|
|
1024
|
+
skewY: (v) => radToDeg(Math.atan(v[2])),
|
|
1025
|
+
skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2
|
|
1026
|
+
};
|
|
1027
|
+
const rebaseAngle = (angle) => {
|
|
1028
|
+
angle = angle % 360;
|
|
1029
|
+
if (angle < 0)
|
|
1030
|
+
angle += 360;
|
|
1031
|
+
return angle;
|
|
1032
|
+
};
|
|
1033
|
+
const rotateZ = rotate;
|
|
1034
|
+
const scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);
|
|
1035
|
+
const scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);
|
|
1036
|
+
const matrix3dParsers = {
|
|
1037
|
+
x: 12,
|
|
1038
|
+
y: 13,
|
|
1039
|
+
z: 14,
|
|
1040
|
+
translateX: 12,
|
|
1041
|
+
translateY: 13,
|
|
1042
|
+
translateZ: 14,
|
|
1043
|
+
scaleX,
|
|
1044
|
+
scaleY,
|
|
1045
|
+
scale: (v) => (scaleX(v) + scaleY(v)) / 2,
|
|
1046
|
+
rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),
|
|
1047
|
+
rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),
|
|
1048
|
+
rotateZ,
|
|
1049
|
+
rotate: rotateZ,
|
|
1050
|
+
skewX: (v) => radToDeg(Math.atan(v[4])),
|
|
1051
|
+
skewY: (v) => radToDeg(Math.atan(v[1])),
|
|
1052
|
+
skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2
|
|
1053
|
+
};
|
|
1054
|
+
function defaultTransformValue(name) {
|
|
1055
|
+
return name.includes("scale") ? 1 : 0;
|
|
1056
|
+
}
|
|
1057
|
+
function parseValueFromTransform(transform2, name) {
|
|
1058
|
+
if (!transform2 || transform2 === "none") {
|
|
1059
|
+
return defaultTransformValue(name);
|
|
1060
|
+
}
|
|
1061
|
+
const matrix3dMatch = transform2.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
1062
|
+
let parsers;
|
|
1063
|
+
let match;
|
|
1064
|
+
if (matrix3dMatch) {
|
|
1065
|
+
parsers = matrix3dParsers;
|
|
1066
|
+
match = matrix3dMatch;
|
|
1876
1067
|
} else {
|
|
1877
|
-
const
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
} else {
|
|
1881
|
-
return 0;
|
|
1882
|
-
}
|
|
1068
|
+
const matrix2dMatch = transform2.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
1069
|
+
parsers = matrix2dParsers;
|
|
1070
|
+
match = matrix2dMatch;
|
|
1883
1071
|
}
|
|
1072
|
+
if (!match) {
|
|
1073
|
+
return defaultTransformValue(name);
|
|
1074
|
+
}
|
|
1075
|
+
const valueParser = parsers[name];
|
|
1076
|
+
const values = match[1].split(",").map(convertTransformToNumber);
|
|
1077
|
+
return typeof valueParser === "function" ? valueParser(values) : values[valueParser];
|
|
1078
|
+
}
|
|
1079
|
+
const readTransformValue = (instance, name) => {
|
|
1080
|
+
const { transform: transform2 = "none" } = getComputedStyle(instance);
|
|
1081
|
+
return parseValueFromTransform(transform2, name);
|
|
1884
1082
|
};
|
|
1083
|
+
function convertTransformToNumber(value) {
|
|
1084
|
+
return parseFloat(value.trim());
|
|
1085
|
+
}
|
|
1086
|
+
const isNumOrPxType = (v) => v === number || v === px;
|
|
1885
1087
|
const transformKeys = /* @__PURE__ */ new Set(["x", "y", "z"]);
|
|
1886
1088
|
const nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));
|
|
1887
1089
|
function removeNonTranslationalTransform(visualElement) {
|
|
@@ -1904,8 +1106,8 @@ const positionalValues = {
|
|
|
1904
1106
|
bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),
|
|
1905
1107
|
right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),
|
|
1906
1108
|
// Transform
|
|
1907
|
-
x:
|
|
1908
|
-
y:
|
|
1109
|
+
x: (_bbox, { transform: transform2 }) => parseValueFromTransform(transform2, "x"),
|
|
1110
|
+
y: (_bbox, { transform: transform2 }) => parseValueFromTransform(transform2, "y")
|
|
1909
1111
|
};
|
|
1910
1112
|
positionalValues.translateX = positionalValues.x;
|
|
1911
1113
|
positionalValues.translateY = positionalValues.y;
|
|
@@ -1960,7 +1162,7 @@ function flushKeyframeResolvers() {
|
|
|
1960
1162
|
measureAllKeyframes();
|
|
1961
1163
|
}
|
|
1962
1164
|
class KeyframeResolver {
|
|
1963
|
-
constructor(unresolvedKeyframes, onComplete, name,
|
|
1165
|
+
constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {
|
|
1964
1166
|
this.isComplete = false;
|
|
1965
1167
|
this.isAsync = false;
|
|
1966
1168
|
this.needsMeasurement = false;
|
|
@@ -1968,7 +1170,7 @@ class KeyframeResolver {
|
|
|
1968
1170
|
this.unresolvedKeyframes = [...unresolvedKeyframes];
|
|
1969
1171
|
this.onComplete = onComplete;
|
|
1970
1172
|
this.name = name;
|
|
1971
|
-
this.motionValue =
|
|
1173
|
+
this.motionValue = motionValue;
|
|
1972
1174
|
this.element = element;
|
|
1973
1175
|
this.isAsync = isAsync;
|
|
1974
1176
|
}
|
|
@@ -1978,8 +1180,8 @@ class KeyframeResolver {
|
|
|
1978
1180
|
toResolve.add(this);
|
|
1979
1181
|
if (!isScheduled) {
|
|
1980
1182
|
isScheduled = true;
|
|
1981
|
-
frame.read(readAllKeyframes);
|
|
1982
|
-
frame.resolveKeyframes(measureAllKeyframes);
|
|
1183
|
+
motionDom.frame.read(readAllKeyframes);
|
|
1184
|
+
motionDom.frame.resolveKeyframes(measureAllKeyframes);
|
|
1983
1185
|
}
|
|
1984
1186
|
} else {
|
|
1985
1187
|
this.readKeyframes();
|
|
@@ -1987,11 +1189,11 @@ class KeyframeResolver {
|
|
|
1987
1189
|
}
|
|
1988
1190
|
}
|
|
1989
1191
|
readKeyframes() {
|
|
1990
|
-
const { unresolvedKeyframes, name, element, motionValue
|
|
1192
|
+
const { unresolvedKeyframes, name, element, motionValue } = this;
|
|
1991
1193
|
for (let i = 0; i < unresolvedKeyframes.length; i++) {
|
|
1992
1194
|
if (unresolvedKeyframes[i] === null) {
|
|
1993
1195
|
if (i === 0) {
|
|
1994
|
-
const currentValue =
|
|
1196
|
+
const currentValue = motionValue === null || motionValue === void 0 ? void 0 : motionValue.get();
|
|
1995
1197
|
const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];
|
|
1996
1198
|
if (currentValue !== void 0) {
|
|
1997
1199
|
unresolvedKeyframes[0] = currentValue;
|
|
@@ -2004,8 +1206,8 @@ class KeyframeResolver {
|
|
|
2004
1206
|
if (unresolvedKeyframes[0] === void 0) {
|
|
2005
1207
|
unresolvedKeyframes[0] = finalKeyframe;
|
|
2006
1208
|
}
|
|
2007
|
-
if (
|
|
2008
|
-
|
|
1209
|
+
if (motionValue && currentValue === void 0) {
|
|
1210
|
+
motionValue.set(unresolvedKeyframes[0]);
|
|
2009
1211
|
}
|
|
2010
1212
|
} else {
|
|
2011
1213
|
unresolvedKeyframes[i] = unresolvedKeyframes[i - 1];
|
|
@@ -2080,8 +1282,8 @@ const auto = {
|
|
|
2080
1282
|
const dimensionValueTypes = [number, px, percent$1, degrees, vw, vh, auto];
|
|
2081
1283
|
const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));
|
|
2082
1284
|
class DOMKeyframesResolver extends KeyframeResolver {
|
|
2083
|
-
constructor(unresolvedKeyframes, onComplete, name,
|
|
2084
|
-
super(unresolvedKeyframes, onComplete, name,
|
|
1285
|
+
constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {
|
|
1286
|
+
super(unresolvedKeyframes, onComplete, name, motionValue, element, true);
|
|
2085
1287
|
}
|
|
2086
1288
|
readKeyframes() {
|
|
2087
1289
|
const { unresolvedKeyframes, element, name } = this;
|
|
@@ -2204,7 +1406,7 @@ function canAnimate(keyframes2, name, type, velocity) {
|
|
|
2204
1406
|
if (!isOriginAnimatable || !isTargetAnimatable) {
|
|
2205
1407
|
return false;
|
|
2206
1408
|
}
|
|
2207
|
-
return hasKeyframesChanged(keyframes2) || (type === "spring" || isGenerator(type)) && velocity;
|
|
1409
|
+
return hasKeyframesChanged(keyframes2) || (type === "spring" || motionDom.isGenerator(type)) && velocity;
|
|
2208
1410
|
}
|
|
2209
1411
|
const isNotNull = (value) => value !== null;
|
|
2210
1412
|
function getFinalKeyframe(keyframes2, { repeat, repeatType = "loop" }, finalKeyframe) {
|
|
@@ -2217,7 +1419,7 @@ class BaseAnimation {
|
|
|
2217
1419
|
constructor({ autoplay = true, delay: delay2 = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", ...options }) {
|
|
2218
1420
|
this.isStopped = false;
|
|
2219
1421
|
this.hasAttemptedResolve = false;
|
|
2220
|
-
this.createdAt = time.now();
|
|
1422
|
+
this.createdAt = motionDom.time.now();
|
|
2221
1423
|
this.options = {
|
|
2222
1424
|
autoplay,
|
|
2223
1425
|
delay: delay2,
|
|
@@ -2261,10 +1463,10 @@ class BaseAnimation {
|
|
|
2261
1463
|
* Otherwise, it will call initPlayback on the implementing class.
|
|
2262
1464
|
*/
|
|
2263
1465
|
onKeyframesResolved(keyframes2, finalKeyframe) {
|
|
2264
|
-
this.resolvedAt = time.now();
|
|
1466
|
+
this.resolvedAt = motionDom.time.now();
|
|
2265
1467
|
this.hasAttemptedResolve = true;
|
|
2266
|
-
const { name, type, velocity, delay: delay2, onComplete, onUpdate, isGenerator
|
|
2267
|
-
if (!
|
|
1468
|
+
const { name, type, velocity, delay: delay2, onComplete, onUpdate, isGenerator } = this.options;
|
|
1469
|
+
if (!isGenerator && !canAnimate(keyframes2, name, type, velocity)) {
|
|
2268
1470
|
if (!delay2) {
|
|
2269
1471
|
onUpdate && onUpdate(getFinalKeyframe(keyframes2, this.options, finalKeyframe));
|
|
2270
1472
|
onComplete && onComplete();
|
|
@@ -2295,6 +1497,8 @@ class BaseAnimation {
|
|
|
2295
1497
|
return this.currentFinishedPromise.then(resolve, reject);
|
|
2296
1498
|
}
|
|
2297
1499
|
flatten() {
|
|
1500
|
+
if (!this.options.allowFlatten)
|
|
1501
|
+
return;
|
|
2298
1502
|
this.options.type = "keyframes";
|
|
2299
1503
|
this.options.ease = "linear";
|
|
2300
1504
|
}
|
|
@@ -2541,7 +1745,7 @@ const easingLookup = {
|
|
|
2541
1745
|
anticipate
|
|
2542
1746
|
};
|
|
2543
1747
|
const easingDefinitionToFunction = (definition) => {
|
|
2544
|
-
if (isBezierDefinition(definition)) {
|
|
1748
|
+
if (motionDom.isBezierDefinition(definition)) {
|
|
2545
1749
|
exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);
|
|
2546
1750
|
const [x1, y1, x2, y2] = definition;
|
|
2547
1751
|
return cubicBezier(x1, y1, x2, y2);
|
|
@@ -2627,13 +1831,13 @@ function keyframes({ duration = 300, keyframes: keyframeValues, times, ease: eas
|
|
|
2627
1831
|
const frameloopDriver = (update) => {
|
|
2628
1832
|
const passTimestamp = ({ timestamp }) => update(timestamp);
|
|
2629
1833
|
return {
|
|
2630
|
-
start: () => frame.update(passTimestamp, true),
|
|
2631
|
-
stop: () => cancelFrame(passTimestamp),
|
|
1834
|
+
start: () => motionDom.frame.update(passTimestamp, true),
|
|
1835
|
+
stop: () => motionDom.cancelFrame(passTimestamp),
|
|
2632
1836
|
/**
|
|
2633
1837
|
* If we're processing this frame we can use the
|
|
2634
1838
|
* framelocked timestamp to keep things in sync.
|
|
2635
1839
|
*/
|
|
2636
|
-
now: () => frameData.isProcessing ? frameData.timestamp : time.now()
|
|
1840
|
+
now: () => motionDom.frameData.isProcessing ? motionDom.frameData.timestamp : motionDom.time.now()
|
|
2637
1841
|
};
|
|
2638
1842
|
};
|
|
2639
1843
|
const generators = {
|
|
@@ -2663,10 +1867,10 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2663
1867
|
const { onStop } = this.options;
|
|
2664
1868
|
onStop && onStop();
|
|
2665
1869
|
};
|
|
2666
|
-
const { name, motionValue
|
|
1870
|
+
const { name, motionValue, element, keyframes: keyframes2 } = this.options;
|
|
2667
1871
|
const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;
|
|
2668
1872
|
const onResolved = (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe);
|
|
2669
|
-
this.resolver = new KeyframeResolver$1(keyframes2, onResolved, name,
|
|
1873
|
+
this.resolver = new KeyframeResolver$1(keyframes2, onResolved, name, motionValue, element);
|
|
2670
1874
|
this.resolver.scheduleResolve();
|
|
2671
1875
|
}
|
|
2672
1876
|
flatten() {
|
|
@@ -2677,7 +1881,7 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2677
1881
|
}
|
|
2678
1882
|
initPlayback(keyframes$1) {
|
|
2679
1883
|
const { type = "keyframes", repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = this.options;
|
|
2680
|
-
const generatorFactory = isGenerator(type) ? type : generators[type] || keyframes;
|
|
1884
|
+
const generatorFactory = motionDom.isGenerator(type) ? type : generators[type] || keyframes;
|
|
2681
1885
|
let mapPercentToKeyframes;
|
|
2682
1886
|
let mirroredGenerator;
|
|
2683
1887
|
if (process.env.NODE_ENV !== "production" && generatorFactory !== keyframes) {
|
|
@@ -2696,7 +1900,7 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2696
1900
|
});
|
|
2697
1901
|
}
|
|
2698
1902
|
if (generator.calculatedDuration === null) {
|
|
2699
|
-
generator.calculatedDuration = calcGeneratorDuration(generator);
|
|
1903
|
+
generator.calculatedDuration = motionDom.calcGeneratorDuration(generator);
|
|
2700
1904
|
}
|
|
2701
1905
|
const { calculatedDuration } = generator;
|
|
2702
1906
|
const resolvedDuration = calculatedDuration + repeatDelay;
|
|
@@ -2712,6 +1916,7 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2712
1916
|
}
|
|
2713
1917
|
onPostResolved() {
|
|
2714
1918
|
const { autoplay = true } = this.options;
|
|
1919
|
+
motionDom.activeAnimations.mainThread++;
|
|
2715
1920
|
this.play();
|
|
2716
1921
|
if (this.pendingPlayState === "paused" || !autoplay) {
|
|
2717
1922
|
this.pause();
|
|
@@ -2832,13 +2037,13 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2832
2037
|
this.driver = driver((timestamp) => this.tick(timestamp));
|
|
2833
2038
|
}
|
|
2834
2039
|
onPlay && onPlay();
|
|
2835
|
-
const
|
|
2040
|
+
const now = this.driver.now();
|
|
2836
2041
|
if (this.holdTime !== null) {
|
|
2837
|
-
this.startTime =
|
|
2042
|
+
this.startTime = now - this.holdTime;
|
|
2838
2043
|
} else if (!this.startTime) {
|
|
2839
2044
|
this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
|
|
2840
2045
|
} else if (this.state === "finished") {
|
|
2841
|
-
this.startTime =
|
|
2046
|
+
this.startTime = now;
|
|
2842
2047
|
}
|
|
2843
2048
|
if (this.state === "finished") {
|
|
2844
2049
|
this.updateFinishedPromise();
|
|
@@ -2884,6 +2089,7 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2884
2089
|
this.updateFinishedPromise();
|
|
2885
2090
|
this.startTime = this.cancelTime = null;
|
|
2886
2091
|
this.resolver.cancel();
|
|
2092
|
+
motionDom.activeAnimations.mainThread--;
|
|
2887
2093
|
}
|
|
2888
2094
|
stopDriver() {
|
|
2889
2095
|
if (!this.driver)
|
|
@@ -2891,9 +2097,9 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2891
2097
|
this.driver.stop();
|
|
2892
2098
|
this.driver = void 0;
|
|
2893
2099
|
}
|
|
2894
|
-
sample(
|
|
2100
|
+
sample(time) {
|
|
2895
2101
|
this.startTime = 0;
|
|
2896
|
-
return this.tick(
|
|
2102
|
+
return this.tick(time, true);
|
|
2897
2103
|
}
|
|
2898
2104
|
}
|
|
2899
2105
|
function animateValue(options) {
|
|
@@ -2912,9 +2118,12 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
2912
2118
|
const keyframeOptions = { [valueName]: keyframes2 };
|
|
2913
2119
|
if (times)
|
|
2914
2120
|
keyframeOptions.offset = times;
|
|
2915
|
-
const easing = mapEasingToNativeEasing(ease2, duration);
|
|
2121
|
+
const easing = motionDom.mapEasingToNativeEasing(ease2, duration);
|
|
2916
2122
|
if (Array.isArray(easing))
|
|
2917
2123
|
keyframeOptions.easing = easing;
|
|
2124
|
+
if (motionDom.statsBuffer.value) {
|
|
2125
|
+
motionDom.activeAnimations.waapi++;
|
|
2126
|
+
}
|
|
2918
2127
|
const animation = element.animate(keyframeOptions, {
|
|
2919
2128
|
delay: delay2,
|
|
2920
2129
|
duration,
|
|
@@ -2923,13 +2132,18 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
|
|
|
2923
2132
|
iterations: repeat + 1,
|
|
2924
2133
|
direction: repeatType === "reverse" ? "alternate" : "normal"
|
|
2925
2134
|
});
|
|
2135
|
+
if (motionDom.statsBuffer.value) {
|
|
2136
|
+
animation.finished.finally(() => {
|
|
2137
|
+
motionDom.activeAnimations.waapi--;
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2926
2140
|
return animation;
|
|
2927
2141
|
}
|
|
2928
2142
|
const supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
2929
2143
|
const sampleDelta = 10;
|
|
2930
2144
|
const maxDuration = 2e4;
|
|
2931
2145
|
function requiresPregeneratedKeyframes(options) {
|
|
2932
|
-
return isGenerator(options.type) || options.type === "spring" || !isWaapiSupportedEasing(options.ease);
|
|
2146
|
+
return motionDom.isGenerator(options.type) || options.type === "spring" || !motionDom.isWaapiSupportedEasing(options.ease);
|
|
2933
2147
|
}
|
|
2934
2148
|
function pregenerateKeyframes(keyframes2, options) {
|
|
2935
2149
|
const sampleAnimation = new MainThreadAnimation({
|
|
@@ -2965,20 +2179,20 @@ function isUnsupportedEase(key) {
|
|
|
2965
2179
|
class AcceleratedAnimation extends BaseAnimation {
|
|
2966
2180
|
constructor(options) {
|
|
2967
2181
|
super(options);
|
|
2968
|
-
const { name, motionValue
|
|
2969
|
-
this.resolver = new DOMKeyframesResolver(keyframes2, (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe), name,
|
|
2182
|
+
const { name, motionValue, element, keyframes: keyframes2 } = this.options;
|
|
2183
|
+
this.resolver = new DOMKeyframesResolver(keyframes2, (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe), name, motionValue, element);
|
|
2970
2184
|
this.resolver.scheduleResolve();
|
|
2971
2185
|
}
|
|
2972
2186
|
initPlayback(keyframes2, finalKeyframe) {
|
|
2973
|
-
let { duration = 300, times, ease: ease2, type, motionValue
|
|
2974
|
-
if (!
|
|
2187
|
+
let { duration = 300, times, ease: ease2, type, motionValue, name, startTime } = this.options;
|
|
2188
|
+
if (!motionValue.owner || !motionValue.owner.current) {
|
|
2975
2189
|
return false;
|
|
2976
2190
|
}
|
|
2977
|
-
if (typeof ease2 === "string" && supportsLinearEasing() && isUnsupportedEase(ease2)) {
|
|
2191
|
+
if (typeof ease2 === "string" && motionDom.supportsLinearEasing() && isUnsupportedEase(ease2)) {
|
|
2978
2192
|
ease2 = unsupportedEasingFunctions[ease2];
|
|
2979
2193
|
}
|
|
2980
2194
|
if (requiresPregeneratedKeyframes(this.options)) {
|
|
2981
|
-
const { onComplete, onUpdate, motionValue:
|
|
2195
|
+
const { onComplete, onUpdate, motionValue: motionValue2, element, ...options } = this.options;
|
|
2982
2196
|
const pregeneratedAnimation = pregenerateKeyframes(keyframes2, options);
|
|
2983
2197
|
keyframes2 = pregeneratedAnimation.keyframes;
|
|
2984
2198
|
if (keyframes2.length === 1) {
|
|
@@ -2989,15 +2203,15 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
2989
2203
|
ease2 = pregeneratedAnimation.ease;
|
|
2990
2204
|
type = "keyframes";
|
|
2991
2205
|
}
|
|
2992
|
-
const animation = startWaapiAnimation(
|
|
2206
|
+
const animation = startWaapiAnimation(motionValue.owner.current, name, keyframes2, { ...this.options, duration, times, ease: ease2 });
|
|
2993
2207
|
animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
|
|
2994
2208
|
if (this.pendingTimeline) {
|
|
2995
|
-
attachTimeline(animation, this.pendingTimeline);
|
|
2209
|
+
motionDom.attachTimeline(animation, this.pendingTimeline);
|
|
2996
2210
|
this.pendingTimeline = void 0;
|
|
2997
2211
|
} else {
|
|
2998
2212
|
animation.onfinish = () => {
|
|
2999
2213
|
const { onComplete } = this.options;
|
|
3000
|
-
|
|
2214
|
+
motionValue.set(getFinalKeyframe(keyframes2, this.options, finalKeyframe));
|
|
3001
2215
|
onComplete && onComplete();
|
|
3002
2216
|
this.cancel();
|
|
3003
2217
|
this.resolveFinishedPromise();
|
|
@@ -3073,7 +2287,7 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3073
2287
|
if (!resolved)
|
|
3074
2288
|
return noop;
|
|
3075
2289
|
const { animation } = resolved;
|
|
3076
|
-
attachTimeline(animation, timeline);
|
|
2290
|
+
motionDom.attachTimeline(animation, timeline);
|
|
3077
2291
|
}
|
|
3078
2292
|
return noop;
|
|
3079
2293
|
}
|
|
@@ -3111,7 +2325,7 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3111
2325
|
return;
|
|
3112
2326
|
}
|
|
3113
2327
|
if (this.time) {
|
|
3114
|
-
const { motionValue
|
|
2328
|
+
const { motionValue, onUpdate, onComplete, element, ...options } = this.options;
|
|
3115
2329
|
const sampleAnimation = new MainThreadAnimation({
|
|
3116
2330
|
...options,
|
|
3117
2331
|
keyframes: keyframes2,
|
|
@@ -3122,7 +2336,7 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3122
2336
|
isGenerator: true
|
|
3123
2337
|
});
|
|
3124
2338
|
const sampleTime = /* @__PURE__ */ secondsToMilliseconds$1(this.time);
|
|
3125
|
-
|
|
2339
|
+
motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
|
|
3126
2340
|
}
|
|
3127
2341
|
const { onStop } = this.options;
|
|
3128
2342
|
onStop && onStop();
|
|
@@ -3141,11 +2355,11 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
3141
2355
|
resolved.animation.cancel();
|
|
3142
2356
|
}
|
|
3143
2357
|
static supports(options) {
|
|
3144
|
-
const { motionValue
|
|
3145
|
-
if (!
|
|
2358
|
+
const { motionValue, name, repeatDelay, repeatType, damping, type } = options;
|
|
2359
|
+
if (!motionValue || !motionValue.owner || !(motionValue.owner.current instanceof HTMLElement)) {
|
|
3146
2360
|
return false;
|
|
3147
2361
|
}
|
|
3148
|
-
const { onUpdate, transformTemplate } =
|
|
2362
|
+
const { onUpdate, transformTemplate } = motionValue.owner.getProps();
|
|
3149
2363
|
return supportsWaapi() && name && acceleratedValues.has(name) && /**
|
|
3150
2364
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
3151
2365
|
* no way to read the value from WAAPI every frame.
|
|
@@ -3186,7 +2400,7 @@ function isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildr
|
|
|
3186
2400
|
return !!Object.keys(transition).length;
|
|
3187
2401
|
}
|
|
3188
2402
|
const animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
|
|
3189
|
-
const valueTransition = getValueTransition
|
|
2403
|
+
const valueTransition = motionDom.getValueTransition(transition, name) || {};
|
|
3190
2404
|
const delay2 = valueTransition.delay || transition.delay || 0;
|
|
3191
2405
|
let { elapsed = 0 } = transition;
|
|
3192
2406
|
elapsed = elapsed - /* @__PURE__ */ secondsToMilliseconds$1(delay2);
|
|
@@ -3230,14 +2444,15 @@ const animateMotionValue = (name, value, target, transition = {}, element, isHan
|
|
|
3230
2444
|
shouldSkip = true;
|
|
3231
2445
|
}
|
|
3232
2446
|
}
|
|
2447
|
+
options.allowFlatten = !valueTransition.type && !valueTransition.ease;
|
|
3233
2448
|
if (shouldSkip && !isHandoff && value.get() !== void 0) {
|
|
3234
2449
|
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
|
|
3235
2450
|
if (finalKeyframe !== void 0) {
|
|
3236
|
-
frame.update(() => {
|
|
2451
|
+
motionDom.frame.update(() => {
|
|
3237
2452
|
options.onUpdate(finalKeyframe);
|
|
3238
2453
|
options.onComplete();
|
|
3239
2454
|
});
|
|
3240
|
-
return new GroupPlaybackControls([]);
|
|
2455
|
+
return new motionDom.GroupPlaybackControls([]);
|
|
3241
2456
|
}
|
|
3242
2457
|
}
|
|
3243
2458
|
if (!isHandoff && AcceleratedAnimation.supports(options)) {
|
|
@@ -3266,13 +2481,13 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
3266
2481
|
}
|
|
3267
2482
|
const valueTransition = {
|
|
3268
2483
|
delay: delay2,
|
|
3269
|
-
...getValueTransition
|
|
2484
|
+
...motionDom.getValueTransition(transition || {}, key)
|
|
3270
2485
|
};
|
|
3271
2486
|
let isHandoff = false;
|
|
3272
2487
|
if (window.MotionHandoffAnimation) {
|
|
3273
2488
|
const appearId = getOptimisedAppearId(visualElement);
|
|
3274
2489
|
if (appearId) {
|
|
3275
|
-
const startTime = window.MotionHandoffAnimation(appearId, key, frame);
|
|
2490
|
+
const startTime = window.MotionHandoffAnimation(appearId, key, motionDom.frame);
|
|
3276
2491
|
if (startTime !== null) {
|
|
3277
2492
|
valueTransition.startTime = startTime;
|
|
3278
2493
|
isHandoff = true;
|
|
@@ -3288,7 +2503,7 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
|
|
|
3288
2503
|
}
|
|
3289
2504
|
if (transitionEnd) {
|
|
3290
2505
|
Promise.all(animations).then(() => {
|
|
3291
|
-
frame.update(() => {
|
|
2506
|
+
motionDom.frame.update(() => {
|
|
3292
2507
|
transitionEnd && setTarget(visualElement, transitionEnd);
|
|
3293
2508
|
});
|
|
3294
2509
|
});
|
|
@@ -3386,10 +2601,10 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3386
2601
|
if (isMotionValue$1(nextValue)) {
|
|
3387
2602
|
element.addValue(key, nextValue);
|
|
3388
2603
|
if (process.env.NODE_ENV === "development") {
|
|
3389
|
-
warnOnce(nextValue.version === "12.
|
|
2604
|
+
warnOnce(nextValue.version === "12.5.0", `Attempting to mix Motion versions ${nextValue.version} with 12.5.0 may not work as expected.`);
|
|
3390
2605
|
}
|
|
3391
2606
|
} else if (isMotionValue$1(prevValue)) {
|
|
3392
|
-
element.addValue(key, motionValue(nextValue, { owner: element }));
|
|
2607
|
+
element.addValue(key, motionDom.motionValue(nextValue, { owner: element }));
|
|
3393
2608
|
} else if (prevValue !== nextValue) {
|
|
3394
2609
|
if (element.hasValue(key)) {
|
|
3395
2610
|
const existingValue = element.getValue(key);
|
|
@@ -3400,7 +2615,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
3400
2615
|
}
|
|
3401
2616
|
} else {
|
|
3402
2617
|
const latestValue = element.getStaticValue(key);
|
|
3403
|
-
element.addValue(key, motionValue(latestValue !== void 0 ? latestValue : nextValue, { owner: element }));
|
|
2618
|
+
element.addValue(key, motionDom.motionValue(latestValue !== void 0 ? latestValue : nextValue, { owner: element }));
|
|
3404
2619
|
}
|
|
3405
2620
|
}
|
|
3406
2621
|
}
|
|
@@ -3452,10 +2667,10 @@ class VisualElement {
|
|
|
3452
2667
|
};
|
|
3453
2668
|
this.renderScheduledAt = 0;
|
|
3454
2669
|
this.scheduleRender = () => {
|
|
3455
|
-
const
|
|
3456
|
-
if (this.renderScheduledAt <
|
|
3457
|
-
this.renderScheduledAt =
|
|
3458
|
-
frame.render(this.render, false, true);
|
|
2670
|
+
const now = motionDom.time.now();
|
|
2671
|
+
if (this.renderScheduledAt < now) {
|
|
2672
|
+
this.renderScheduledAt = now;
|
|
2673
|
+
motionDom.frame.render(this.render, false, true);
|
|
3459
2674
|
}
|
|
3460
2675
|
};
|
|
3461
2676
|
const { latestValues, renderState, onUpdate } = visualState;
|
|
@@ -3508,8 +2723,8 @@ class VisualElement {
|
|
|
3508
2723
|
}
|
|
3509
2724
|
unmount() {
|
|
3510
2725
|
this.projection && this.projection.unmount();
|
|
3511
|
-
cancelFrame(this.notifyUpdate);
|
|
3512
|
-
cancelFrame(this.render);
|
|
2726
|
+
motionDom.cancelFrame(this.notifyUpdate);
|
|
2727
|
+
motionDom.cancelFrame(this.render);
|
|
3513
2728
|
this.valueSubscriptions.forEach((remove) => remove());
|
|
3514
2729
|
this.valueSubscriptions.clear();
|
|
3515
2730
|
this.removeFromVariantTree && this.removeFromVariantTree();
|
|
@@ -3536,7 +2751,7 @@ class VisualElement {
|
|
|
3536
2751
|
}
|
|
3537
2752
|
const removeOnChange = value.on("change", (latestValue) => {
|
|
3538
2753
|
this.latestValues[key] = latestValue;
|
|
3539
|
-
this.props.onUpdate && frame.preRender(this.notifyUpdate);
|
|
2754
|
+
this.props.onUpdate && motionDom.frame.preRender(this.notifyUpdate);
|
|
3540
2755
|
if (valueIsTransform && this.projection) {
|
|
3541
2756
|
this.projection.isTransformDirty = true;
|
|
3542
2757
|
}
|
|
@@ -3698,7 +2913,7 @@ class VisualElement {
|
|
|
3698
2913
|
}
|
|
3699
2914
|
let value = this.values.get(key);
|
|
3700
2915
|
if (value === void 0 && defaultValue !== void 0) {
|
|
3701
|
-
value = motionValue(defaultValue === null ? void 0 : defaultValue, { owner: this });
|
|
2916
|
+
value = motionDom.motionValue(defaultValue === null ? void 0 : defaultValue, { owner: this });
|
|
3702
2917
|
this.addValue(key, value);
|
|
3703
2918
|
}
|
|
3704
2919
|
return value;
|
|
@@ -4045,7 +3260,7 @@ class SVGVisualElement extends DOMVisualElement {
|
|
|
4045
3260
|
}
|
|
4046
3261
|
onBindTransform() {
|
|
4047
3262
|
if (this.current && !this.renderState.dimensions) {
|
|
4048
|
-
frame.postRender(this.updateDimensions);
|
|
3263
|
+
motionDom.frame.postRender(this.updateDimensions);
|
|
4049
3264
|
}
|
|
4050
3265
|
}
|
|
4051
3266
|
build(renderState, latestValues, props) {
|
|
@@ -4080,8 +3295,8 @@ function transformBoxPoints$1(point2, transformPoint2) {
|
|
|
4080
3295
|
function isIdentityScale(scale2) {
|
|
4081
3296
|
return scale2 === void 0 || scale2 === 1;
|
|
4082
3297
|
}
|
|
4083
|
-
function hasScale({ scale: scale2, scaleX, scaleY }) {
|
|
4084
|
-
return !isIdentityScale(scale2) || !isIdentityScale(
|
|
3298
|
+
function hasScale({ scale: scale2, scaleX: scaleX2, scaleY: scaleY2 }) {
|
|
3299
|
+
return !isIdentityScale(scale2) || !isIdentityScale(scaleX2) || !isIdentityScale(scaleY2);
|
|
4085
3300
|
}
|
|
4086
3301
|
function hasTransform(values) {
|
|
4087
3302
|
return hasScale(values) || has2DTranslate(values) || values.z || values.rotate || values.rotateX || values.rotateY || values.skewX || values.skewY;
|
|
@@ -4175,8 +3390,7 @@ class HTMLVisualElement extends DOMVisualElement {
|
|
|
4175
3390
|
}
|
|
4176
3391
|
readValueFromInstance(instance, key) {
|
|
4177
3392
|
if (transformProps.has(key)) {
|
|
4178
|
-
|
|
4179
|
-
return defaultType ? defaultType.default || 0 : 0;
|
|
3393
|
+
return readTransformValue(instance, key);
|
|
4180
3394
|
} else {
|
|
4181
3395
|
const computedStyle = getComputedStyle$1(instance);
|
|
4182
3396
|
const value = (isCSSVariableName(key) ? computedStyle.getPropertyValue(key) : computedStyle[key]) || 0;
|
|
@@ -4264,7 +3478,7 @@ function createObjectVisualElement(subject) {
|
|
|
4264
3478
|
visualElementStore.set(subject, node);
|
|
4265
3479
|
}
|
|
4266
3480
|
function animateSingleValue(value, keyframes2, options) {
|
|
4267
|
-
const motionValue$1 = isMotionValue$1(value) ? value : motionValue(value);
|
|
3481
|
+
const motionValue$1 = isMotionValue$1(value) ? value : motionDom.motionValue(value);
|
|
4268
3482
|
motionValue$1.start(animateMotionValue("", motionValue$1, keyframes2, options));
|
|
4269
3483
|
return motionValue$1.animation;
|
|
4270
3484
|
}
|
|
@@ -4314,7 +3528,7 @@ function createScopedAnimate(scope) {
|
|
|
4314
3528
|
} else {
|
|
4315
3529
|
animations = animateSubject(subjectOrSequence, optionsOrKeyframes, options, scope);
|
|
4316
3530
|
}
|
|
4317
|
-
const animation = new GroupPlaybackControls(animations);
|
|
3531
|
+
const animation = new motionDom.GroupPlaybackControls(animations);
|
|
4318
3532
|
if (scope) {
|
|
4319
3533
|
scope.animations.push(animation);
|
|
4320
3534
|
}
|
|
@@ -4357,7 +3571,7 @@ function getElementAnimationState(element) {
|
|
|
4357
3571
|
state.set(element, animationState);
|
|
4358
3572
|
return state.get(element);
|
|
4359
3573
|
}
|
|
4360
|
-
class NativeAnimation extends NativeAnimationControls {
|
|
3574
|
+
class NativeAnimation extends motionDom.NativeAnimationControls {
|
|
4361
3575
|
constructor(element, valueName, valueKeyframes, options) {
|
|
4362
3576
|
const isCSSVar = valueName.startsWith("--");
|
|
4363
3577
|
exports.invariant(typeof options.type !== "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
|
|
@@ -4370,9 +3584,9 @@ class NativeAnimation extends NativeAnimationControls {
|
|
|
4370
3584
|
valueKeyframes = [valueKeyframes];
|
|
4371
3585
|
}
|
|
4372
3586
|
hydrateKeyframes(valueName, valueKeyframes, readInitialKeyframe);
|
|
4373
|
-
if (isGenerator(options.type)) {
|
|
4374
|
-
const generatorOptions = createGeneratorEasing(options, 100, options.type);
|
|
4375
|
-
options.ease = supportsLinearEasing() ? generatorOptions.ease : defaultEasing;
|
|
3587
|
+
if (motionDom.isGenerator(options.type)) {
|
|
3588
|
+
const generatorOptions = motionDom.createGeneratorEasing(options, 100, options.type);
|
|
3589
|
+
options.ease = motionDom.supportsLinearEasing() ? generatorOptions.ease : defaultEasing;
|
|
4376
3590
|
options.duration = /* @__PURE__ */ secondsToMilliseconds$1(generatorOptions.duration);
|
|
4377
3591
|
options.type = "keyframes";
|
|
4378
3592
|
} else {
|
|
@@ -4431,7 +3645,7 @@ class NativeAnimation extends NativeAnimationControls {
|
|
|
4431
3645
|
}
|
|
4432
3646
|
}
|
|
4433
3647
|
function animateElements(elementOrSelector, keyframes2, options, scope) {
|
|
4434
|
-
const elements = resolveElements(elementOrSelector, scope);
|
|
3648
|
+
const elements = motionDom.resolveElements(elementOrSelector, scope);
|
|
4435
3649
|
const numElements = elements.length;
|
|
4436
3650
|
exports.invariant(Boolean(numElements), "No valid element provided.");
|
|
4437
3651
|
const animations = [];
|
|
@@ -4444,10 +3658,11 @@ function animateElements(elementOrSelector, keyframes2, options, scope) {
|
|
|
4444
3658
|
for (const valueName in keyframes2) {
|
|
4445
3659
|
const valueKeyframes = keyframes2[valueName];
|
|
4446
3660
|
const valueOptions = {
|
|
4447
|
-
...getValueTransition
|
|
3661
|
+
...motionDom.getValueTransition(elementTransition, valueName)
|
|
4448
3662
|
};
|
|
4449
3663
|
valueOptions.duration = valueOptions.duration ? /* @__PURE__ */ secondsToMilliseconds$1(valueOptions.duration) : valueOptions.duration;
|
|
4450
3664
|
valueOptions.delay = /* @__PURE__ */ secondsToMilliseconds$1(valueOptions.delay || 0);
|
|
3665
|
+
valueOptions.allowFlatten = !elementTransition.type && !elementTransition.ease;
|
|
4451
3666
|
animations.push(new NativeAnimation(element, valueName, valueKeyframes, valueOptions));
|
|
4452
3667
|
}
|
|
4453
3668
|
}
|
|
@@ -4455,7 +3670,7 @@ function animateElements(elementOrSelector, keyframes2, options, scope) {
|
|
|
4455
3670
|
}
|
|
4456
3671
|
const createScopedWaapiAnimate = (scope) => {
|
|
4457
3672
|
function scopedAnimate(elementOrSelector, keyframes2, options) {
|
|
4458
|
-
return new GroupPlaybackControls(animateElements(elementOrSelector, keyframes2, options, scope));
|
|
3673
|
+
return new motionDom.GroupPlaybackControls(animateElements(elementOrSelector, keyframes2, options, scope));
|
|
4459
3674
|
}
|
|
4460
3675
|
return scopedAnimate;
|
|
4461
3676
|
};
|
|
@@ -4471,8 +3686,8 @@ function observeTimeline(update, timeline) {
|
|
|
4471
3686
|
}
|
|
4472
3687
|
prevProgress = progress2;
|
|
4473
3688
|
};
|
|
4474
|
-
frame.update(onFrame, true);
|
|
4475
|
-
return () => cancelFrame(onFrame);
|
|
3689
|
+
motionDom.frame.update(onFrame, true);
|
|
3690
|
+
return () => motionDom.cancelFrame(onFrame);
|
|
4476
3691
|
}
|
|
4477
3692
|
const resizeHandlers = /* @__PURE__ */ new WeakMap();
|
|
4478
3693
|
let observer;
|
|
@@ -4512,7 +3727,7 @@ function createResizeObserver() {
|
|
|
4512
3727
|
function resizeElement(target, handler) {
|
|
4513
3728
|
if (!observer)
|
|
4514
3729
|
createResizeObserver();
|
|
4515
|
-
const elements = resolveElements(target);
|
|
3730
|
+
const elements = motionDom.resolveElements(target);
|
|
4516
3731
|
elements.forEach((element) => {
|
|
4517
3732
|
let elementHandlers = resizeHandlers.get(element);
|
|
4518
3733
|
if (!elementHandlers) {
|
|
@@ -4589,7 +3804,7 @@ const keys = {
|
|
|
4589
3804
|
position: "Top"
|
|
4590
3805
|
}
|
|
4591
3806
|
};
|
|
4592
|
-
function updateAxisInfo(element, axisName, info,
|
|
3807
|
+
function updateAxisInfo(element, axisName, info, time) {
|
|
4593
3808
|
const axis = info[axisName];
|
|
4594
3809
|
const { length, position } = keys[axisName];
|
|
4595
3810
|
const prev = axis.current;
|
|
@@ -4600,13 +3815,13 @@ function updateAxisInfo(element, axisName, info, time2) {
|
|
|
4600
3815
|
axis.offset[0] = 0;
|
|
4601
3816
|
axis.offset[1] = axis.scrollLength;
|
|
4602
3817
|
axis.progress = /* @__PURE__ */ progress$1(0, axis.scrollLength, axis.current);
|
|
4603
|
-
const elapsed =
|
|
3818
|
+
const elapsed = time - prevTime;
|
|
4604
3819
|
axis.velocity = elapsed > maxElapsed ? 0 : velocityPerSecond(axis.current - prev, elapsed);
|
|
4605
3820
|
}
|
|
4606
|
-
function updateScrollInfo(element, info,
|
|
4607
|
-
updateAxisInfo(element, "x", info,
|
|
4608
|
-
updateAxisInfo(element, "y", info,
|
|
4609
|
-
info.time =
|
|
3821
|
+
function updateScrollInfo(element, info, time) {
|
|
3822
|
+
updateAxisInfo(element, "x", info, time);
|
|
3823
|
+
updateAxisInfo(element, "y", info, time);
|
|
3824
|
+
info.time = time;
|
|
4610
3825
|
}
|
|
4611
3826
|
function calcInset(element, container) {
|
|
4612
3827
|
const inset = { x: 0, y: 0 };
|
|
@@ -4761,8 +3976,8 @@ function measure(container, target = container, info) {
|
|
|
4761
3976
|
function createOnScrollHandler(element, onScroll, info, options = {}) {
|
|
4762
3977
|
return {
|
|
4763
3978
|
measure: () => measure(element, options.target, info),
|
|
4764
|
-
update: (
|
|
4765
|
-
updateScrollInfo(element, info,
|
|
3979
|
+
update: (time) => {
|
|
3980
|
+
updateScrollInfo(element, info, time);
|
|
4766
3981
|
if (options.offset || options.target) {
|
|
4767
3982
|
resolveOffsets(element, info, options);
|
|
4768
3983
|
}
|
|
@@ -4790,7 +4005,7 @@ function scrollInfo(onScroll, { container = document.documentElement, ...options
|
|
|
4790
4005
|
};
|
|
4791
4006
|
const updateAll = () => {
|
|
4792
4007
|
for (const handler of containerHandlers) {
|
|
4793
|
-
handler.update(frameData.timestamp);
|
|
4008
|
+
handler.update(motionDom.frameData.timestamp);
|
|
4794
4009
|
}
|
|
4795
4010
|
};
|
|
4796
4011
|
const notifyAll2 = () => {
|
|
@@ -4798,9 +4013,9 @@ function scrollInfo(onScroll, { container = document.documentElement, ...options
|
|
|
4798
4013
|
handler.notify();
|
|
4799
4014
|
};
|
|
4800
4015
|
const listener2 = () => {
|
|
4801
|
-
frame.read(measureAll, false, true);
|
|
4802
|
-
frame.read(updateAll, false, true);
|
|
4803
|
-
frame.update(notifyAll2, false, true);
|
|
4016
|
+
motionDom.frame.read(measureAll, false, true);
|
|
4017
|
+
motionDom.frame.read(updateAll, false, true);
|
|
4018
|
+
motionDom.frame.update(notifyAll2, false, true);
|
|
4804
4019
|
};
|
|
4805
4020
|
scrollListeners.set(container, listener2);
|
|
4806
4021
|
const target = getEventTarget(container);
|
|
@@ -4811,10 +4026,10 @@ function scrollInfo(onScroll, { container = document.documentElement, ...options
|
|
|
4811
4026
|
target.addEventListener("scroll", listener2, { passive: true });
|
|
4812
4027
|
}
|
|
4813
4028
|
const listener = scrollListeners.get(container);
|
|
4814
|
-
frame.read(listener, false, true);
|
|
4029
|
+
motionDom.frame.read(listener, false, true);
|
|
4815
4030
|
return () => {
|
|
4816
4031
|
var _a;
|
|
4817
|
-
cancelFrame(listener);
|
|
4032
|
+
motionDom.cancelFrame(listener);
|
|
4818
4033
|
const currentHandlers = onScrollHandlers.get(container);
|
|
4819
4034
|
if (!currentHandlers)
|
|
4820
4035
|
return;
|
|
@@ -4848,7 +4063,7 @@ function getTimeline({ source, container = document.documentElement, axis = "y"
|
|
|
4848
4063
|
}
|
|
4849
4064
|
const elementCache = timelineCache.get(container);
|
|
4850
4065
|
if (!elementCache[axis]) {
|
|
4851
|
-
elementCache[axis] = supportsScrollTimeline() ? new ScrollTimeline({ source: container, axis }) : scrollTimelineFallback({ source: container, axis });
|
|
4066
|
+
elementCache[axis] = motionDom.supportsScrollTimeline() ? new ScrollTimeline({ source: container, axis }) : scrollTimelineFallback({ source: container, axis });
|
|
4852
4067
|
}
|
|
4853
4068
|
return elementCache[axis];
|
|
4854
4069
|
}
|
|
@@ -4897,7 +4112,7 @@ const thresholds = {
|
|
|
4897
4112
|
all: 1
|
|
4898
4113
|
};
|
|
4899
4114
|
function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = "some" } = {}) {
|
|
4900
|
-
const elements = resolveElements(elementOrSelector);
|
|
4115
|
+
const elements = motionDom.resolveElements(elementOrSelector);
|
|
4901
4116
|
const activeIntersections = /* @__PURE__ */ new WeakMap();
|
|
4902
4117
|
const onIntersectionChange = (entries) => {
|
|
4903
4118
|
entries.forEach((entry) => {
|
|
@@ -4955,16 +4170,16 @@ function stagger(duration = 0.1, { startDelay = 0, from = 0, ease: ease2 } = {})
|
|
|
4955
4170
|
};
|
|
4956
4171
|
}
|
|
4957
4172
|
function delay$1(callback, timeout) {
|
|
4958
|
-
const start = time.now();
|
|
4173
|
+
const start = motionDom.time.now();
|
|
4959
4174
|
const checkElapsed = ({ timestamp }) => {
|
|
4960
4175
|
const elapsed = timestamp - start;
|
|
4961
4176
|
if (elapsed >= timeout) {
|
|
4962
|
-
cancelFrame(checkElapsed);
|
|
4177
|
+
motionDom.cancelFrame(checkElapsed);
|
|
4963
4178
|
callback(elapsed - timeout);
|
|
4964
4179
|
}
|
|
4965
4180
|
};
|
|
4966
|
-
frame.read(checkElapsed, true);
|
|
4967
|
-
return () => cancelFrame(checkElapsed);
|
|
4181
|
+
motionDom.frame.read(checkElapsed, true);
|
|
4182
|
+
return () => motionDom.cancelFrame(checkElapsed);
|
|
4968
4183
|
}
|
|
4969
4184
|
function delayInSeconds(callback, timeout) {
|
|
4970
4185
|
return delay$1(callback, /* @__PURE__ */ secondsToMilliseconds$1(timeout));
|
|
@@ -4992,11 +4207,6 @@ function transform(...args) {
|
|
|
4992
4207
|
});
|
|
4993
4208
|
return useImmediate ? interpolator(inputValue) : interpolator;
|
|
4994
4209
|
}
|
|
4995
|
-
const sync = frame;
|
|
4996
|
-
const cancelSync = stepsOrder.reduce((acc, key) => {
|
|
4997
|
-
acc[key] = (process2) => cancelFrame(process2);
|
|
4998
|
-
return acc;
|
|
4999
|
-
}, {});
|
|
5000
4210
|
function createContext(providerComponentName, contextName) {
|
|
5001
4211
|
const symbolDescription = typeof providerComponentName === "string" && !contextName ? `${providerComponentName}Context` : contextName;
|
|
5002
4212
|
const injectionKey = Symbol(symbolDescription);
|
|
@@ -5023,7 +4233,7 @@ function isMotionValue(value) {
|
|
|
5023
4233
|
}
|
|
5024
4234
|
function useInView(domRef, options) {
|
|
5025
4235
|
const isInView = vue.ref(false);
|
|
5026
|
-
vue.watch([domRef, () => vue.isRef(options) ? options.value : options], (_v1, _v2) => {
|
|
4236
|
+
vue.watch([domRef, () => vue.isRef(options) ? options.value : options], (_v1, _v2, onCleanup) => {
|
|
5027
4237
|
const realOptions = vue.unref(options) || {};
|
|
5028
4238
|
const { once } = realOptions;
|
|
5029
4239
|
if (!domRef.value || once && isInView.value) {
|
|
@@ -5035,7 +4245,10 @@ function useInView(domRef, options) {
|
|
|
5035
4245
|
isInView.value = false;
|
|
5036
4246
|
};
|
|
5037
4247
|
};
|
|
5038
|
-
|
|
4248
|
+
const cleanup = inView(domRef.value, onEnter, realOptions);
|
|
4249
|
+
onCleanup(() => {
|
|
4250
|
+
cleanup();
|
|
4251
|
+
});
|
|
5039
4252
|
}, {
|
|
5040
4253
|
immediate: true
|
|
5041
4254
|
});
|
|
@@ -5048,13 +4261,13 @@ function useAnimationFrame(callback) {
|
|
|
5048
4261
|
initialTimestamp = timestamp;
|
|
5049
4262
|
callback(timestamp - initialTimestamp, delta);
|
|
5050
4263
|
};
|
|
5051
|
-
const cancel = () => cancelFrame(provideTimeSinceStart);
|
|
4264
|
+
const cancel = () => motionDom.cancelFrame(provideTimeSinceStart);
|
|
5052
4265
|
vue.onBeforeUpdate(() => {
|
|
5053
4266
|
cancel();
|
|
5054
|
-
frame.update(provideTimeSinceStart, true);
|
|
4267
|
+
motionDom.frame.update(provideTimeSinceStart, true);
|
|
5055
4268
|
});
|
|
5056
4269
|
vue.onUnmounted(() => cancel());
|
|
5057
|
-
frame.update(provideTimeSinceStart, true);
|
|
4270
|
+
motionDom.frame.update(provideTimeSinceStart, true);
|
|
5058
4271
|
}
|
|
5059
4272
|
const secondsToMilliseconds = (seconds) => seconds * 1e3;
|
|
5060
4273
|
function millisecondsToSeconds(milliseconds) {
|
|
@@ -5206,7 +4419,6 @@ function isAnimateChanged(oldOptions, newOptions) {
|
|
|
5206
4419
|
return oldVal !== newVal;
|
|
5207
4420
|
});
|
|
5208
4421
|
}
|
|
5209
|
-
console.log(2344);
|
|
5210
4422
|
return oldAnimate !== newAnimate;
|
|
5211
4423
|
}
|
|
5212
4424
|
const rotation = {
|
|
@@ -5472,7 +4684,7 @@ function handleHoverEvent$1(state2, event, lifecycle) {
|
|
|
5472
4684
|
const eventName = `onHover${lifecycle}`;
|
|
5473
4685
|
const callback = props[eventName];
|
|
5474
4686
|
if (callback) {
|
|
5475
|
-
frame.postRender(() => callback(event, extractEventInfo$1(event)));
|
|
4687
|
+
motionDom.frame.postRender(() => callback(event, extractEventInfo$1(event)));
|
|
5476
4688
|
}
|
|
5477
4689
|
}
|
|
5478
4690
|
class HoverGesture extends Feature {
|
|
@@ -5486,7 +4698,7 @@ class HoverGesture extends Feature {
|
|
|
5486
4698
|
const element = this.state.element;
|
|
5487
4699
|
if (!element)
|
|
5488
4700
|
return;
|
|
5489
|
-
this.unmount = hover(
|
|
4701
|
+
this.unmount = motionDom.hover(
|
|
5490
4702
|
element,
|
|
5491
4703
|
(el, startEvent) => {
|
|
5492
4704
|
handleHoverEvent$1(this.state, startEvent, "Start");
|
|
@@ -5513,32 +4725,45 @@ function handlePressEvent(state2, event, lifecycle) {
|
|
|
5513
4725
|
const eventName = `onPress${lifecycle === "End" ? "" : lifecycle}`;
|
|
5514
4726
|
const callback = props[eventName];
|
|
5515
4727
|
if (callback) {
|
|
5516
|
-
frame.postRender(() => callback(event, extractEventInfo$1(event)));
|
|
4728
|
+
motionDom.frame.postRender(() => callback(event, extractEventInfo$1(event)));
|
|
5517
4729
|
}
|
|
5518
4730
|
}
|
|
5519
4731
|
class PressGesture extends Feature {
|
|
5520
4732
|
isActive() {
|
|
5521
|
-
|
|
4733
|
+
const { whilePress, onPress, onPressCancel, onPressStart } = this.state.options;
|
|
4734
|
+
return Boolean(whilePress || onPress || onPressCancel || onPressStart);
|
|
5522
4735
|
}
|
|
5523
4736
|
constructor(state2) {
|
|
5524
4737
|
super(state2);
|
|
5525
4738
|
}
|
|
5526
4739
|
mount() {
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
(
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
4740
|
+
this.register();
|
|
4741
|
+
}
|
|
4742
|
+
update() {
|
|
4743
|
+
const preProps = this.state.visualElement.prevProps;
|
|
4744
|
+
if (preProps.whilePress !== this.state.options.whilePress) {
|
|
4745
|
+
this.register();
|
|
4746
|
+
}
|
|
4747
|
+
}
|
|
4748
|
+
register() {
|
|
4749
|
+
this.unmount();
|
|
4750
|
+
if (this.isActive()) {
|
|
4751
|
+
const element = this.state.element;
|
|
4752
|
+
if (!element)
|
|
4753
|
+
return;
|
|
4754
|
+
this.unmount = motionDom.press(
|
|
4755
|
+
element,
|
|
4756
|
+
(el, startEvent) => {
|
|
4757
|
+
handlePressEvent(this.state, startEvent, "Start");
|
|
4758
|
+
return (endEvent, { success }) => handlePressEvent(
|
|
4759
|
+
this.state,
|
|
4760
|
+
endEvent,
|
|
4761
|
+
success ? "End" : "Cancel"
|
|
4762
|
+
);
|
|
4763
|
+
},
|
|
4764
|
+
{ useGlobalTarget: this.state.options.globalPressTarget }
|
|
4765
|
+
);
|
|
4766
|
+
}
|
|
5542
4767
|
}
|
|
5543
4768
|
}
|
|
5544
4769
|
function handleHoverEvent(state2, entry, lifecycle) {
|
|
@@ -5549,7 +4774,7 @@ function handleHoverEvent(state2, entry, lifecycle) {
|
|
|
5549
4774
|
const eventName = `onViewport${lifecycle}`;
|
|
5550
4775
|
const callback = props[eventName];
|
|
5551
4776
|
if (callback) {
|
|
5552
|
-
frame.postRender(() => callback(entry));
|
|
4777
|
+
motionDom.frame.postRender(() => callback(entry));
|
|
5553
4778
|
}
|
|
5554
4779
|
}
|
|
5555
4780
|
class InViewGesture extends Feature {
|
|
@@ -5769,7 +4994,7 @@ class PanSession {
|
|
|
5769
4994
|
if (!isPanStarted && !isDistancePastThreshold)
|
|
5770
4995
|
return;
|
|
5771
4996
|
const { point: point3 } = info2;
|
|
5772
|
-
const { timestamp: timestamp2 } = frameData;
|
|
4997
|
+
const { timestamp: timestamp2 } = motionDom.frameData;
|
|
5773
4998
|
this.history.push({ ...point3, timestamp: timestamp2 });
|
|
5774
4999
|
const { onStart, onMove } = this.handlers;
|
|
5775
5000
|
if (!isPanStarted) {
|
|
@@ -5781,7 +5006,7 @@ class PanSession {
|
|
|
5781
5006
|
this.handlePointerMove = (event2, info2) => {
|
|
5782
5007
|
this.lastMoveEvent = event2;
|
|
5783
5008
|
this.lastMoveEventInfo = transformPoint(info2, this.transformPagePoint);
|
|
5784
|
-
frame.update(this.updatePoint, true);
|
|
5009
|
+
motionDom.frame.update(this.updatePoint, true);
|
|
5785
5010
|
};
|
|
5786
5011
|
this.handlePointerUp = (event2, info2) => {
|
|
5787
5012
|
this.end();
|
|
@@ -5808,7 +5033,7 @@ class PanSession {
|
|
|
5808
5033
|
const info = extractEventInfo(event);
|
|
5809
5034
|
const initialInfo = transformPoint(info, this.transformPagePoint);
|
|
5810
5035
|
const { point: point2 } = initialInfo;
|
|
5811
|
-
const { timestamp } = frameData;
|
|
5036
|
+
const { timestamp } = motionDom.frameData;
|
|
5812
5037
|
this.history = [{ ...point2, timestamp }];
|
|
5813
5038
|
const { onSessionStart } = handlers;
|
|
5814
5039
|
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
@@ -5835,7 +5060,7 @@ class PanSession {
|
|
|
5835
5060
|
}
|
|
5836
5061
|
end() {
|
|
5837
5062
|
this.removeListeners && this.removeListeners();
|
|
5838
|
-
cancelFrame(this.updatePoint);
|
|
5063
|
+
motionDom.cancelFrame(this.updatePoint);
|
|
5839
5064
|
}
|
|
5840
5065
|
}
|
|
5841
5066
|
function transformPoint(info, transformPagePoint) {
|
|
@@ -5875,15 +5100,15 @@ function getVelocity(history, timeDelta) {
|
|
|
5875
5100
|
if (!timestampedPoint) {
|
|
5876
5101
|
return { x: 0, y: 0 };
|
|
5877
5102
|
}
|
|
5878
|
-
const
|
|
5103
|
+
const time = millisecondsToSeconds(
|
|
5879
5104
|
lastPoint.timestamp - timestampedPoint.timestamp
|
|
5880
5105
|
);
|
|
5881
|
-
if (
|
|
5106
|
+
if (time === 0) {
|
|
5882
5107
|
return { x: 0, y: 0 };
|
|
5883
5108
|
}
|
|
5884
5109
|
const currentVelocity = {
|
|
5885
|
-
x: (lastPoint.x - timestampedPoint.x) /
|
|
5886
|
-
y: (lastPoint.y - timestampedPoint.y) /
|
|
5110
|
+
x: (lastPoint.x - timestampedPoint.x) / time,
|
|
5111
|
+
y: (lastPoint.y - timestampedPoint.y) / time
|
|
5887
5112
|
};
|
|
5888
5113
|
if (currentVelocity.x === Infinity) {
|
|
5889
5114
|
currentVelocity.x = 0;
|
|
@@ -6029,7 +5254,7 @@ class VisualElementDragControls {
|
|
|
6029
5254
|
this.originPoint[axis] = current;
|
|
6030
5255
|
});
|
|
6031
5256
|
if (onDragStart) {
|
|
6032
|
-
frame.postRender(() => onDragStart(event, info));
|
|
5257
|
+
motionDom.frame.postRender(() => onDragStart(event, info));
|
|
6033
5258
|
}
|
|
6034
5259
|
addValueToWillChange(this.visualElement, "transform");
|
|
6035
5260
|
const state2 = this.visualElement.state;
|
|
@@ -6082,15 +5307,15 @@ class VisualElementDragControls {
|
|
|
6082
5307
|
);
|
|
6083
5308
|
}
|
|
6084
5309
|
stop(event, info) {
|
|
6085
|
-
const
|
|
5310
|
+
const isDragging = this.isDragging;
|
|
6086
5311
|
this.cancel();
|
|
6087
|
-
if (!
|
|
5312
|
+
if (!isDragging)
|
|
6088
5313
|
return;
|
|
6089
5314
|
const { velocity } = info;
|
|
6090
5315
|
this.startAnimation(velocity);
|
|
6091
5316
|
const { onDragEnd } = this.getProps();
|
|
6092
5317
|
if (onDragEnd) {
|
|
6093
|
-
frame.postRender(() => onDragEnd(event, info));
|
|
5318
|
+
motionDom.frame.postRender(() => onDragEnd(event, info));
|
|
6094
5319
|
}
|
|
6095
5320
|
}
|
|
6096
5321
|
cancel() {
|
|
@@ -6343,19 +5568,19 @@ class VisualElementDragControls {
|
|
|
6343
5568
|
projection.root && projection.root.updateScroll();
|
|
6344
5569
|
projection.updateLayout();
|
|
6345
5570
|
}
|
|
6346
|
-
frame.read(measureDragConstraints);
|
|
5571
|
+
motionDom.frame.read(measureDragConstraints);
|
|
6347
5572
|
const stopResizeListener = addDomEvent$1(window, "resize", () => this.scalePositionWithinConstraints());
|
|
6348
5573
|
const stopLayoutUpdateListener = projection.addEventListener(
|
|
6349
5574
|
"didUpdate",
|
|
6350
5575
|
({ delta, hasLayoutChanged }) => {
|
|
6351
5576
|
if (this.isDragging && hasLayoutChanged) {
|
|
6352
5577
|
eachAxis$1((axis) => {
|
|
6353
|
-
const
|
|
6354
|
-
if (!
|
|
5578
|
+
const motionValue = this.getAxisMotionValue(axis);
|
|
5579
|
+
if (!motionValue)
|
|
6355
5580
|
return;
|
|
6356
5581
|
this.originPoint[axis] += delta[axis].translate;
|
|
6357
|
-
|
|
6358
|
-
|
|
5582
|
+
motionValue.set(
|
|
5583
|
+
motionValue.get() + delta[axis].translate
|
|
6359
5584
|
);
|
|
6360
5585
|
});
|
|
6361
5586
|
this.visualElement.render();
|
|
@@ -6546,7 +5771,7 @@ class LayoutFeature extends Feature {
|
|
|
6546
5771
|
function asyncHandler(handler) {
|
|
6547
5772
|
return (event, info) => {
|
|
6548
5773
|
if (handler) {
|
|
6549
|
-
frame.postRender(() => handler(event, info));
|
|
5774
|
+
motionDom.frame.postRender(() => handler(event, info));
|
|
6550
5775
|
}
|
|
6551
5776
|
};
|
|
6552
5777
|
}
|
|
@@ -6583,7 +5808,7 @@ class PanGesture extends Feature {
|
|
|
6583
5808
|
const { onPanEnd } = this.state.options;
|
|
6584
5809
|
delete this.session;
|
|
6585
5810
|
if (onPanEnd) {
|
|
6586
|
-
frame.postRender(() => onPanEnd(event, info));
|
|
5811
|
+
motionDom.frame.postRender(() => onPanEnd(event, info));
|
|
6587
5812
|
}
|
|
6588
5813
|
}
|
|
6589
5814
|
};
|
|
@@ -6602,7 +5827,6 @@ class PanGesture extends Feature {
|
|
|
6602
5827
|
this.session && this.session.end();
|
|
6603
5828
|
}
|
|
6604
5829
|
}
|
|
6605
|
-
const { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, false);
|
|
6606
5830
|
const compareByDepth = (a, b) => a.depth - b.depth;
|
|
6607
5831
|
class FlatTree {
|
|
6608
5832
|
constructor() {
|
|
@@ -6894,11 +6118,11 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
6894
6118
|
transform2 += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
|
|
6895
6119
|
}
|
|
6896
6120
|
if (latestTransform) {
|
|
6897
|
-
const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } = latestTransform;
|
|
6121
|
+
const { transformPerspective, rotate: rotate2, rotateX, rotateY, skewX, skewY } = latestTransform;
|
|
6898
6122
|
if (transformPerspective)
|
|
6899
6123
|
transform2 = `perspective(${transformPerspective}px) ${transform2}`;
|
|
6900
|
-
if (
|
|
6901
|
-
transform2 += `rotate(${
|
|
6124
|
+
if (rotate2)
|
|
6125
|
+
transform2 += `rotate(${rotate2}deg) `;
|
|
6902
6126
|
if (rotateX)
|
|
6903
6127
|
transform2 += `rotateX(${rotateX}deg) `;
|
|
6904
6128
|
if (rotateY)
|
|
@@ -6918,6 +6142,11 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
|
|
|
6918
6142
|
function eachAxis(callback) {
|
|
6919
6143
|
return [callback("x"), callback("y")];
|
|
6920
6144
|
}
|
|
6145
|
+
const metrics = {
|
|
6146
|
+
nodes: 0,
|
|
6147
|
+
calculatedTargetDeltas: 0,
|
|
6148
|
+
calculatedProjections: 0
|
|
6149
|
+
};
|
|
6921
6150
|
const transformAxes = ["", "X", "Y", "Z"];
|
|
6922
6151
|
const hiddenVisibility = { visibility: "hidden" };
|
|
6923
6152
|
const animationTarget = 1e3;
|
|
@@ -6942,7 +6171,7 @@ function cancelTreeOptimisedTransformAnimations(projectionNode) {
|
|
|
6942
6171
|
const appearId = getOptimisedAppearId(visualElement);
|
|
6943
6172
|
if (window.MotionHasOptimisedAnimation(appearId, "transform")) {
|
|
6944
6173
|
const { layout, layoutId } = projectionNode.options;
|
|
6945
|
-
window.MotionCancelOptimisedAnimation(appearId, "transform", frame, !(layout || layoutId));
|
|
6174
|
+
window.MotionCancelOptimisedAnimation(appearId, "transform", motionDom.frame, !(layout || layoutId));
|
|
6946
6175
|
}
|
|
6947
6176
|
const { parent } = projectionNode;
|
|
6948
6177
|
if (parent && !parent.hasCheckedOptimisedAppear) {
|
|
@@ -6983,10 +6212,16 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6983
6212
|
};
|
|
6984
6213
|
this.updateProjection = () => {
|
|
6985
6214
|
this.projectionUpdateScheduled = false;
|
|
6215
|
+
if (motionDom.statsBuffer.value) {
|
|
6216
|
+
metrics.nodes = metrics.calculatedTargetDeltas = metrics.calculatedProjections = 0;
|
|
6217
|
+
}
|
|
6986
6218
|
this.nodes.forEach(propagateDirtyNodes);
|
|
6987
6219
|
this.nodes.forEach(resolveTargetDelta);
|
|
6988
6220
|
this.nodes.forEach(calcProjection);
|
|
6989
6221
|
this.nodes.forEach(cleanDirtyNodes);
|
|
6222
|
+
if (motionDom.statsBuffer.addProjectionMetrics) {
|
|
6223
|
+
motionDom.statsBuffer.addProjectionMetrics(metrics);
|
|
6224
|
+
}
|
|
6990
6225
|
};
|
|
6991
6226
|
this.resolvedRelativeTargetAt = 0;
|
|
6992
6227
|
this.hasProjected = false;
|
|
@@ -7068,7 +6303,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7068
6303
|
}
|
|
7069
6304
|
this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
7070
6305
|
const animationOptions = {
|
|
7071
|
-
...getValueTransition
|
|
6306
|
+
...motionDom.getValueTransition(layoutTransition, "layout"),
|
|
7072
6307
|
onPlay: onLayoutAnimationStart,
|
|
7073
6308
|
onComplete: onLayoutAnimationComplete
|
|
7074
6309
|
};
|
|
@@ -7096,7 +6331,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7096
6331
|
stack && stack.remove(this);
|
|
7097
6332
|
this.parent && this.parent.children.delete(this);
|
|
7098
6333
|
this.instance = void 0;
|
|
7099
|
-
cancelFrame(this.updateProjection);
|
|
6334
|
+
motionDom.cancelFrame(this.updateProjection);
|
|
7100
6335
|
}
|
|
7101
6336
|
// only on the root
|
|
7102
6337
|
blockUpdate() {
|
|
@@ -7169,19 +6404,19 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7169
6404
|
this.nodes.forEach(updateLayout);
|
|
7170
6405
|
this.nodes.forEach(notifyLayoutUpdate);
|
|
7171
6406
|
this.clearAllSnapshots();
|
|
7172
|
-
const
|
|
7173
|
-
frameData.delta = clamp$1(0, 1e3 / 60,
|
|
7174
|
-
frameData.timestamp =
|
|
7175
|
-
frameData.isProcessing = true;
|
|
7176
|
-
frameSteps.update.process(frameData);
|
|
7177
|
-
frameSteps.preRender.process(frameData);
|
|
7178
|
-
frameSteps.render.process(frameData);
|
|
7179
|
-
frameData.isProcessing = false;
|
|
6407
|
+
const now = motionDom.time.now();
|
|
6408
|
+
motionDom.frameData.delta = clamp$1(0, 1e3 / 60, now - motionDom.frameData.timestamp);
|
|
6409
|
+
motionDom.frameData.timestamp = now;
|
|
6410
|
+
motionDom.frameData.isProcessing = true;
|
|
6411
|
+
motionDom.frameSteps.update.process(motionDom.frameData);
|
|
6412
|
+
motionDom.frameSteps.preRender.process(motionDom.frameData);
|
|
6413
|
+
motionDom.frameSteps.render.process(motionDom.frameData);
|
|
6414
|
+
motionDom.frameData.isProcessing = false;
|
|
7180
6415
|
}
|
|
7181
6416
|
didUpdate() {
|
|
7182
6417
|
if (!this.updateScheduled) {
|
|
7183
6418
|
this.updateScheduled = true;
|
|
7184
|
-
microtask.read(this.scheduleUpdate);
|
|
6419
|
+
motionDom.microtask.read(this.scheduleUpdate);
|
|
7185
6420
|
}
|
|
7186
6421
|
}
|
|
7187
6422
|
clearAllSnapshots() {
|
|
@@ -7191,11 +6426,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7191
6426
|
scheduleUpdateProjection() {
|
|
7192
6427
|
if (!this.projectionUpdateScheduled) {
|
|
7193
6428
|
this.projectionUpdateScheduled = true;
|
|
7194
|
-
frame.preRender(this.updateProjection, false, true);
|
|
6429
|
+
motionDom.frame.preRender(this.updateProjection, false, true);
|
|
7195
6430
|
}
|
|
7196
6431
|
}
|
|
7197
6432
|
scheduleCheckAfterUnmount() {
|
|
7198
|
-
frame.postRender(() => {
|
|
6433
|
+
motionDom.frame.postRender(() => {
|
|
7199
6434
|
if (this.isLayoutDirty) {
|
|
7200
6435
|
this.root.didUpdate();
|
|
7201
6436
|
} else {
|
|
@@ -7381,7 +6616,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7381
6616
|
forceRelativeParentToResolveTarget() {
|
|
7382
6617
|
if (!this.relativeParent)
|
|
7383
6618
|
return;
|
|
7384
|
-
if (this.relativeParent.resolvedRelativeTargetAt !== frameData.timestamp) {
|
|
6619
|
+
if (this.relativeParent.resolvedRelativeTargetAt !== motionDom.frameData.timestamp) {
|
|
7385
6620
|
this.relativeParent.resolveTargetDelta(true);
|
|
7386
6621
|
}
|
|
7387
6622
|
}
|
|
@@ -7398,7 +6633,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7398
6633
|
const { layout, layoutId } = this.options;
|
|
7399
6634
|
if (!this.layout || !(layout || layoutId))
|
|
7400
6635
|
return;
|
|
7401
|
-
this.resolvedRelativeTargetAt = frameData.timestamp;
|
|
6636
|
+
this.resolvedRelativeTargetAt = motionDom.frameData.timestamp;
|
|
7402
6637
|
if (!this.targetDelta && !this.relativeTarget) {
|
|
7403
6638
|
const relativeParent = this.getClosestProjectingParent();
|
|
7404
6639
|
if (relativeParent && relativeParent.layout && this.animationProgress !== 1) {
|
|
@@ -7445,6 +6680,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7445
6680
|
this.relativeParent = this.relativeTarget = void 0;
|
|
7446
6681
|
}
|
|
7447
6682
|
}
|
|
6683
|
+
if (motionDom.statsBuffer.value) {
|
|
6684
|
+
metrics.calculatedTargetDeltas++;
|
|
6685
|
+
}
|
|
7448
6686
|
}
|
|
7449
6687
|
getClosestProjectingParent() {
|
|
7450
6688
|
if (!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues)) {
|
|
@@ -7470,7 +6708,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7470
6708
|
if (isShared && (this.isSharedProjectionDirty || this.isTransformDirty)) {
|
|
7471
6709
|
canSkip = false;
|
|
7472
6710
|
}
|
|
7473
|
-
if (this.resolvedRelativeTargetAt === frameData.timestamp) {
|
|
6711
|
+
if (this.resolvedRelativeTargetAt === motionDom.frameData.timestamp) {
|
|
7474
6712
|
canSkip = false;
|
|
7475
6713
|
}
|
|
7476
6714
|
if (canSkip)
|
|
@@ -7510,6 +6748,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7510
6748
|
this.scheduleRender();
|
|
7511
6749
|
this.notifyListeners("projectionUpdate", target);
|
|
7512
6750
|
}
|
|
6751
|
+
if (motionDom.statsBuffer.value) {
|
|
6752
|
+
metrics.calculatedProjections++;
|
|
6753
|
+
}
|
|
7513
6754
|
}
|
|
7514
6755
|
hide() {
|
|
7515
6756
|
this.isVisible = false;
|
|
@@ -7583,11 +6824,12 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7583
6824
|
this.resumingFrom.currentAnimation.stop();
|
|
7584
6825
|
}
|
|
7585
6826
|
if (this.pendingAnimation) {
|
|
7586
|
-
cancelFrame(this.pendingAnimation);
|
|
6827
|
+
motionDom.cancelFrame(this.pendingAnimation);
|
|
7587
6828
|
this.pendingAnimation = void 0;
|
|
7588
6829
|
}
|
|
7589
|
-
this.pendingAnimation = frame.update(() => {
|
|
6830
|
+
this.pendingAnimation = motionDom.frame.update(() => {
|
|
7590
6831
|
globalProjectionState.hasAnimatedSinceResize = true;
|
|
6832
|
+
motionDom.activeAnimations.layout++;
|
|
7591
6833
|
this.currentAnimation = animateSingleValue(0, animationTarget, {
|
|
7592
6834
|
...options,
|
|
7593
6835
|
onUpdate: (latest) => {
|
|
@@ -7595,8 +6837,10 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
7595
6837
|
options.onUpdate && options.onUpdate(latest);
|
|
7596
6838
|
},
|
|
7597
6839
|
onStop: () => {
|
|
6840
|
+
motionDom.activeAnimations.layout--;
|
|
7598
6841
|
},
|
|
7599
6842
|
onComplete: () => {
|
|
6843
|
+
motionDom.activeAnimations.layout--;
|
|
7600
6844
|
options.onComplete && options.onComplete();
|
|
7601
6845
|
this.completeAnimation();
|
|
7602
6846
|
}
|
|
@@ -7874,6 +7118,9 @@ function notifyLayoutUpdate(node) {
|
|
|
7874
7118
|
node.options.transition = void 0;
|
|
7875
7119
|
}
|
|
7876
7120
|
function propagateDirtyNodes(node) {
|
|
7121
|
+
if (motionDom.statsBuffer.value) {
|
|
7122
|
+
metrics.nodes++;
|
|
7123
|
+
}
|
|
7877
7124
|
if (!node.parent)
|
|
7878
7125
|
return;
|
|
7879
7126
|
if (!node.isProjecting()) {
|
|
@@ -8184,7 +7431,8 @@ function animateUpdates({
|
|
|
8184
7431
|
});
|
|
8185
7432
|
}
|
|
8186
7433
|
function resolveDirectAnimation(directAnimate, directTransition) {
|
|
8187
|
-
|
|
7434
|
+
var _a;
|
|
7435
|
+
const variant = resolveVariant(directAnimate, this.options.variants, this.options.custom || ((_a = this.options.animatePresenceContext) == null ? void 0 : _a.custom));
|
|
8188
7436
|
if (!variant)
|
|
8189
7437
|
return {};
|
|
8190
7438
|
const transition = variant.transition || directTransition || this.options.transition || {};
|
|
@@ -8236,7 +7484,7 @@ function createAnimationFactories(prevTarget, animationOptions, controlDelay) {
|
|
|
8236
7484
|
this.element,
|
|
8237
7485
|
{ [key]: keyValue },
|
|
8238
7486
|
{
|
|
8239
|
-
...animationOptions,
|
|
7487
|
+
...(animationOptions == null ? void 0 : animationOptions[key]) || animationOptions,
|
|
8240
7488
|
delay: (((_a2 = animationOptions == null ? void 0 : animationOptions[key]) == null ? void 0 : _a2.delay) || (animationOptions == null ? void 0 : animationOptions.delay) || 0) + controlDelay
|
|
8241
7489
|
}
|
|
8242
7490
|
);
|
|
@@ -8404,14 +7652,14 @@ class MotionState {
|
|
|
8404
7652
|
}
|
|
8405
7653
|
if (this.options.layoutId) {
|
|
8406
7654
|
mountedLayoutIds.add(this.options.layoutId);
|
|
8407
|
-
frame.render(() => {
|
|
7655
|
+
motionDom.frame.render(() => {
|
|
8408
7656
|
mountedLayoutIds.clear();
|
|
8409
7657
|
});
|
|
8410
7658
|
}
|
|
8411
7659
|
}
|
|
8412
7660
|
clearAnimation() {
|
|
8413
7661
|
var _a;
|
|
8414
|
-
this.currentProcess && cancelFrame(this.currentProcess);
|
|
7662
|
+
this.currentProcess && motionDom.cancelFrame(this.currentProcess);
|
|
8415
7663
|
this.currentProcess = null;
|
|
8416
7664
|
(_a = this.visualElement.variantChildren) == null ? void 0 : _a.forEach((child) => {
|
|
8417
7665
|
child.state.clearAnimation();
|
|
@@ -8420,7 +7668,7 @@ class MotionState {
|
|
|
8420
7668
|
// update trigger animation
|
|
8421
7669
|
startAnimation() {
|
|
8422
7670
|
this.clearAnimation();
|
|
8423
|
-
this.currentProcess = frame.render(() => {
|
|
7671
|
+
this.currentProcess = motionDom.frame.render(() => {
|
|
8424
7672
|
this.currentProcess = null;
|
|
8425
7673
|
this.animateUpdates();
|
|
8426
7674
|
});
|
|
@@ -8481,7 +7729,7 @@ class MotionState {
|
|
|
8481
7729
|
if (isAnimate) {
|
|
8482
7730
|
this.animateUpdates({
|
|
8483
7731
|
isFallback: !isActive && name !== "exit" && this.visualElement.isControllingVariants,
|
|
8484
|
-
isExit: this.activeStates.exit
|
|
7732
|
+
isExit: name === "exit" && this.activeStates.exit
|
|
8485
7733
|
});
|
|
8486
7734
|
}
|
|
8487
7735
|
}
|
|
@@ -8601,17 +7849,17 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8601
7849
|
dragMomentum: true,
|
|
8602
7850
|
whileDrag: void 0,
|
|
8603
7851
|
crossfade: true,
|
|
8604
|
-
whileHover: ({ hover
|
|
8605
|
-
if (process.env.NODE_ENV === "development" &&
|
|
7852
|
+
whileHover: ({ hover }) => {
|
|
7853
|
+
if (process.env.NODE_ENV === "development" && hover) {
|
|
8606
7854
|
vue.warn("hover is deprecated. Use whileHover instead.");
|
|
8607
7855
|
}
|
|
8608
|
-
return
|
|
7856
|
+
return hover;
|
|
8609
7857
|
},
|
|
8610
|
-
whilePress: ({ press
|
|
8611
|
-
if (process.env.NODE_ENV === "development" &&
|
|
7858
|
+
whilePress: ({ press }) => {
|
|
7859
|
+
if (process.env.NODE_ENV === "development" && press) {
|
|
8612
7860
|
vue.warn("press is deprecated. Use whilePress instead.");
|
|
8613
7861
|
}
|
|
8614
|
-
return
|
|
7862
|
+
return press;
|
|
8615
7863
|
},
|
|
8616
7864
|
whileInView: ({ inView: inView2 }) => {
|
|
8617
7865
|
if (process.env.NODE_ENV === "development" && inView2) {
|
|
@@ -8647,6 +7895,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8647
7895
|
layoutGroup,
|
|
8648
7896
|
motionConfig: config.value,
|
|
8649
7897
|
inViewOptions: props.inViewOptions ?? config.value.inViewOptions,
|
|
7898
|
+
animatePresenceContext,
|
|
8650
7899
|
initial: animatePresenceContext.initial === false ? animatePresenceContext.initial : props.initial === true ? void 0 : props.initial
|
|
8651
7900
|
};
|
|
8652
7901
|
}
|
|
@@ -8816,7 +8065,7 @@ function usePopLayout(props) {
|
|
|
8816
8065
|
if (!style2)
|
|
8817
8066
|
return;
|
|
8818
8067
|
styles.delete(state2);
|
|
8819
|
-
frame.render(() => {
|
|
8068
|
+
motionDom.frame.render(() => {
|
|
8820
8069
|
document.head.removeChild(style2);
|
|
8821
8070
|
});
|
|
8822
8071
|
}
|
|
@@ -8843,7 +8092,6 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8843
8092
|
as: {},
|
|
8844
8093
|
custom: {},
|
|
8845
8094
|
onExitComplete: {},
|
|
8846
|
-
unwrapElement: { type: [Boolean, Function], default: false },
|
|
8847
8095
|
anchorX: { default: "left" }
|
|
8848
8096
|
},
|
|
8849
8097
|
setup(__props) {
|
|
@@ -8857,6 +8105,16 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8857
8105
|
presenceContext.initial = void 0;
|
|
8858
8106
|
});
|
|
8859
8107
|
const { addPopStyle, removePopStyle, styles } = usePopLayout(props);
|
|
8108
|
+
function findMotionElement(el) {
|
|
8109
|
+
let current = el;
|
|
8110
|
+
while (current) {
|
|
8111
|
+
if (mountedStates.get(current)) {
|
|
8112
|
+
return current;
|
|
8113
|
+
}
|
|
8114
|
+
current = current.firstElementChild;
|
|
8115
|
+
}
|
|
8116
|
+
return null;
|
|
8117
|
+
}
|
|
8860
8118
|
function enter(el) {
|
|
8861
8119
|
const state2 = mountedStates.get(el);
|
|
8862
8120
|
if (!state2) {
|
|
@@ -8874,29 +8132,28 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8874
8132
|
exitDom.clear();
|
|
8875
8133
|
});
|
|
8876
8134
|
function exit(el, done) {
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8135
|
+
var _a;
|
|
8136
|
+
const motionEl = findMotionElement(el);
|
|
8137
|
+
const state2 = mountedStates.get(motionEl);
|
|
8138
|
+
if (!motionEl || !state2) {
|
|
8139
|
+
done();
|
|
8140
|
+
if (exitDom.size === 0) {
|
|
8141
|
+
(_a = props.onExitComplete) == null ? void 0 : _a.call(props);
|
|
8882
8142
|
}
|
|
8143
|
+
return;
|
|
8883
8144
|
}
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
return done();
|
|
8887
|
-
}
|
|
8888
|
-
exitDom.set(el, true);
|
|
8889
|
-
removeDoneCallback(el);
|
|
8145
|
+
exitDom.set(motionEl, true);
|
|
8146
|
+
removeDoneCallback(motionEl);
|
|
8890
8147
|
addPopStyle(state2);
|
|
8891
8148
|
function doneCallback(e) {
|
|
8892
|
-
var
|
|
8893
|
-
if ((
|
|
8149
|
+
var _a2, _b;
|
|
8150
|
+
if ((_a2 = e == null ? void 0 : e.detail) == null ? void 0 : _a2.isExit) {
|
|
8894
8151
|
const projection = state2.visualElement.projection;
|
|
8895
8152
|
if ((projection == null ? void 0 : projection.animationProgress) > 0 && !state2.isSafeToRemove && !state2.isVShow) {
|
|
8896
8153
|
return;
|
|
8897
8154
|
}
|
|
8898
|
-
removeDoneCallback(
|
|
8899
|
-
exitDom.delete(
|
|
8155
|
+
removeDoneCallback(motionEl);
|
|
8156
|
+
exitDom.delete(motionEl);
|
|
8900
8157
|
if (exitDom.size === 0) {
|
|
8901
8158
|
(_b = props.onExitComplete) == null ? void 0 : _b.call(props);
|
|
8902
8159
|
}
|
|
@@ -8906,15 +8163,15 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
8906
8163
|
removePopStyle(state2);
|
|
8907
8164
|
}
|
|
8908
8165
|
done();
|
|
8909
|
-
if (!
|
|
8166
|
+
if (!motionEl.isConnected) {
|
|
8910
8167
|
state2.unmount(true);
|
|
8911
8168
|
}
|
|
8912
8169
|
}
|
|
8913
8170
|
}
|
|
8914
8171
|
delay(() => {
|
|
8915
8172
|
state2.setActive("exit", true);
|
|
8916
|
-
doneCallbacks.set(
|
|
8917
|
-
|
|
8173
|
+
doneCallbacks.set(motionEl, doneCallback);
|
|
8174
|
+
motionEl.addEventListener("motioncomplete", doneCallback);
|
|
8918
8175
|
});
|
|
8919
8176
|
}
|
|
8920
8177
|
const transitionProps = vue.computed(() => {
|
|
@@ -9003,7 +8260,7 @@ function moveItem([...arr], fromIndex, toIndex) {
|
|
|
9003
8260
|
return arr;
|
|
9004
8261
|
}
|
|
9005
8262
|
function useDefaultMotionValue(value, defaultValue = 0) {
|
|
9006
|
-
return isMotionValue(value) ? value : motionValue(defaultValue);
|
|
8263
|
+
return isMotionValue(value) ? value : motionDom.motionValue(defaultValue);
|
|
9007
8264
|
}
|
|
9008
8265
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
9009
8266
|
...{
|
|
@@ -9135,16 +8392,16 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9135
8392
|
}
|
|
9136
8393
|
});
|
|
9137
8394
|
function useCombineMotionValues(combineValues) {
|
|
9138
|
-
const value = motionValue(combineValues());
|
|
8395
|
+
const value = motionDom.motionValue(combineValues());
|
|
9139
8396
|
const updateValue = () => value.set(combineValues());
|
|
9140
|
-
const scheduleUpdate = () => frame.preRender(updateValue, false, true);
|
|
8397
|
+
const scheduleUpdate = () => motionDom.frame.preRender(updateValue, false, true);
|
|
9141
8398
|
let subscriptions;
|
|
9142
8399
|
const subscribe = (values) => {
|
|
9143
8400
|
subscriptions = values.map((v) => v.on("change", scheduleUpdate));
|
|
9144
8401
|
};
|
|
9145
8402
|
const unsubscribe = () => {
|
|
9146
8403
|
subscriptions.forEach((unsubscribe2) => unsubscribe2());
|
|
9147
|
-
cancelFrame(updateValue);
|
|
8404
|
+
motionDom.cancelFrame(updateValue);
|
|
9148
8405
|
};
|
|
9149
8406
|
vue.onUnmounted(() => {
|
|
9150
8407
|
unsubscribe();
|
|
@@ -9156,16 +8413,16 @@ function useCombineMotionValues(combineValues) {
|
|
|
9156
8413
|
};
|
|
9157
8414
|
}
|
|
9158
8415
|
function useComputed(computed) {
|
|
9159
|
-
collectMotionValues.current = [];
|
|
8416
|
+
motionDom.collectMotionValues.current = [];
|
|
9160
8417
|
const { value, subscribe, unsubscribe } = useCombineMotionValues(computed);
|
|
9161
|
-
subscribe(collectMotionValues.current);
|
|
9162
|
-
collectMotionValues.current = void 0;
|
|
8418
|
+
subscribe(motionDom.collectMotionValues.current);
|
|
8419
|
+
motionDom.collectMotionValues.current = void 0;
|
|
9163
8420
|
vue.onBeforeUpdate(() => {
|
|
9164
8421
|
unsubscribe();
|
|
9165
|
-
collectMotionValues.current = [];
|
|
8422
|
+
motionDom.collectMotionValues.current = [];
|
|
9166
8423
|
computed();
|
|
9167
|
-
subscribe(collectMotionValues.current);
|
|
9168
|
-
collectMotionValues.current = void 0;
|
|
8424
|
+
subscribe(motionDom.collectMotionValues.current);
|
|
8425
|
+
motionDom.collectMotionValues.current = void 0;
|
|
9169
8426
|
});
|
|
9170
8427
|
return value;
|
|
9171
8428
|
}
|
|
@@ -9173,9 +8430,7 @@ function useTransform(input, inputRangeOrTransformer, outputRange, options) {
|
|
|
9173
8430
|
if (typeof input === "function") {
|
|
9174
8431
|
return useComputed(input);
|
|
9175
8432
|
}
|
|
9176
|
-
const transformer = vue.computed(() =>
|
|
9177
|
-
return typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(vue.isRef(inputRangeOrTransformer) ? inputRangeOrTransformer.value : inputRangeOrTransformer, outputRange, options);
|
|
9178
|
-
});
|
|
8433
|
+
const transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : vue.isRef(inputRangeOrTransformer) ? vue.computed(() => transform(inputRangeOrTransformer.value, outputRange, options)) : transform(inputRangeOrTransformer, outputRange, options);
|
|
9179
8434
|
return Array.isArray(input) ? useListTransform(
|
|
9180
8435
|
input,
|
|
9181
8436
|
transformer
|
|
@@ -9200,9 +8455,9 @@ function useListTransform(values, transformer) {
|
|
|
9200
8455
|
return value;
|
|
9201
8456
|
}
|
|
9202
8457
|
function useTime() {
|
|
9203
|
-
const
|
|
9204
|
-
useAnimationFrame((t) =>
|
|
9205
|
-
return
|
|
8458
|
+
const time = motionDom.motionValue(0);
|
|
8459
|
+
useAnimationFrame((t) => time.set(t));
|
|
8460
|
+
return time;
|
|
9206
8461
|
}
|
|
9207
8462
|
function useMotionTemplate(fragments, ...values) {
|
|
9208
8463
|
const numFragments = fragments.length;
|
|
@@ -9235,7 +8490,7 @@ function toNumber(v) {
|
|
|
9235
8490
|
}
|
|
9236
8491
|
function useSpring(source, config = {}) {
|
|
9237
8492
|
let activeSpringAnimation = null;
|
|
9238
|
-
const value = motionValue(
|
|
8493
|
+
const value = motionDom.motionValue(
|
|
9239
8494
|
isMotionValue(source) ? toNumber(source.get()) : source
|
|
9240
8495
|
);
|
|
9241
8496
|
let latestValue = value.get();
|
|
@@ -9250,7 +8505,7 @@ function useSpring(source, config = {}) {
|
|
|
9250
8505
|
const startAnimation = () => {
|
|
9251
8506
|
const animation = activeSpringAnimation;
|
|
9252
8507
|
if ((animation == null ? void 0 : animation.time) === 0) {
|
|
9253
|
-
animation.sample(frameData.delta);
|
|
8508
|
+
animation.sample(motionDom.frameData.delta);
|
|
9254
8509
|
}
|
|
9255
8510
|
stopAnimation2();
|
|
9256
8511
|
const springConfig = vue.isRef(config) ? config.value : config;
|
|
@@ -9273,7 +8528,7 @@ function useSpring(source, config = {}) {
|
|
|
9273
8528
|
value.attach((v, set) => {
|
|
9274
8529
|
latestValue = v;
|
|
9275
8530
|
latestSetter = set;
|
|
9276
|
-
frame.update(startAnimation);
|
|
8531
|
+
motionDom.frame.update(startAnimation);
|
|
9277
8532
|
return value.get();
|
|
9278
8533
|
}, stopAnimation2);
|
|
9279
8534
|
}, { immediate: true });
|
|
@@ -9292,10 +8547,10 @@ function refWarning(name, ref) {
|
|
|
9292
8547
|
}
|
|
9293
8548
|
function createScrollMotionValues() {
|
|
9294
8549
|
return {
|
|
9295
|
-
scrollX: motionValue(0),
|
|
9296
|
-
scrollY: motionValue(0),
|
|
9297
|
-
scrollXProgress: motionValue(0),
|
|
9298
|
-
scrollYProgress: motionValue(0)
|
|
8550
|
+
scrollX: motionDom.motionValue(0),
|
|
8551
|
+
scrollY: motionDom.motionValue(0),
|
|
8552
|
+
scrollXProgress: motionDom.motionValue(0),
|
|
8553
|
+
scrollYProgress: motionDom.motionValue(0)
|
|
9299
8554
|
};
|
|
9300
8555
|
}
|
|
9301
8556
|
function useScroll({
|
|
@@ -9304,46 +8559,48 @@ function useScroll({
|
|
|
9304
8559
|
...options
|
|
9305
8560
|
} = {}) {
|
|
9306
8561
|
const values = createScrollMotionValues();
|
|
9307
|
-
let cleanup;
|
|
9308
|
-
const setupScroll = () => {
|
|
9309
|
-
cleanup == null ? void 0 : cleanup();
|
|
9310
|
-
cleanup = scroll(
|
|
9311
|
-
(_progress, { x, y }) => {
|
|
9312
|
-
values.scrollX.set(x.current);
|
|
9313
|
-
values.scrollXProgress.set(x.progress);
|
|
9314
|
-
values.scrollY.set(y.current);
|
|
9315
|
-
values.scrollYProgress.set(y.progress);
|
|
9316
|
-
},
|
|
9317
|
-
{
|
|
9318
|
-
...options,
|
|
9319
|
-
container: (container == null ? void 0 : container.value) ?? void 0,
|
|
9320
|
-
target: (target == null ? void 0 : target.value) ?? void 0
|
|
9321
|
-
}
|
|
9322
|
-
);
|
|
9323
|
-
};
|
|
9324
8562
|
vue.onMounted(() => {
|
|
9325
8563
|
refWarning("target", target);
|
|
9326
8564
|
refWarning("container", container);
|
|
9327
|
-
setupScroll();
|
|
9328
8565
|
});
|
|
9329
|
-
vue.onUnmounted(() => cleanup == null ? void 0 : cleanup());
|
|
9330
8566
|
vue.watch(
|
|
9331
|
-
|
|
9332
|
-
|
|
8567
|
+
[container, target, () => options.offset],
|
|
8568
|
+
(n, o, onCleanup) => {
|
|
8569
|
+
const cleanup = scroll(
|
|
8570
|
+
(_progress, { x, y }) => {
|
|
8571
|
+
values.scrollX.set(x.current);
|
|
8572
|
+
values.scrollXProgress.set(x.progress);
|
|
8573
|
+
values.scrollY.set(y.current);
|
|
8574
|
+
values.scrollYProgress.set(y.progress);
|
|
8575
|
+
},
|
|
8576
|
+
{
|
|
8577
|
+
...options,
|
|
8578
|
+
container: (container == null ? void 0 : container.value) ?? void 0,
|
|
8579
|
+
target: (target == null ? void 0 : target.value) ?? void 0
|
|
8580
|
+
}
|
|
8581
|
+
);
|
|
8582
|
+
onCleanup(() => {
|
|
8583
|
+
cleanup();
|
|
8584
|
+
});
|
|
8585
|
+
},
|
|
8586
|
+
{
|
|
8587
|
+
immediate: true,
|
|
8588
|
+
flush: "post"
|
|
8589
|
+
}
|
|
9333
8590
|
);
|
|
9334
8591
|
return values;
|
|
9335
8592
|
}
|
|
9336
8593
|
function useVelocity(value) {
|
|
9337
|
-
const velocity = motionValue(value.getVelocity());
|
|
8594
|
+
const velocity = motionDom.motionValue(value.getVelocity());
|
|
9338
8595
|
const updateVelocity = () => {
|
|
9339
8596
|
const latest = value.getVelocity();
|
|
9340
8597
|
velocity.set(latest);
|
|
9341
8598
|
if (latest) {
|
|
9342
|
-
frame.update(updateVelocity);
|
|
8599
|
+
motionDom.frame.update(updateVelocity);
|
|
9343
8600
|
}
|
|
9344
8601
|
};
|
|
9345
8602
|
useMotionValueEvent(value, "change", () => {
|
|
9346
|
-
frame.update(updateVelocity, false, true);
|
|
8603
|
+
motionDom.frame.update(updateVelocity, false, true);
|
|
9347
8604
|
});
|
|
9348
8605
|
return velocity;
|
|
9349
8606
|
}
|
|
@@ -9453,7 +8710,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9453
8710
|
}
|
|
9454
8711
|
return axis.value;
|
|
9455
8712
|
});
|
|
9456
|
-
const
|
|
8713
|
+
const isDragging = vue.ref(false);
|
|
9457
8714
|
return (_ctx, _cache) => {
|
|
9458
8715
|
return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$6), vue.mergeProps(bindProps(), {
|
|
9459
8716
|
drag: drag.value,
|
|
@@ -9461,17 +8718,17 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
9461
8718
|
onDrag: _cache[0] || (_cache[0] = (event, gesturePoint) => {
|
|
9462
8719
|
const { velocity } = gesturePoint;
|
|
9463
8720
|
velocity[vue.unref(axis)] && vue.unref(updateOrder)(_ctx.value, point2[vue.unref(axis)].get(), velocity[vue.unref(axis)]);
|
|
9464
|
-
!
|
|
8721
|
+
!isDragging.value && (isDragging.value = true);
|
|
9465
8722
|
_ctx.onDrag && _ctx.onDrag(event, gesturePoint);
|
|
9466
8723
|
}),
|
|
9467
8724
|
onDragEnd: _cache[1] || (_cache[1] = (event, gesturePoint) => {
|
|
9468
|
-
|
|
8725
|
+
isDragging.value = false;
|
|
9469
8726
|
_ctx.onDragEnd && _ctx.onDragEnd(event, gesturePoint);
|
|
9470
8727
|
}),
|
|
9471
8728
|
onLayoutMeasure: _cache[2] || (_cache[2] = (measured) => vue.unref(registerItem)(_ctx.value, measured))
|
|
9472
8729
|
}), {
|
|
9473
8730
|
default: vue.withCtx(() => [
|
|
9474
|
-
vue.renderSlot(_ctx.$slots, "default", { isDragging:
|
|
8731
|
+
vue.renderSlot(_ctx.$slots, "default", { isDragging: isDragging.value }),
|
|
9475
8732
|
vue.createTextVNode(" " + vue.toDisplayString(warning2()), 1)
|
|
9476
8733
|
]),
|
|
9477
8734
|
_: 3
|
|
@@ -9586,33 +8843,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
9586
8843
|
};
|
|
9587
8844
|
}
|
|
9588
8845
|
});
|
|
9589
|
-
const components = {
|
|
9590
|
-
motion: [
|
|
9591
|
-
"Motion",
|
|
9592
|
-
"AnimatePresence",
|
|
9593
|
-
"LayoutGroup",
|
|
9594
|
-
"MotionConfig",
|
|
9595
|
-
"ReorderGroup",
|
|
9596
|
-
"ReorderItem"
|
|
9597
|
-
]
|
|
9598
|
-
};
|
|
9599
|
-
const utilities = {
|
|
9600
|
-
utilities: [
|
|
9601
|
-
"useTransform",
|
|
9602
|
-
"useTime",
|
|
9603
|
-
"useMotionTemplate",
|
|
9604
|
-
"useSpring",
|
|
9605
|
-
"useScroll",
|
|
9606
|
-
"useMotionValue",
|
|
9607
|
-
"useVelocity",
|
|
9608
|
-
"useAnimate",
|
|
9609
|
-
"useInView",
|
|
9610
|
-
"useAnimationFrame",
|
|
9611
|
-
"useMotionValueEvent",
|
|
9612
|
-
"useLayoutGroup",
|
|
9613
|
-
"useDragControls"
|
|
9614
|
-
]
|
|
9615
|
-
};
|
|
9616
8846
|
function useAnimate() {
|
|
9617
8847
|
const dom = vue.ref(null);
|
|
9618
8848
|
const domProxy = new Proxy(dom, {
|
|
@@ -9733,6 +8963,10 @@ function useAnimationControls() {
|
|
|
9733
8963
|
});
|
|
9734
8964
|
return controls;
|
|
9735
8965
|
}
|
|
8966
|
+
function useReducedMotion(options = {}) {
|
|
8967
|
+
const reducedMotion = core.useMediaQuery("(prefers-reduced-motion: reduce)", options);
|
|
8968
|
+
return vue.computed(() => reducedMotion.value);
|
|
8969
|
+
}
|
|
9736
8970
|
class DragControls {
|
|
9737
8971
|
constructor() {
|
|
9738
8972
|
this.componentControls = /* @__PURE__ */ new Set();
|
|
@@ -9772,11 +9006,50 @@ class DragControls {
|
|
|
9772
9006
|
}
|
|
9773
9007
|
const createDragControls = () => new DragControls();
|
|
9774
9008
|
const useDragControls = createDragControls;
|
|
9009
|
+
Object.defineProperty(exports, "MotionValue", {
|
|
9010
|
+
enumerable: true,
|
|
9011
|
+
get: () => motionDom.MotionValue
|
|
9012
|
+
});
|
|
9013
|
+
Object.defineProperty(exports, "cancelFrame", {
|
|
9014
|
+
enumerable: true,
|
|
9015
|
+
get: () => motionDom.cancelFrame
|
|
9016
|
+
});
|
|
9017
|
+
Object.defineProperty(exports, "frame", {
|
|
9018
|
+
enumerable: true,
|
|
9019
|
+
get: () => motionDom.frame
|
|
9020
|
+
});
|
|
9021
|
+
Object.defineProperty(exports, "frameData", {
|
|
9022
|
+
enumerable: true,
|
|
9023
|
+
get: () => motionDom.frameData
|
|
9024
|
+
});
|
|
9025
|
+
Object.defineProperty(exports, "hover", {
|
|
9026
|
+
enumerable: true,
|
|
9027
|
+
get: () => motionDom.hover
|
|
9028
|
+
});
|
|
9029
|
+
Object.defineProperty(exports, "isDragActive", {
|
|
9030
|
+
enumerable: true,
|
|
9031
|
+
get: () => motionDom.isDragActive
|
|
9032
|
+
});
|
|
9033
|
+
Object.defineProperty(exports, "motionValue", {
|
|
9034
|
+
enumerable: true,
|
|
9035
|
+
get: () => motionDom.motionValue
|
|
9036
|
+
});
|
|
9037
|
+
Object.defineProperty(exports, "press", {
|
|
9038
|
+
enumerable: true,
|
|
9039
|
+
get: () => motionDom.press
|
|
9040
|
+
});
|
|
9041
|
+
Object.defineProperty(exports, "time", {
|
|
9042
|
+
enumerable: true,
|
|
9043
|
+
get: () => motionDom.time
|
|
9044
|
+
});
|
|
9045
|
+
Object.defineProperty(exports, "useMotionValue", {
|
|
9046
|
+
enumerable: true,
|
|
9047
|
+
get: () => motionDom.motionValue
|
|
9048
|
+
});
|
|
9775
9049
|
exports.AnimatePresence = _sfc_main$5;
|
|
9776
9050
|
exports.LayoutGroup = _sfc_main;
|
|
9777
9051
|
exports.Motion = _sfc_main$6;
|
|
9778
9052
|
exports.MotionConfig = _sfc_main$4;
|
|
9779
|
-
exports.MotionValue = MotionValue;
|
|
9780
9053
|
exports.Reorder = Reorder;
|
|
9781
9054
|
exports.ReorderGroup = ReorderGroup;
|
|
9782
9055
|
exports.ReorderItem = ReorderItem;
|
|
@@ -9788,13 +9061,10 @@ exports.anticipate = anticipate;
|
|
|
9788
9061
|
exports.backIn = backIn;
|
|
9789
9062
|
exports.backInOut = backInOut;
|
|
9790
9063
|
exports.backOut = backOut;
|
|
9791
|
-
exports.cancelFrame = cancelFrame;
|
|
9792
|
-
exports.cancelSync = cancelSync;
|
|
9793
9064
|
exports.circIn = circIn;
|
|
9794
9065
|
exports.circInOut = circInOut;
|
|
9795
9066
|
exports.circOut = circOut;
|
|
9796
9067
|
exports.clamp = clamp$1;
|
|
9797
|
-
exports.components = components;
|
|
9798
9068
|
exports.createContext = createContext;
|
|
9799
9069
|
exports.createScopedAnimate = createScopedAnimate;
|
|
9800
9070
|
exports.cubicBezier = cubicBezier;
|
|
@@ -9804,28 +9074,21 @@ exports.distance2D = distance2D;
|
|
|
9804
9074
|
exports.easeIn = easeIn;
|
|
9805
9075
|
exports.easeInOut = easeInOut;
|
|
9806
9076
|
exports.easeOut = easeOut;
|
|
9807
|
-
exports.frame = frame;
|
|
9808
|
-
exports.frameData = frameData;
|
|
9809
|
-
exports.frameSteps = frameSteps;
|
|
9810
9077
|
exports.getContextWindow = getContextWindow;
|
|
9811
|
-
exports.hover = hover;
|
|
9812
9078
|
exports.inView = inView;
|
|
9813
9079
|
exports.inertia = inertia;
|
|
9814
9080
|
exports.injectLayoutGroup = injectLayoutGroup;
|
|
9815
9081
|
exports.injectMotion = injectMotion;
|
|
9816
9082
|
exports.interpolate = interpolate;
|
|
9817
|
-
exports.isDragActive = isDragActive;
|
|
9818
9083
|
exports.isMotionValue = isMotionValue;
|
|
9819
9084
|
exports.keyframes = keyframes;
|
|
9820
9085
|
exports.millisecondsToSeconds = millisecondsToSeconds;
|
|
9821
9086
|
exports.mirrorEasing = mirrorEasing;
|
|
9822
9087
|
exports.mix = mix;
|
|
9823
9088
|
exports.motion = motion;
|
|
9824
|
-
exports.motionValue = motionValue;
|
|
9825
9089
|
exports.mountedStates = mountedStates;
|
|
9826
9090
|
exports.noop = noop;
|
|
9827
9091
|
exports.pipe = pipe;
|
|
9828
|
-
exports.press = press;
|
|
9829
9092
|
exports.progress = progress$1;
|
|
9830
9093
|
exports.provideLayoutGroup = provideLayoutGroup;
|
|
9831
9094
|
exports.provideMotion = provideMotion;
|
|
@@ -9837,8 +9100,6 @@ exports.secondsToMilliseconds = secondsToMilliseconds;
|
|
|
9837
9100
|
exports.spring = spring;
|
|
9838
9101
|
exports.stagger = stagger;
|
|
9839
9102
|
exports.steps = steps;
|
|
9840
|
-
exports.sync = sync;
|
|
9841
|
-
exports.time = time;
|
|
9842
9103
|
exports.transform = transform;
|
|
9843
9104
|
exports.useAnimate = useAnimate;
|
|
9844
9105
|
exports.useAnimationControls = useAnimationControls;
|
|
@@ -9851,12 +9112,11 @@ exports.useInView = useInView;
|
|
|
9851
9112
|
exports.useLayoutGroup = useLayoutGroup;
|
|
9852
9113
|
exports.useMotionConfig = useMotionConfig;
|
|
9853
9114
|
exports.useMotionTemplate = useMotionTemplate;
|
|
9854
|
-
exports.useMotionValue = motionValue;
|
|
9855
9115
|
exports.useMotionValueEvent = useMotionValueEvent;
|
|
9116
|
+
exports.useReducedMotion = useReducedMotion;
|
|
9856
9117
|
exports.useScroll = useScroll;
|
|
9857
9118
|
exports.useSpring = useSpring;
|
|
9858
9119
|
exports.useTime = useTime;
|
|
9859
9120
|
exports.useTransform = useTransform;
|
|
9860
9121
|
exports.useVelocity = useVelocity;
|
|
9861
|
-
exports.utilities = utilities;
|
|
9862
9122
|
exports.wrap = wrap;
|