motion 10.18.0 → 11.11.12
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/.turbo/turbo-build.log +29 -0
- package/{LICENSE → LICENSE.md} +2 -2
- package/README.md +99 -7
- package/dist/cjs/index.js +6117 -0
- package/dist/cjs/react-client.js +10003 -0
- package/dist/cjs/react-m.js +1852 -0
- package/dist/es/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +78 -0
- package/dist/es/framer-motion/dist/es/animation/animate/index.mjs +34 -0
- package/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +19 -0
- package/dist/es/framer-motion/dist/es/animation/animate/sequence.mjs +14 -0
- package/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs +11 -0
- package/dist/es/framer-motion/dist/es/animation/animate/subject.mjs +52 -0
- package/dist/es/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +318 -0
- package/dist/es/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +112 -0
- package/dist/es/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +380 -0
- package/dist/es/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +17 -0
- package/dist/es/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +14 -0
- package/dist/es/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +42 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +169 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +36 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +12 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/easing.mjs +44 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/index.mjs +23 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/attach-timeline.mjs +6 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +12 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/linear.mjs +15 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs +9 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +8 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs +9 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs +15 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +13 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +5 -0
- package/dist/es/framer-motion/dist/es/animation/generators/inertia.mjs +87 -0
- package/dist/es/framer-motion/dist/es/animation/generators/keyframes.mjs +51 -0
- package/dist/es/framer-motion/dist/es/animation/generators/spring/find.mjs +89 -0
- package/dist/es/framer-motion/dist/es/animation/generators/spring/index.mjs +129 -0
- package/dist/es/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +17 -0
- package/dist/es/framer-motion/dist/es/animation/generators/utils/is-generator.mjs +5 -0
- package/dist/es/framer-motion/dist/es/animation/generators/utils/velocity.mjs +9 -0
- package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +105 -0
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +75 -0
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs +66 -0
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element.mjs +26 -0
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +6 -0
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +7 -0
- package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +230 -0
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +21 -0
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/edit.mjs +31 -0
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/sort.mjs +14 -0
- package/dist/es/framer-motion/dist/es/animation/utils/create-visual-element.mjs +44 -0
- package/dist/es/framer-motion/dist/es/animation/utils/default-transitions.mjs +40 -0
- package/dist/es/framer-motion/dist/es/animation/utils/get-value-transition.mjs +9 -0
- package/dist/es/framer-motion/dist/es/animation/utils/is-animatable.mjs +30 -0
- package/dist/es/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +7 -0
- package/dist/es/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +5 -0
- package/dist/es/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +5 -0
- package/dist/es/framer-motion/dist/es/animation/utils/is-none.mjs +15 -0
- package/dist/es/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +10 -0
- package/dist/es/framer-motion/dist/es/animation/utils/stagger.mjs +26 -0
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +40 -0
- package/dist/es/framer-motion/dist/es/context/LayoutGroupContext.mjs +6 -0
- package/dist/es/framer-motion/dist/es/context/LazyContext.mjs +6 -0
- package/dist/es/framer-motion/dist/es/context/MotionConfigContext.mjs +13 -0
- package/dist/es/framer-motion/dist/es/context/MotionContext/create.mjs +13 -0
- package/dist/es/framer-motion/dist/es/context/MotionContext/index.mjs +6 -0
- package/dist/es/framer-motion/dist/es/context/MotionContext/utils.mjs +17 -0
- package/dist/es/framer-motion/dist/es/context/PresenceContext.mjs +9 -0
- package/dist/es/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs +9 -0
- package/dist/es/framer-motion/dist/es/easing/anticipate.mjs +5 -0
- package/dist/es/framer-motion/dist/es/easing/back.mjs +9 -0
- package/dist/es/framer-motion/dist/es/easing/circ.mjs +8 -0
- package/dist/es/framer-motion/dist/es/easing/cubic-bezier.mjs +51 -0
- package/dist/es/framer-motion/dist/es/easing/ease.mjs +7 -0
- package/dist/es/framer-motion/dist/es/easing/modifiers/mirror.mjs +5 -0
- package/dist/es/framer-motion/dist/es/easing/modifiers/reverse.mjs +5 -0
- package/dist/es/framer-motion/dist/es/easing/steps.mjs +15 -0
- package/dist/es/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +17 -0
- package/dist/es/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +8 -0
- package/dist/es/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +3 -0
- package/dist/es/framer-motion/dist/es/easing/utils/is-easing-array.mjs +5 -0
- package/dist/es/framer-motion/dist/es/easing/utils/map.mjs +38 -0
- package/dist/es/framer-motion/dist/es/events/add-dom-event.mjs +6 -0
- package/dist/es/framer-motion/dist/es/events/add-pointer-event.mjs +8 -0
- package/dist/es/framer-motion/dist/es/events/event-info.mjs +15 -0
- package/dist/es/framer-motion/dist/es/events/utils/is-primary-pointer.mjs +18 -0
- package/dist/es/framer-motion/dist/es/frameloop/batcher.mjs +71 -0
- package/dist/es/framer-motion/dist/es/frameloop/frame.mjs +6 -0
- package/dist/es/framer-motion/dist/es/frameloop/index-legacy.mjs +20 -0
- package/dist/es/framer-motion/dist/es/frameloop/microtask.mjs +5 -0
- package/dist/es/framer-motion/dist/es/frameloop/render-step.mjs +80 -0
- package/dist/es/framer-motion/dist/es/frameloop/sync-time.mjs +31 -0
- package/dist/es/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +487 -0
- package/dist/es/framer-motion/dist/es/gestures/drag/index.mjs +27 -0
- package/dist/es/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +129 -0
- package/dist/es/framer-motion/dist/es/gestures/drag/utils/lock.mjs +53 -0
- package/dist/es/framer-motion/dist/es/gestures/focus.mjs +41 -0
- package/dist/es/framer-motion/dist/es/gestures/hover.mjs +33 -0
- package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +156 -0
- package/dist/es/framer-motion/dist/es/gestures/pan/index.mjs +50 -0
- package/dist/es/framer-motion/dist/es/gestures/press.mjs +130 -0
- package/dist/es/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs +20 -0
- package/dist/es/framer-motion/dist/es/motion/features/Feature.mjs +9 -0
- package/dist/es/framer-motion/dist/es/motion/features/animation/exit.mjs +31 -0
- package/dist/es/framer-motion/dist/es/motion/features/animation/index.mjs +41 -0
- package/dist/es/framer-motion/dist/es/motion/features/animations.mjs +13 -0
- package/dist/es/framer-motion/dist/es/motion/features/definitions.mjs +28 -0
- package/dist/es/framer-motion/dist/es/motion/features/drag.mjs +17 -0
- package/dist/es/framer-motion/dist/es/motion/features/gestures.mjs +21 -0
- package/dist/es/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +134 -0
- package/dist/es/framer-motion/dist/es/motion/features/layout.mjs +11 -0
- package/dist/es/framer-motion/dist/es/motion/features/load-features.mjs +12 -0
- package/dist/es/framer-motion/dist/es/motion/features/viewport/index.mjs +72 -0
- package/dist/es/framer-motion/dist/es/motion/features/viewport/observers.mjs +49 -0
- package/dist/es/framer-motion/dist/es/motion/index.mjs +98 -0
- package/dist/es/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +11 -0
- package/dist/es/framer-motion/dist/es/motion/utils/symbol.mjs +3 -0
- package/dist/es/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +36 -0
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-element.mjs +134 -0
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-state.mjs +82 -0
- package/dist/es/framer-motion/dist/es/motion/utils/valid-prop.mjs +57 -0
- package/dist/es/framer-motion/dist/es/projection/animation/mix-values.mjs +93 -0
- package/dist/es/framer-motion/dist/es/projection/geometry/conversion.mjs +33 -0
- package/dist/es/framer-motion/dist/es/projection/geometry/copy.mjs +31 -0
- package/dist/es/framer-motion/dist/es/projection/geometry/delta-apply.mjs +119 -0
- package/dist/es/framer-motion/dist/es/projection/geometry/delta-calc.mjs +52 -0
- package/dist/es/framer-motion/dist/es/projection/geometry/delta-remove.mjs +54 -0
- package/dist/es/framer-motion/dist/es/projection/geometry/models.mjs +17 -0
- package/dist/es/framer-motion/dist/es/projection/geometry/utils.mjs +31 -0
- package/dist/es/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +13 -0
- package/dist/es/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +27 -0
- package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +1583 -0
- package/dist/es/framer-motion/dist/es/projection/node/state.mjs +19 -0
- package/dist/es/framer-motion/dist/es/projection/shared/stack.mjs +112 -0
- package/dist/es/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +41 -0
- package/dist/es/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +35 -0
- package/dist/es/framer-motion/dist/es/projection/styles/scale-correction.mjs +6 -0
- package/dist/es/framer-motion/dist/es/projection/styles/transform.mjs +49 -0
- package/dist/es/framer-motion/dist/es/projection/utils/each-axis.mjs +5 -0
- package/dist/es/framer-motion/dist/es/projection/utils/has-transform.mjs +26 -0
- package/dist/es/framer-motion/dist/es/projection/utils/measure.mjs +17 -0
- package/dist/es/framer-motion/dist/es/render/VisualElement.mjs +477 -0
- package/dist/es/framer-motion/dist/es/render/components/create-factory.mjs +23 -0
- package/dist/es/framer-motion/dist/es/render/components/m/create.mjs +6 -0
- package/dist/es/framer-motion/dist/es/render/components/m/elements.mjs +227 -0
- package/dist/es/framer-motion/dist/es/render/components/motion/create.mjs +15 -0
- package/dist/es/framer-motion/dist/es/render/components/motion/elements.mjs +194 -0
- package/dist/es/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +130 -0
- package/dist/es/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +28 -0
- package/dist/es/framer-motion/dist/es/render/dom/create-visual-element.mjs +14 -0
- package/dist/es/framer-motion/dist/es/render/dom/resize/handle-element.mjs +64 -0
- package/dist/es/framer-motion/dist/es/render/dom/resize/handle-window.mjs +30 -0
- package/dist/es/framer-motion/dist/es/render/dom/resize/index.mjs +8 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +80 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/info.mjs +56 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/observe.mjs +18 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +45 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +59 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +45 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +35 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +20 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +48 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/supports.mjs +5 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/track.mjs +84 -0
- package/dist/es/framer-motion/dist/es/render/dom/use-render.mjs +33 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +6 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +42 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/filter-props.mjs +59 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +15 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs +30 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +5 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +28 -0
- package/dist/es/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +65 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +15 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/defaults.mjs +30 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +15 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/find.mjs +15 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +10 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +41 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/number.mjs +18 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/test.mjs +6 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/transform.mjs +31 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +9 -0
- package/dist/es/framer-motion/dist/es/render/dom/value-types/type-int.mjs +8 -0
- package/dist/es/framer-motion/dist/es/render/dom/viewport/index.mjs +43 -0
- package/dist/es/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +57 -0
- package/dist/es/framer-motion/dist/es/render/html/config-motion.mjs +12 -0
- package/dist/es/framer-motion/dist/es/render/html/use-props.mjs +57 -0
- package/dist/es/framer-motion/dist/es/render/html/utils/build-styles.mjs +65 -0
- package/dist/es/framer-motion/dist/es/render/html/utils/build-transform.mjs +62 -0
- package/dist/es/framer-motion/dist/es/render/html/utils/create-render-state.mjs +8 -0
- package/dist/es/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +30 -0
- package/dist/es/framer-motion/dist/es/render/html/utils/render.mjs +9 -0
- package/dist/es/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +20 -0
- package/dist/es/framer-motion/dist/es/render/html/utils/transform.mjs +28 -0
- package/dist/es/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +41 -0
- package/dist/es/framer-motion/dist/es/render/store.mjs +3 -0
- package/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +45 -0
- package/dist/es/framer-motion/dist/es/render/svg/config-motion.mjs +40 -0
- package/dist/es/framer-motion/dist/es/render/svg/lowercase-elements.mjs +33 -0
- package/dist/es/framer-motion/dist/es/render/svg/use-props.mjs +24 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +52 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +30 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/create-render-state.mjs +8 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +3 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/path.mjs +32 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/render.mjs +12 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +19 -0
- package/dist/es/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +18 -0
- package/dist/es/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +164 -0
- package/dist/es/framer-motion/dist/es/render/utils/animation-state.mjs +332 -0
- package/dist/es/framer-motion/dist/es/render/utils/compare-by-depth.mjs +3 -0
- package/dist/es/framer-motion/dist/es/render/utils/flat-tree.mjs +24 -0
- package/dist/es/framer-motion/dist/es/render/utils/get-variant-context.mjs +28 -0
- package/dist/es/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +13 -0
- package/dist/es/framer-motion/dist/es/render/utils/is-variant-label.mjs +8 -0
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +59 -0
- package/dist/es/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +8 -0
- package/dist/es/framer-motion/dist/es/render/utils/resolve-variants.mjs +36 -0
- package/dist/es/framer-motion/dist/es/render/utils/setters.mjs +27 -0
- package/dist/es/framer-motion/dist/es/render/utils/variant-props.mjs +12 -0
- package/dist/es/framer-motion/dist/es/utils/GlobalConfig.mjs +6 -0
- package/dist/es/framer-motion/dist/es/utils/array.mjs +11 -0
- package/dist/es/framer-motion/dist/es/utils/clamp.mjs +9 -0
- package/dist/es/framer-motion/dist/es/utils/delay.mjs +24 -0
- package/dist/es/framer-motion/dist/es/utils/distance.mjs +9 -0
- package/dist/es/framer-motion/dist/es/utils/errors.mjs +18 -0
- package/dist/es/framer-motion/dist/es/utils/get-context-window.mjs +6 -0
- package/dist/es/framer-motion/dist/es/utils/hsla-to-rgba.mjs +42 -0
- package/dist/es/framer-motion/dist/es/utils/interpolate.mjs +75 -0
- package/dist/es/framer-motion/dist/es/utils/is-browser.mjs +3 -0
- package/dist/es/framer-motion/dist/es/utils/is-numerical-string.mjs +6 -0
- package/dist/es/framer-motion/dist/es/utils/is-ref-object.mjs +7 -0
- package/dist/es/framer-motion/dist/es/utils/is-zero-value-string.mjs +6 -0
- package/dist/es/framer-motion/dist/es/utils/memo.mjs +10 -0
- package/dist/es/framer-motion/dist/es/utils/mix/color.mjs +47 -0
- package/dist/es/framer-motion/dist/es/utils/mix/complex.mjs +94 -0
- package/dist/es/framer-motion/dist/es/utils/mix/immediate.mjs +5 -0
- package/dist/es/framer-motion/dist/es/utils/mix/index.mjs +14 -0
- package/dist/es/framer-motion/dist/es/utils/mix/number.mjs +26 -0
- package/dist/es/framer-motion/dist/es/utils/mix/visibility.mjs +16 -0
- package/dist/es/framer-motion/dist/es/utils/noop.mjs +3 -0
- package/dist/es/framer-motion/dist/es/utils/offsets/default.mjs +9 -0
- package/dist/es/framer-motion/dist/es/utils/offsets/fill.mjs +12 -0
- package/dist/es/framer-motion/dist/es/utils/offsets/time.mjs +5 -0
- package/dist/es/framer-motion/dist/es/utils/pipe.mjs +11 -0
- package/dist/es/framer-motion/dist/es/utils/progress.mjs +18 -0
- package/dist/es/framer-motion/dist/es/utils/reduced-motion/index.mjs +19 -0
- package/dist/es/framer-motion/dist/es/utils/reduced-motion/state.mjs +5 -0
- package/dist/es/framer-motion/dist/es/utils/resolve-value.mjs +11 -0
- package/dist/es/framer-motion/dist/es/utils/shallow-compare.mjs +14 -0
- package/dist/es/framer-motion/dist/es/utils/subscription-manager.mjs +40 -0
- package/dist/es/framer-motion/dist/es/utils/time-conversion.mjs +10 -0
- package/dist/es/framer-motion/dist/es/utils/transform.mjs +21 -0
- package/dist/es/framer-motion/dist/es/utils/use-constant.mjs +18 -0
- package/dist/es/framer-motion/dist/es/utils/use-isomorphic-effect.mjs +6 -0
- package/dist/es/framer-motion/dist/es/utils/velocity-per-second.mjs +11 -0
- package/dist/es/framer-motion/dist/es/utils/warn-once.mjs +11 -0
- package/dist/es/framer-motion/dist/es/utils/wrap.mjs +6 -0
- package/dist/es/framer-motion/dist/es/value/index.mjs +313 -0
- package/dist/es/framer-motion/dist/es/value/types/color/hex.mjs +40 -0
- package/dist/es/framer-motion/dist/es/value/types/color/hsla.mjs +22 -0
- package/dist/es/framer-motion/dist/es/value/types/color/index.mjs +27 -0
- package/dist/es/framer-motion/dist/es/value/types/color/rgba.mjs +25 -0
- package/dist/es/framer-motion/dist/es/value/types/color/utils.mjs +29 -0
- package/dist/es/framer-motion/dist/es/value/types/complex/filter.mjs +30 -0
- package/dist/es/framer-motion/dist/es/value/types/complex/index.mjs +92 -0
- package/dist/es/framer-motion/dist/es/value/types/numbers/index.mjs +17 -0
- package/dist/es/framer-motion/dist/es/value/types/numbers/units.mjs +17 -0
- package/dist/es/framer-motion/dist/es/value/types/utils/color-regex.mjs +3 -0
- package/dist/es/framer-motion/dist/es/value/types/utils/float-regex.mjs +3 -0
- package/dist/es/framer-motion/dist/es/value/types/utils/is-nullish.mjs +5 -0
- package/dist/es/framer-motion/dist/es/value/types/utils/sanitize.mjs +5 -0
- package/dist/es/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +3 -0
- package/dist/es/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +14 -0
- package/dist/es/framer-motion/dist/es/value/use-will-change/is.mjs +7 -0
- package/dist/es/framer-motion/dist/es/value/utils/is-motion-value.mjs +3 -0
- package/dist/es/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +16 -0
- package/dist/es/motion/lib/index.mjs +30 -0
- package/dist/es/motion/lib/react-client.mjs +3 -0
- package/dist/es/motion/lib/react-m.mjs +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/motion.dev.js +6121 -0
- package/dist/motion.js +1 -0
- package/dist/react-client.d.ts +1 -0
- package/dist/react-m.d.ts +1 -0
- package/lib/index.js +1 -3
- package/lib/index.js.map +1 -1
- package/lib/react-client.js +3 -0
- package/lib/react-client.js.map +1 -0
- package/lib/react-m.js +3 -0
- package/lib/react-m.js.map +1 -0
- package/lib/react.js +3 -0
- package/lib/react.js.map +1 -0
- package/package.json +79 -29
- package/react/package.json +6 -0
- package/react-client/package.json +6 -0
- package/react-m/package.json +6 -0
- package/rollup.config.mjs +174 -0
- package/src/index.ts +1 -0
- package/src/react-client.ts +3 -0
- package/src/react-m.ts +3 -0
- package/src/react.ts +3 -0
- package/tsconfig.json +25 -0
- package/types/index.d.ts +1 -4
- package/types/react-client.d.ts +1 -0
- package/types/react-m.d.ts +1 -0
- package/types/react.d.ts +1 -0
- package/CHANGELOG.md +0 -378
- package/dist/animate.cjs.js +0 -22
- package/dist/animate.es.js +0 -19
- package/dist/main.cjs.js +0 -21
- package/dist/main.es.js +0 -3
- package/dist/motion.min.js +0 -1
- package/dist/motion.umd.js +0 -2364
- package/dist/size-index.js +0 -1
- package/lib/animate.js +0 -17
- package/lib/animate.js.map +0 -1
- package/types/animate.d.ts +0 -6
- package/types/animate.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
package/CHANGELOG.md
DELETED
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
Motion One adheres to [Semantic Versioning](http://semver.org/).
|
|
4
|
-
|
|
5
|
-
## [10.18.0] [2024-06-02]
|
|
6
|
-
|
|
7
|
-
### Updated
|
|
8
|
-
|
|
9
|
-
- Typescript to `5.4.0`.
|
|
10
|
-
|
|
11
|
-
## [10.17.1] [2024-06-01]
|
|
12
|
-
|
|
13
|
-
### Fixed
|
|
14
|
-
|
|
15
|
-
- Fixed type of `step-start` and `step-end` easing functions.
|
|
16
|
-
|
|
17
|
-
## [10.17.0] [2024-01-02]
|
|
18
|
-
|
|
19
|
-
### Added
|
|
20
|
-
|
|
21
|
-
- `autoplay`
|
|
22
|
-
- Improved tsdocs for `animate()`.
|
|
23
|
-
|
|
24
|
-
## [10.16.4] [2023-09-21]
|
|
25
|
-
|
|
26
|
-
### Added
|
|
27
|
-
|
|
28
|
-
- Better rest values for spring animations.
|
|
29
|
-
|
|
30
|
-
## [10.16.3] [2023-09-21]
|
|
31
|
-
|
|
32
|
-
### Added
|
|
33
|
-
|
|
34
|
-
- Fixed duplicated `currentTime` case.
|
|
35
|
-
|
|
36
|
-
## [10.16.2] [2023-05-16]
|
|
37
|
-
|
|
38
|
-
### Added
|
|
39
|
-
|
|
40
|
-
- Exporting more types including `GlideOptions` and `SpringOptions`.
|
|
41
|
-
|
|
42
|
-
## [10.16.1] [2023-05-16]
|
|
43
|
-
|
|
44
|
-
### Added
|
|
45
|
-
|
|
46
|
-
- Types for Vue `Motion` component.
|
|
47
|
-
|
|
48
|
-
## [10.16.0] [2023-03-23]
|
|
49
|
-
|
|
50
|
-
### Added
|
|
51
|
-
|
|
52
|
-
- `Presence` re-implemented using Solid primitives.
|
|
53
|
-
|
|
54
|
-
## [10.15.5] [2023-01-11]
|
|
55
|
-
|
|
56
|
-
### Added
|
|
57
|
-
|
|
58
|
-
- Adding checks for present `Element` and `keyframes`.
|
|
59
|
-
|
|
60
|
-
## [10.15.4] [2022-12-18]
|
|
61
|
-
|
|
62
|
-
### Fixed
|
|
63
|
-
|
|
64
|
-
- Updating `solid`.
|
|
65
|
-
|
|
66
|
-
## [10.15.3] [2022-12-06]
|
|
67
|
-
|
|
68
|
-
### Fixed
|
|
69
|
-
|
|
70
|
-
- Fixed `process` in UMD package.
|
|
71
|
-
|
|
72
|
-
## [10.15.2] [2022-12-06]
|
|
73
|
-
|
|
74
|
-
### Fixed
|
|
75
|
-
|
|
76
|
-
- Fixed imports in UMD package.
|
|
77
|
-
|
|
78
|
-
## [10.15.1] [2022-12-06]
|
|
79
|
-
|
|
80
|
-
### Added
|
|
81
|
-
|
|
82
|
-
- UMD package for `@motionone/dom`.
|
|
83
|
-
|
|
84
|
-
## [10.15.0] [2022-12-05]
|
|
85
|
-
|
|
86
|
-
### Fixed
|
|
87
|
-
|
|
88
|
-
- Add options `persist: true` to leave an animation running when complete.
|
|
89
|
-
|
|
90
|
-
## [10.14.3] [2022-10-31]
|
|
91
|
-
|
|
92
|
-
### Fixed
|
|
93
|
-
|
|
94
|
-
- Fixed type of argument for `createAnimate`.
|
|
95
|
-
|
|
96
|
-
## [10.14.2] [2022-09-07]
|
|
97
|
-
|
|
98
|
-
### Fixed
|
|
99
|
-
|
|
100
|
-
- Fixed exit animations in Solid 1.5.
|
|
101
|
-
|
|
102
|
-
## [10.14.1] [2022-08-23]
|
|
103
|
-
|
|
104
|
-
### Added
|
|
105
|
-
|
|
106
|
-
- `createAnimate` export for creating `animate()` without the `Animation` polyfill. This is not a public API.
|
|
107
|
-
|
|
108
|
-
## [10.14.0] [2022-08-17]
|
|
109
|
-
|
|
110
|
-
### Added
|
|
111
|
-
|
|
112
|
-
- Support for animating transforms as unit values.
|
|
113
|
-
|
|
114
|
-
## [10.13.3] [2022-08-12]
|
|
115
|
-
|
|
116
|
-
### Fixed
|
|
117
|
-
|
|
118
|
-
- Fixing `InViewOptions` within Motion One for Solid.
|
|
119
|
-
|
|
120
|
-
## [10.13.2] [2022-08-05]
|
|
121
|
-
|
|
122
|
-
### Fixed
|
|
123
|
-
|
|
124
|
-
- Making `BezierDefinition` `readonly`.
|
|
125
|
-
|
|
126
|
-
## [10.13.1] [2022-07-18]
|
|
127
|
-
|
|
128
|
-
### Added
|
|
129
|
-
|
|
130
|
-
- Keyframes and `timeline` now support custom easing functions.
|
|
131
|
-
|
|
132
|
-
## [10.13.0] [2022-07-18]
|
|
133
|
-
|
|
134
|
-
### Added
|
|
135
|
-
|
|
136
|
-
- `animate` now support custom easing functions.
|
|
137
|
-
|
|
138
|
-
### Removed
|
|
139
|
-
|
|
140
|
-
- `motion/react` entry point.
|
|
141
|
-
|
|
142
|
-
## [10.12.0] [2022-07-10]
|
|
143
|
-
|
|
144
|
-
### Added
|
|
145
|
-
|
|
146
|
-
- `scroll` function for tracking scroll events and powering scroll-driven animations.
|
|
147
|
-
|
|
148
|
-
### Fixed
|
|
149
|
-
|
|
150
|
-
- Fixing `play` -> `cancel` behaviour in Safari. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/102)
|
|
151
|
-
|
|
152
|
-
## [10.11.2] [2022-07-06]
|
|
153
|
-
|
|
154
|
-
### Removed
|
|
155
|
-
|
|
156
|
-
- Removing default `root` in `inView` as this [silently fails in iOS Safari 14-15](https://bugs.webkit.org/show_bug.cgi?id=224324).
|
|
157
|
-
|
|
158
|
-
## [10.11.1] [2022-07-06]
|
|
159
|
-
|
|
160
|
-
### Added
|
|
161
|
-
|
|
162
|
-
- In supported browsers, `inView` will use `document` as the default value for `root` to ensure `rootMargin` works within iframes.
|
|
163
|
-
|
|
164
|
-
## [10.11.0] [2022-06-24]
|
|
165
|
-
|
|
166
|
-
### Added
|
|
167
|
-
|
|
168
|
-
- `inView` function for detecting when elements enter and leave the viewport.
|
|
169
|
-
- Adding `view` options prop to Motion One for Vue and Solid.
|
|
170
|
-
|
|
171
|
-
## [10.10.2] [2022-06-24]
|
|
172
|
-
|
|
173
|
-
### Fixed
|
|
174
|
-
|
|
175
|
-
- Gracefully failing when no elements are found. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/95)
|
|
176
|
-
|
|
177
|
-
## [10.10.1] [2022-06-24]
|
|
178
|
-
|
|
179
|
-
### Fixed
|
|
180
|
-
|
|
181
|
-
- Fixed incorrect handling of `easing` string vs array in polyfill. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/96)
|
|
182
|
-
|
|
183
|
-
## [10.10.0] [2022-05-28]
|
|
184
|
-
|
|
185
|
-
### Added
|
|
186
|
-
|
|
187
|
-
- Added support for [timeline labels](https://motion.dev/dom/timeline#labels). These allow you to to reference parts of the timeline using a name rather than a timestamp.
|
|
188
|
-
|
|
189
|
-
## [10.9.0] [2022-05-23]
|
|
190
|
-
|
|
191
|
-
### Added
|
|
192
|
-
|
|
193
|
-
- Adding support for `playState` prop.
|
|
194
|
-
|
|
195
|
-
## [10.8.3] [2022-05-23]
|
|
196
|
-
|
|
197
|
-
### Fixed
|
|
198
|
-
|
|
199
|
-
- Fixing reflection of playback controls so unsupported props aren't executed as functions.
|
|
200
|
-
|
|
201
|
-
## [10.8.2] [2022-05-16]
|
|
202
|
-
|
|
203
|
-
### Fixed
|
|
204
|
-
|
|
205
|
-
- Exporting `@motionone/types` types via `motion`. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/78)
|
|
206
|
-
|
|
207
|
-
## [10.8.1] [2022-04-29]
|
|
208
|
-
|
|
209
|
-
### Fixed
|
|
210
|
-
|
|
211
|
-
- Fixing types for `stagger` `delay` option.
|
|
212
|
-
|
|
213
|
-
## [10.8.0] [2022-04-28]
|
|
214
|
-
|
|
215
|
-
### Added
|
|
216
|
-
|
|
217
|
-
- [Motion One for Solid](https://motion.dev/solid/quick-start).
|
|
218
|
-
|
|
219
|
-
### Fixed
|
|
220
|
-
|
|
221
|
-
- Remove `repeat` and `direction` from `timeline` segment options. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/67)
|
|
222
|
-
- Converting all transform values into numbers before forwarding to animation polyfill. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/68)
|
|
223
|
-
- Fixed `initial="false"` typechecking in Motion One for Vue.
|
|
224
|
-
|
|
225
|
-
## [10.7.2] [2022-04-16]
|
|
226
|
-
|
|
227
|
-
### Fixed
|
|
228
|
-
|
|
229
|
-
- Fixing forced read of initial keyframe when Motion DevTools is recording if keyframe is explicitly defined.
|
|
230
|
-
|
|
231
|
-
## [10.7.1] [2022-04-11]
|
|
232
|
-
|
|
233
|
-
### Fixed
|
|
234
|
-
|
|
235
|
-
- Fixed `stagger` calculations with easings.
|
|
236
|
-
|
|
237
|
-
## [10.7.0] [2022-03-20]
|
|
238
|
-
|
|
239
|
-
### Added
|
|
240
|
-
|
|
241
|
-
- Added support for Motion Developer Tools.
|
|
242
|
-
|
|
243
|
-
## [10.6.2] [2022-02-08]
|
|
244
|
-
|
|
245
|
-
### Fixed
|
|
246
|
-
|
|
247
|
-
- Fixed velocity calculations of critically and overdamped animations.
|
|
248
|
-
|
|
249
|
-
## [10.6.1] [2022-02-06]
|
|
250
|
-
|
|
251
|
-
### Fixed
|
|
252
|
-
|
|
253
|
-
- Fixed velocity transfer of interrupted generated animations. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/43)
|
|
254
|
-
|
|
255
|
-
## [10.6.0] [2022-01-22]
|
|
256
|
-
|
|
257
|
-
### Added
|
|
258
|
-
|
|
259
|
-
- Custom animations by passing function to `animate`.
|
|
260
|
-
|
|
261
|
-
## [10.5.2] [2022-01-16]
|
|
262
|
-
|
|
263
|
-
### Fixed
|
|
264
|
-
|
|
265
|
-
- Fixing types for `Presence`. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/44)
|
|
266
|
-
|
|
267
|
-
## [10.5.1] [2022-01-15]
|
|
268
|
-
|
|
269
|
-
### Fixed
|
|
270
|
-
|
|
271
|
-
- Fixing "default slot" warning in Vue `Presence` component. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/45)
|
|
272
|
-
|
|
273
|
-
## [10.5.0] [2022-01-01]
|
|
274
|
-
|
|
275
|
-
### Added
|
|
276
|
-
|
|
277
|
-
- **Motion One for Vue:** A fully declarative version of Motion One for Vue 3!
|
|
278
|
-
- `style` utility for getting/setting styles and CSS variables on DOM elements.
|
|
279
|
-
|
|
280
|
-
## [10.4.0] [2021-10-18]
|
|
281
|
-
|
|
282
|
-
### Added
|
|
283
|
-
|
|
284
|
-
- **Spring and glide in timeline:** `timeline` now supports animations with `ease: spring()` and `ease: glide()`.
|
|
285
|
-
|
|
286
|
-
## [10.3.2] [2021-10-18]
|
|
287
|
-
|
|
288
|
-
### Fixed
|
|
289
|
-
|
|
290
|
-
- Fixing animation interruption for independent transform animations in Safari and Firefox. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/27)
|
|
291
|
-
|
|
292
|
-
## [10.3.1] [2021-10-12]
|
|
293
|
-
|
|
294
|
-
### Fixed
|
|
295
|
-
|
|
296
|
-
- Fixing a bug in `stagger` and `animate`.
|
|
297
|
-
|
|
298
|
-
## [10.3.0] [2021-10-11]
|
|
299
|
-
|
|
300
|
-
### New
|
|
301
|
-
|
|
302
|
-
- **Glide:** Animate transforms with realistic [glide](https://motion.dev/dom/glide) that can be used to mimic momentum scroll.
|
|
303
|
-
|
|
304
|
-
### Fixed
|
|
305
|
-
|
|
306
|
-
- Fixing a bug where sometimes velocity wasn't being correctly passed to the next animation.
|
|
307
|
-
|
|
308
|
-
## [10.2.1] [2021-10-06]
|
|
309
|
-
|
|
310
|
-
### Fixed
|
|
311
|
-
|
|
312
|
-
- Ensuring `duration` is always passed correctly to the independent transform polyfill.
|
|
313
|
-
|
|
314
|
-
## [10.2.0] [2021-10-05]
|
|
315
|
-
|
|
316
|
-
### New
|
|
317
|
-
|
|
318
|
-
- **Springs:** Animate transforms with realistic [spring](https://motion.dev/dom/spring) simulations.
|
|
319
|
-
|
|
320
|
-
## [10.1.3] [2021-10-01]
|
|
321
|
-
|
|
322
|
-
### Fixed
|
|
323
|
-
|
|
324
|
-
- **Fill both for timelines:** Extends `fill: "both"` effect from `10.1.2` to `timeline`.
|
|
325
|
-
|
|
326
|
-
## [10.1.2] [2021-10-01]
|
|
327
|
-
|
|
328
|
-
### Fixed
|
|
329
|
-
|
|
330
|
-
- **Fill both:** Previously, if an animation had a delay and an initially-defined first keyframe (`opacity: [0, 1]`) the animation would start from its rendered style to that first keyframe. Now, the initial keyframe gets stretched to the very start of the whole animation by setting `fill: "both"`. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/20)
|
|
331
|
-
|
|
332
|
-
## [10.1.1] [2021-09-28]
|
|
333
|
-
|
|
334
|
-
### Fixed
|
|
335
|
-
|
|
336
|
-
- **Scrub to end:** Setting `currentTime` to `duration` was removing the animation effect. This has been fixed by setting `fill: "forwards"` on the WAAPI animation. This won't affect memory consumption as animations are flattened into styles and removed on finish. [Issue (sponsors only)](https://github.com/motiondivision/motionone/issues/21)
|
|
337
|
-
|
|
338
|
-
### Changed
|
|
339
|
-
|
|
340
|
-
- **Removed Popmotion dependency:** Reduced the number of dependencies by moving Popmotion utilities inside Motion One. Filesize remains unaffected in most environments but will be lower in Skypack and other distributors that don't support tree-shaking.
|
|
341
|
-
|
|
342
|
-
## [10.1.0] [2021-09-27]
|
|
343
|
-
|
|
344
|
-
### New
|
|
345
|
-
|
|
346
|
-
- **Duration:** The duration of timelines is usually automatically calculated from its defined animations. It can now be read from the new read-only `duration` prop on [animation controls](http://motion.dev/dom/controls).
|
|
347
|
-
|
|
348
|
-
### Changed
|
|
349
|
-
|
|
350
|
-
- **Performance:** Before Motion One starts a new animation, it stops the old one. Stopping an animation commits its styles, which can cause a style recalculation. Now, when an animation finishes, we delete the reference to the old animation. Additionally, we check the animation status isn't `"finished"` before committing styles within `stop`. This prevents unnecessary style recalculations.
|
|
351
|
-
|
|
352
|
-
## [10.0.3] [2021-09-25]
|
|
353
|
-
|
|
354
|
-
### Fixed
|
|
355
|
-
|
|
356
|
-
- Fixed formatting of changelog for website publication.
|
|
357
|
-
|
|
358
|
-
## [10.0.2] [2021-09-24]
|
|
359
|
-
|
|
360
|
-
### Changed
|
|
361
|
-
|
|
362
|
-
- Generating `finished` promise on-demand.
|
|
363
|
-
|
|
364
|
-
### Fixed
|
|
365
|
-
|
|
366
|
-
- Catching promise in `animate` and `timeline` to prevent errors whenever a sub-animation is cancelled.
|
|
367
|
-
|
|
368
|
-
## [10.0.1] [2021-09-22]
|
|
369
|
-
|
|
370
|
-
### Changed
|
|
371
|
-
|
|
372
|
-
- Removed links to repo from Readme.
|
|
373
|
-
|
|
374
|
-
## [10.0.0] [2021-09-12]
|
|
375
|
-
|
|
376
|
-
### New
|
|
377
|
-
|
|
378
|
-
- First publish
|
package/dist/animate.cjs.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dom = require('@motionone/dom');
|
|
4
|
-
var utils = require('@motionone/utils');
|
|
5
|
-
var animation = require('@motionone/animation');
|
|
6
|
-
|
|
7
|
-
function animateProgress(target, options = {}) {
|
|
8
|
-
return dom.withControls([
|
|
9
|
-
() => {
|
|
10
|
-
const animation$1 = new animation.Animation(target, [0, 1], options);
|
|
11
|
-
animation$1.finished.catch(() => { });
|
|
12
|
-
return animation$1;
|
|
13
|
-
},
|
|
14
|
-
], options, options.duration);
|
|
15
|
-
}
|
|
16
|
-
function animate(target, keyframesOrOptions, options) {
|
|
17
|
-
const factory = utils.isFunction(target) ? animateProgress : dom.animate;
|
|
18
|
-
return factory(target, keyframesOrOptions, options);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.animate = animate;
|
|
22
|
-
exports.animateProgress = animateProgress;
|
package/dist/animate.es.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { animate as animate$1, withControls } from '@motionone/dom';
|
|
2
|
-
import { isFunction } from '@motionone/utils';
|
|
3
|
-
import { Animation } from '@motionone/animation';
|
|
4
|
-
|
|
5
|
-
function animateProgress(target, options = {}) {
|
|
6
|
-
return withControls([
|
|
7
|
-
() => {
|
|
8
|
-
const animation = new Animation(target, [0, 1], options);
|
|
9
|
-
animation.finished.catch(() => { });
|
|
10
|
-
return animation;
|
|
11
|
-
},
|
|
12
|
-
], options, options.duration);
|
|
13
|
-
}
|
|
14
|
-
function animate(target, keyframesOrOptions, options) {
|
|
15
|
-
const factory = isFunction(target) ? animateProgress : animate$1;
|
|
16
|
-
return factory(target, keyframesOrOptions, options);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { animate, animateProgress };
|
package/dist/main.cjs.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var dom = require('@motionone/dom');
|
|
4
|
-
var types = require('@motionone/types');
|
|
5
|
-
var animate = require('./animate.cjs.js');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.animate = animate.animate;
|
|
10
|
-
Object.keys(dom).forEach(function (k) {
|
|
11
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return dom[k]; }
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
Object.keys(types).forEach(function (k) {
|
|
17
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return types[k]; }
|
|
20
|
-
});
|
|
21
|
-
});
|
package/dist/main.es.js
DELETED
package/dist/motion.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>Math.min(Math.max(n,t),e),r={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},o=t=>"number"==typeof t,s=t=>Array.isArray(t)&&!o(t[0]),a=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function c(t,e){return s(t)?t[a(0,t.length,e)]:t}const l=(t,e,n)=>-n*t+n*e+t,u=()=>{},f=t=>t,h=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function d(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=h(0,e,i);t.push(l(n,1,r))}}function p(t){const e=[0];return d(e,t-1),e}function g(t,e=p(t.length),n=f){const r=t.length,o=r-e.length;return o>0&&d(e,o),o=>{let s=0;for(;s<r-2&&!(o<e[s+1]);s++);let a=i(0,1,h(e[s],e[s+1],o));return a=c(n,s)(a),l(t[s],t[s+1],a)}}const m=t=>Array.isArray(t)&&o(t[0]),y=t=>"object"==typeof t&&Boolean(t.createAnimation),v=t=>"function"==typeof t,w=t=>"string"==typeof t,b={ms:t=>1e3*t,s:t=>t/1e3};function E(t,e){return e?t*(1e3/e):0}const x=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,O=1e-7,S=12;function M(t,e,n,i){if(t===e&&n===i)return f;const r=e=>function(t,e,n,i,r){let o,s,a=0;do{s=e+(n-e)/2,o=x(s,i,r)-t,o>0?n=s:e=s}while(Math.abs(o)>O&&++a<S);return s}(e,0,1,t,n);return t=>0===t||1===t?t:x(r(t),e,i)}const T=(t,e="end")=>n=>{const r=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(r):Math.ceil(r);return i(0,1,o/t)},A={ease:M(.25,.1,.25,1),"ease-in":M(.42,0,1,1),"ease-in-out":M(.42,0,.58,1),"ease-out":M(0,0,.58,1)},D=/\((.*?)\)/;function L(t){if(v(t))return t;if(m(t))return M(...t);const e=A[t];if(e)return e;if(t.startsWith("steps")){const e=D.exec(t);if(e){const t=e[1].split(",");return T(parseFloat(t[0]),t[1].trim())}}return f}class k{constructor(t,e=[0,1],{easing:n,duration:i=r.duration,delay:o=r.delay,endDelay:a=r.endDelay,repeat:c=r.repeat,offset:l,direction:u="normal",autoplay:h=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=f,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise(((t,e)=>{this.resolve=t,this.reject=e})),n=n||r.easing,y(n)){const t=n.createAnimation(e);n=t.easing,e=t.keyframes||e,i=t.duration||i}this.repeat=c,this.easing=s(n)?f:L(n),this.updateDuration(i);const d=g(e,l,s(n)?n.map(L):f);this.tick=e=>{var n;let i=0;i=void 0!==this.pauseTime?this.pauseTime:(e-this.startTime)*this.rate,this.t=i,i/=1e3,i=Math.max(i-o,0),"finished"===this.playState&&void 0===this.pauseTime&&(i=this.totalDuration);const r=i/this.duration;let s=Math.floor(r),c=r%1;!c&&r>=1&&(c=1),1===c&&s--;const l=s%2;("reverse"===u||"alternate"===u&&l||"alternate-reverse"===u&&!l)&&(c=1-c);const f=i>=this.totalDuration?1:Math.min(c,1),h=d(this.easing(f));t(h);void 0===this.pauseTime&&("finished"===this.playState||i>=this.totalDuration+a)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,h)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},h&&this.play()}play(){const t=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(t=this.reject)||void 0===t||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){void 0!==this.pauseTime||0===this.rate?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}var W=function(){};class j{setAnimation(t){this.animation=t,null==t||t.finished.then((()=>this.clearAnimation())).catch((()=>{}))}clearAnimation(){this.animation=this.generator=void 0}}const R=new WeakMap;function z(t){return R.has(t)||R.set(t,{transforms:[],values:new Map}),R.get(t)}const B=["","X","Y","Z"],P={x:"translateX",y:"translateY",z:"translateZ"},$={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},V={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:$,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:f},skew:$},q=new Map,C=t=>`--motion-${t}`,F=["x","y","z"];["translate","scale","rotate","skew"].forEach((t=>{B.forEach((e=>{F.push(t+e),q.set(C(t+e),V[t])}))}));const H=(t,e)=>F.indexOf(t)-F.indexOf(e),I=new Set(F),U=t=>I.has(t),N=(t,n)=>{P[n]&&(n=P[n]);const{transforms:i}=z(t);e(i,n),t.style.transform=_(i)},_=t=>t.sort(H).reduce(G,"").trim(),G=(t,e)=>`${t} ${e}(var(${C(e)}))`,Z=t=>t.startsWith("--"),K=new Set;const X=(t,e)=>document.createElement("div").animate(t,e),Y={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{X({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(X({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{X({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},J={},Q={};for(const t in Y)Q[t]=()=>(void 0===J[t]&&(J[t]=Y[t]()),J[t]);const tt=(t,e)=>v(t)?Q.linearEasing()?`linear(${((t,e)=>{let n="";const i=Math.round(e/.015);for(let e=0;e<i;e++)n+=t(h(0,i-1,e))+", ";return n.substring(0,n.length-2)})(t,e)})`:r.easing:m(t)?et(t):t,et=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;const nt=t=>Array.isArray(t)?t:[t];function it(t){return P[t]&&(t=P[t]),U(t)?C(t):t}const rt={get:(t,e)=>{e=it(e);let n=Z(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&0!==n){const t=q.get(e);t&&(n=t.initialValue)}return n},set:(t,e,n)=>{e=it(e),Z(e)?t.style.setProperty(e,n):t.style[e]=n}};function ot(t,e=!0){if(t&&"finished"!==t.playState)try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(t){}}function st(t,e){var n;let i=(null==e?void 0:e.toDefaultUnit)||f;const r=t[t.length-1];if(w(r)){const t=(null===(n=r.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";t&&(i=e=>e+t)}return i}function at(t,e,n,i={},a){const c=window.__MOTION_DEV_TOOLS_RECORD,l=!1!==i.record&&c;let f,{duration:h=r.duration,delay:d=r.delay,endDelay:p=r.endDelay,repeat:g=r.repeat,easing:m=r.easing,persist:w=!1,direction:E,offset:x,allowWebkitAcceleration:O=!1,autoplay:S=!0}=i;const M=z(t),T=U(e);let A=Q.waapi();T&&N(t,e);const D=it(e),L=function(t,e){return t.has(e)||t.set(e,new j),t.get(e)}(M.values,D),k=q.get(D);return ot(L.animation,!(y(m)&&L.generator)&&!1!==i.record),()=>{const r=()=>{var e,n;return null!==(n=null!==(e=rt.get(t,D))&&void 0!==e?e:null==k?void 0:k.initialValue)&&void 0!==n?n:0};let M=function(t,e){for(let n=0;n<t.length;n++)null===t[n]&&(t[n]=n?t[n-1]:e());return t}(nt(n),r);const W=st(M,k);if(y(m)){const t=m.createAnimation(M,"opacity"!==e,r,D,L);m=t.easing,M=t.keyframes||M,h=t.duration||h}if(Z(D)&&(Q.cssRegisterProperty()?function(t){if(!K.has(t)){K.add(t);try{const{syntax:e,initialValue:n}=q.has(t)?q.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch(t){}}}(D):A=!1),T&&!Q.linearEasing()&&(v(m)||s(m)&&m.some(v))&&(A=!1),A){k&&(M=M.map((t=>o(t)?k.toDefaultUnit(t):t))),1!==M.length||Q.partialKeyframes()&&!l||M.unshift(r());const e={delay:b.ms(d),duration:b.ms(h),endDelay:b.ms(p),easing:s(m)?void 0:tt(m,h),direction:E,iterations:g+1,fill:"both"};f=t.animate({[D]:M,offset:x,easing:s(m)?m.map((t=>tt(t,h))):void 0},e),f.finished||(f.finished=new Promise(((t,e)=>{f.onfinish=t,f.oncancel=e})));const n=M[M.length-1];f.finished.then((()=>{w||(rt.set(t,D,n),f.cancel())})).catch(u),O||(f.playbackRate=1.000001)}else if(a&&T)M=M.map((t=>"string"==typeof t?parseFloat(t):t)),1===M.length&&M.unshift(parseFloat(r())),f=new a((e=>{rt.set(t,D,W?W(e):e)}),M,Object.assign(Object.assign({},i),{duration:h,easing:m}));else{const e=M[M.length-1];rt.set(t,D,k&&o(e)?k.toDefaultUnit(e):e)}return l&&c(t,e,M,{duration:h,delay:d,easing:m,repeat:g,offset:x},"motion-one"),L.setAnimation(f),f&&!S&&f.pause(),f}}const ct=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function lt(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const ut=t=>t(),ft=(t,e,n=r.duration)=>new Proxy({animations:t.map(ut).filter(Boolean),duration:n,options:e},ht),ht={get:(t,e)=>{const n=t.animations[0];switch(e){case"duration":return t.duration;case"currentTime":return b.s((null==n?void 0:n[e])||0);case"playbackRate":case"playState":return null==n?void 0:n[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(dt)).catch(u)),t.finished;case"stop":return()=>{t.animations.forEach((t=>ot(t)))};case"forEachNative":return e=>{t.animations.forEach((n=>e(n,t)))};default:return void 0===(null==n?void 0:n[e])?void 0:()=>t.animations.forEach((t=>t[e]()))}},set:(t,e,n)=>{switch(e){case"currentTime":n=b.ms(n);case"playbackRate":for(let i=0;i<t.animations.length;i++)t.animations[i][e]=n;return!0}return!1}},dt=t=>t.finished;function pt(t,e,n){return v(t)?t(e,n):t}function gt(t){return function(e,n,i={}){const r=(e=lt(e)).length,o=[];for(let s=0;s<r;s++){const a=e[s];for(const e in n){const c=ct(i,e);c.delay=pt(c.delay,s,r);const l=at(a,e,n[e],c,t);o.push(l)}}return ft(o,i,i.duration)}}const mt=gt(k);function yt(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function vt(t,e,n,i){var r;return o(e)?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(r=i.get(e))&&void 0!==r?r:t}function wt(t,e,i,r,o,s){!function(t,e,i){for(let r=0;r<t.length;r++){const o=t[r];o.at>e&&o.at<i&&(n(t,o),r--)}}(t,o,s);for(let n=0;n<e.length;n++)t.push({value:e[n],at:l(o,s,r[n]),easing:c(i,n)})}function bt(t,e){return t.at===e.at?null===t.value?1:-1:t.at-e.at}function Et(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function xt(t,e){return e[t]||(e[t]=[]),e[t]}"function"==typeof SuppressedError&&SuppressedError;const Ot=5;function St(t,e,n){const i=Math.max(e-Ot,0);return E(n-t(i),e-i)}const Mt=100,Tt=10,At=1;const Dt=({stiffness:t=Mt,damping:e=Tt,mass:n=At,from:i=0,to:r=1,velocity:o=0,restSpeed:s,restDistance:a}={})=>{o=o?b.s(o):0;const c={done:!1,hasReachedTarget:!1,current:i,target:r},l=r-i,u=Math.sqrt(t/n)/1e3,f=((t=Mt,e=Tt,n=At)=>e/(2*Math.sqrt(t*n)))(t,e,n),h=Math.abs(l)<5;let d;if(s||(s=h?.01:2),a||(a=h?.005:.5),f<1){const t=u*Math.sqrt(1-f*f);d=e=>r-Math.exp(-f*u*e)*((f*u*l-o)/t*Math.sin(t*e)+l*Math.cos(t*e))}else d=t=>r-Math.exp(-u*t)*(l+(u*l-o)*t);return t=>{c.current=d(t);const e=0===t?o:St(d,t,c.current),n=Math.abs(e)<=s,l=Math.abs(r-c.current)<=a;var u,f,h;return c.done=n&&l,c.hasReachedTarget=(u=i,f=r,h=c.current,u<f&&h>=f||u>f&&h<=f),c}},Lt=10,kt=1e4;function Wt(t){return o(t)&&!isNaN(t)}function jt(t){return w(t)?parseFloat(t):t}function Rt(t){const e=new WeakMap;return(n={})=>{const i=new Map,r=(e=0,r=100,o=0,s=!1)=>{const a=`${e}-${r}-${o}-${s}`;return i.has(a)||i.set(a,t(Object.assign({from:e,to:r,velocity:o},n))),i.get(a)},o=(t,n)=>(e.has(t)||e.set(t,function(t,e=f){let n,i=Lt,r=t(0);const o=[e(r.current)];for(;!r.done&&i<kt;)r=t(i),o.push(e(r.done?r.target:r.current)),void 0===n&&r.hasReachedTarget&&(n=i),i+=Lt;const s=i-Lt;return 1===o.length&&o.push(r.current),{keyframes:o,duration:s/1e3,overshootDuration:(null!=n?n:s)/1e3}}(t,n)),e.get(t));return{createAnimation:(t,e=!0,n,i,s)=>{let a,c,l,u=0,h=f;const d=t.length;if(e){h=st(t,i?q.get(it(i)):void 0);if(l=jt(t[d-1]),d>1&&null!==t[0])c=jt(t[0]);else{const t=null==s?void 0:s.generator;if(t){const{animation:e,generatorStartTime:n}=s,i=(null==e?void 0:e.startTime)||n||0,r=(null==e?void 0:e.currentTime)||performance.now()-i,o=t(r).current;c=o,u=St((e=>t(e).current),r,o)}else n&&(c=jt(n()))}}if(Wt(c)&&Wt(l)){const t=r(c,l,u,null==i?void 0:i.includes("scale"));a=Object.assign(Object.assign({},o(t,h)),{easing:"linear"}),s&&(s.generator=t,s.generatorStartTime=performance.now())}if(!a){a={easing:"ease",duration:o(r(0,100)).overshootDuration}}return a}}}}const zt=Rt(Dt),Bt=Rt((({from:t=0,velocity:e=0,power:n=.8,decay:i=.325,bounceDamping:r,bounceStiffness:o,changeTarget:s,min:a,max:c,restDistance:l=.5,restSpeed:u})=>{i=b.ms(i);const f={hasReachedTarget:!1,done:!1,current:t,target:t},h=t=>void 0===a?c:void 0===c||Math.abs(a-t)<Math.abs(c-t)?a:c;let d=n*e;const p=t+d,g=void 0===s?p:s(p);f.target=g,g!==p&&(d=g-t);const m=t=>-d*Math.exp(-t/i),y=t=>g+m(t),v=t=>{const e=m(t),n=y(t);f.done=Math.abs(e)<=l,f.current=f.done?g:n};let w,E;const x=t=>{var e;(e=f.current,void 0!==a&&e<a||void 0!==c&&e>c)&&(w=t,E=Dt({from:f.current,to:h(f.current),velocity:St(y,t,f.current),damping:r,stiffness:o,restDistance:l,restSpeed:u}))};return x(0),t=>{let e=!1;return E||void 0!==w||(e=!0,v(t),x(t)),void 0!==w&&t>w?(f.hasReachedTarget=!0,E(t-w)):(f.hasReachedTarget=!1,!e&&v(t),f)}})),Pt={any:0,all:1};function $t(t,e,{root:n,margin:i,amount:r="any"}={}){if("undefined"==typeof IntersectionObserver)return()=>{};const o=lt(t),s=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=s.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);v(n)?s.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),s.delete(t.target))}))}),{root:n,rootMargin:i,threshold:"number"==typeof r?r:Pt[r]});return o.forEach((t=>a.observe(t))),()=>a.disconnect()}const Vt=new WeakMap;let qt;function Ct({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Vt.get(t))||void 0===i||i.forEach((i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})}))}function Ft(t){t.forEach(Ct)}function Ht(t,e){qt||"undefined"!=typeof ResizeObserver&&(qt=new ResizeObserver(Ft));const n=lt(t);return n.forEach((t=>{let n=Vt.get(t);n||(n=new Set,Vt.set(t,n)),n.add(e),null==qt||qt.observe(t)})),()=>{n.forEach((t=>{const n=Vt.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==qt||qt.unobserve(t)}))}}const It=new Set;let Ut;function Nt(t){return It.add(t),Ut||(Ut=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};It.forEach((t=>t(e)))},window.addEventListener("resize",Ut)),()=>{It.delete(t),!It.size&&Ut&&(Ut=void 0)}}function _t(t,e){return v(t)?Nt(t):Ht(t,e)}const Gt=50,Zt={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Kt(t,e,n,i){const r=n[e],{length:o,position:s}=Zt[e],a=r.current,c=n.time;r.current=t[`scroll${s}`],r.scrollLength=t[`scroll${o}`]-t[`client${o}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=h(0,r.scrollLength,r.current);const l=i-c;r.velocity=l>Gt?0:E(r.current-a,l)}const Xt={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Yt={start:0,center:.5,end:1};function Jt(t,e,n=0){let i=0;if(void 0!==Yt[t]&&(t=Yt[t]),w(t)){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return o(t)&&(i=e*t),n+i}const Qt=[0,0];function te(t,e,n,i){let r=Array.isArray(t)?t:Qt,s=0,a=0;return o(t)?r=[t,t]:w(t)&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Yt[t]?t:"0"]),s=Jt(r[0],n,i),a=Jt(r[1],e),s-a}const ee={x:0,y:0};function ne(t,e,n){let{offset:i=Xt.All}=n;const{target:r=t,axis:o="y"}=n,s="y"===o?"height":"width",a=r!==t?function(t,e){let n={x:0,y:0},i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if(i instanceof SVGGraphicsElement&&"getBBox"in i){const{top:t,left:e}=i.getBBox();for(n.x+=e,n.y+=t;i&&"svg"!==i.tagName;)i=i.parentNode}return n}(r,t):ee,c=r===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:r.clientWidth,height:r.clientHeight},l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const f=i.length;for(let t=0;t<f;t++){const n=te(i[t],l[s],c[s],a[o]);u||n===e[o].interpolatorOffsets[t]||(u=!0),e[o].offset[t]=n}u&&(e[o].interpolate=g(p(f),e[o].offset),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function ie(t,e,n,i={}){const r=i.axis||"y";return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!=t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){Kt(t,"x",e,n),Kt(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&ne(t,n,i)},notify:v(e)?()=>e(n):re(e,n[r])}}function re(t,e){return t.pause(),t.forEachNative(((t,{easing:e})=>{var n,i;if(t.updateDuration)e||(t.easing=f),t.updateDuration(1);else{const r={duration:1e3};e||(r.easing="linear"),null===(i=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===i||i.call(n,r)}})),()=>{t.currentTime=e.progress}}const oe=new WeakMap,se=new WeakMap,ae=new WeakMap,ce=t=>t===document.documentElement?window:t;function le(t,e){return function(t){return"object"==typeof t}(t)?t:t&&e?e[t]:void 0}let ue;function fe(){if(!ue)return;const t=ue.sort(de).map(pe);t.forEach(ge),t.forEach(ge),ue=void 0}function he(t){ue?e(ue,t):(ue=[t],requestAnimationFrame(fe))}const de=(t,e)=>t.getDepth()-e.getDepth(),pe=t=>t.animateUpdates(),ge=t=>t.next(),me=(t,e)=>new CustomEvent(t,{detail:{target:e}});function ye(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:n}}))}function ve(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:n}}))}const we=(t,e,n)=>i=>{i.pointerType&&"mouse"!==i.pointerType||(n(),ye(t,e,i))},be={inView:{isActive:t=>Boolean(t.inView),subscribe:(t,{enable:e,disable:n},{inViewOptions:i={}})=>{const{once:r}=i,o=yt(i,["once"]);return $t(t,(i=>{if(e(),ve(t,"viewenter",i),!r)return e=>{n(),ve(t,"viewleave",e)}}),o)}},hover:{isActive:t=>Boolean(t.hover),subscribe:(t,{enable:e,disable:n})=>{const i=we(t,"hoverstart",e),r=we(t,"hoverend",n);return t.addEventListener("pointerenter",i),t.addEventListener("pointerleave",r),()=>{t.removeEventListener("pointerenter",i),t.removeEventListener("pointerleave",r)}}},press:{isActive:t=>Boolean(t.press),subscribe:(t,{enable:e,disable:n})=>{const i=e=>{n(),ye(t,"pressend",e),window.removeEventListener("pointerup",i)},r=n=>{e(),ye(t,"pressstart",n),window.addEventListener("pointerup",i)};return t.addEventListener("pointerdown",r),()=>{t.removeEventListener("pointerdown",r),window.removeEventListener("pointerup",i)}}}},Ee=["initial","animate",...Object.keys(be),"exit"],xe=new WeakMap;function Oe(t){const e={},n=[];for(let i in t){const r=t[i];U(i)&&(P[i]&&(i=P[i]),n.push(i),i=C(i));let s=Array.isArray(r)?r[0]:r;const a=q.get(i);a&&(s=o(r)?a.toDefaultUnit(r):r),e[i]=s}return n.length&&(e.transform=_(n)),e}const Se=t=>`-${t.toLowerCase()}`;function Me(t,e={}){return ft([()=>{const n=new k(t,[0,1],e);return n.finished.catch((()=>{})),n}],e,e.duration)}t.MotionValue=j,t.ScrollOffset=Xt,t.animate=function(t,e,n){return(v(t)?Me:mt)(t,e,n)},t.animateStyle=at,t.createAnimate=gt,t.createMotionState=function(t={},e){let i,r=e?e.getDepth()+1:0;const o={initial:!0,animate:!0},s={},a={};for(const n of Ee)a[n]="string"==typeof t[n]?t[n]:null==e?void 0:e.getContext()[n];const c=!1===t.initial?"animate":"initial";let l=yt(le(t[c]||a[c],t.variants)||{},["transition"]);const f=Object.assign({},l),h=(t,e)=>()=>{o[t]=e,he(p)},d=()=>{for(const e in be){const n=be[e].isActive(t),r=s[e];n&&!r?s[e]=be[e].subscribe(i,{enable:h(e,!0),disable:h(e,!1)},t):!n&&r&&(r(),delete s[e])}},p={update:e=>{i&&(t=e,d(),he(p))},setActive:(t,e)=>{i&&(o[t]=e,he(p))},animateUpdates:function*(){var e,n;const r=l;l={};const s={};for(const i of Ee){if(!o[i])continue;const r=le(t[i]);if(r)for(const i in r)"transition"!==i&&(l[i]=r[i],s[i]=ct(null!==(n=null!==(e=r.transition)&&void 0!==e?e:t.transition)&&void 0!==n?n:{},i))}const a=new Set([...Object.keys(l),...Object.keys(r)]),c=[];a.forEach((t=>{var e,n,o;void 0===l[t]&&(l[t]=f[t]),n=r[t],o=l[t],typeof n==typeof o&&(Array.isArray(n)&&Array.isArray(o)?function(t,e){const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}(n,o):n===o)||(null!==(e=f[t])&&void 0!==e||(f[t]=rt.get(i,t)),c.push(at(i,t,l[t],s[t],k)))})),yield;const h=c.map((t=>t())).filter(Boolean);if(!h.length)return;const d=l;i.dispatchEvent(me("motionstart",d)),Promise.all(h.map((t=>t.finished))).then((()=>{i.dispatchEvent(me("motioncomplete",d))})).catch(u)},getDepth:()=>r,getTarget:()=>l,getOptions:()=>t,getContext:()=>a,mount:t=>(i=t,xe.set(i,p),d(),()=>{xe.delete(i),function(t){ue&&n(ue,t)}(p);for(const t in s)s[t]()}),isMounted:()=>Boolean(i)};return p},t.createStyleString=function(t={}){const e=Oe(t);let n="";for(const t in e)n+=t.startsWith("--")?t:t.replace(/[A-Z]/g,Se),n+=`: ${e[t]}; `;return n},t.createStyles=Oe,t.getAnimationData=z,t.getStyleName=it,t.glide=Bt,t.inView=$t,t.mountedStates=xe,t.resize=_t,t.scroll=function(t,e={}){var{container:n=document.documentElement}=e,i=yt(e,["container"]);let r=ae.get(n);r||(r=new Set,ae.set(n,r));const o=ie(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(r.add(o),!oe.has(n)){const t=()=>{const t=performance.now();for(const t of r)t.measure();for(const e of r)e.update(t);for(const t of r)t.notify()};oe.set(n,t);const e=ce(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&se.set(n,_t(n,t)),e.addEventListener("scroll",t,{passive:!0})}const s=oe.get(n),a=requestAnimationFrame(s);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(a);const i=ae.get(n);if(!i)return;if(i.delete(o),i.size)return;const r=oe.get(n);oe.delete(n),r&&(ce(n).removeEventListener("scroll",r),null===(e=se.get(n))||void 0===e||e(),window.removeEventListener("resize",r))}},t.spring=zt,t.stagger=function(t=.1,{start:e=0,from:n=0,easing:i}={}){return(r,s)=>{const a=o(n)?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,s),c=Math.abs(a-r);let l=t*c;if(i){const e=s*t;l=L(i)(l/e)*e}return e+l}},t.style=rt,t.timeline=function(t,e={}){var n;const i=function(t,e={}){var{defaultOptions:n={}}=e,i=yt(e,["defaultOptions"]);const o=[],s=new Map,a={},c=new Map;let l=0,u=0,f=0;for(let e=0;e<t.length;e++){const i=t[e];if(w(i)){c.set(i,u);continue}if(!Array.isArray(i)){c.set(i.name,vt(u,i.at,l,c));continue}const[o,h,g={}]=i;void 0!==g.at&&(u=vt(u,g.at,l,c));let m=0;const v=lt(o,a),b=v.length;for(let t=0;t<b;t++){const e=Et(v[t],s);for(const i in h){const o=xt(i,e);let s=nt(h[i]);const a=ct(g,i);let{duration:c=n.duration||r.duration,easing:l=n.easing||r.easing}=a;if(y(l)){W("opacity"===i||s.length>1);const t=l.createAnimation(s,"opacity"!==i,(()=>0),i);l=t.easing,s=t.keyframes||s,c=t.duration||c}const v=pt(g.delay,t,b)||0,w=u+v,E=w+c;let{offset:x=p(s.length)}=a;1===x.length&&0===x[0]&&(x[1]=1);const O=x.length-s.length;O>0&&d(x,O),1===s.length&&s.unshift(null),wt(o,s,l,x,w,E),m=Math.max(v+c,m),f=Math.max(E,f)}}l=u,u+=m}return s.forEach(((t,e)=>{for(const s in t){const a=t[s];a.sort(bt);const c=[],l=[],u=[];for(let t=0;t<a.length;t++){const{at:e,value:n,easing:i}=a[t];c.push(n),l.push(h(0,f,e)),u.push(i||r.easing)}0!==l[0]&&(l.unshift(0),c.unshift(c[0]),u.unshift("linear")),1!==l[l.length-1]&&(l.push(1),c.push(null)),o.push([e,s,c,Object.assign(Object.assign(Object.assign({},n),{duration:f,easing:u,offset:l}),i)])}})),o}(t,e),o=i.map((t=>at(...t,k))).filter(Boolean);return ft(o,e,null===(n=i[0])||void 0===n?void 0:n[3].duration)},t.withControls=ft}));
|