motion 12.18.1 → 12.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/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.dev.js +2 -2
- 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,79 +0,0 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
2
|
-
import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';
|
|
3
|
-
import { MotionContext } from '../../context/MotionContext/index.mjs';
|
|
4
|
-
import { PresenceContext } from '../../context/PresenceContext.mjs';
|
|
5
|
-
import { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';
|
|
6
|
-
import { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';
|
|
7
|
-
import { useConstant } from '../../utils/use-constant.mjs';
|
|
8
|
-
import { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';
|
|
9
|
-
|
|
10
|
-
function makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) {
|
|
11
|
-
const state = {
|
|
12
|
-
latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
|
|
13
|
-
renderState: createRenderState(),
|
|
14
|
-
};
|
|
15
|
-
return state;
|
|
16
|
-
}
|
|
17
|
-
const makeUseVisualState = (config) => (props, isStatic) => {
|
|
18
|
-
const context = useContext(MotionContext);
|
|
19
|
-
const presenceContext = useContext(PresenceContext);
|
|
20
|
-
const make = () => makeState(config, props, context, presenceContext);
|
|
21
|
-
return isStatic ? make() : useConstant(make);
|
|
22
|
-
};
|
|
23
|
-
function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
|
|
24
|
-
const values = {};
|
|
25
|
-
const motionValues = scrapeMotionValues(props, {});
|
|
26
|
-
for (const key in motionValues) {
|
|
27
|
-
values[key] = resolveMotionValue(motionValues[key]);
|
|
28
|
-
}
|
|
29
|
-
let { initial, animate } = props;
|
|
30
|
-
const isControllingVariants$1 = isControllingVariants(props);
|
|
31
|
-
const isVariantNode$1 = isVariantNode(props);
|
|
32
|
-
if (context &&
|
|
33
|
-
isVariantNode$1 &&
|
|
34
|
-
!isControllingVariants$1 &&
|
|
35
|
-
props.inherit !== false) {
|
|
36
|
-
if (initial === undefined)
|
|
37
|
-
initial = context.initial;
|
|
38
|
-
if (animate === undefined)
|
|
39
|
-
animate = context.animate;
|
|
40
|
-
}
|
|
41
|
-
let isInitialAnimationBlocked = presenceContext
|
|
42
|
-
? presenceContext.initial === false
|
|
43
|
-
: false;
|
|
44
|
-
isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;
|
|
45
|
-
const variantToSet = isInitialAnimationBlocked ? animate : initial;
|
|
46
|
-
if (variantToSet &&
|
|
47
|
-
typeof variantToSet !== "boolean" &&
|
|
48
|
-
!isAnimationControls(variantToSet)) {
|
|
49
|
-
const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
|
|
50
|
-
for (let i = 0; i < list.length; i++) {
|
|
51
|
-
const resolved = resolveVariantFromProps(props, list[i]);
|
|
52
|
-
if (resolved) {
|
|
53
|
-
const { transitionEnd, transition, ...target } = resolved;
|
|
54
|
-
for (const key in target) {
|
|
55
|
-
let valueTarget = target[key];
|
|
56
|
-
if (Array.isArray(valueTarget)) {
|
|
57
|
-
/**
|
|
58
|
-
* Take final keyframe if the initial animation is blocked because
|
|
59
|
-
* we want to initialise at the end of that blocked animation.
|
|
60
|
-
*/
|
|
61
|
-
const index = isInitialAnimationBlocked
|
|
62
|
-
? valueTarget.length - 1
|
|
63
|
-
: 0;
|
|
64
|
-
valueTarget = valueTarget[index];
|
|
65
|
-
}
|
|
66
|
-
if (valueTarget !== null) {
|
|
67
|
-
values[key] = valueTarget;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
for (const key in transitionEnd) {
|
|
71
|
-
values[key] = transitionEnd[key];
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return values;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export { makeUseVisualState };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A list of all valid MotionProps.
|
|
3
|
-
*
|
|
4
|
-
* @privateRemarks
|
|
5
|
-
* This doesn't throw if a `MotionProp` name is missing - it should.
|
|
6
|
-
*/
|
|
7
|
-
const validMotionProps = new Set([
|
|
8
|
-
"animate",
|
|
9
|
-
"exit",
|
|
10
|
-
"variants",
|
|
11
|
-
"initial",
|
|
12
|
-
"style",
|
|
13
|
-
"values",
|
|
14
|
-
"variants",
|
|
15
|
-
"transition",
|
|
16
|
-
"transformTemplate",
|
|
17
|
-
"custom",
|
|
18
|
-
"inherit",
|
|
19
|
-
"onBeforeLayoutMeasure",
|
|
20
|
-
"onAnimationStart",
|
|
21
|
-
"onAnimationComplete",
|
|
22
|
-
"onUpdate",
|
|
23
|
-
"onDragStart",
|
|
24
|
-
"onDrag",
|
|
25
|
-
"onDragEnd",
|
|
26
|
-
"onMeasureDragConstraints",
|
|
27
|
-
"onDirectionLock",
|
|
28
|
-
"onDragTransitionEnd",
|
|
29
|
-
"_dragX",
|
|
30
|
-
"_dragY",
|
|
31
|
-
"onHoverStart",
|
|
32
|
-
"onHoverEnd",
|
|
33
|
-
"onViewportEnter",
|
|
34
|
-
"onViewportLeave",
|
|
35
|
-
"globalTapTarget",
|
|
36
|
-
"ignoreStrict",
|
|
37
|
-
"viewport",
|
|
38
|
-
]);
|
|
39
|
-
/**
|
|
40
|
-
* Check whether a prop name is a valid `MotionProp` key.
|
|
41
|
-
*
|
|
42
|
-
* @param key - Name of the property to check
|
|
43
|
-
* @returns `true` is key is a valid `MotionProp`.
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
*/
|
|
47
|
-
function isValidMotionProp(key) {
|
|
48
|
-
return (key.startsWith("while") ||
|
|
49
|
-
(key.startsWith("drag") && key !== "draggable") ||
|
|
50
|
-
key.startsWith("layout") ||
|
|
51
|
-
key.startsWith("onTap") ||
|
|
52
|
-
key.startsWith("onPan") ||
|
|
53
|
-
key.startsWith("onLayout") ||
|
|
54
|
-
validMotionProps.has(key));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { isValidMotionProp };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { mixNumber } from '../../../../../motion-dom/dist/es/utils/mix/number.mjs';
|
|
2
|
-
import { percent, px } from '../../../../../motion-dom/dist/es/value/types/numbers/units.mjs';
|
|
3
|
-
import { progress } from '../../../../../motion-utils/dist/es/progress.mjs';
|
|
4
|
-
import { circOut } from '../../../../../motion-utils/dist/es/easing/circ.mjs';
|
|
5
|
-
import { noop } from '../../../../../motion-utils/dist/es/noop.mjs';
|
|
6
|
-
|
|
7
|
-
const borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"];
|
|
8
|
-
const numBorders = borders.length;
|
|
9
|
-
const asNumber = (value) => typeof value === "string" ? parseFloat(value) : value;
|
|
10
|
-
const isPx = (value) => typeof value === "number" || px.test(value);
|
|
11
|
-
function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {
|
|
12
|
-
if (shouldCrossfadeOpacity) {
|
|
13
|
-
target.opacity = mixNumber(0, lead.opacity ?? 1, easeCrossfadeIn(progress));
|
|
14
|
-
target.opacityExit = mixNumber(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));
|
|
15
|
-
}
|
|
16
|
-
else if (isOnlyMember) {
|
|
17
|
-
target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Mix border radius
|
|
21
|
-
*/
|
|
22
|
-
for (let i = 0; i < numBorders; i++) {
|
|
23
|
-
const borderLabel = `border${borders[i]}Radius`;
|
|
24
|
-
let followRadius = getRadius(follow, borderLabel);
|
|
25
|
-
let leadRadius = getRadius(lead, borderLabel);
|
|
26
|
-
if (followRadius === undefined && leadRadius === undefined)
|
|
27
|
-
continue;
|
|
28
|
-
followRadius || (followRadius = 0);
|
|
29
|
-
leadRadius || (leadRadius = 0);
|
|
30
|
-
const canMix = followRadius === 0 ||
|
|
31
|
-
leadRadius === 0 ||
|
|
32
|
-
isPx(followRadius) === isPx(leadRadius);
|
|
33
|
-
if (canMix) {
|
|
34
|
-
target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress), 0);
|
|
35
|
-
if (percent.test(leadRadius) || percent.test(followRadius)) {
|
|
36
|
-
target[borderLabel] += "%";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
target[borderLabel] = leadRadius;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Mix rotation
|
|
45
|
-
*/
|
|
46
|
-
if (follow.rotate || lead.rotate) {
|
|
47
|
-
target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function getRadius(values, radiusName) {
|
|
51
|
-
return values[radiusName] !== undefined
|
|
52
|
-
? values[radiusName]
|
|
53
|
-
: values.borderRadius;
|
|
54
|
-
}
|
|
55
|
-
// /**
|
|
56
|
-
// * We only want to mix the background color if there's a follow element
|
|
57
|
-
// * that we're not crossfading opacity between. For instance with switch
|
|
58
|
-
// * AnimateSharedLayout animations, this helps the illusion of a continuous
|
|
59
|
-
// * element being animated but also cuts down on the number of paints triggered
|
|
60
|
-
// * for elements where opacity is doing that work for us.
|
|
61
|
-
// */
|
|
62
|
-
// if (
|
|
63
|
-
// !hasFollowElement &&
|
|
64
|
-
// latestLeadValues.backgroundColor &&
|
|
65
|
-
// latestFollowValues.backgroundColor
|
|
66
|
-
// ) {
|
|
67
|
-
// /**
|
|
68
|
-
// * This isn't ideal performance-wise as mixColor is creating a new function every frame.
|
|
69
|
-
// * We could probably create a mixer that runs at the start of the animation but
|
|
70
|
-
// * the idea behind the crossfader is that it runs dynamically between two potentially
|
|
71
|
-
// * changing targets (ie opacity or borderRadius may be animating independently via variants)
|
|
72
|
-
// */
|
|
73
|
-
// leadState.backgroundColor = followState.backgroundColor = mixColor(
|
|
74
|
-
// latestFollowValues.backgroundColor as string,
|
|
75
|
-
// latestLeadValues.backgroundColor as string
|
|
76
|
-
// )(p)
|
|
77
|
-
// }
|
|
78
|
-
const easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);
|
|
79
|
-
const easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);
|
|
80
|
-
function compress(min, max, easing) {
|
|
81
|
-
return (p) => {
|
|
82
|
-
// Could replace ifs with clamp
|
|
83
|
-
if (p < min)
|
|
84
|
-
return 0;
|
|
85
|
-
if (p > max)
|
|
86
|
-
return 1;
|
|
87
|
-
return easing(progress(min, max, p));
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export { mixValues };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bounding boxes tend to be defined as top, left, right, bottom. For various operations
|
|
3
|
-
* it's easier to consider each axis individually. This function returns a bounding box
|
|
4
|
-
* as a map of single-axis min/max values.
|
|
5
|
-
*/
|
|
6
|
-
function convertBoundingBoxToBox({ top, left, right, bottom, }) {
|
|
7
|
-
return {
|
|
8
|
-
x: { min: left, max: right },
|
|
9
|
-
y: { min: top, max: bottom },
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function convertBoxToBoundingBox({ x, y }) {
|
|
13
|
-
return { top: y.min, right: x.max, bottom: y.max, left: x.min };
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Applies a TransformPoint function to a bounding box. TransformPoint is usually a function
|
|
17
|
-
* provided by Framer to allow measured points to be corrected for device scaling. This is used
|
|
18
|
-
* when measuring DOM elements and DOM event points.
|
|
19
|
-
*/
|
|
20
|
-
function transformBoxPoints(point, transformPoint) {
|
|
21
|
-
if (!transformPoint)
|
|
22
|
-
return point;
|
|
23
|
-
const topLeft = transformPoint({ x: point.left, y: point.top });
|
|
24
|
-
const bottomRight = transformPoint({ x: point.right, y: point.bottom });
|
|
25
|
-
return {
|
|
26
|
-
top: topLeft.y,
|
|
27
|
-
left: topLeft.x,
|
|
28
|
-
bottom: bottomRight.y,
|
|
29
|
-
right: bottomRight.x,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reset an axis to the provided origin box.
|
|
3
|
-
*
|
|
4
|
-
* This is a mutative operation.
|
|
5
|
-
*/
|
|
6
|
-
function copyAxisInto(axis, originAxis) {
|
|
7
|
-
axis.min = originAxis.min;
|
|
8
|
-
axis.max = originAxis.max;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Reset a box to the provided origin box.
|
|
12
|
-
*
|
|
13
|
-
* This is a mutative operation.
|
|
14
|
-
*/
|
|
15
|
-
function copyBoxInto(box, originBox) {
|
|
16
|
-
copyAxisInto(box.x, originBox.x);
|
|
17
|
-
copyAxisInto(box.y, originBox.y);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Reset a delta to the provided origin box.
|
|
21
|
-
*
|
|
22
|
-
* This is a mutative operation.
|
|
23
|
-
*/
|
|
24
|
-
function copyAxisDeltaInto(delta, originDelta) {
|
|
25
|
-
delta.translate = originDelta.translate;
|
|
26
|
-
delta.scale = originDelta.scale;
|
|
27
|
-
delta.originPoint = originDelta.originPoint;
|
|
28
|
-
delta.origin = originDelta.origin;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { copyAxisDeltaInto, copyAxisInto, copyBoxInto };
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { hasTransform } from '../utils/has-transform.mjs';
|
|
2
|
-
import { mixNumber } from '../../../../../motion-dom/dist/es/utils/mix/number.mjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Scales a point based on a factor and an originPoint
|
|
6
|
-
*/
|
|
7
|
-
function scalePoint(point, scale, originPoint) {
|
|
8
|
-
const distanceFromOrigin = point - originPoint;
|
|
9
|
-
const scaled = scale * distanceFromOrigin;
|
|
10
|
-
return originPoint + scaled;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Applies a translate/scale delta to a point
|
|
14
|
-
*/
|
|
15
|
-
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
|
|
16
|
-
if (boxScale !== undefined) {
|
|
17
|
-
point = scalePoint(point, boxScale, originPoint);
|
|
18
|
-
}
|
|
19
|
-
return scalePoint(point, scale, originPoint) + translate;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Applies a translate/scale delta to an axis
|
|
23
|
-
*/
|
|
24
|
-
function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
|
|
25
|
-
axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
|
|
26
|
-
axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Applies a translate/scale delta to a box
|
|
30
|
-
*/
|
|
31
|
-
function applyBoxDelta(box, { x, y }) {
|
|
32
|
-
applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
|
|
33
|
-
applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
|
|
34
|
-
}
|
|
35
|
-
const TREE_SCALE_SNAP_MIN = 0.999999999999;
|
|
36
|
-
const TREE_SCALE_SNAP_MAX = 1.0000000000001;
|
|
37
|
-
/**
|
|
38
|
-
* Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms
|
|
39
|
-
* in a tree upon our box before then calculating how to project it into our desired viewport-relative box
|
|
40
|
-
*
|
|
41
|
-
* This is the final nested loop within updateLayoutDelta for future refactoring
|
|
42
|
-
*/
|
|
43
|
-
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
|
|
44
|
-
const treeLength = treePath.length;
|
|
45
|
-
if (!treeLength)
|
|
46
|
-
return;
|
|
47
|
-
// Reset the treeScale
|
|
48
|
-
treeScale.x = treeScale.y = 1;
|
|
49
|
-
let node;
|
|
50
|
-
let delta;
|
|
51
|
-
for (let i = 0; i < treeLength; i++) {
|
|
52
|
-
node = treePath[i];
|
|
53
|
-
delta = node.projectionDelta;
|
|
54
|
-
/**
|
|
55
|
-
* TODO: Prefer to remove this, but currently we have motion components with
|
|
56
|
-
* display: contents in Framer.
|
|
57
|
-
*/
|
|
58
|
-
const { visualElement } = node.options;
|
|
59
|
-
if (visualElement &&
|
|
60
|
-
visualElement.props.style &&
|
|
61
|
-
visualElement.props.style.display === "contents") {
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
if (isSharedTransition &&
|
|
65
|
-
node.options.layoutScroll &&
|
|
66
|
-
node.scroll &&
|
|
67
|
-
node !== node.root) {
|
|
68
|
-
transformBox(box, {
|
|
69
|
-
x: -node.scroll.offset.x,
|
|
70
|
-
y: -node.scroll.offset.y,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
if (delta) {
|
|
74
|
-
// Incoporate each ancestor's scale into a culmulative treeScale for this component
|
|
75
|
-
treeScale.x *= delta.x.scale;
|
|
76
|
-
treeScale.y *= delta.y.scale;
|
|
77
|
-
// Apply each ancestor's calculated delta into this component's recorded layout box
|
|
78
|
-
applyBoxDelta(box, delta);
|
|
79
|
-
}
|
|
80
|
-
if (isSharedTransition && hasTransform(node.latestValues)) {
|
|
81
|
-
transformBox(box, node.latestValues);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Snap tree scale back to 1 if it's within a non-perceivable threshold.
|
|
86
|
-
* This will help reduce useless scales getting rendered.
|
|
87
|
-
*/
|
|
88
|
-
if (treeScale.x < TREE_SCALE_SNAP_MAX &&
|
|
89
|
-
treeScale.x > TREE_SCALE_SNAP_MIN) {
|
|
90
|
-
treeScale.x = 1.0;
|
|
91
|
-
}
|
|
92
|
-
if (treeScale.y < TREE_SCALE_SNAP_MAX &&
|
|
93
|
-
treeScale.y > TREE_SCALE_SNAP_MIN) {
|
|
94
|
-
treeScale.y = 1.0;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function translateAxis(axis, distance) {
|
|
98
|
-
axis.min = axis.min + distance;
|
|
99
|
-
axis.max = axis.max + distance;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Apply a transform to an axis from the latest resolved motion values.
|
|
103
|
-
* This function basically acts as a bridge between a flat motion value map
|
|
104
|
-
* and applyAxisDelta
|
|
105
|
-
*/
|
|
106
|
-
function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
|
|
107
|
-
const originPoint = mixNumber(axis.min, axis.max, axisOrigin);
|
|
108
|
-
// Apply the axis delta to the final axis
|
|
109
|
-
applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Apply a transform to a box from the latest resolved motion values.
|
|
113
|
-
*/
|
|
114
|
-
function transformBox(box, transform) {
|
|
115
|
-
transformAxis(box.x, transform.x, transform.scaleX, transform.scale, transform.originX);
|
|
116
|
-
transformAxis(box.y, transform.y, transform.scaleY, transform.scale, transform.originY);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { mixNumber } from '../../../../../motion-dom/dist/es/utils/mix/number.mjs';
|
|
2
|
-
|
|
3
|
-
const SCALE_PRECISION = 0.0001;
|
|
4
|
-
const SCALE_MIN = 1 - SCALE_PRECISION;
|
|
5
|
-
const SCALE_MAX = 1 + SCALE_PRECISION;
|
|
6
|
-
const TRANSLATE_PRECISION = 0.01;
|
|
7
|
-
const TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;
|
|
8
|
-
const TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;
|
|
9
|
-
function calcLength(axis) {
|
|
10
|
-
return axis.max - axis.min;
|
|
11
|
-
}
|
|
12
|
-
function isNear(value, target, maxDistance) {
|
|
13
|
-
return Math.abs(value - target) <= maxDistance;
|
|
14
|
-
}
|
|
15
|
-
function calcAxisDelta(delta, source, target, origin = 0.5) {
|
|
16
|
-
delta.origin = origin;
|
|
17
|
-
delta.originPoint = mixNumber(source.min, source.max, delta.origin);
|
|
18
|
-
delta.scale = calcLength(target) / calcLength(source);
|
|
19
|
-
delta.translate =
|
|
20
|
-
mixNumber(target.min, target.max, delta.origin) - delta.originPoint;
|
|
21
|
-
if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||
|
|
22
|
-
isNaN(delta.scale)) {
|
|
23
|
-
delta.scale = 1.0;
|
|
24
|
-
}
|
|
25
|
-
if ((delta.translate >= TRANSLATE_MIN &&
|
|
26
|
-
delta.translate <= TRANSLATE_MAX) ||
|
|
27
|
-
isNaN(delta.translate)) {
|
|
28
|
-
delta.translate = 0.0;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function calcBoxDelta(delta, source, target, origin) {
|
|
32
|
-
calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);
|
|
33
|
-
calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);
|
|
34
|
-
}
|
|
35
|
-
function calcRelativeAxis(target, relative, parent) {
|
|
36
|
-
target.min = parent.min + relative.min;
|
|
37
|
-
target.max = target.min + calcLength(relative);
|
|
38
|
-
}
|
|
39
|
-
function calcRelativeBox(target, relative, parent) {
|
|
40
|
-
calcRelativeAxis(target.x, relative.x, parent.x);
|
|
41
|
-
calcRelativeAxis(target.y, relative.y, parent.y);
|
|
42
|
-
}
|
|
43
|
-
function calcRelativeAxisPosition(target, layout, parent) {
|
|
44
|
-
target.min = layout.min - parent.min;
|
|
45
|
-
target.max = target.min + calcLength(layout);
|
|
46
|
-
}
|
|
47
|
-
function calcRelativePosition(target, layout, parent) {
|
|
48
|
-
calcRelativeAxisPosition(target.x, layout.x, parent.x);
|
|
49
|
-
calcRelativeAxisPosition(target.y, layout.y, parent.y);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { scalePoint } from './delta-apply.mjs';
|
|
2
|
-
import { percent } from '../../../../../motion-dom/dist/es/value/types/numbers/units.mjs';
|
|
3
|
-
import { mixNumber } from '../../../../../motion-dom/dist/es/utils/mix/number.mjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse
|
|
7
|
-
*/
|
|
8
|
-
function removePointDelta(point, translate, scale, originPoint, boxScale) {
|
|
9
|
-
point -= translate;
|
|
10
|
-
point = scalePoint(point, 1 / scale, originPoint);
|
|
11
|
-
if (boxScale !== undefined) {
|
|
12
|
-
point = scalePoint(point, 1 / boxScale, originPoint);
|
|
13
|
-
}
|
|
14
|
-
return point;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse
|
|
18
|
-
*/
|
|
19
|
-
function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {
|
|
20
|
-
if (percent.test(translate)) {
|
|
21
|
-
translate = parseFloat(translate);
|
|
22
|
-
const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);
|
|
23
|
-
translate = relativeProgress - sourceAxis.min;
|
|
24
|
-
}
|
|
25
|
-
if (typeof translate !== "number")
|
|
26
|
-
return;
|
|
27
|
-
let originPoint = mixNumber(originAxis.min, originAxis.max, origin);
|
|
28
|
-
if (axis === originAxis)
|
|
29
|
-
originPoint -= translate;
|
|
30
|
-
axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);
|
|
31
|
-
axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse
|
|
35
|
-
* and acts as a bridge between motion values and removeAxisDelta
|
|
36
|
-
*/
|
|
37
|
-
function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {
|
|
38
|
-
removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The names of the motion values we want to apply as translation, scale and origin.
|
|
42
|
-
*/
|
|
43
|
-
const xKeys = ["x", "scaleX", "originX"];
|
|
44
|
-
const yKeys = ["y", "scaleY", "originY"];
|
|
45
|
-
/**
|
|
46
|
-
* Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse
|
|
47
|
-
* and acts as a bridge between motion values and removeAxisDelta
|
|
48
|
-
*/
|
|
49
|
-
function removeBoxTransforms(box, transforms, originBox, sourceBox) {
|
|
50
|
-
removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);
|
|
51
|
-
removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const createAxisDelta = () => ({
|
|
2
|
-
translate: 0,
|
|
3
|
-
scale: 1,
|
|
4
|
-
origin: 0,
|
|
5
|
-
originPoint: 0,
|
|
6
|
-
});
|
|
7
|
-
const createDelta = () => ({
|
|
8
|
-
x: createAxisDelta(),
|
|
9
|
-
y: createAxisDelta(),
|
|
10
|
-
});
|
|
11
|
-
const createAxis = () => ({ min: 0, max: 0 });
|
|
12
|
-
const createBox = () => ({
|
|
13
|
-
x: createAxis(),
|
|
14
|
-
y: createAxis(),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export { createAxis, createAxisDelta, createBox, createDelta };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { calcLength } from './delta-calc.mjs';
|
|
2
|
-
|
|
3
|
-
function isAxisDeltaZero(delta) {
|
|
4
|
-
return delta.translate === 0 && delta.scale === 1;
|
|
5
|
-
}
|
|
6
|
-
function isDeltaZero(delta) {
|
|
7
|
-
return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);
|
|
8
|
-
}
|
|
9
|
-
function axisEquals(a, b) {
|
|
10
|
-
return a.min === b.min && a.max === b.max;
|
|
11
|
-
}
|
|
12
|
-
function boxEquals(a, b) {
|
|
13
|
-
return axisEquals(a.x, b.x) && axisEquals(a.y, b.y);
|
|
14
|
-
}
|
|
15
|
-
function axisEqualsRounded(a, b) {
|
|
16
|
-
return (Math.round(a.min) === Math.round(b.min) &&
|
|
17
|
-
Math.round(a.max) === Math.round(b.max));
|
|
18
|
-
}
|
|
19
|
-
function boxEqualsRounded(a, b) {
|
|
20
|
-
return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y);
|
|
21
|
-
}
|
|
22
|
-
function aspectRatio(box) {
|
|
23
|
-
return calcLength(box.x) / calcLength(box.y);
|
|
24
|
-
}
|
|
25
|
-
function axisDeltaEquals(a, b) {
|
|
26
|
-
return (a.translate === b.translate &&
|
|
27
|
-
a.scale === b.scale &&
|
|
28
|
-
a.originPoint === b.originPoint);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createProjectionNode } from './create-projection-node.mjs';
|
|
2
|
-
import { addDomEvent } from '../../events/add-dom-event.mjs';
|
|
3
|
-
|
|
4
|
-
const DocumentProjectionNode = createProjectionNode({
|
|
5
|
-
attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
|
|
6
|
-
measureScroll: () => ({
|
|
7
|
-
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
8
|
-
y: document.documentElement.scrollTop || document.body.scrollTop,
|
|
9
|
-
}),
|
|
10
|
-
checkIsScrollRoot: () => true,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export { DocumentProjectionNode };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createProjectionNode } from './create-projection-node.mjs';
|
|
2
|
-
import { DocumentProjectionNode } from './DocumentProjectionNode.mjs';
|
|
3
|
-
|
|
4
|
-
const rootProjectionNode = {
|
|
5
|
-
current: undefined,
|
|
6
|
-
};
|
|
7
|
-
const HTMLProjectionNode = createProjectionNode({
|
|
8
|
-
measureScroll: (instance) => ({
|
|
9
|
-
x: instance.scrollLeft,
|
|
10
|
-
y: instance.scrollTop,
|
|
11
|
-
}),
|
|
12
|
-
defaultParent: () => {
|
|
13
|
-
if (!rootProjectionNode.current) {
|
|
14
|
-
const documentNode = new DocumentProjectionNode({});
|
|
15
|
-
documentNode.mount(window);
|
|
16
|
-
documentNode.setOptions({ layoutScroll: true });
|
|
17
|
-
rootProjectionNode.current = documentNode;
|
|
18
|
-
}
|
|
19
|
-
return rootProjectionNode.current;
|
|
20
|
-
},
|
|
21
|
-
resetTransform: (instance, value) => {
|
|
22
|
-
instance.style.transform = value !== undefined ? value : "none";
|
|
23
|
-
},
|
|
24
|
-
checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"),
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export { HTMLProjectionNode, rootProjectionNode };
|