motion 12.18.0 → 12.18.2
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/mini.js +7 -1063
- package/dist/es/debug.mjs +1 -0
- package/dist/es/index.mjs +1 -0
- package/dist/es/mini.mjs +1 -0
- package/dist/es/react-client.mjs +2 -0
- package/dist/es/react-m.mjs +2 -0
- package/dist/es/react-mini.mjs +2 -0
- package/dist/es/react.mjs +2 -0
- package/dist/motion.js +1 -1
- package/mini/package.json +1 -1
- package/package.json +11 -11
- package/react/package.json +1 -1
- package/react-client/package.json +1 -1
- package/react-m/package.json +1 -1
- package/dist/es/framer-motion/dist/es/animation/animate/index.mjs +0 -34
- package/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +0 -19
- package/dist/es/framer-motion/dist/es/animation/animate/sequence.mjs +0 -14
- package/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs +0 -11
- package/dist/es/framer-motion/dist/es/animation/animate/subject.mjs +0 -52
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +0 -112
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs +0 -13
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +0 -12
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -12
- package/dist/es/framer-motion/dist/es/animation/hooks/animation-controls.mjs +0 -80
- package/dist/es/framer-motion/dist/es/animation/hooks/use-animate-style.mjs +0 -17
- package/dist/es/framer-motion/dist/es/animation/hooks/use-animate.mjs +0 -17
- package/dist/es/framer-motion/dist/es/animation/hooks/use-animated-state.mjs +0 -64
- package/dist/es/framer-motion/dist/es/animation/hooks/use-animation.mjs +0 -41
- package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +0 -102
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +0 -85
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs +0 -65
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element.mjs +0 -26
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -6
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -7
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/handoff.mjs +0 -38
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/start.mjs +0 -171
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +0 -8
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/store.mjs +0 -4
- package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +0 -256
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -5
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -23
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -31
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -13
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -14
- package/dist/es/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -45
- package/dist/es/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -40
- package/dist/es/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -7
- package/dist/es/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -5
- package/dist/es/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -5
- package/dist/es/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -10
- package/dist/es/framer-motion/dist/es/animation/utils/stagger.mjs +0 -26
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs +0 -87
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs +0 -64
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/index.mjs +0 -166
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/use-presence-data.mjs +0 -9
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +0 -70
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/utils.mjs +0 -14
- package/dist/es/framer-motion/dist/es/components/AnimateSharedLayout.mjs +0 -15
- package/dist/es/framer-motion/dist/es/components/LayoutGroup/index.mjs +0 -32
- package/dist/es/framer-motion/dist/es/components/LazyMotion/index.mjs +0 -68
- package/dist/es/framer-motion/dist/es/components/MotionConfig/index.mjs +0 -48
- package/dist/es/framer-motion/dist/es/components/Reorder/Group.mjs +0 -53
- package/dist/es/framer-motion/dist/es/components/Reorder/Item.mjs +0 -34
- package/dist/es/framer-motion/dist/es/components/Reorder/namespace.mjs +0 -2
- package/dist/es/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs +0 -24
- package/dist/es/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs +0 -10
- package/dist/es/framer-motion/dist/es/context/LayoutGroupContext.mjs +0 -6
- package/dist/es/framer-motion/dist/es/context/LazyContext.mjs +0 -6
- package/dist/es/framer-motion/dist/es/context/MotionConfigContext.mjs +0 -13
- package/dist/es/framer-motion/dist/es/context/MotionContext/create.mjs +0 -13
- package/dist/es/framer-motion/dist/es/context/MotionContext/index.mjs +0 -6
- package/dist/es/framer-motion/dist/es/context/MotionContext/utils.mjs +0 -17
- package/dist/es/framer-motion/dist/es/context/PresenceContext.mjs +0 -10
- package/dist/es/framer-motion/dist/es/context/ReorderContext.mjs +0 -6
- package/dist/es/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs +0 -9
- package/dist/es/framer-motion/dist/es/events/add-dom-event.mjs +0 -6
- package/dist/es/framer-motion/dist/es/events/add-pointer-event.mjs +0 -8
- package/dist/es/framer-motion/dist/es/events/event-info.mjs +0 -15
- package/dist/es/framer-motion/dist/es/events/use-dom-event.mjs +0 -34
- package/dist/es/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +0 -479
- package/dist/es/framer-motion/dist/es/gestures/drag/index.mjs +0 -27
- package/dist/es/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs +0 -88
- package/dist/es/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +0 -129
- package/dist/es/framer-motion/dist/es/gestures/focus.mjs +0 -41
- package/dist/es/framer-motion/dist/es/gestures/hover.mjs +0 -30
- package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +0 -156
- package/dist/es/framer-motion/dist/es/gestures/pan/index.mjs +0 -50
- package/dist/es/framer-motion/dist/es/gestures/press.mjs +0 -33
- package/dist/es/framer-motion/dist/es/motion/features/Feature.mjs +0 -9
- package/dist/es/framer-motion/dist/es/motion/features/animation/exit.mjs +0 -36
- package/dist/es/framer-motion/dist/es/motion/features/animation/index.mjs +0 -40
- package/dist/es/framer-motion/dist/es/motion/features/animations.mjs +0 -13
- package/dist/es/framer-motion/dist/es/motion/features/definitions.mjs +0 -28
- package/dist/es/framer-motion/dist/es/motion/features/drag.mjs +0 -17
- package/dist/es/framer-motion/dist/es/motion/features/gestures.mjs +0 -21
- package/dist/es/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +0 -135
- package/dist/es/framer-motion/dist/es/motion/features/layout.mjs +0 -11
- package/dist/es/framer-motion/dist/es/motion/features/load-features.mjs +0 -12
- package/dist/es/framer-motion/dist/es/motion/features/viewport/index.mjs +0 -72
- package/dist/es/framer-motion/dist/es/motion/features/viewport/observers.mjs +0 -49
- package/dist/es/framer-motion/dist/es/motion/index.mjs +0 -101
- package/dist/es/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -11
- package/dist/es/framer-motion/dist/es/motion/utils/is-motion-component.mjs +0 -12
- package/dist/es/framer-motion/dist/es/motion/utils/symbol.mjs +0 -3
- package/dist/es/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs +0 -17
- package/dist/es/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +0 -38
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-element.mjs +0 -133
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-state.mjs +0 -79
- package/dist/es/framer-motion/dist/es/motion/utils/valid-prop.mjs +0 -57
- package/dist/es/framer-motion/dist/es/projection/animation/mix-values.mjs +0 -91
- package/dist/es/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -33
- package/dist/es/framer-motion/dist/es/projection/geometry/copy.mjs +0 -31
- package/dist/es/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -119
- package/dist/es/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -52
- package/dist/es/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -54
- package/dist/es/framer-motion/dist/es/projection/geometry/models.mjs +0 -17
- package/dist/es/framer-motion/dist/es/projection/geometry/utils.mjs +0 -31
- package/dist/es/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -13
- package/dist/es/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -27
- package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +0 -1605
- package/dist/es/framer-motion/dist/es/projection/node/group.mjs +0 -24
- package/dist/es/framer-motion/dist/es/projection/node/state.mjs +0 -19
- package/dist/es/framer-motion/dist/es/projection/shared/stack.mjs +0 -112
- package/dist/es/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -41
- package/dist/es/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -35
- package/dist/es/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -13
- package/dist/es/framer-motion/dist/es/projection/styles/transform.mjs +0 -49
- package/dist/es/framer-motion/dist/es/projection/use-instant-layout-transition.mjs +0 -14
- package/dist/es/framer-motion/dist/es/projection/use-reset-projection.mjs +0 -14
- package/dist/es/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -5
- package/dist/es/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -26
- package/dist/es/framer-motion/dist/es/projection/utils/measure.mjs +0 -17
- package/dist/es/framer-motion/dist/es/render/VisualElement.mjs +0 -478
- package/dist/es/framer-motion/dist/es/render/components/create-factory.mjs +0 -23
- package/dist/es/framer-motion/dist/es/render/components/create-proxy.mjs +0 -38
- package/dist/es/framer-motion/dist/es/render/components/m/create.mjs +0 -6
- package/dist/es/framer-motion/dist/es/render/components/m/elements.mjs +0 -227
- package/dist/es/framer-motion/dist/es/render/components/m/proxy.mjs +0 -6
- package/dist/es/framer-motion/dist/es/render/components/motion/create.mjs +0 -15
- package/dist/es/framer-motion/dist/es/render/components/motion/elements.mjs +0 -194
- package/dist/es/framer-motion/dist/es/render/components/motion/proxy.mjs +0 -6
- package/dist/es/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +0 -43
- package/dist/es/framer-motion/dist/es/render/dom/create-visual-element.mjs +0 -14
- package/dist/es/framer-motion/dist/es/render/dom/features-animation.mjs +0 -14
- package/dist/es/framer-motion/dist/es/render/dom/features-max.mjs +0 -14
- package/dist/es/framer-motion/dist/es/render/dom/features-min.mjs +0 -12
- package/dist/es/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs +0 -17
- package/dist/es/framer-motion/dist/es/render/dom/scroll/attach-function.mjs +0 -23
- package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +0 -14
- package/dist/es/framer-motion/dist/es/render/dom/scroll/info.mjs +0 -56
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -45
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -60
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -47
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -35
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -20
- package/dist/es/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -48
- package/dist/es/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -81
- package/dist/es/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs +0 -30
- package/dist/es/framer-motion/dist/es/render/dom/use-render.mjs +0 -33
- package/dist/es/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -6
- package/dist/es/framer-motion/dist/es/render/dom/utils/filter-props.mjs +0 -59
- package/dist/es/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs +0 -30
- package/dist/es/framer-motion/dist/es/render/dom/viewport/index.mjs +0 -43
- package/dist/es/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -44
- package/dist/es/framer-motion/dist/es/render/html/config-motion.mjs +0 -12
- package/dist/es/framer-motion/dist/es/render/html/use-props.mjs +0 -57
- package/dist/es/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -65
- package/dist/es/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -62
- package/dist/es/framer-motion/dist/es/render/html/utils/create-render-state.mjs +0 -8
- package/dist/es/framer-motion/dist/es/render/html/utils/render.mjs +0 -9
- package/dist/es/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -19
- package/dist/es/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -41
- package/dist/es/framer-motion/dist/es/render/store.mjs +0 -3
- package/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +0 -45
- package/dist/es/framer-motion/dist/es/render/svg/config-motion.mjs +0 -12
- package/dist/es/framer-motion/dist/es/render/svg/lowercase-elements.mjs +0 -33
- package/dist/es/framer-motion/dist/es/render/svg/use-props.mjs +0 -24
- package/dist/es/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +0 -57
- package/dist/es/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -30
- package/dist/es/framer-motion/dist/es/render/svg/utils/create-render-state.mjs +0 -8
- package/dist/es/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -3
- package/dist/es/framer-motion/dist/es/render/svg/utils/path.mjs +0 -32
- package/dist/es/framer-motion/dist/es/render/svg/utils/render.mjs +0 -12
- package/dist/es/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -19
- package/dist/es/framer-motion/dist/es/render/utils/animation-state.mjs +0 -342
- package/dist/es/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -3
- package/dist/es/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -24
- package/dist/es/framer-motion/dist/es/render/utils/get-variant-context.mjs +0 -28
- package/dist/es/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -13
- package/dist/es/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -8
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +0 -51
- package/dist/es/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -8
- package/dist/es/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -36
- package/dist/es/framer-motion/dist/es/render/utils/setters.mjs +0 -31
- package/dist/es/framer-motion/dist/es/render/utils/variant-props.mjs +0 -12
- package/dist/es/framer-motion/dist/es/utils/delay.mjs +0 -24
- package/dist/es/framer-motion/dist/es/utils/distance.mjs +0 -9
- package/dist/es/framer-motion/dist/es/utils/get-context-window.mjs +0 -6
- package/dist/es/framer-motion/dist/es/utils/is-browser.mjs +0 -3
- package/dist/es/framer-motion/dist/es/utils/is-ref-object.mjs +0 -7
- package/dist/es/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -19
- package/dist/es/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -5
- package/dist/es/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +0 -19
- package/dist/es/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs +0 -47
- package/dist/es/framer-motion/dist/es/utils/shallow-compare.mjs +0 -14
- package/dist/es/framer-motion/dist/es/utils/use-animation-frame.mjs +0 -21
- package/dist/es/framer-motion/dist/es/utils/use-constant.mjs +0 -18
- package/dist/es/framer-motion/dist/es/utils/use-cycle.mjs +0 -47
- package/dist/es/framer-motion/dist/es/utils/use-force-update.mjs +0 -19
- package/dist/es/framer-motion/dist/es/utils/use-in-view.mjs +0 -23
- package/dist/es/framer-motion/dist/es/utils/use-instant-transition.mjs +0 -41
- package/dist/es/framer-motion/dist/es/utils/use-is-mounted.mjs +0 -15
- package/dist/es/framer-motion/dist/es/utils/use-isomorphic-effect.mjs +0 -6
- package/dist/es/framer-motion/dist/es/utils/use-motion-value-event.mjs +0 -13
- package/dist/es/framer-motion/dist/es/utils/use-unmount-effect.mjs +0 -7
- package/dist/es/framer-motion/dist/es/value/scroll/use-element-scroll.mjs +0 -14
- package/dist/es/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs +0 -14
- package/dist/es/framer-motion/dist/es/value/use-combine-values.mjs +0 -37
- package/dist/es/framer-motion/dist/es/value/use-computed.mjs +0 -19
- package/dist/es/framer-motion/dist/es/value/use-inverted-scale.mjs +0 -52
- package/dist/es/framer-motion/dist/es/value/use-motion-template.mjs +0 -45
- package/dist/es/framer-motion/dist/es/value/use-motion-value.mjs +0 -38
- package/dist/es/framer-motion/dist/es/value/use-scroll.mjs +0 -39
- package/dist/es/framer-motion/dist/es/value/use-spring.mjs +0 -22
- package/dist/es/framer-motion/dist/es/value/use-time.mjs +0 -10
- package/dist/es/framer-motion/dist/es/value/use-transform.mjs +0 -29
- package/dist/es/framer-motion/dist/es/value/use-velocity.mjs +0 -35
- package/dist/es/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs +0 -21
- package/dist/es/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -20
- package/dist/es/framer-motion/dist/es/value/use-will-change/index.mjs +0 -8
- package/dist/es/framer-motion/dist/es/value/use-will-change/is.mjs +0 -7
- package/dist/es/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -12
- package/dist/es/motion/lib/debug.mjs +0 -1
- package/dist/es/motion/lib/index.mjs +0 -131
- package/dist/es/motion/lib/mini.mjs +0 -2
- package/dist/es/motion/lib/react-client.mjs +0 -3
- package/dist/es/motion/lib/react-m.mjs +0 -3
- package/dist/es/motion/lib/react-mini.mjs +0 -2
- package/dist/es/motion/lib/react.mjs +0 -204
- package/dist/es/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs +0 -175
- package/dist/es/motion-dom/dist/es/animation/GroupAnimation.mjs +0 -72
- package/dist/es/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs +0 -9
- package/dist/es/motion-dom/dist/es/animation/JSAnimation.mjs +0 -348
- package/dist/es/motion-dom/dist/es/animation/NativeAnimation.mjs +0 -158
- package/dist/es/motion-dom/dist/es/animation/NativeAnimationExtended.mjs +0 -65
- package/dist/es/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs +0 -14
- package/dist/es/motion-dom/dist/es/animation/drivers/frame.mjs +0 -17
- package/dist/es/motion-dom/dist/es/animation/generators/inertia.mjs +0 -87
- package/dist/es/motion-dom/dist/es/animation/generators/keyframes.mjs +0 -51
- package/dist/es/motion-dom/dist/es/animation/generators/spring/defaults.mjs +0 -27
- package/dist/es/motion-dom/dist/es/animation/generators/spring/find.mjs +0 -86
- package/dist/es/motion-dom/dist/es/animation/generators/spring/index.mjs +0 -176
- package/dist/es/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -17
- package/dist/es/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +0 -19
- package/dist/es/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -5
- package/dist/es/motion-dom/dist/es/animation/generators/utils/velocity.mjs +0 -9
- package/dist/es/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs +0 -131
- package/dist/es/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs +0 -147
- package/dist/es/motion-dom/dist/es/animation/keyframes/get-final.mjs +0 -11
- package/dist/es/motion-dom/dist/es/animation/keyframes/offsets/default.mjs +0 -9
- package/dist/es/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs +0 -12
- package/dist/es/motion-dom/dist/es/animation/keyframes/offsets/time.mjs +0 -5
- package/dist/es/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs +0 -11
- package/dist/es/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs +0 -7
- package/dist/es/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs +0 -15
- package/dist/es/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs +0 -30
- package/dist/es/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs +0 -36
- package/dist/es/motion-dom/dist/es/animation/utils/WithPromise.mjs +0 -26
- package/dist/es/motion-dom/dist/es/animation/utils/active-animations.mjs +0 -9
- package/dist/es/motion-dom/dist/es/animation/utils/can-animate.mjs +0 -42
- package/dist/es/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs +0 -42
- package/dist/es/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -7
- package/dist/es/motion-dom/dist/es/animation/utils/is-animatable.mjs +0 -30
- package/dist/es/motion-dom/dist/es/animation/utils/is-css-variable.mjs +0 -15
- package/dist/es/motion-dom/dist/es/animation/utils/replace-transition-type.mjs +0 -18
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs +0 -3
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +0 -14
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +0 -28
- package/dist/es/motion-dom/dist/es/animation/waapi/easing/supported.mjs +0 -15
- package/dist/es/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs +0 -39
- package/dist/es/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs +0 -13
- package/dist/es/motion-dom/dist/es/animation/waapi/supports/waapi.mjs +0 -37
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs +0 -14
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs +0 -15
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/linear.mjs +0 -12
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/px-values.mjs +0 -39
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs +0 -20
- package/dist/es/motion-dom/dist/es/effects/MotionValueState.mjs +0 -47
- package/dist/es/motion-dom/dist/es/effects/attr/index.mjs +0 -41
- package/dist/es/motion-dom/dist/es/effects/prop/index.mjs +0 -9
- package/dist/es/motion-dom/dist/es/effects/style/index.mjs +0 -52
- package/dist/es/motion-dom/dist/es/effects/style/transform.mjs +0 -38
- package/dist/es/motion-dom/dist/es/effects/svg/index.mjs +0 -41
- package/dist/es/motion-dom/dist/es/effects/utils/create-dom-effect.mjs +0 -18
- package/dist/es/motion-dom/dist/es/effects/utils/create-effect.mjs +0 -21
- package/dist/es/motion-dom/dist/es/frameloop/batcher.mjs +0 -71
- package/dist/es/motion-dom/dist/es/frameloop/frame.mjs +0 -6
- package/dist/es/motion-dom/dist/es/frameloop/index-legacy.mjs +0 -20
- package/dist/es/motion-dom/dist/es/frameloop/microtask.mjs +0 -6
- package/dist/es/motion-dom/dist/es/frameloop/order.mjs +0 -12
- package/dist/es/motion-dom/dist/es/frameloop/render-step.mjs +0 -92
- package/dist/es/motion-dom/dist/es/frameloop/sync-time.mjs +0 -31
- package/dist/es/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -9
- package/dist/es/motion-dom/dist/es/gestures/drag/state/set-active.mjs +0 -28
- package/dist/es/motion-dom/dist/es/gestures/hover.mjs +0 -37
- package/dist/es/motion-dom/dist/es/gestures/press/index.mjs +0 -83
- package/dist/es/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -13
- package/dist/es/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -38
- package/dist/es/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -3
- package/dist/es/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -20
- package/dist/es/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -18
- package/dist/es/motion-dom/dist/es/gestures/utils/setup.mjs +0 -15
- package/dist/es/motion-dom/dist/es/render/dom/is-css-var.mjs +0 -3
- package/dist/es/motion-dom/dist/es/render/dom/parse-transform.mjs +0 -83
- package/dist/es/motion-dom/dist/es/render/dom/style-computed.mjs +0 -10
- package/dist/es/motion-dom/dist/es/render/dom/style-set.mjs +0 -9
- package/dist/es/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs +0 -5
- package/dist/es/motion-dom/dist/es/render/utils/keys-position.mjs +0 -13
- package/dist/es/motion-dom/dist/es/render/utils/keys-transform.mjs +0 -28
- package/dist/es/motion-dom/dist/es/resize/handle-element.mjs +0 -63
- package/dist/es/motion-dom/dist/es/resize/handle-window.mjs +0 -31
- package/dist/es/motion-dom/dist/es/resize/index.mjs +0 -8
- package/dist/es/motion-dom/dist/es/scroll/observe.mjs +0 -18
- package/dist/es/motion-dom/dist/es/stats/animation-count.mjs +0 -7
- package/dist/es/motion-dom/dist/es/stats/buffer.mjs +0 -6
- package/dist/es/motion-dom/dist/es/stats/index.mjs +0 -117
- package/dist/es/motion-dom/dist/es/utils/interpolate.mjs +0 -79
- package/dist/es/motion-dom/dist/es/utils/is-html-element.mjs +0 -11
- package/dist/es/motion-dom/dist/es/utils/is-svg-element.mjs +0 -11
- package/dist/es/motion-dom/dist/es/utils/is-svg-svg-element.mjs +0 -11
- package/dist/es/motion-dom/dist/es/utils/mix/color.mjs +0 -47
- package/dist/es/motion-dom/dist/es/utils/mix/complex.mjs +0 -93
- package/dist/es/motion-dom/dist/es/utils/mix/immediate.mjs +0 -5
- package/dist/es/motion-dom/dist/es/utils/mix/index.mjs +0 -14
- package/dist/es/motion-dom/dist/es/utils/mix/number.mjs +0 -26
- package/dist/es/motion-dom/dist/es/utils/mix/visibility.mjs +0 -16
- package/dist/es/motion-dom/dist/es/utils/resolve-elements.mjs +0 -17
- package/dist/es/motion-dom/dist/es/utils/supports/flags.mjs +0 -7
- package/dist/es/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -15
- package/dist/es/motion-dom/dist/es/utils/supports/memo.mjs +0 -9
- package/dist/es/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +0 -5
- package/dist/es/motion-dom/dist/es/utils/transform.mjs +0 -14
- package/dist/es/motion-dom/dist/es/value/index.mjs +0 -329
- package/dist/es/motion-dom/dist/es/value/map-value.mjs +0 -46
- package/dist/es/motion-dom/dist/es/value/spring-value.mjs +0 -72
- package/dist/es/motion-dom/dist/es/value/subscribe-value.mjs +0 -13
- package/dist/es/motion-dom/dist/es/value/transform-value.mjs +0 -35
- package/dist/es/motion-dom/dist/es/value/types/auto.mjs +0 -9
- package/dist/es/motion-dom/dist/es/value/types/color/hex.mjs +0 -40
- package/dist/es/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs +0 -42
- package/dist/es/motion-dom/dist/es/value/types/color/hsla.mjs +0 -22
- package/dist/es/motion-dom/dist/es/value/types/color/index.mjs +0 -32
- package/dist/es/motion-dom/dist/es/value/types/color/rgba.mjs +0 -25
- package/dist/es/motion-dom/dist/es/value/types/color/utils.mjs +0 -29
- package/dist/es/motion-dom/dist/es/value/types/complex/filter.mjs +0 -30
- package/dist/es/motion-dom/dist/es/value/types/complex/index.mjs +0 -91
- package/dist/es/motion-dom/dist/es/value/types/dimensions.mjs +0 -15
- package/dist/es/motion-dom/dist/es/value/types/int.mjs +0 -8
- package/dist/es/motion-dom/dist/es/value/types/maps/defaults.mjs +0 -30
- package/dist/es/motion-dom/dist/es/value/types/maps/number.mjs +0 -50
- package/dist/es/motion-dom/dist/es/value/types/maps/transform.mjs +0 -31
- package/dist/es/motion-dom/dist/es/value/types/numbers/index.mjs +0 -17
- package/dist/es/motion-dom/dist/es/value/types/numbers/units.mjs +0 -18
- package/dist/es/motion-dom/dist/es/value/types/test.mjs +0 -6
- package/dist/es/motion-dom/dist/es/value/types/utils/animatable-none.mjs +0 -15
- package/dist/es/motion-dom/dist/es/value/types/utils/color-regex.mjs +0 -3
- package/dist/es/motion-dom/dist/es/value/types/utils/find.mjs +0 -15
- package/dist/es/motion-dom/dist/es/value/types/utils/float-regex.mjs +0 -3
- package/dist/es/motion-dom/dist/es/value/types/utils/get-as-type.mjs +0 -10
- package/dist/es/motion-dom/dist/es/value/types/utils/is-nullish.mjs +0 -5
- package/dist/es/motion-dom/dist/es/value/types/utils/sanitize.mjs +0 -5
- package/dist/es/motion-dom/dist/es/value/types/utils/single-color-regex.mjs +0 -3
- package/dist/es/motion-dom/dist/es/value/utils/is-motion-value.mjs +0 -3
- package/dist/es/motion-dom/dist/es/view/index.mjs +0 -64
- package/dist/es/motion-dom/dist/es/view/queue.mjs +0 -52
- package/dist/es/motion-dom/dist/es/view/start.mjs +0 -155
- package/dist/es/motion-dom/dist/es/view/utils/choose-layer-type.mjs +0 -11
- package/dist/es/motion-dom/dist/es/view/utils/css.mjs +0 -32
- package/dist/es/motion-dom/dist/es/view/utils/get-layer-name.mjs +0 -8
- package/dist/es/motion-dom/dist/es/view/utils/get-view-animations.mjs +0 -12
- package/dist/es/motion-dom/dist/es/view/utils/has-target.mjs +0 -5
- package/dist/es/motion-utils/dist/es/array.mjs +0 -21
- package/dist/es/motion-utils/dist/es/clamp.mjs +0 -9
- package/dist/es/motion-utils/dist/es/easing/anticipate.mjs +0 -5
- package/dist/es/motion-utils/dist/es/easing/back.mjs +0 -9
- package/dist/es/motion-utils/dist/es/easing/circ.mjs +0 -8
- package/dist/es/motion-utils/dist/es/easing/cubic-bezier.mjs +0 -51
- package/dist/es/motion-utils/dist/es/easing/ease.mjs +0 -7
- package/dist/es/motion-utils/dist/es/easing/modifiers/mirror.mjs +0 -5
- package/dist/es/motion-utils/dist/es/easing/modifiers/reverse.mjs +0 -5
- package/dist/es/motion-utils/dist/es/easing/steps.mjs +0 -15
- package/dist/es/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs +0 -8
- package/dist/es/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs +0 -3
- package/dist/es/motion-utils/dist/es/easing/utils/is-easing-array.mjs +0 -5
- package/dist/es/motion-utils/dist/es/easing/utils/map.mjs +0 -41
- package/dist/es/motion-utils/dist/es/errors.mjs +0 -16
- package/dist/es/motion-utils/dist/es/global-config.mjs +0 -3
- package/dist/es/motion-utils/dist/es/is-numerical-string.mjs +0 -6
- package/dist/es/motion-utils/dist/es/is-object.mjs +0 -5
- package/dist/es/motion-utils/dist/es/is-zero-value-string.mjs +0 -6
- package/dist/es/motion-utils/dist/es/memo.mjs +0 -11
- package/dist/es/motion-utils/dist/es/noop.mjs +0 -4
- package/dist/es/motion-utils/dist/es/pipe.mjs +0 -11
- package/dist/es/motion-utils/dist/es/progress.mjs +0 -19
- package/dist/es/motion-utils/dist/es/subscription-manager.mjs +0 -40
- package/dist/es/motion-utils/dist/es/time-conversion.mjs +0 -12
- package/dist/es/motion-utils/dist/es/velocity-per-second.mjs +0 -11
- package/dist/es/motion-utils/dist/es/warn-once.mjs +0 -14
- package/dist/es/motion-utils/dist/es/wrap.mjs +0 -6
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { floatRegex } from '../utils/float-regex.mjs';
|
|
2
|
-
import { isNullish } from '../utils/is-nullish.mjs';
|
|
3
|
-
import { singleColorRegex } from '../utils/single-color-regex.mjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,
|
|
7
|
-
* but false if a number or multiple colors
|
|
8
|
-
*/
|
|
9
|
-
const isColorString = (type, testProp) => (v) => {
|
|
10
|
-
return Boolean((typeof v === "string" &&
|
|
11
|
-
singleColorRegex.test(v) &&
|
|
12
|
-
v.startsWith(type)) ||
|
|
13
|
-
(testProp &&
|
|
14
|
-
!isNullish(v) &&
|
|
15
|
-
Object.prototype.hasOwnProperty.call(v, testProp)));
|
|
16
|
-
};
|
|
17
|
-
const splitColor = (aName, bName, cName) => (v) => {
|
|
18
|
-
if (typeof v !== "string")
|
|
19
|
-
return v;
|
|
20
|
-
const [a, b, c, alpha] = v.match(floatRegex);
|
|
21
|
-
return {
|
|
22
|
-
[aName]: parseFloat(a),
|
|
23
|
-
[bName]: parseFloat(b),
|
|
24
|
-
[cName]: parseFloat(c),
|
|
25
|
-
alpha: alpha !== undefined ? parseFloat(alpha) : 1,
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { isColorString, splitColor };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { complex } from './index.mjs';
|
|
2
|
-
import { floatRegex } from '../utils/float-regex.mjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Properties that should default to 1 or 100%
|
|
6
|
-
*/
|
|
7
|
-
const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
8
|
-
function applyDefaultFilter(v) {
|
|
9
|
-
const [name, value] = v.slice(0, -1).split("(");
|
|
10
|
-
if (name === "drop-shadow")
|
|
11
|
-
return v;
|
|
12
|
-
const [number] = value.match(floatRegex) || [];
|
|
13
|
-
if (!number)
|
|
14
|
-
return v;
|
|
15
|
-
const unit = value.replace(number, "");
|
|
16
|
-
let defaultValue = maxDefaults.has(name) ? 1 : 0;
|
|
17
|
-
if (number !== value)
|
|
18
|
-
defaultValue *= 100;
|
|
19
|
-
return name + "(" + defaultValue + unit + ")";
|
|
20
|
-
}
|
|
21
|
-
const functionRegex = /\b([a-z-]*)\(.*?\)/gu;
|
|
22
|
-
const filter = {
|
|
23
|
-
...complex,
|
|
24
|
-
getAnimatableNone: (v) => {
|
|
25
|
-
const functions = v.match(functionRegex);
|
|
26
|
-
return functions ? functions.map(applyDefaultFilter).join(" ") : v;
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { filter };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { color } from '../color/index.mjs';
|
|
2
|
-
import { colorRegex } from '../utils/color-regex.mjs';
|
|
3
|
-
import { floatRegex } from '../utils/float-regex.mjs';
|
|
4
|
-
import { sanitize } from '../utils/sanitize.mjs';
|
|
5
|
-
|
|
6
|
-
function test(v) {
|
|
7
|
-
return (isNaN(v) &&
|
|
8
|
-
typeof v === "string" &&
|
|
9
|
-
(v.match(floatRegex)?.length || 0) +
|
|
10
|
-
(v.match(colorRegex)?.length || 0) >
|
|
11
|
-
0);
|
|
12
|
-
}
|
|
13
|
-
const NUMBER_TOKEN = "number";
|
|
14
|
-
const COLOR_TOKEN = "color";
|
|
15
|
-
const VAR_TOKEN = "var";
|
|
16
|
-
const VAR_FUNCTION_TOKEN = "var(";
|
|
17
|
-
const SPLIT_TOKEN = "${}";
|
|
18
|
-
// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`
|
|
19
|
-
const complexRegex = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
20
|
-
function analyseComplexValue(value) {
|
|
21
|
-
const originalValue = value.toString();
|
|
22
|
-
const values = [];
|
|
23
|
-
const indexes = {
|
|
24
|
-
color: [],
|
|
25
|
-
number: [],
|
|
26
|
-
var: [],
|
|
27
|
-
};
|
|
28
|
-
const types = [];
|
|
29
|
-
let i = 0;
|
|
30
|
-
const tokenised = originalValue.replace(complexRegex, (parsedValue) => {
|
|
31
|
-
if (color.test(parsedValue)) {
|
|
32
|
-
indexes.color.push(i);
|
|
33
|
-
types.push(COLOR_TOKEN);
|
|
34
|
-
values.push(color.parse(parsedValue));
|
|
35
|
-
}
|
|
36
|
-
else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {
|
|
37
|
-
indexes.var.push(i);
|
|
38
|
-
types.push(VAR_TOKEN);
|
|
39
|
-
values.push(parsedValue);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
indexes.number.push(i);
|
|
43
|
-
types.push(NUMBER_TOKEN);
|
|
44
|
-
values.push(parseFloat(parsedValue));
|
|
45
|
-
}
|
|
46
|
-
++i;
|
|
47
|
-
return SPLIT_TOKEN;
|
|
48
|
-
});
|
|
49
|
-
const split = tokenised.split(SPLIT_TOKEN);
|
|
50
|
-
return { values, split, indexes, types };
|
|
51
|
-
}
|
|
52
|
-
function parseComplexValue(v) {
|
|
53
|
-
return analyseComplexValue(v).values;
|
|
54
|
-
}
|
|
55
|
-
function createTransformer(source) {
|
|
56
|
-
const { split, types } = analyseComplexValue(source);
|
|
57
|
-
const numSections = split.length;
|
|
58
|
-
return (v) => {
|
|
59
|
-
let output = "";
|
|
60
|
-
for (let i = 0; i < numSections; i++) {
|
|
61
|
-
output += split[i];
|
|
62
|
-
if (v[i] !== undefined) {
|
|
63
|
-
const type = types[i];
|
|
64
|
-
if (type === NUMBER_TOKEN) {
|
|
65
|
-
output += sanitize(v[i]);
|
|
66
|
-
}
|
|
67
|
-
else if (type === COLOR_TOKEN) {
|
|
68
|
-
output += color.transform(v[i]);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
output += v[i];
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return output;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
const convertNumbersToZero = (v) => typeof v === "number" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;
|
|
79
|
-
function getAnimatableNone(v) {
|
|
80
|
-
const parsed = parseComplexValue(v);
|
|
81
|
-
const transformer = createTransformer(v);
|
|
82
|
-
return transformer(parsed.map(convertNumbersToZero));
|
|
83
|
-
}
|
|
84
|
-
const complex = {
|
|
85
|
-
test,
|
|
86
|
-
parse: parseComplexValue,
|
|
87
|
-
createTransformer,
|
|
88
|
-
getAnimatableNone,
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export { analyseComplexValue, complex };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { auto } from './auto.mjs';
|
|
2
|
-
import { number } from './numbers/index.mjs';
|
|
3
|
-
import { px, percent, degrees, vw, vh } from './numbers/units.mjs';
|
|
4
|
-
import { testValueType } from './test.mjs';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A list of value types commonly used for dimensions
|
|
8
|
-
*/
|
|
9
|
-
const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];
|
|
10
|
-
/**
|
|
11
|
-
* Tests a dimensional value against the list of dimension ValueTypes
|
|
12
|
-
*/
|
|
13
|
-
const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));
|
|
14
|
-
|
|
15
|
-
export { dimensionValueTypes, findDimensionValueType };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { color } from '../color/index.mjs';
|
|
2
|
-
import { filter } from '../complex/filter.mjs';
|
|
3
|
-
import { numberValueTypes } from './number.mjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A map of default value types for common values
|
|
7
|
-
*/
|
|
8
|
-
const defaultValueTypes = {
|
|
9
|
-
...numberValueTypes,
|
|
10
|
-
// Color props
|
|
11
|
-
color,
|
|
12
|
-
backgroundColor: color,
|
|
13
|
-
outlineColor: color,
|
|
14
|
-
fill: color,
|
|
15
|
-
stroke: color,
|
|
16
|
-
// Border props
|
|
17
|
-
borderColor: color,
|
|
18
|
-
borderTopColor: color,
|
|
19
|
-
borderRightColor: color,
|
|
20
|
-
borderBottomColor: color,
|
|
21
|
-
borderLeftColor: color,
|
|
22
|
-
filter,
|
|
23
|
-
WebkitFilter: filter,
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Gets the default ValueType for the provided value key
|
|
27
|
-
*/
|
|
28
|
-
const getDefaultValueType = (key) => defaultValueTypes[key];
|
|
29
|
-
|
|
30
|
-
export { defaultValueTypes, getDefaultValueType };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { int } from '../int.mjs';
|
|
2
|
-
import { alpha } from '../numbers/index.mjs';
|
|
3
|
-
import { px } from '../numbers/units.mjs';
|
|
4
|
-
import { transformValueTypes } from './transform.mjs';
|
|
5
|
-
|
|
6
|
-
const numberValueTypes = {
|
|
7
|
-
// Border props
|
|
8
|
-
borderWidth: px,
|
|
9
|
-
borderTopWidth: px,
|
|
10
|
-
borderRightWidth: px,
|
|
11
|
-
borderBottomWidth: px,
|
|
12
|
-
borderLeftWidth: px,
|
|
13
|
-
borderRadius: px,
|
|
14
|
-
radius: px,
|
|
15
|
-
borderTopLeftRadius: px,
|
|
16
|
-
borderTopRightRadius: px,
|
|
17
|
-
borderBottomRightRadius: px,
|
|
18
|
-
borderBottomLeftRadius: px,
|
|
19
|
-
// Positioning props
|
|
20
|
-
width: px,
|
|
21
|
-
maxWidth: px,
|
|
22
|
-
height: px,
|
|
23
|
-
maxHeight: px,
|
|
24
|
-
top: px,
|
|
25
|
-
right: px,
|
|
26
|
-
bottom: px,
|
|
27
|
-
left: px,
|
|
28
|
-
// Spacing props
|
|
29
|
-
padding: px,
|
|
30
|
-
paddingTop: px,
|
|
31
|
-
paddingRight: px,
|
|
32
|
-
paddingBottom: px,
|
|
33
|
-
paddingLeft: px,
|
|
34
|
-
margin: px,
|
|
35
|
-
marginTop: px,
|
|
36
|
-
marginRight: px,
|
|
37
|
-
marginBottom: px,
|
|
38
|
-
marginLeft: px,
|
|
39
|
-
// Misc
|
|
40
|
-
backgroundPositionX: px,
|
|
41
|
-
backgroundPositionY: px,
|
|
42
|
-
...transformValueTypes,
|
|
43
|
-
zIndex: int,
|
|
44
|
-
// SVG
|
|
45
|
-
fillOpacity: alpha,
|
|
46
|
-
strokeOpacity: alpha,
|
|
47
|
-
numOctaves: int,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export { numberValueTypes };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { scale, alpha } from '../numbers/index.mjs';
|
|
2
|
-
import { degrees, px, progressPercentage } from '../numbers/units.mjs';
|
|
3
|
-
|
|
4
|
-
const transformValueTypes = {
|
|
5
|
-
rotate: degrees,
|
|
6
|
-
rotateX: degrees,
|
|
7
|
-
rotateY: degrees,
|
|
8
|
-
rotateZ: degrees,
|
|
9
|
-
scale,
|
|
10
|
-
scaleX: scale,
|
|
11
|
-
scaleY: scale,
|
|
12
|
-
scaleZ: scale,
|
|
13
|
-
skew: degrees,
|
|
14
|
-
skewX: degrees,
|
|
15
|
-
skewY: degrees,
|
|
16
|
-
distance: px,
|
|
17
|
-
translateX: px,
|
|
18
|
-
translateY: px,
|
|
19
|
-
translateZ: px,
|
|
20
|
-
x: px,
|
|
21
|
-
y: px,
|
|
22
|
-
z: px,
|
|
23
|
-
perspective: px,
|
|
24
|
-
transformPerspective: px,
|
|
25
|
-
opacity: alpha,
|
|
26
|
-
originX: progressPercentage,
|
|
27
|
-
originY: progressPercentage,
|
|
28
|
-
originZ: px,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { transformValueTypes };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { clamp } from '../../../../../../motion-utils/dist/es/clamp.mjs';
|
|
2
|
-
|
|
3
|
-
const number = {
|
|
4
|
-
test: (v) => typeof v === "number",
|
|
5
|
-
parse: parseFloat,
|
|
6
|
-
transform: (v) => v,
|
|
7
|
-
};
|
|
8
|
-
const alpha = {
|
|
9
|
-
...number,
|
|
10
|
-
transform: (v) => clamp(0, 1, v),
|
|
11
|
-
};
|
|
12
|
-
const scale = {
|
|
13
|
-
...number,
|
|
14
|
-
default: 1,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { alpha, number, scale };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
2
|
-
const createUnitType = (unit) => ({
|
|
3
|
-
test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1,
|
|
4
|
-
parse: parseFloat,
|
|
5
|
-
transform: (v) => `${v}${unit}`,
|
|
6
|
-
});
|
|
7
|
-
const degrees = /*@__PURE__*/ createUnitType("deg");
|
|
8
|
-
const percent = /*@__PURE__*/ createUnitType("%");
|
|
9
|
-
const px = /*@__PURE__*/ createUnitType("px");
|
|
10
|
-
const vh = /*@__PURE__*/ createUnitType("vh");
|
|
11
|
-
const vw = /*@__PURE__*/ createUnitType("vw");
|
|
12
|
-
const progressPercentage = /*@__PURE__*/ (() => ({
|
|
13
|
-
...percent,
|
|
14
|
-
parse: (v) => percent.parse(v) / 100,
|
|
15
|
-
transform: (v) => percent.transform(v * 100),
|
|
16
|
-
}))();
|
|
17
|
-
|
|
18
|
-
export { degrees, percent, progressPercentage, px, vh, vw };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { complex } from '../complex/index.mjs';
|
|
2
|
-
import { filter } from '../complex/filter.mjs';
|
|
3
|
-
import { getDefaultValueType } from '../maps/defaults.mjs';
|
|
4
|
-
|
|
5
|
-
function getAnimatableNone(key, value) {
|
|
6
|
-
let defaultValueType = getDefaultValueType(key);
|
|
7
|
-
if (defaultValueType !== filter)
|
|
8
|
-
defaultValueType = complex;
|
|
9
|
-
// If value is not recognised as animatable, ie "none", create an animatable version origin based on the target
|
|
10
|
-
return defaultValueType.getAnimatableNone
|
|
11
|
-
? defaultValueType.getAnimatableNone(value)
|
|
12
|
-
: undefined;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { getAnimatableNone };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { color } from '../color/index.mjs';
|
|
2
|
-
import { complex } from '../complex/index.mjs';
|
|
3
|
-
import { dimensionValueTypes } from '../dimensions.mjs';
|
|
4
|
-
import { testValueType } from '../test.mjs';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A list of all ValueTypes
|
|
8
|
-
*/
|
|
9
|
-
const valueTypes = [...dimensionValueTypes, color, complex];
|
|
10
|
-
/**
|
|
11
|
-
* Tests a value against the list of ValueTypes
|
|
12
|
-
*/
|
|
13
|
-
const findValueType = (v) => valueTypes.find(testValueType(v));
|
|
14
|
-
|
|
15
|
-
export { findValueType };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { addToQueue } from './queue.mjs';
|
|
2
|
-
import { noop } from '../../../../motion-utils/dist/es/noop.mjs';
|
|
3
|
-
|
|
4
|
-
class ViewTransitionBuilder {
|
|
5
|
-
constructor(update, options = {}) {
|
|
6
|
-
this.currentTarget = "root";
|
|
7
|
-
this.targets = new Map();
|
|
8
|
-
this.notifyReady = noop;
|
|
9
|
-
this.readyPromise = new Promise((resolve) => {
|
|
10
|
-
this.notifyReady = resolve;
|
|
11
|
-
});
|
|
12
|
-
this.update = update;
|
|
13
|
-
this.options = {
|
|
14
|
-
interrupt: "wait",
|
|
15
|
-
...options,
|
|
16
|
-
};
|
|
17
|
-
addToQueue(this);
|
|
18
|
-
}
|
|
19
|
-
get(selector) {
|
|
20
|
-
this.currentTarget = selector;
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
layout(keyframes, options) {
|
|
24
|
-
this.updateTarget("layout", keyframes, options);
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
new(keyframes, options) {
|
|
28
|
-
this.updateTarget("new", keyframes, options);
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
old(keyframes, options) {
|
|
32
|
-
this.updateTarget("old", keyframes, options);
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
enter(keyframes, options) {
|
|
36
|
-
this.updateTarget("enter", keyframes, options);
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
exit(keyframes, options) {
|
|
40
|
-
this.updateTarget("exit", keyframes, options);
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
crossfade(options) {
|
|
44
|
-
this.updateTarget("enter", { opacity: 1 }, options);
|
|
45
|
-
this.updateTarget("exit", { opacity: 0 }, options);
|
|
46
|
-
return this;
|
|
47
|
-
}
|
|
48
|
-
updateTarget(target, keyframes, options = {}) {
|
|
49
|
-
const { currentTarget, targets } = this;
|
|
50
|
-
if (!targets.has(currentTarget)) {
|
|
51
|
-
targets.set(currentTarget, {});
|
|
52
|
-
}
|
|
53
|
-
const targetData = targets.get(currentTarget);
|
|
54
|
-
targetData[target] = { keyframes, options };
|
|
55
|
-
}
|
|
56
|
-
then(resolve, reject) {
|
|
57
|
-
return this.readyPromise.then(resolve, reject);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function animateView(update, defaultOptions = {}) {
|
|
61
|
-
return new ViewTransitionBuilder(update, defaultOptions);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { ViewTransitionBuilder, animateView };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { microtask } from '../frameloop/microtask.mjs';
|
|
2
|
-
import { startViewAnimation } from './start.mjs';
|
|
3
|
-
import { removeItem } from '../../../../motion-utils/dist/es/array.mjs';
|
|
4
|
-
|
|
5
|
-
let builders = [];
|
|
6
|
-
let current = null;
|
|
7
|
-
function next() {
|
|
8
|
-
current = null;
|
|
9
|
-
const [nextBuilder] = builders;
|
|
10
|
-
if (nextBuilder)
|
|
11
|
-
start(nextBuilder);
|
|
12
|
-
}
|
|
13
|
-
function start(builder) {
|
|
14
|
-
removeItem(builders, builder);
|
|
15
|
-
current = builder;
|
|
16
|
-
startViewAnimation(builder).then((animation) => {
|
|
17
|
-
builder.notifyReady(animation);
|
|
18
|
-
animation.finished.finally(next);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function processQueue() {
|
|
22
|
-
/**
|
|
23
|
-
* Iterate backwards over the builders array. We can ignore the
|
|
24
|
-
* "wait" animations. If we have an interrupting animation in the
|
|
25
|
-
* queue then we need to batch all preceeding animations into it.
|
|
26
|
-
* Currently this only batches the update functions but will also
|
|
27
|
-
* need to batch the targets.
|
|
28
|
-
*/
|
|
29
|
-
for (let i = builders.length - 1; i >= 0; i--) {
|
|
30
|
-
const builder = builders[i];
|
|
31
|
-
const { interrupt } = builder.options;
|
|
32
|
-
if (interrupt === "immediate") {
|
|
33
|
-
const batchedUpdates = builders.slice(0, i + 1).map((b) => b.update);
|
|
34
|
-
const remaining = builders.slice(i + 1);
|
|
35
|
-
builder.update = () => {
|
|
36
|
-
batchedUpdates.forEach((update) => update());
|
|
37
|
-
};
|
|
38
|
-
// Put the current builder at the front, followed by any "wait" builders
|
|
39
|
-
builders = [builder, ...remaining];
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
if (!current || builders[0]?.options.interrupt === "immediate") {
|
|
44
|
-
next();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function addToQueue(builder) {
|
|
48
|
-
builders.push(builder);
|
|
49
|
-
microtask.render(processQueue);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { addToQueue };
|