motion-v 0.8.1 → 0.10.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +552 -221
- package/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/animation/hooks/use-animate.mjs +1 -1
- package/dist/es/components/animate-presence/AnimatePresence.vue.mjs +1 -1
- package/dist/es/components/context.d.ts +0 -1
- package/dist/es/components/index.d.ts +1 -0
- package/dist/es/components/motion/Motion.vue.mjs +7 -2
- package/dist/es/components/reorder/Group.d.ts +71 -0
- package/dist/es/components/reorder/Group.vue.mjs +131 -0
- package/dist/es/components/reorder/Group.vue2.mjs +4 -0
- package/dist/es/components/reorder/Item.d.ts +88 -0
- package/dist/es/components/reorder/Item.vue.mjs +131 -0
- package/dist/es/components/reorder/Item.vue2.mjs +4 -0
- package/dist/es/components/reorder/context.d.ts +8 -0
- package/dist/es/components/reorder/context.mjs +6 -0
- package/dist/es/components/reorder/index.d.ts +13 -0
- package/dist/es/components/reorder/index.mjs +13 -0
- package/dist/es/components/reorder/types.d.ts +5 -0
- package/dist/es/components/reorder/utils.d.ts +6 -0
- package/dist/es/components/reorder/utils.mjs +46 -0
- package/dist/es/constants/index.mjs +3 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +14 -11
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +8 -8
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +4 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -2
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +6 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +5 -5
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/utils/map.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/batcher.mjs +6 -18
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/frame.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/index-legacy.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/frameloop/order.mjs +17 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/render-step.mjs +8 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +22 -35
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +14 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/VisualElement.mjs +6 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/render/svg/utils/measure.mjs +15 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.4.0/external/framer-motion/dist/es/stats/buffer.mjs +7 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/delay.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/interpolate.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/offsets/fill.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/hover.mjs +11 -11
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/supports/memo.mjs +2 -2
- package/dist/es/external/.pnpm/motion-dom@12.0.0/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +6 -0
- package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.0.0}/external/motion-utils/dist/es/memo.mjs +1 -0
- package/dist/es/external/.pnpm/motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.0.0}/external/motion-utils/dist/es/progress.mjs +1 -1
- package/dist/es/external/.pnpm/motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs +6 -0
- package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +2 -2
- package/dist/es/features/gestures/drag/index.mjs +4 -3
- package/dist/es/features/gestures/focus/index.mjs +1 -1
- package/dist/es/features/gestures/hover/index.mjs +4 -4
- package/dist/es/features/gestures/in-view/index.mjs +3 -3
- package/dist/es/features/gestures/pan/PanSession.mjs +3 -3
- package/dist/es/features/gestures/pan/index.mjs +3 -3
- package/dist/es/features/gestures/press/index.mjs +4 -4
- package/dist/es/features/layout/config.mjs +2 -2
- package/dist/es/features/layout/layout.mjs +6 -5
- package/dist/es/features/layout/projection.mjs +2 -2
- package/dist/es/features/layout/types.d.ts +14 -1
- package/dist/es/features/svg.mjs +1 -1
- package/dist/es/index.mjs +41 -33
- package/dist/es/state/animate-updates.mjs +3 -3
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +5 -11
- package/dist/es/utils/use-animation-frame.mjs +1 -1
- package/dist/es/utils/use-in-view.d.ts +1 -1
- package/dist/es/utils/use-in-view.mjs +1 -1
- package/dist/es/value/use-combine-values.mjs +2 -2
- package/dist/es/value/use-computed.mjs +1 -1
- package/dist/es/value/use-scroll.mjs +2 -2
- package/dist/es/value/use-spring.mjs +3 -3
- package/dist/es/value/use-time.mjs +1 -1
- package/dist/es/value/use-transform.mjs +1 -1
- package/dist/es/value/use-velocity.mjs +2 -2
- package/package.json +5 -5
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -6
- package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -8
- package/dist/es/external/.pnpm/motion-dom@11.16.4/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +0 -6
- package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/noop.mjs +0 -4
- package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/time-conversion.mjs +0 -6
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/back.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/keys-position.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/keys-transform.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +1 -1
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/setters.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/warn-once.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.0}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/resolve-elements.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.0.0}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.0.0}/external/motion-utils/dist/es/errors.mjs +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@
|
|
2
|
-
import { noop } from "../../../../../../../motion-utils@
|
|
3
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../motion-utils@
|
|
4
|
-
import { isGenerator } from "../../../../../../../motion-dom@
|
|
5
|
-
import { attachTimeline } from "../../../../../../../motion-dom@
|
|
6
|
-
import { isWaapiSupportedEasing } from "../../../../../../../motion-dom@
|
|
7
|
-
import { supportsLinearEasing } from "../../../../../../../motion-dom@
|
|
1
|
+
import "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs";
|
|
3
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
4
|
+
import { isGenerator } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
5
|
+
import { attachTimeline } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs";
|
|
6
|
+
import { isWaapiSupportedEasing } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs";
|
|
7
|
+
import { supportsLinearEasing } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/utils/supports/linear-easing.mjs";
|
|
8
8
|
import { anticipate } from "../../easing/anticipate.mjs";
|
|
9
9
|
import { backInOut } from "../../easing/back.mjs";
|
|
10
10
|
import { circInOut } from "../../easing/circ.mjs";
|
|
@@ -59,9 +59,8 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
59
59
|
this.resolver.scheduleResolve();
|
|
60
60
|
}
|
|
61
61
|
initPlayback(keyframes, finalKeyframe) {
|
|
62
|
-
var _a;
|
|
63
62
|
let { duration = 300, times, ease, type, motionValue, name, startTime } = this.options;
|
|
64
|
-
if (!
|
|
63
|
+
if (!motionValue.owner || !motionValue.owner.current) {
|
|
65
64
|
return false;
|
|
66
65
|
}
|
|
67
66
|
if (typeof ease === "string" && supportsLinearEasing() && isUnsupportedEase(ease)) {
|
|
@@ -232,11 +231,15 @@ class AcceleratedAnimation extends BaseAnimation {
|
|
|
232
231
|
}
|
|
233
232
|
static supports(options) {
|
|
234
233
|
const { motionValue, name, repeatDelay, repeatType, damping, type } = options;
|
|
235
|
-
|
|
234
|
+
if (!motionValue || !motionValue.owner || !(motionValue.owner.current instanceof HTMLElement)) {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
const { onUpdate, transformTemplate } = motionValue.owner.getProps();
|
|
238
|
+
return supportsWaapi() && name && acceleratedValues.has(name) && /**
|
|
236
239
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
237
240
|
* no way to read the value from WAAPI every frame.
|
|
238
241
|
*/
|
|
239
|
-
!
|
|
242
|
+
!onUpdate && !transformTemplate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
245
|
export {
|
|
@@ -56,8 +56,8 @@ class BaseAnimation {
|
|
|
56
56
|
const { name, type, velocity, delay, onComplete, onUpdate, isGenerator } = this.options;
|
|
57
57
|
if (!isGenerator && !canAnimate(keyframes, name, type, velocity)) {
|
|
58
58
|
if (!delay) {
|
|
59
|
-
onUpdate
|
|
60
|
-
onComplete
|
|
59
|
+
onUpdate && onUpdate(getFinalKeyframe(keyframes, this.options, finalKeyframe));
|
|
60
|
+
onComplete && onComplete();
|
|
61
61
|
this.resolveFinishedPromise();
|
|
62
62
|
return;
|
|
63
63
|
} else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { invariant } from "../../../../../../../motion-utils@
|
|
2
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../motion-utils@
|
|
3
|
-
import { calcGeneratorDuration } from "../../../../../../../motion-dom@
|
|
4
|
-
import { isGenerator } from "../../../../../../../motion-dom@
|
|
1
|
+
import { invariant } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { calcGeneratorDuration } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs";
|
|
4
|
+
import { isGenerator } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
5
5
|
import { KeyframeResolver } from "../../render/utils/KeyframesResolver.mjs";
|
|
6
6
|
import { clamp } from "../../utils/clamp.mjs";
|
|
7
7
|
import { mix } from "../../utils/mix/index.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { warning } from "../../../../../../../../motion-utils@
|
|
2
|
-
import { isGenerator } from "../../../../../../../../motion-dom@
|
|
1
|
+
import { warning } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { isGenerator } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
3
3
|
import { isAnimatable } from "../../utils/is-animatable.mjs";
|
|
4
4
|
function hasKeyframesChanged(keyframes) {
|
|
5
5
|
const current = keyframes[0];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { invariant } from "../../../../../../../../motion-utils@
|
|
2
|
-
import { secondsToMilliseconds } from "../../../../../../../../motion-utils@
|
|
3
|
-
import { createGeneratorEasing } from "../../../../../../../../motion-dom@
|
|
4
|
-
import { isGenerator } from "../../../../../../../../motion-dom@
|
|
5
|
-
import { NativeAnimationControls } from "../../../../../../../../motion-dom@
|
|
6
|
-
import { supportsLinearEasing } from "../../../../../../../../motion-dom@
|
|
1
|
+
import { invariant } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { secondsToMilliseconds } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { createGeneratorEasing } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs";
|
|
4
|
+
import { isGenerator } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
5
|
+
import { NativeAnimationControls } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs";
|
|
6
|
+
import { supportsLinearEasing } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/utils/supports/linear-easing.mjs";
|
|
7
7
|
import { startWaapiAnimation } from "./index.mjs";
|
|
8
8
|
import { browserNumberValueTypes } from "../../../render/dom/value-types/number-browser.mjs";
|
|
9
9
|
import { getFinalKeyframe } from "./utils/get-final-keyframe.mjs";
|
|
@@ -61,8 +61,8 @@ class NativeAnimation extends NativeAnimationControls {
|
|
|
61
61
|
this.options = options;
|
|
62
62
|
this.updateFinishedPromise();
|
|
63
63
|
this.removeAnimation = () => {
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
const elementState = state.get(element);
|
|
65
|
+
elementState && elementState.delete(valueName);
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
if (!supportsWaapi()) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { invariant } from "../../../../../../../../motion-utils@
|
|
2
|
-
import { secondsToMilliseconds } from "../../../../../../../../motion-utils@
|
|
3
|
-
import { getValueTransition } from "../../../../../../../../motion-dom@
|
|
4
|
-
import { resolveElements } from "../../../../../../../../motion-dom@
|
|
1
|
+
import { invariant } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { secondsToMilliseconds } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { getValueTransition } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs";
|
|
4
|
+
import { resolveElements } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/utils/resolve-elements.mjs";
|
|
5
5
|
import { NativeAnimation } from "./NativeAnimation.mjs";
|
|
6
6
|
function animateElements(elementOrSelector, keyframes, options, scope) {
|
|
7
7
|
const elements = resolveElements(elementOrSelector, scope);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GroupPlaybackControls } from "../../../../../../../../motion-dom@
|
|
2
|
-
import "../../../../../../../../motion-utils@
|
|
1
|
+
import { GroupPlaybackControls } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/controls/Group.mjs";
|
|
2
|
+
import "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
3
3
|
import { animateElements } from "./animate-elements.mjs";
|
|
4
4
|
const createScopedWaapiAnimate = (scope) => {
|
|
5
5
|
function scopedAnimate(elementOrSelector, keyframes, options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../../../../../../motion-utils@
|
|
2
|
-
import { mapEasingToNativeEasing } from "../../../../../../../../motion-dom@
|
|
1
|
+
import "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { mapEasingToNativeEasing } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs";
|
|
3
3
|
function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeInOut", times } = {}) {
|
|
4
4
|
const keyframeOptions = { [valueName]: keyframes };
|
|
5
5
|
if (times)
|
|
@@ -7,7 +7,7 @@ function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duratio
|
|
|
7
7
|
const easing = mapEasingToNativeEasing(ease, duration);
|
|
8
8
|
if (Array.isArray(easing))
|
|
9
9
|
keyframeOptions.easing = easing;
|
|
10
|
-
|
|
10
|
+
const animation = element.animate(keyframeOptions, {
|
|
11
11
|
delay,
|
|
12
12
|
duration,
|
|
13
13
|
easing: !Array.isArray(easing) ? easing : "linear",
|
|
@@ -15,6 +15,7 @@ function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duratio
|
|
|
15
15
|
iterations: repeat + 1,
|
|
16
16
|
direction: repeatType === "reverse" ? "alternate" : "normal"
|
|
17
17
|
});
|
|
18
|
+
return animation;
|
|
18
19
|
}
|
|
19
20
|
export {
|
|
20
21
|
startWaapiAnimation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../../../../../../../motion-utils@
|
|
2
|
-
import { memo } from "../../../../../../../../../motion-utils@
|
|
1
|
+
import "../../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { memo } from "../../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/memo.mjs";
|
|
3
3
|
const supportsPartialKeyframes = /* @__PURE__ */ memo(() => {
|
|
4
4
|
try {
|
|
5
5
|
document.createElement("div").animate({ opacity: [1] });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "../../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { memo } from "../../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/memo.mjs";
|
|
3
|
+
const supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
4
|
+
export {
|
|
5
|
+
supportsWaapi
|
|
6
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { warning } from "../../../../../../../../motion-utils@
|
|
2
|
-
import { secondsToMilliseconds, millisecondsToSeconds } from "../../../../../../../../motion-utils@
|
|
1
|
+
import { warning } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { secondsToMilliseconds, millisecondsToSeconds } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
3
|
import { clamp } from "../../../utils/clamp.mjs";
|
|
4
4
|
import { springDefaults } from "./defaults.mjs";
|
|
5
5
|
const safeMin = 1e-3;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../../../../../../../../motion-utils@
|
|
2
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../../motion-utils@
|
|
3
|
-
import { calcGeneratorDuration, maxGeneratorDuration } from "../../../../../../../../motion-dom@
|
|
4
|
-
import { generateLinearEasing } from "../../../../../../../../motion-dom@
|
|
1
|
+
import "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { calcGeneratorDuration, maxGeneratorDuration } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs";
|
|
4
|
+
import { generateLinearEasing } from "../../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs";
|
|
5
5
|
import { clamp } from "../../../utils/clamp.mjs";
|
|
6
6
|
import { calcGeneratorVelocity } from "../utils/velocity.mjs";
|
|
7
7
|
import { springDefaults } from "./defaults.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GroupPlaybackControls } from "../../../../../../../motion-dom@
|
|
2
|
-
import { getValueTransition } from "../../../../../../../motion-dom@
|
|
3
|
-
import "../../../../../../../motion-utils@
|
|
4
|
-
import { secondsToMilliseconds } from "../../../../../../../motion-utils@
|
|
1
|
+
import { GroupPlaybackControls } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/controls/Group.mjs";
|
|
2
|
+
import { getValueTransition } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs";
|
|
3
|
+
import "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
4
|
+
import { secondsToMilliseconds } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
5
5
|
import { frame } from "../../frameloop/frame.mjs";
|
|
6
6
|
import { AcceleratedAnimation } from "../animators/AcceleratedAnimation.mjs";
|
|
7
7
|
import { MainThreadAnimation } from "../animators/MainThreadAnimation.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@
|
|
2
|
-
import { getValueTransition } from "../../../../../../../motion-dom@
|
|
1
|
+
import "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { getValueTransition } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs";
|
|
3
3
|
import { positionalKeys } from "../../render/html/utils/keys-position.mjs";
|
|
4
4
|
import { setTarget } from "../../render/utils/setters.mjs";
|
|
5
5
|
import { addValueToWillChange } from "../../value/use-will-change/add-will-change.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { invariant } from "../../../../../../../motion-utils@
|
|
2
|
-
import { progress } from "../../../../../../../motion-utils@
|
|
3
|
-
import { secondsToMilliseconds } from "../../../../../../../motion-utils@
|
|
4
|
-
import { createGeneratorEasing } from "../../../../../../../motion-dom@
|
|
5
|
-
import { isGenerator } from "../../../../../../../motion-dom@
|
|
1
|
+
import { invariant } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { progress } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/progress.mjs";
|
|
3
|
+
import { secondsToMilliseconds } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
4
|
+
import { createGeneratorEasing } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs";
|
|
5
|
+
import { isGenerator } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
6
6
|
import { getEasingForSegment } from "../../easing/utils/get-easing-for-segment.mjs";
|
|
7
7
|
import { defaultOffset } from "../../utils/offsets/default.mjs";
|
|
8
8
|
import { fillOffset } from "../../utils/offsets/fill.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../../../../motion-utils@
|
|
2
|
-
import { noop } from "../../../../../../motion-utils@
|
|
1
|
+
import "../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs";
|
|
3
3
|
const calcBezier = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;
|
|
4
4
|
const subdivisionPrecision = 1e-7;
|
|
5
5
|
const subdivisionMaxIterations = 12;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { invariant } from "../../../../../../../motion-utils@
|
|
2
|
-
import { noop } from "../../../../../../../motion-utils@
|
|
3
|
-
import { isBezierDefinition } from "../../../../../../../motion-dom@
|
|
1
|
+
import { invariant } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs";
|
|
3
|
+
import { isBezierDefinition } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/utils/is-bezier-definition.mjs";
|
|
4
4
|
import { anticipate } from "../anticipate.mjs";
|
|
5
5
|
import { backIn, backInOut, backOut } from "../back.mjs";
|
|
6
6
|
import { circIn, circInOut, circOut } from "../circ.mjs";
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
+
import { stepsOrder } from "./order.mjs";
|
|
1
2
|
import { createRenderStep } from "./render-step.mjs";
|
|
2
|
-
const stepsOrder = [
|
|
3
|
-
"read",
|
|
4
|
-
// Read
|
|
5
|
-
"resolveKeyframes",
|
|
6
|
-
// Write/Read/Write/Read
|
|
7
|
-
"update",
|
|
8
|
-
// Compute
|
|
9
|
-
"preRender",
|
|
10
|
-
// Compute
|
|
11
|
-
"render",
|
|
12
|
-
// Write
|
|
13
|
-
"postRender"
|
|
14
|
-
// Compute
|
|
15
|
-
];
|
|
16
3
|
const maxElapsed = 40;
|
|
17
4
|
function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
18
5
|
let runNextFrame = false;
|
|
@@ -24,14 +11,16 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
24
11
|
};
|
|
25
12
|
const flagRunNextFrame = () => runNextFrame = true;
|
|
26
13
|
const steps = stepsOrder.reduce((acc, key) => {
|
|
27
|
-
acc[key] = createRenderStep(flagRunNextFrame);
|
|
14
|
+
acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : void 0);
|
|
28
15
|
return acc;
|
|
29
16
|
}, {});
|
|
30
17
|
const { read, resolveKeyframes, update, preRender, render, postRender } = steps;
|
|
31
18
|
const processBatch = () => {
|
|
32
19
|
const timestamp = performance.now();
|
|
33
20
|
runNextFrame = false;
|
|
34
|
-
|
|
21
|
+
{
|
|
22
|
+
state.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);
|
|
23
|
+
}
|
|
35
24
|
state.timestamp = timestamp;
|
|
36
25
|
state.isProcessing = true;
|
|
37
26
|
read.process(state);
|
|
@@ -70,6 +59,5 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
|
70
59
|
return { schedule, cancel, state, steps };
|
|
71
60
|
}
|
|
72
61
|
export {
|
|
73
|
-
createRenderBatcher
|
|
74
|
-
stepsOrder
|
|
62
|
+
createRenderBatcher
|
|
75
63
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../../../../motion-utils@
|
|
2
|
-
import { noop } from "../../../../../../motion-utils@
|
|
1
|
+
import "../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs";
|
|
3
3
|
import { createRenderBatcher } from "./batcher.mjs";
|
|
4
4
|
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true);
|
|
5
5
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { statsBuffer } from "../stats/buffer.mjs";
|
|
2
|
+
function createRenderStep(runNextFrame, stepName) {
|
|
2
3
|
let thisFrame = /* @__PURE__ */ new Set();
|
|
3
4
|
let nextFrame = /* @__PURE__ */ new Set();
|
|
4
5
|
let isProcessing = false;
|
|
@@ -9,11 +10,13 @@ function createRenderStep(runNextFrame) {
|
|
|
9
10
|
timestamp: 0,
|
|
10
11
|
isProcessing: false
|
|
11
12
|
};
|
|
13
|
+
let numCalls = 0;
|
|
12
14
|
function triggerCallback(callback) {
|
|
13
15
|
if (toKeepAlive.has(callback)) {
|
|
14
16
|
step.schedule(callback);
|
|
15
17
|
runNextFrame();
|
|
16
18
|
}
|
|
19
|
+
numCalls++;
|
|
17
20
|
callback(latestFrameData);
|
|
18
21
|
}
|
|
19
22
|
const step = {
|
|
@@ -48,6 +51,10 @@ function createRenderStep(runNextFrame) {
|
|
|
48
51
|
isProcessing = true;
|
|
49
52
|
[thisFrame, nextFrame] = [nextFrame, thisFrame];
|
|
50
53
|
thisFrame.forEach(triggerCallback);
|
|
54
|
+
if (stepName && statsBuffer.value) {
|
|
55
|
+
statsBuffer.value.frameloop[stepName].push(numCalls);
|
|
56
|
+
}
|
|
57
|
+
numCalls = 0;
|
|
51
58
|
thisFrame.clear();
|
|
52
59
|
isProcessing = false;
|
|
53
60
|
if (flushNextFrame) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@
|
|
2
|
-
import { noop } from "../../../../../../../motion-utils@
|
|
3
|
-
import { progress } from "../../../../../../../motion-utils@
|
|
1
|
+
import "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs";
|
|
3
|
+
import { progress } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/progress.mjs";
|
|
4
4
|
import { circOut } from "../../easing/circ.mjs";
|
|
5
5
|
import { mixNumber } from "../../utils/mix/number.mjs";
|
|
6
6
|
import { percent, px } from "../../value/types/numbers/units.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@
|
|
2
|
-
import { noop } from "../../../../../../../motion-utils@
|
|
3
|
-
import { getValueTransition } from "../../../../../../../motion-dom@
|
|
1
|
+
import "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { noop } from "../../../../../../../motion-utils@12.0.0/external/motion-utils/dist/es/noop.mjs";
|
|
3
|
+
import { getValueTransition } from "../../../../../../../motion-dom@12.0.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs";
|
|
4
4
|
import { animateSingleValue } from "../../animation/animate/single-value.mjs";
|
|
5
5
|
import { getOptimisedAppearId } from "../../animation/optimized-appear/get-appear-id.mjs";
|
|
6
6
|
import { cancelFrame, frameData, frameSteps, frame } from "../../frameloop/frame.mjs";
|
|
@@ -16,7 +16,7 @@ import { resolveMotionValue } from "../../value/utils/resolve-motion-value.mjs";
|
|
|
16
16
|
import { mixValues } from "../animation/mix-values.mjs";
|
|
17
17
|
import { copyBoxInto, copyAxisDeltaInto } from "../geometry/copy.mjs";
|
|
18
18
|
import { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from "../geometry/delta-apply.mjs";
|
|
19
|
-
import { calcRelativePosition, calcRelativeBox, calcBoxDelta,
|
|
19
|
+
import { calcLength, calcRelativePosition, calcRelativeBox, calcBoxDelta, isNear } from "../geometry/delta-calc.mjs";
|
|
20
20
|
import { removeBoxTransforms } from "../geometry/delta-remove.mjs";
|
|
21
21
|
import { createBox, createDelta } from "../geometry/models.mjs";
|
|
22
22
|
import { boxEqualsRounded, isDeltaZero, axisDeltaEquals, aspectRatio, boxEquals } from "../geometry/utils.mjs";
|
|
@@ -26,13 +26,6 @@ import { buildProjectionTransform } from "../styles/transform.mjs";
|
|
|
26
26
|
import { eachAxis } from "../utils/each-axis.mjs";
|
|
27
27
|
import { hasTransform, hasScale, has2DTranslate } from "../utils/has-transform.mjs";
|
|
28
28
|
import { globalProjectionState } from "./state.mjs";
|
|
29
|
-
const metrics = {
|
|
30
|
-
type: "projectionFrame",
|
|
31
|
-
totalNodes: 0,
|
|
32
|
-
resolvedTargetDeltas: 0,
|
|
33
|
-
recalculatedProjection: 0
|
|
34
|
-
};
|
|
35
|
-
const isDebug = typeof window !== "undefined" && window.MotionDebug !== void 0;
|
|
36
29
|
const transformAxes = ["", "X", "Y", "Z"];
|
|
37
30
|
const hiddenVisibility = { visibility: "hidden" };
|
|
38
31
|
const animationTarget = 1e3;
|
|
@@ -98,16 +91,10 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
98
91
|
};
|
|
99
92
|
this.updateProjection = () => {
|
|
100
93
|
this.projectionUpdateScheduled = false;
|
|
101
|
-
if (isDebug) {
|
|
102
|
-
metrics.totalNodes = metrics.resolvedTargetDeltas = metrics.recalculatedProjection = 0;
|
|
103
|
-
}
|
|
104
94
|
this.nodes.forEach(propagateDirtyNodes);
|
|
105
95
|
this.nodes.forEach(resolveTargetDelta);
|
|
106
96
|
this.nodes.forEach(calcProjection);
|
|
107
97
|
this.nodes.forEach(cleanDirtyNodes);
|
|
108
|
-
if (isDebug) {
|
|
109
|
-
window.MotionDebug.record(metrics);
|
|
110
|
-
}
|
|
111
98
|
};
|
|
112
99
|
this.resolvedRelativeTargetAt = 0;
|
|
113
100
|
this.hasProjected = false;
|
|
@@ -172,7 +159,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
172
159
|
this.root.registerSharedNode(layoutId, this);
|
|
173
160
|
}
|
|
174
161
|
if (this.options.animate !== false && visualElement && (layoutId || layout)) {
|
|
175
|
-
this.addEventListener("didUpdate", ({ delta, hasLayoutChanged,
|
|
162
|
+
this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout }) => {
|
|
176
163
|
if (this.isTreeAnimationBlocked()) {
|
|
177
164
|
this.target = void 0;
|
|
178
165
|
this.relativeTarget = void 0;
|
|
@@ -180,9 +167,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
180
167
|
}
|
|
181
168
|
const layoutTransition = this.options.transition || visualElement.getDefaultTransition() || defaultLayoutTransition;
|
|
182
169
|
const { onLayoutAnimationStart, onLayoutAnimationComplete } = visualElement.getProps();
|
|
183
|
-
const
|
|
184
|
-
const hasOnlyRelativeTargetChanged = !hasLayoutChanged &&
|
|
185
|
-
if (this.options.layoutRoot || this.resumeFrom
|
|
170
|
+
const hasTargetChanged = !this.targetLayout || !boxEqualsRounded(this.targetLayout, newLayout);
|
|
171
|
+
const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged;
|
|
172
|
+
if (this.options.layoutRoot || this.resumeFrom || hasOnlyRelativeTargetChanged || hasLayoutChanged && (hasTargetChanged || !this.currentAnimation)) {
|
|
186
173
|
if (this.resumeFrom) {
|
|
187
174
|
this.resumingFrom = this.resumeFrom;
|
|
188
175
|
this.resumingFrom.resumingFrom = void 0;
|
|
@@ -331,6 +318,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
331
318
|
if (this.snapshot || !this.instance)
|
|
332
319
|
return;
|
|
333
320
|
this.snapshot = this.measure();
|
|
321
|
+
if (this.snapshot && !calcLength(this.snapshot.measuredBox.x) && !calcLength(this.snapshot.measuredBox.y)) {
|
|
322
|
+
this.snapshot = void 0;
|
|
323
|
+
}
|
|
334
324
|
}
|
|
335
325
|
updateLayout() {
|
|
336
326
|
if (!this.instance)
|
|
@@ -563,9 +553,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
563
553
|
this.relativeParent = this.relativeTarget = void 0;
|
|
564
554
|
}
|
|
565
555
|
}
|
|
566
|
-
if (isDebug) {
|
|
567
|
-
metrics.resolvedTargetDeltas++;
|
|
568
|
-
}
|
|
569
556
|
}
|
|
570
557
|
getClosestProjectingParent() {
|
|
571
558
|
if (!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues)) {
|
|
@@ -631,9 +618,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
631
618
|
this.scheduleRender();
|
|
632
619
|
this.notifyListeners("projectionUpdate", target);
|
|
633
620
|
}
|
|
634
|
-
if (isDebug) {
|
|
635
|
-
metrics.recalculatedProjection++;
|
|
636
|
-
}
|
|
637
621
|
}
|
|
638
622
|
hide() {
|
|
639
623
|
this.isVisible = false;
|
|
@@ -718,6 +702,8 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
718
702
|
this.mixTargetDelta(latest);
|
|
719
703
|
options.onUpdate && options.onUpdate(latest);
|
|
720
704
|
},
|
|
705
|
+
onStop: () => {
|
|
706
|
+
},
|
|
721
707
|
onComplete: () => {
|
|
722
708
|
options.onComplete && options.onComplete();
|
|
723
709
|
this.completeAnimation();
|
|
@@ -889,7 +875,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
889
875
|
for (const key in scaleCorrectors) {
|
|
890
876
|
if (valuesToRender[key] === void 0)
|
|
891
877
|
continue;
|
|
892
|
-
const { correct, applyTo } = scaleCorrectors[key];
|
|
878
|
+
const { correct, applyTo, isCSSVariable } = scaleCorrectors[key];
|
|
893
879
|
const corrected = styles.transform === "none" ? valuesToRender[key] : correct(valuesToRender[key], lead);
|
|
894
880
|
if (applyTo) {
|
|
895
881
|
const num = applyTo.length;
|
|
@@ -897,7 +883,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
897
883
|
styles[applyTo[i]] = corrected;
|
|
898
884
|
}
|
|
899
885
|
} else {
|
|
900
|
-
|
|
886
|
+
if (isCSSVariable) {
|
|
887
|
+
this.options.visualElement.renderState.vars[key] = corrected;
|
|
888
|
+
} else {
|
|
889
|
+
styles[key] = corrected;
|
|
890
|
+
}
|
|
901
891
|
}
|
|
902
892
|
}
|
|
903
893
|
if (this.options.layoutId) {
|
|
@@ -956,7 +946,7 @@ function notifyLayoutUpdate(node) {
|
|
|
956
946
|
calcBoxDelta(visualDelta, layout, snapshot.layoutBox);
|
|
957
947
|
}
|
|
958
948
|
const hasLayoutChanged = !isDeltaZero(layoutDelta);
|
|
959
|
-
let
|
|
949
|
+
let hasRelativeLayoutChanged = false;
|
|
960
950
|
if (!node.resumeFrom) {
|
|
961
951
|
const relativeParent = node.getClosestProjectingParent();
|
|
962
952
|
if (relativeParent && !relativeParent.resumeFrom) {
|
|
@@ -967,7 +957,7 @@ function notifyLayoutUpdate(node) {
|
|
|
967
957
|
const relativeLayout = createBox();
|
|
968
958
|
calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);
|
|
969
959
|
if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {
|
|
970
|
-
|
|
960
|
+
hasRelativeLayoutChanged = true;
|
|
971
961
|
}
|
|
972
962
|
if (relativeParent.options.layoutRoot) {
|
|
973
963
|
node.relativeTarget = relativeLayout;
|
|
@@ -983,7 +973,7 @@ function notifyLayoutUpdate(node) {
|
|
|
983
973
|
delta: visualDelta,
|
|
984
974
|
layoutDelta,
|
|
985
975
|
hasLayoutChanged,
|
|
986
|
-
|
|
976
|
+
hasRelativeLayoutChanged
|
|
987
977
|
});
|
|
988
978
|
} else if (node.isLead()) {
|
|
989
979
|
const { onExitComplete } = node.options;
|
|
@@ -992,9 +982,6 @@ function notifyLayoutUpdate(node) {
|
|
|
992
982
|
node.options.transition = void 0;
|
|
993
983
|
}
|
|
994
984
|
function propagateDirtyNodes(node) {
|
|
995
|
-
if (isDebug) {
|
|
996
|
-
metrics.totalNodes++;
|
|
997
|
-
}
|
|
998
985
|
if (!node.parent)
|
|
999
986
|
return;
|
|
1000
987
|
if (!node.isProjecting()) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isCSSVariableName } from "../../render/dom/utils/is-css-variable.mjs";
|
|
2
|
+
const scaleCorrectors = {};
|
|
3
|
+
function addScaleCorrector(correctors) {
|
|
4
|
+
for (const key in correctors) {
|
|
5
|
+
scaleCorrectors[key] = correctors[key];
|
|
6
|
+
if (isCSSVariableName(key)) {
|
|
7
|
+
scaleCorrectors[key].isCSSVariable = true;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
addScaleCorrector,
|
|
13
|
+
scaleCorrectors
|
|
14
|
+
};
|