@betterinternship/components 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/animated-count.js +1 -3
- package/dist/components/animated-count.js.map +1 -1
- package/dist/components/tabs.js +40 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -2
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -118
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -77
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -190
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -46
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -11
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -586
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -51
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -130
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -42
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -31
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -285
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -51
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -71
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -41
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -49
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -22
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -138
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -16
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -77
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -50
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -113
- package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -52
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -166
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -81
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -46
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -14
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -19
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -28
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -37
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -31
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -59
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -34
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -26
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -9
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -49
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -61
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -20
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js.map +0 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -200
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -386
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -181
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -88
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -88
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -52
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -331
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -106
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -109
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -60
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -142
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -148
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -47
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -44
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -43
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -41
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -55
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -73
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -84
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -29
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -70
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -97
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -39
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -69
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -125
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -59
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -55
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -28
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -1660
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -85
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -42
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -36
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -53
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -25
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -564
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -43
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -84
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -55
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -66
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -72
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -22
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/store.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -52
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -64
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -387
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -36
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -56
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -20
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -37
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -64
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -32
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/resize/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -80
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -14
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -12
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -48
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -94
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -15
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -27
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -17
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -320
- package/dist/node_modules/motion-dom/dist/es/value/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -10
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -41
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -43
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -23
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -33
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -26
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -30
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -31
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -114
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -13
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -9
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -34
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -71
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -38
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -19
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -7
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -18
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -16
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -11
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -21
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js.map +0 -1
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -8
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/array.js +0 -12
- package/dist/node_modules/motion-utils/dist/es/array.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -10
- package/dist/node_modules/motion-utils/dist/es/clamp.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -10
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -10
- package/dist/node_modules/motion-utils/dist/es/easing/back.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -9
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -53
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -42
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/errors.js +0 -20
- package/dist/node_modules/motion-utils/dist/es/errors.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/global-config.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -4
- package/dist/node_modules/motion-utils/dist/es/is-object.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -7
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/memo.js +0 -12
- package/dist/node_modules/motion-utils/dist/es/memo.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/noop.js +0 -5
- package/dist/node_modules/motion-utils/dist/es/noop.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -11
- package/dist/node_modules/motion-utils/dist/es/pipe.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/progress.js +0 -15
- package/dist/node_modules/motion-utils/dist/es/progress.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -41
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -13
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -8
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js.map +0 -1
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -12
- package/dist/node_modules/motion-utils/dist/es/warn-once.js.map +0 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
|
-
import { useReducedMotion } from '
|
|
4
|
-
import { AnimatePresence } from '../node_modules/framer-motion/dist/es/components/AnimatePresence/index.js';
|
|
5
|
-
import { motion } from '../node_modules/framer-motion/dist/es/render/components/motion/proxy.js';
|
|
3
|
+
import { useReducedMotion, AnimatePresence, motion } from 'framer-motion';
|
|
6
4
|
|
|
7
5
|
/** A number that rolls up or down when its value changes. */
|
|
8
6
|
const AnimatedCount = ({ value }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated-count.js","sources":["../../src/components/animated-count.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'framer-motion';\n\n/** A number that rolls up or down when its value changes. */\nexport const AnimatedCount = ({ value }: { value: number }) => {\n const reduceMotion = useReducedMotion();\n const previous = useRef(value);\n const direction = value >= previous.current ? 1 : -1;\n\n useEffect(() => {\n previous.current = value;\n }, [value]);\n\n return (\n <span className=\"relative inline-flex justify-center overflow-hidden tabular-nums\">\n <span className={reduceMotion ? undefined : 'invisible'}>{value}</span>\n {!reduceMotion && (\n <span aria-hidden=\"true\">\n <AnimatePresence initial={false} custom={direction}>\n <motion.span\n key={value}\n className=\"absolute inset-0 flex items-center justify-center\"\n initial={{ y: `${direction * 100}%`, opacity: 0 }}\n animate={{ y: '0%', opacity: 1 }}\n variants={{ exit: (exitDirection: number) => ({ y: `${exitDirection * -100}%`, opacity: 0 }) }}\n exit=\"exit\"\n transition={{ duration: 0.18, ease: 'easeOut' }}\n >\n {value}\n </motion.span>\n </AnimatePresence>\n </span>\n )}\n </span>\n );\n};\n\nexport default AnimatedCount;\n"],"names":["_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"animated-count.js","sources":["../../src/components/animated-count.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'framer-motion';\n\n/** A number that rolls up or down when its value changes. */\nexport const AnimatedCount = ({ value }: { value: number }) => {\n const reduceMotion = useReducedMotion();\n const previous = useRef(value);\n const direction = value >= previous.current ? 1 : -1;\n\n useEffect(() => {\n previous.current = value;\n }, [value]);\n\n return (\n <span className=\"relative inline-flex justify-center overflow-hidden tabular-nums\">\n <span className={reduceMotion ? undefined : 'invisible'}>{value}</span>\n {!reduceMotion && (\n <span aria-hidden=\"true\">\n <AnimatePresence initial={false} custom={direction}>\n <motion.span\n key={value}\n className=\"absolute inset-0 flex items-center justify-center\"\n initial={{ y: `${direction * 100}%`, opacity: 0 }}\n animate={{ y: '0%', opacity: 1 }}\n variants={{ exit: (exitDirection: number) => ({ y: `${exitDirection * -100}%`, opacity: 0 }) }}\n exit=\"exit\"\n transition={{ duration: 0.18, ease: 'easeOut' }}\n >\n {value}\n </motion.span>\n </AnimatePresence>\n </span>\n )}\n </span>\n );\n};\n\nexport default AnimatedCount;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;AAGA;MACa,aAAa,GAAG,CAAC,EAAE,KAAK,EAAqB,KAAI;AAC5D,IAAA,MAAM,YAAY,GAAG,gBAAgB,EAAE;AACvC,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;AAC9B,IAAA,MAAM,SAAS,GAAG,KAAK,IAAI,QAAQ,CAAC,OAAO,GAAG,CAAC,GAAG,EAAE;IAEpD,SAAS,CAAC,MAAK;AACb,QAAA,QAAQ,CAAC,OAAO,GAAG,KAAK;AAC1B,IAAA,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAEX,IAAA,QACEA,IAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,kEAAkE,EAAA,QAAA,EAAA,CAChFC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,YAAY,GAAG,SAAS,GAAG,WAAW,EAAA,QAAA,EAAG,KAAK,EAAA,CAAQ,EACtE,CAAC,YAAY,KACZA,GAAA,CAAA,MAAA,EAAA,EAAA,aAAA,EAAkB,MAAM,YACtBA,GAAA,CAAC,eAAe,EAAA,EAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAA,QAAA,EAChDA,GAAA,CAAC,MAAM,CAAC,IAAI,EAAA,EAEV,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,EAAE,CAAC,EAAE,CAAA,EAAG,SAAS,GAAG,GAAG,CAAA,CAAA,CAAG,EAAE,OAAO,EAAE,CAAC,EAAE,EACjD,OAAO,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EAChC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,aAAqB,MAAM,EAAE,CAAC,EAAE,CAAA,EAAG,aAAa,GAAG,IAAI,CAAA,CAAA,CAAG,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,EAC9F,IAAI,EAAC,MAAM,EACX,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAA,QAAA,EAE9C,KAAK,EAAA,EARD,KAAK,CASE,EAAA,CACE,EAAA,CACb,CACR,CAAA,EAAA,CACI;AAEX;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useReducedMotion, motion } from 'framer-motion';
|
|
5
|
+
import { cn } from '../utils.js';
|
|
6
|
+
|
|
7
|
+
const Tab = ({ children }) => jsx(Fragment, { children: children });
|
|
8
|
+
function TabGroup({ children, value, onValueChange, defaultValue, unmountInactive = true, className, navigationOnly = false, id: providedId, 'aria-label': label = 'Sections' }) {
|
|
9
|
+
const tabs = React.Children.toArray(children).filter(React.isValidElement);
|
|
10
|
+
const [internal, setInternal] = React.useState(defaultValue ?? tabs[0]?.props.name ?? '');
|
|
11
|
+
const active = value ?? (tabs.some(tab => tab.props.name === internal) ? internal : tabs[0]?.props.name);
|
|
12
|
+
const generatedId = React.useId();
|
|
13
|
+
const id = providedId ?? generatedId;
|
|
14
|
+
const reducedMotion = useReducedMotion();
|
|
15
|
+
const select = (tab) => {
|
|
16
|
+
if (value === undefined)
|
|
17
|
+
setInternal(tab.props.name);
|
|
18
|
+
onValueChange?.(tab.props.name);
|
|
19
|
+
tab.props.onTabChange?.();
|
|
20
|
+
};
|
|
21
|
+
return jsxs("div", { className: cn('w-full min-w-0', className), children: [jsx("div", { role: "tablist", "aria-label": label, className: "flex gap-1 overflow-x-auto", onKeyDown: event => {
|
|
22
|
+
if (!['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key))
|
|
23
|
+
return;
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
const index = tabs.findIndex(tab => tab.props.name === active);
|
|
26
|
+
const next = event.key === 'Home' ? 0 : event.key === 'End' ? tabs.length - 1 : (index + (event.key === 'ArrowRight' ? 1 : -1) + tabs.length) % tabs.length;
|
|
27
|
+
if (!tabs[next])
|
|
28
|
+
return;
|
|
29
|
+
select(tabs[next]);
|
|
30
|
+
event.currentTarget.querySelectorAll('[role="tab"]')[next]?.focus();
|
|
31
|
+
}, children: tabs.map((tab, index) => jsxs("button", { type: "button", role: "tab", id: `${id}-tab-${index}`, "aria-controls": `${id}-panel-${index}`, "aria-selected": active === tab.props.name, tabIndex: active === tab.props.name ? 0 : -1, onClick: () => select(tab), className: cn('relative shrink-0 cursor-pointer px-4 py-3 text-sm text-muted-foreground transition-colors duration-state hover:text-foreground focus-visible:outline-3 focus-visible:-outline-offset-4 focus-visible:outline-landing-blue motion-reduce:transition-none', active === tab.props.name && 'font-semibold text-foreground'), children: [jsxs("span", { className: "inline-flex items-center gap-1.5", children: [tab.props.indicator && jsx("span", { "aria-label": "New activity", role: "img", className: "size-2.5 rounded-full bg-warning ring-2 ring-background" }), tab.props.name] }), active === tab.props.name && jsx(motion.span, { "aria-hidden": "true", layoutId: `${id}-underline`, className: "absolute inset-x-0 bottom-0 h-0.5 bg-primary", transition: reducedMotion ? { duration: 0 } : { type: 'spring', stiffness: 450, damping: 35 } })] }, tab.props.name)) }), !navigationOnly && tabs.map((tab, index) => {
|
|
32
|
+
const selected = active === tab.props.name;
|
|
33
|
+
if (unmountInactive && !selected)
|
|
34
|
+
return null;
|
|
35
|
+
return jsx("div", { role: "tabpanel", id: `${id}-panel-${index}`, "aria-labelledby": `${id}-tab-${index}`, hidden: !selected, tabIndex: 0, children: jsx(motion.div, { initial: false, animate: { opacity: selected ? 1 : 0, y: selected ? 0 : 4 }, transition: { duration: reducedMotion ? 0 : 0.18 }, children: tab }) }, tab.props.name);
|
|
36
|
+
})] });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { Tab, TabGroup };
|
|
40
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../src/components/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport { motion, useReducedMotion } from 'framer-motion';\nimport { cn } from '@/utils';\n\ninterface TabProps {\n name: string;\n children: React.ReactNode;\n indicator?: boolean;\n onTabChange?: () => void;\n}\nexport const Tab = ({ children }: TabProps) => <>{children}</>;\n\ninterface TabGroupProps {\n children: React.ReactElement<TabProps> | (React.ReactElement<TabProps> | false | null | undefined)[];\n value?: string;\n onValueChange?: (value: string) => void;\n defaultValue?: string;\n unmountInactive?: boolean;\n className?: string;\n /** Render only the tab bar when panels are laid out elsewhere. */\n navigationOnly?: boolean;\n id?: string;\n 'aria-label'?: string;\n}\n\nexport function TabGroup({ children, value, onValueChange, defaultValue, unmountInactive = true, className, navigationOnly = false, id: providedId, 'aria-label': label = 'Sections' }: TabGroupProps) {\n const tabs = React.Children.toArray(children).filter(React.isValidElement) as React.ReactElement<TabProps>[];\n const [internal, setInternal] = React.useState(defaultValue ?? tabs[0]?.props.name ?? '');\n const active = value ?? (tabs.some(tab => tab.props.name === internal) ? internal : tabs[0]?.props.name);\n const generatedId = React.useId();\n const id = providedId ?? generatedId;\n const reducedMotion = useReducedMotion();\n const select = (tab: React.ReactElement<TabProps>) => {\n if (value === undefined) setInternal(tab.props.name);\n onValueChange?.(tab.props.name);\n tab.props.onTabChange?.();\n };\n return <div className={cn('w-full min-w-0', className)}>\n <div role=\"tablist\" aria-label={label} className=\"flex gap-1 overflow-x-auto\" onKeyDown={event => {\n if (!['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) return;\n event.preventDefault();\n const index = tabs.findIndex(tab => tab.props.name === active);\n const next = event.key === 'Home' ? 0 : event.key === 'End' ? tabs.length - 1 : (index + (event.key === 'ArrowRight' ? 1 : -1) + tabs.length) % tabs.length;\n if (!tabs[next]) return;\n select(tabs[next]);\n event.currentTarget.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]')[next]?.focus();\n }}>\n {tabs.map((tab, index) => <button key={tab.props.name} type=\"button\" role=\"tab\" id={`${id}-tab-${index}`} aria-controls={`${id}-panel-${index}`} aria-selected={active === tab.props.name} tabIndex={active === tab.props.name ? 0 : -1} onClick={() => select(tab)} className={cn('relative shrink-0 cursor-pointer px-4 py-3 text-sm text-muted-foreground transition-colors duration-state hover:text-foreground focus-visible:outline-3 focus-visible:-outline-offset-4 focus-visible:outline-landing-blue motion-reduce:transition-none', active === tab.props.name && 'font-semibold text-foreground')}>\n <span className=\"inline-flex items-center gap-1.5\">{tab.props.indicator && <span aria-label=\"New activity\" role=\"img\" className=\"size-2.5 rounded-full bg-warning ring-2 ring-background\" />}{tab.props.name}</span>\n {active === tab.props.name && <motion.span aria-hidden=\"true\" layoutId={`${id}-underline`} className=\"absolute inset-x-0 bottom-0 h-0.5 bg-primary\" transition={reducedMotion ? { duration: 0 } : { type: 'spring', stiffness: 450, damping: 35 }} />}\n </button>)}\n </div>\n {!navigationOnly && tabs.map((tab, index) => {\n const selected = active === tab.props.name;\n if (unmountInactive && !selected) return null;\n return <div key={tab.props.name} role=\"tabpanel\" id={`${id}-panel-${index}`} aria-labelledby={`${id}-tab-${index}`} hidden={!selected} tabIndex={0}>\n <motion.div initial={false} animate={{ opacity: selected ? 1 : 0, y: selected ? 0 : 4 }} transition={{ duration: reducedMotion ? 0 : 0.18 }}>{tab}</motion.div>\n </div>;\n })}\n </div>;\n}\n"],"names":[],"mappings":";;;;;;AAYO;AAeD;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAC2B;;AAEzB;AACF;;AAGI;;;AAEA;;AAEA;;AACA;AACA;;;;AASkC;AAClC;;AAKN;;"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -34,4 +34,5 @@ export { ResourceTable, Table } from './components/table.js';
|
|
|
34
34
|
export { Textarea } from './components/textarea.js';
|
|
35
35
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/tooltip.js';
|
|
36
36
|
export { Stepper } from './components/stepper.js';
|
|
37
|
+
export { Tab, TabGroup } from './components/tabs.js';
|
|
37
38
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betterinternship/components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"playground"
|
|
6
6
|
],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"theme.legacy.css"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && rollup -c && tsc-alias",
|
|
16
|
+
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && rollup -c rollup.config.mjs && tsc-alias",
|
|
17
17
|
"prepack": "npm run build",
|
|
18
18
|
"dev:playground": "npm --prefix playground run dev"
|
|
19
19
|
},
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"import": "./dist/components/tooltip.js",
|
|
82
82
|
"types": "./dist/components/tooltip.d.ts"
|
|
83
83
|
},
|
|
84
|
+
"./tabs": {
|
|
85
|
+
"import": "./dist/components/tabs.js",
|
|
86
|
+
"types": "./dist/components/tabs.d.ts"
|
|
87
|
+
},
|
|
84
88
|
"./page-header": {
|
|
85
89
|
"import": "./dist/components/page-header.js",
|
|
86
90
|
"types": "./dist/components/page-header.d.ts"
|
|
@@ -275,6 +279,7 @@
|
|
|
275
279
|
"typescript-eslint": "^8.20.0"
|
|
276
280
|
},
|
|
277
281
|
"dependencies": {
|
|
282
|
+
"framer-motion": "^13.1.1",
|
|
278
283
|
"@daypicker/react": "^10.0.1",
|
|
279
284
|
"@types/react-dom": "^19.2.4",
|
|
280
285
|
"class-variance-authority": "^0.7.1",
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { useId, useRef, useContext, useInsertionEffect } from 'react';
|
|
5
|
-
import { MotionConfigContext } from '../../context/MotionConfigContext.js';
|
|
6
|
-
import { useComposedRefs } from '../../utils/use-composed-ref.js';
|
|
7
|
-
import { isHTMLElement } from '../../../../../motion-dom/dist/es/utils/is-html-element.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Measurement functionality has to be within a separate component
|
|
11
|
-
* to leverage snapshot lifecycle.
|
|
12
|
-
*/
|
|
13
|
-
class PopChildMeasure extends React.Component {
|
|
14
|
-
getSnapshotBeforeUpdate(prevProps) {
|
|
15
|
-
const element = this.props.childRef.current;
|
|
16
|
-
if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {
|
|
17
|
-
const parent = element.offsetParent;
|
|
18
|
-
const parentWidth = isHTMLElement(parent)
|
|
19
|
-
? parent.offsetWidth || 0
|
|
20
|
-
: 0;
|
|
21
|
-
const parentHeight = isHTMLElement(parent)
|
|
22
|
-
? parent.offsetHeight || 0
|
|
23
|
-
: 0;
|
|
24
|
-
const computedStyle = getComputedStyle(element);
|
|
25
|
-
const size = this.props.sizeRef.current;
|
|
26
|
-
size.height = parseFloat(computedStyle.height);
|
|
27
|
-
size.width = parseFloat(computedStyle.width);
|
|
28
|
-
size.top = element.offsetTop;
|
|
29
|
-
size.left = element.offsetLeft;
|
|
30
|
-
size.right = parentWidth - size.width - size.left;
|
|
31
|
-
size.bottom = parentHeight - size.height - size.top;
|
|
32
|
-
size.direction = computedStyle.direction;
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
38
|
-
*/
|
|
39
|
-
componentDidUpdate() { }
|
|
40
|
-
render() {
|
|
41
|
-
return this.props.children;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {
|
|
45
|
-
const id = useId();
|
|
46
|
-
const ref = useRef(null);
|
|
47
|
-
const size = useRef({
|
|
48
|
-
width: 0,
|
|
49
|
-
height: 0,
|
|
50
|
-
top: 0,
|
|
51
|
-
left: 0,
|
|
52
|
-
right: 0,
|
|
53
|
-
bottom: 0,
|
|
54
|
-
direction: "ltr",
|
|
55
|
-
});
|
|
56
|
-
const { nonce } = useContext(MotionConfigContext);
|
|
57
|
-
/**
|
|
58
|
-
* In React 19, refs are passed via props.ref instead of element.ref.
|
|
59
|
-
* We check props.ref first (React 19) and fall back to element.ref (React 18).
|
|
60
|
-
*
|
|
61
|
-
* The composed ref is only used when popping the child out (pop !== false),
|
|
62
|
-
* so we avoid reading children.props.ref otherwise. In React 18.3 that read
|
|
63
|
-
* triggers a spurious "`ref` is not a prop" warning getter (#3745).
|
|
64
|
-
*/
|
|
65
|
-
const childRef = pop !== false
|
|
66
|
-
? (children.props?.ref ??
|
|
67
|
-
children?.ref)
|
|
68
|
-
: undefined;
|
|
69
|
-
const composedRef = useComposedRefs(ref, childRef);
|
|
70
|
-
/**
|
|
71
|
-
* We create and inject a style block so we can apply this explicit
|
|
72
|
-
* sizing in a non-destructive manner by just deleting the style block.
|
|
73
|
-
*
|
|
74
|
-
* We can't apply size via render as the measurement happens
|
|
75
|
-
* in getSnapshotBeforeUpdate (post-render), likewise if we apply the
|
|
76
|
-
* styles directly on the DOM node, we might be overwriting
|
|
77
|
-
* styles set via the style prop.
|
|
78
|
-
*/
|
|
79
|
-
useInsertionEffect(() => {
|
|
80
|
-
const { width, height, top, left, right, bottom, direction } = size.current;
|
|
81
|
-
if (isPresent || pop === false || !ref.current || !width || !height)
|
|
82
|
-
return;
|
|
83
|
-
const isRTL = direction === "rtl";
|
|
84
|
-
const x = anchorX === "left"
|
|
85
|
-
? (isRTL ? `right: ${right}` : `left: ${left}`)
|
|
86
|
-
: (isRTL ? `left: ${left}` : `right: ${right}`);
|
|
87
|
-
const y = anchorY === "bottom" ? `bottom: ${bottom}` : `top: ${top}`;
|
|
88
|
-
ref.current.dataset.motionPopId = id;
|
|
89
|
-
const style = document.createElement("style");
|
|
90
|
-
if (nonce)
|
|
91
|
-
style.nonce = nonce;
|
|
92
|
-
const parent = root ?? document.head;
|
|
93
|
-
parent.appendChild(style);
|
|
94
|
-
if (style.sheet) {
|
|
95
|
-
style.sheet.insertRule(`
|
|
96
|
-
[data-motion-pop-id="${id}"] {
|
|
97
|
-
position: absolute !important;
|
|
98
|
-
width: ${width}px !important;
|
|
99
|
-
height: ${height}px !important;
|
|
100
|
-
${x}px !important;
|
|
101
|
-
${y}px !important;
|
|
102
|
-
}
|
|
103
|
-
`);
|
|
104
|
-
}
|
|
105
|
-
return () => {
|
|
106
|
-
ref.current?.removeAttribute("data-motion-pop-id");
|
|
107
|
-
if (parent.contains(style)) {
|
|
108
|
-
parent.removeChild(style);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
}, [isPresent]);
|
|
112
|
-
return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false
|
|
113
|
-
? children
|
|
114
|
-
: React.cloneElement(children, { ref: composedRef }) }));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export { PopChild };
|
|
118
|
-
//# sourceMappingURL=PopChild.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PopChild.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n if (isPresent || pop === false || !ref.current || !width || !height)\n return;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`);\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? document.head;\n parent.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `);\n }\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":[],"mappings":";;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { useId, useRef, useMemo } from 'react';
|
|
5
|
-
import { PresenceContext } from '../../context/PresenceContext.js';
|
|
6
|
-
import { useConstant } from '../../utils/use-constant.js';
|
|
7
|
-
import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.js';
|
|
8
|
-
import { PopChild } from './PopChild.js';
|
|
9
|
-
|
|
10
|
-
const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {
|
|
11
|
-
const presenceChildren = useConstant(newChildrenMap);
|
|
12
|
-
const id = useId();
|
|
13
|
-
// Written in a layout effect (not render) so discarded concurrent
|
|
14
|
-
// renders can't leave the refs pointing at uncommitted state.
|
|
15
|
-
const isPresentRef = useRef(isPresent);
|
|
16
|
-
const onExitCompleteRef = useRef(onExitComplete);
|
|
17
|
-
useIsomorphicLayoutEffect(() => {
|
|
18
|
-
isPresentRef.current = isPresent;
|
|
19
|
-
onExitCompleteRef.current = onExitComplete;
|
|
20
|
-
});
|
|
21
|
-
let isReusedContext = true;
|
|
22
|
-
let context = useMemo(() => {
|
|
23
|
-
isReusedContext = false;
|
|
24
|
-
return {
|
|
25
|
-
id,
|
|
26
|
-
initial,
|
|
27
|
-
isPresent,
|
|
28
|
-
custom,
|
|
29
|
-
onExitComplete: (childId) => {
|
|
30
|
-
presenceChildren.set(childId, true);
|
|
31
|
-
for (const isComplete of presenceChildren.values()) {
|
|
32
|
-
if (!isComplete)
|
|
33
|
-
return; // can stop searching when any is incomplete
|
|
34
|
-
}
|
|
35
|
-
onExitComplete && onExitComplete();
|
|
36
|
-
},
|
|
37
|
-
register: (childId) => {
|
|
38
|
-
presenceChildren.set(childId, false);
|
|
39
|
-
return () => {
|
|
40
|
-
presenceChildren.delete(childId);
|
|
41
|
-
!isPresentRef.current &&
|
|
42
|
-
!presenceChildren.size &&
|
|
43
|
-
onExitCompleteRef.current?.();
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}, [isPresent, presenceChildren, onExitComplete]);
|
|
48
|
-
/**
|
|
49
|
-
* If the presence of a child affects the layout of the components around it,
|
|
50
|
-
* we want to make a new context value to ensure they get re-rendered
|
|
51
|
-
* so they can detect that layout change.
|
|
52
|
-
*/
|
|
53
|
-
if (presenceAffectsLayout && isReusedContext) {
|
|
54
|
-
context = { ...context };
|
|
55
|
-
}
|
|
56
|
-
useMemo(() => {
|
|
57
|
-
presenceChildren.forEach((_, key) => presenceChildren.set(key, false));
|
|
58
|
-
}, [isPresent]);
|
|
59
|
-
/**
|
|
60
|
-
* If there's no `motion` components to fire exit animations, we want to remove this
|
|
61
|
-
* component immediately.
|
|
62
|
-
*/
|
|
63
|
-
React.useEffect(() => {
|
|
64
|
-
!isPresent &&
|
|
65
|
-
!presenceChildren.size &&
|
|
66
|
-
onExitComplete &&
|
|
67
|
-
onExitComplete();
|
|
68
|
-
}, [isPresent]);
|
|
69
|
-
children = (jsx(PopChild, { pop: mode === "popLayout", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));
|
|
70
|
-
return (jsx(PresenceContext.Provider, { value: context, children: children }));
|
|
71
|
-
};
|
|
72
|
-
function newChildrenMap() {
|
|
73
|
-
return new Map();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { PresenceChild };
|
|
77
|
-
//# sourceMappingURL=PresenceChild.js.map
|
package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PresenceChild.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n // Written in a layout effect (not render) so discarded concurrent\n // renders can't leave the refs pointing at uncommitted state.\n const isPresentRef = useRef(isPresent);\n const onExitCompleteRef = useRef(onExitComplete);\n useIsomorphicLayoutEffect(() => {\n isPresentRef.current = isPresent;\n onExitCompleteRef.current = onExitComplete;\n });\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => {\n presenceChildren.delete(childId);\n !isPresentRef.current &&\n !presenceChildren.size &&\n onExitCompleteRef.current?.();\n };\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n children = (jsx(PopChild, { pop: mode === \"popLayout\", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n//# sourceMappingURL=PresenceChild.mjs.map\n"],"names":[],"mappings":";;;;;;;;;AASK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import { useMemo, useRef, useState, useContext } from 'react';
|
|
4
|
-
import { LayoutGroupContext } from '../../context/LayoutGroupContext.js';
|
|
5
|
-
import { useConstant } from '../../utils/use-constant.js';
|
|
6
|
-
import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.js';
|
|
7
|
-
import { PresenceChild } from './PresenceChild.js';
|
|
8
|
-
import { usePresence } from './use-presence.js';
|
|
9
|
-
import { onlyElements, getChildKey } from './utils.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* `AnimatePresence` enables the animation of components that have been removed from the tree.
|
|
13
|
-
*
|
|
14
|
-
* When adding/removing more than a single child, every child **must** be given a unique `key` prop.
|
|
15
|
-
*
|
|
16
|
-
* Any `motion` components that have an `exit` property defined will animate out when removed from
|
|
17
|
-
* the tree.
|
|
18
|
-
*
|
|
19
|
-
* ```jsx
|
|
20
|
-
* import { motion, AnimatePresence } from 'framer-motion'
|
|
21
|
-
*
|
|
22
|
-
* export const Items = ({ items }) => (
|
|
23
|
-
* <AnimatePresence>
|
|
24
|
-
* {items.map(item => (
|
|
25
|
-
* <motion.div
|
|
26
|
-
* key={item.id}
|
|
27
|
-
* initial={{ opacity: 0 }}
|
|
28
|
-
* animate={{ opacity: 1 }}
|
|
29
|
-
* exit={{ opacity: 0 }}
|
|
30
|
-
* />
|
|
31
|
-
* ))}
|
|
32
|
-
* </AnimatePresence>
|
|
33
|
-
* )
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* You can sequence exit animations throughout a tree using variants.
|
|
37
|
-
*
|
|
38
|
-
* If a child contains multiple `motion` components with `exit` props, it will only unmount the child
|
|
39
|
-
* once all `motion` components have finished animating out. Likewise, any components using
|
|
40
|
-
* `usePresence` all need to call `safeToRemove`.
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
const AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = "sync", propagate = false, anchorX = "left", anchorY = "top", root }) => {
|
|
45
|
-
const [isParentPresent, safeToRemove] = usePresence(propagate);
|
|
46
|
-
/**
|
|
47
|
-
* Filter any children that aren't ReactElements. We can only track components
|
|
48
|
-
* between renders with a props.key.
|
|
49
|
-
*/
|
|
50
|
-
const presentChildren = useMemo(() => onlyElements(children), [children]);
|
|
51
|
-
/**
|
|
52
|
-
* Track the keys of the currently rendered children. This is used to
|
|
53
|
-
* determine which children are exiting.
|
|
54
|
-
*/
|
|
55
|
-
const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);
|
|
56
|
-
/**
|
|
57
|
-
* If `initial={false}` we only want to pass this to components in the first render.
|
|
58
|
-
*/
|
|
59
|
-
const isInitialRender = useRef(true);
|
|
60
|
-
/**
|
|
61
|
-
* A ref containing the currently present children. When all exit animations
|
|
62
|
-
* are complete, we use this to re-render the component with the latest children
|
|
63
|
-
* *committed* rather than the latest children *rendered*.
|
|
64
|
-
*/
|
|
65
|
-
const pendingPresentChildren = useRef(presentChildren);
|
|
66
|
-
/**
|
|
67
|
-
* Track which exiting children have finished animating out.
|
|
68
|
-
*/
|
|
69
|
-
const exitComplete = useConstant(() => new Map());
|
|
70
|
-
/**
|
|
71
|
-
* Track which components are currently processing exit to prevent duplicate processing.
|
|
72
|
-
*/
|
|
73
|
-
const exitingComponents = useRef(new Set());
|
|
74
|
-
/**
|
|
75
|
-
* Save children to render as React state. To ensure this component is concurrent-safe,
|
|
76
|
-
* we check for exiting children via an effect.
|
|
77
|
-
*/
|
|
78
|
-
const [diffedChildren, setDiffedChildren] = useState(presentChildren);
|
|
79
|
-
const [renderedChildren, setRenderedChildren] = useState(presentChildren);
|
|
80
|
-
useIsomorphicLayoutEffect(() => {
|
|
81
|
-
if (propagate && !isParentPresent && !renderedChildren.length) {
|
|
82
|
-
safeToRemove?.();
|
|
83
|
-
}
|
|
84
|
-
}, [isParentPresent, propagate, renderedChildren.length, safeToRemove]);
|
|
85
|
-
useIsomorphicLayoutEffect(() => {
|
|
86
|
-
isInitialRender.current = false;
|
|
87
|
-
pendingPresentChildren.current = presentChildren;
|
|
88
|
-
/**
|
|
89
|
-
* Update complete status of exiting children.
|
|
90
|
-
*/
|
|
91
|
-
for (let i = 0; i < renderedChildren.length; i++) {
|
|
92
|
-
const key = getChildKey(renderedChildren[i]);
|
|
93
|
-
if (!presentKeys.includes(key)) {
|
|
94
|
-
if (exitComplete.get(key) !== true) {
|
|
95
|
-
exitComplete.set(key, false);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
exitComplete.delete(key);
|
|
100
|
-
exitingComponents.current.delete(key);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}, [renderedChildren, presentKeys.length, presentKeys.join("-")]);
|
|
104
|
-
const exitingChildren = [];
|
|
105
|
-
if (presentChildren !== diffedChildren) {
|
|
106
|
-
let nextChildren = [...presentChildren];
|
|
107
|
-
/**
|
|
108
|
-
* Loop through all the currently rendered components and decide which
|
|
109
|
-
* are exiting.
|
|
110
|
-
*
|
|
111
|
-
* Exiting children are reinserted directly after the child they
|
|
112
|
-
* previously followed. Splicing at their index within the previously
|
|
113
|
-
* rendered children, as we used to, indexes into the wrong list: it
|
|
114
|
-
* can interleave them with entering children and push present children
|
|
115
|
-
* to new positions, remounting them (#3746).
|
|
116
|
-
*/
|
|
117
|
-
let insertionIndex = 0;
|
|
118
|
-
for (const child of renderedChildren) {
|
|
119
|
-
const presentIndex = presentKeys.indexOf(getChildKey(child));
|
|
120
|
-
if (presentIndex === -1) {
|
|
121
|
-
nextChildren.splice(insertionIndex++, 0, child);
|
|
122
|
-
exitingChildren.push(child);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
insertionIndex = presentIndex + exitingChildren.length + 1;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* If we're in "wait" mode, and we have exiting children, we want to
|
|
130
|
-
* only render these until they've all exited.
|
|
131
|
-
*/
|
|
132
|
-
if (mode === "wait" && exitingChildren.length) {
|
|
133
|
-
nextChildren = exitingChildren;
|
|
134
|
-
}
|
|
135
|
-
setRenderedChildren(onlyElements(nextChildren));
|
|
136
|
-
setDiffedChildren(presentChildren);
|
|
137
|
-
/**
|
|
138
|
-
* Early return to ensure once we've set state with the latest diffed
|
|
139
|
-
* children, we can immediately re-render.
|
|
140
|
-
*/
|
|
141
|
-
return null;
|
|
142
|
-
}
|
|
143
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
144
|
-
mode === "wait" &&
|
|
145
|
-
renderedChildren.length > 1) {
|
|
146
|
-
console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* If we've been provided a forceRender function by the LayoutGroupContext,
|
|
150
|
-
* we can use it to force a re-render amongst all surrounding components once
|
|
151
|
-
* all components have finished animating out.
|
|
152
|
-
*/
|
|
153
|
-
const { forceRender } = useContext(LayoutGroupContext);
|
|
154
|
-
return (jsx(Fragment, { children: renderedChildren.map((child) => {
|
|
155
|
-
const key = getChildKey(child);
|
|
156
|
-
const isPresent = propagate && !isParentPresent
|
|
157
|
-
? false
|
|
158
|
-
: presentChildren === renderedChildren ||
|
|
159
|
-
presentKeys.includes(key);
|
|
160
|
-
const onExit = () => {
|
|
161
|
-
if (exitingComponents.current.has(key)) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
if (exitComplete.has(key)) {
|
|
165
|
-
exitingComponents.current.add(key);
|
|
166
|
-
exitComplete.set(key, true);
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
let isEveryExitComplete = true;
|
|
172
|
-
exitComplete.forEach((isExitComplete) => {
|
|
173
|
-
if (!isExitComplete)
|
|
174
|
-
isEveryExitComplete = false;
|
|
175
|
-
});
|
|
176
|
-
if (isEveryExitComplete) {
|
|
177
|
-
forceRender?.();
|
|
178
|
-
setRenderedChildren(pendingPresentChildren.current);
|
|
179
|
-
propagate && safeToRemove?.();
|
|
180
|
-
onExitComplete && onExitComplete();
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial
|
|
184
|
-
? undefined
|
|
185
|
-
: false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key));
|
|
186
|
-
}) }));
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
export { AnimatePresence };
|
|
190
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useContext } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { usePresence } from './use-presence.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", propagate = false, anchorX = \"left\", anchorY = \"top\", root }) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate);\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n if (propagate && !isParentPresent && !renderedChildren.length) {\n safeToRemove?.();\n }\n }, [isParentPresent, propagate, renderedChildren.length, safeToRemove]);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n exitingComponents.current.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n *\n * Exiting children are reinserted directly after the child they\n * previously followed. Splicing at their index within the previously\n * rendered children, as we used to, indexes into the wrong list: it\n * can interleave them with entering children and push present children\n * to new positions, remounting them (#3746).\n */\n let insertionIndex = 0;\n for (const child of renderedChildren) {\n const presentIndex = presentKeys.indexOf(getChildKey(child));\n if (presentIndex === -1) {\n nextChildren.splice(insertionIndex++, 0, child);\n exitingChildren.push(child);\n }\n else {\n insertionIndex = presentIndex + exitingChildren.length + 1;\n }\n }\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return;\n }\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key);\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n setRenderedChildren(pendingPresentChildren.current);\n propagate && safeToRemove?.();\n onExitComplete && onExitComplete();\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useContext, useId, useEffect, useCallback } from 'react';
|
|
3
|
-
import { PresenceContext } from '../../context/PresenceContext.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* When a component is the child of `AnimatePresence`, it can use `usePresence`
|
|
7
|
-
* to access information about whether it's still present in the React tree.
|
|
8
|
-
*
|
|
9
|
-
* ```jsx
|
|
10
|
-
* import { usePresence } from "framer-motion"
|
|
11
|
-
*
|
|
12
|
-
* export const Component = () => {
|
|
13
|
-
* const [isPresent, safeToRemove] = usePresence()
|
|
14
|
-
*
|
|
15
|
-
* useEffect(() => {
|
|
16
|
-
* !isPresent && setTimeout(safeToRemove, 1000)
|
|
17
|
-
* }, [isPresent])
|
|
18
|
-
*
|
|
19
|
-
* return <div />
|
|
20
|
-
* }
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* If `isPresent` is `false`, it means that a component has been removed from the tree,
|
|
24
|
-
* but `AnimatePresence` won't really remove it until `safeToRemove` has been called.
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
function usePresence(subscribe = true) {
|
|
29
|
-
const context = useContext(PresenceContext);
|
|
30
|
-
if (context === null)
|
|
31
|
-
return [true, null];
|
|
32
|
-
const { isPresent, onExitComplete, register } = context;
|
|
33
|
-
// It's safe to call the following hooks conditionally (after an early return) because the context will always
|
|
34
|
-
// either be null or non-null for the lifespan of the component.
|
|
35
|
-
const id = useId();
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
if (subscribe) {
|
|
38
|
-
return register(id);
|
|
39
|
-
}
|
|
40
|
-
}, [subscribe]);
|
|
41
|
-
const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);
|
|
42
|
-
return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { usePresence };
|
|
46
|
-
//# sourceMappingURL=use-presence.js.map
|
package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-presence.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs"],"sourcesContent":["\"use client\";\nimport { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed from the tree,\n * but `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe) {\n return register(id);\n }\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n//# sourceMappingURL=use-presence.mjs.map\n"],"names":[],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Children, isValidElement } from 'react';
|
|
2
|
-
|
|
3
|
-
const getChildKey = (child) => child.key || "";
|
|
4
|
-
function onlyElements(children) {
|
|
5
|
-
const filtered = [];
|
|
6
|
-
// We use forEach here instead of map as map mutates the component key by preprending `.$`
|
|
7
|
-
Children.forEach(children, (child) => {
|
|
8
|
-
if (isValidElement(child))
|
|
9
|
-
filtered.push(child);
|
|
10
|
-
});
|
|
11
|
-
return filtered;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { getChildKey, onlyElements };
|
|
15
|
-
//# sourceMappingURL=utils.js.map
|