@betterinternship/components 2.9.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -9
- package/dist/components/{ui/accordion.d.ts → accordion.d.ts} +7 -1
- package/dist/components/accordion.js +23 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/{ui/animated-count.d.ts → animated-count.d.ts} +1 -4
- package/dist/components/animated-count.js +19 -0
- package/dist/components/animated-count.js.map +1 -0
- package/dist/components/animated-shiny-text.d.ts +5 -0
- package/dist/components/{ui/app-header.d.ts → app-header.d.ts} +3 -1
- package/dist/components/app-header.js +72 -0
- package/dist/components/app-header.js.map +1 -0
- package/dist/components/autocomplete.d.ts +34 -0
- package/dist/components/{ui/avatar.js → avatar.js} +1 -1
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/{ui/badge.js → badge.js} +54 -31
- package/dist/components/badge.js.map +1 -0
- package/dist/components/banner.d.ts +17 -0
- package/dist/components/banner.js +41 -0
- package/dist/components/banner.js.map +1 -0
- package/dist/components/button.d.ts +56 -0
- package/dist/components/button.js +53 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +10 -0
- package/dist/components/calendar.js +56 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/{ui/card.d.ts → card.d.ts} +7 -1
- package/dist/components/{ui/card.js → card.js} +10 -4
- package/dist/components/{ui/card.js.map → card.js.map} +1 -1
- package/dist/components/carousel.d.ts +40 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.js +20 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/chip-select.d.ts +18 -0
- package/dist/components/collapsible.d.ts +18 -0
- package/dist/components/context-menu.d.ts +27 -0
- package/dist/components/{ui/dialog.d.ts → dialog.d.ts} +5 -2
- package/dist/components/dialog.js +44 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/divider.d.ts +3 -0
- package/dist/components/divider.js +10 -0
- package/dist/components/divider.js.map +1 -0
- package/dist/components/dot-matrix.d.ts +21 -0
- package/dist/components/dropdown-menu.js +61 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/dropdown.d.ts +65 -0
- package/dist/components/error.d.ts +8 -0
- package/dist/components/file-upload.d.ts +16 -0
- package/dist/components/file-upload.js +29 -0
- package/dist/components/file-upload.js.map +1 -0
- package/dist/components/filter-chip.d.ts +21 -0
- package/dist/components/filter-chip.js +28 -0
- package/dist/components/filter-chip.js.map +1 -0
- package/dist/components/form-checkbox-group.d.ts +31 -0
- package/dist/components/form-checkbox-group.js +29 -0
- package/dist/components/form-checkbox-group.js.map +1 -0
- package/dist/components/form-checkbox.d.ts +15 -0
- package/dist/components/form-checkbox.js +14 -0
- package/dist/components/form-checkbox.js.map +1 -0
- package/dist/components/form-date-picker.d.ts +47 -0
- package/dist/components/form-date-picker.js +55 -0
- package/dist/components/form-date-picker.js.map +1 -0
- package/dist/components/form-field.d.ts +14 -0
- package/dist/components/form-field.js +10 -0
- package/dist/components/form-field.js.map +1 -0
- package/dist/components/form-input.d.ts +11 -0
- package/dist/components/form-input.js +12 -0
- package/dist/components/form-input.js.map +1 -0
- package/dist/components/form-month-picker.d.ts +26 -0
- package/dist/components/form-month-picker.js +55 -0
- package/dist/components/form-month-picker.js.map +1 -0
- package/dist/components/form-radio.d.ts +15 -0
- package/dist/components/form-radio.js +20 -0
- package/dist/components/form-radio.js.map +1 -0
- package/dist/components/form-textarea.d.ts +11 -0
- package/dist/components/form-textarea.js +11 -0
- package/dist/components/form-textarea.js.map +1 -0
- package/dist/components/form.d.ts +24 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/input-otp.d.ts +39 -0
- package/dist/components/input.js +30 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +15 -0
- package/dist/components/label.js +19 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/loader.d.ts +20 -0
- package/dist/components/loader.js +14 -0
- package/dist/components/loader.js.map +1 -0
- package/dist/components/magnetic-button.d.ts +5 -0
- package/dist/components/messages.d.ts +6 -0
- package/dist/components/mobile-sheet-portal.d.ts +9 -0
- package/dist/components/page-header.d.ts +6 -0
- package/dist/components/page-header.js +9 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/paginator.d.ts +9 -0
- package/dist/components/{ui/popover.js → popover.js} +2 -2
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.js +17 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +50 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/sheet.d.ts +27 -0
- package/dist/components/{ui/skeleton.js → skeleton.js} +2 -2
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/sonner-toast.d.ts +106 -0
- package/dist/components/stepper.d.ts +9 -0
- package/dist/components/stepper.js +14 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.js +10 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +33 -0
- package/dist/components/table.js +88 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +22 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +11 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/time-input-native.d.ts +14 -0
- package/dist/components/time-input-native.js +61 -0
- package/dist/components/time-input-native.js.map +1 -0
- package/dist/components/timeline.d.ts +17 -0
- package/dist/components/toggle.d.ts +5 -0
- package/dist/components/{ui/tooltip.js → tooltip.js} +2 -2
- package/dist/components/tooltip.js.map +1 -0
- package/dist/design-tokens.d.ts +69 -0
- package/dist/hooks/use-detect-click-outside.d.ts +4 -0
- package/dist/hooks/use-field-focus.d.ts +37 -0
- package/dist/hooks/use-field-focus.js +57 -0
- package/dist/hooks/use-field-focus.js.map +1 -0
- package/dist/hooks/use-mobile-sheet-viewport.d.ts +6 -0
- package/dist/hooks/use-mobile-sheet-viewport.js +60 -0
- package/dist/hooks/use-mobile-sheet-viewport.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-resource-table.d.ts +141 -0
- package/dist/index.d.ts +36 -22
- package/dist/index.js +34 -22
- package/dist/index.js.map +1 -1
- package/dist/lib/interaction-styles.d.ts +10 -0
- package/dist/lib/interaction-styles.js +15 -0
- package/dist/lib/interaction-styles.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +118 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +77 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +190 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +46 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +18 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +11 -0
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +586 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +51 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +130 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +42 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +31 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +285 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +51 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +38 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +71 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +41 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +49 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +18 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +138 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +12 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +16 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +77 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +50 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +113 -0
- package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +52 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +166 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +81 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +59 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +46 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +19 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +28 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +37 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +31 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +12 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +59 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +26 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +12 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +49 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +61 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +20 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +200 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +386 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +181 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +88 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +88 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +52 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +331 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +106 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +109 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +60 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +142 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +148 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +47 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +44 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +41 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +55 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +73 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +84 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +70 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +97 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +39 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +69 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +125 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +59 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +55 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +1660 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +85 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +42 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +36 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +53 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +564 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +84 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +55 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +66 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +72 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +52 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +64 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +387 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +36 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +56 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +64 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +80 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +48 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +94 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js +320 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +41 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +26 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +30 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +114 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +71 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/array.js +12 -0
- package/dist/node_modules/motion-utils/dist/es/array.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/clamp.js +10 -0
- package/dist/node_modules/motion-utils/dist/es/clamp.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +10 -0
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +10 -0
- package/dist/node_modules/motion-utils/dist/es/easing/back.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +9 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +53 -0
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +42 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +20 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/memo.js +12 -0
- package/dist/node_modules/motion-utils/dist/es/memo.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/noop.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/noop.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/pipe.js +11 -0
- package/dist/node_modules/motion-utils/dist/es/pipe.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/progress.js +15 -0
- package/dist/node_modules/motion-utils/dist/es/progress.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +41 -0
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +13 -0
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +12 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js.map +1 -0
- package/package.json +107 -71
- package/theme.css +147 -20
- package/theme.legacy.css +84 -0
- package/dist/components/ui/accordion.js +0 -20
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/animated-count.js +0 -22
- package/dist/components/ui/animated-count.js.map +0 -1
- package/dist/components/ui/app-header.js +0 -72
- package/dist/components/ui/app-header.js.map +0 -1
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -22
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/button.d.ts +0 -13
- package/dist/components/ui/button.js +0 -88
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/button.test.d.ts +0 -1
- package/dist/components/ui/calendar.d.ts +0 -7
- package/dist/components/ui/checkbox.d.ts +0 -4
- package/dist/components/ui/checkbox.js +0 -11
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/dialog.js +0 -41
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/dropdown-menu.js +0 -61
- package/dist/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/fab.js +0 -9
- package/dist/components/ui/fab.js.map +0 -1
- package/dist/components/ui/icons.d.ts +0 -10
- package/dist/components/ui/icons.js +0 -39
- package/dist/components/ui/icons.js.map +0 -1
- package/dist/components/ui/input.js +0 -17
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/label.d.ts +0 -4
- package/dist/components/ui/label.js +0 -10
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/page-header.d.ts +0 -18
- package/dist/components/ui/page-header.js +0 -17
- package/dist/components/ui/page-header.js.map +0 -1
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -4
- package/dist/components/ui/separator.js +0 -10
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/status-notice.d.ts +0 -14
- package/dist/components/ui/status-notice.js +0 -27
- package/dist/components/ui/status-notice.js.map +0 -1
- package/dist/components/ui/switch.js +0 -10
- package/dist/components/ui/switch.js.map +0 -1
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/components/ui/table.js +0 -30
- package/dist/components/ui/table.js.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/textarea.js +0 -9
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/tooltip.js.map +0 -1
- package/dist/config.d.ts +0 -6
- package/dist/config.js +0 -9
- package/dist/config.js.map +0 -1
- package/dist/hooks/useClientProcess.d.ts +0 -69
- package/dist/hooks/useClientProcess.js +0 -255
- package/dist/hooks/useClientProcess.js.map +0 -1
- /package/dist/components/{ui/avatar.d.ts → avatar.d.ts} +0 -0
- /package/dist/components/{ui/dropdown-menu.d.ts → dropdown-menu.d.ts} +0 -0
- /package/dist/components/{ui/fab.d.ts → fab.d.ts} +0 -0
- /package/dist/components/{ui/input.d.ts → input.d.ts} +0 -0
- /package/dist/components/{ui/popover.d.ts → popover.d.ts} +0 -0
- /package/dist/components/{ui/skeleton.d.ts → skeleton.d.ts} +0 -0
- /package/dist/components/{ui/switch.d.ts → switch.d.ts} +0 -0
- /package/dist/components/{ui/tooltip.d.ts → tooltip.d.ts} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DragGesture } from '../../gestures/drag/index.js';
|
|
2
|
+
import { PanGesture } from '../../gestures/pan/index.js';
|
|
3
|
+
import { MeasureLayout } from './layout/MeasureLayout.js';
|
|
4
|
+
import { HTMLProjectionNode } from '../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js';
|
|
5
|
+
|
|
6
|
+
const drag = {
|
|
7
|
+
pan: {
|
|
8
|
+
Feature: PanGesture,
|
|
9
|
+
},
|
|
10
|
+
drag: {
|
|
11
|
+
Feature: DragGesture,
|
|
12
|
+
ProjectionNode: HTMLProjectionNode,
|
|
13
|
+
MeasureLayout,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { drag };
|
|
18
|
+
//# sourceMappingURL=drag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/drag.mjs"],"sourcesContent":["import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from 'motion-dom';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n//# sourceMappingURL=drag.mjs.map\n"],"names":[],"mappings":";;;;;AAKK,MAAC,IAAI,GAAG;AACb,IAAI,GAAG,EAAE;AACT,QAAQ,OAAO,EAAE,UAAU;AAC3B,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,OAAO,EAAE,WAAW;AAC5B,QAAQ,cAAc,EAAE,kBAAkB;AAC1C,QAAQ,aAAa;AACrB,KAAK;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HoverGesture } from '../../gestures/hover.js';
|
|
2
|
+
import { FocusGesture } from '../../gestures/focus.js';
|
|
3
|
+
import { PressGesture } from '../../gestures/press.js';
|
|
4
|
+
import { InViewFeature } from './viewport/index.js';
|
|
5
|
+
|
|
6
|
+
const gestureAnimations = {
|
|
7
|
+
inView: {
|
|
8
|
+
Feature: InViewFeature,
|
|
9
|
+
},
|
|
10
|
+
tap: {
|
|
11
|
+
Feature: PressGesture,
|
|
12
|
+
},
|
|
13
|
+
focus: {
|
|
14
|
+
Feature: FocusGesture,
|
|
15
|
+
},
|
|
16
|
+
hover: {
|
|
17
|
+
Feature: HoverGesture,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { gestureAnimations };
|
|
22
|
+
//# sourceMappingURL=gestures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gestures.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/gestures.mjs"],"sourcesContent":["import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n//# sourceMappingURL=gestures.mjs.map\n"],"names":[],"mappings":";;;;;AAKK,MAAC,iBAAiB,GAAG;AAC1B,IAAI,MAAM,EAAE;AACZ,QAAQ,OAAO,EAAE,aAAa;AAC9B,KAAK;AACL,IAAI,GAAG,EAAE;AACT,QAAQ,OAAO,EAAE,YAAY;AAC7B,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,OAAO,EAAE,YAAY;AAC7B,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,OAAO,EAAE,YAAY;AAC7B,KAAK;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useContext, Component } from 'react';
|
|
4
|
+
import { usePresence } from '../../../components/AnimatePresence/use-presence.js';
|
|
5
|
+
import { LayoutGroupContext } from '../../../context/LayoutGroupContext.js';
|
|
6
|
+
import { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.js';
|
|
7
|
+
import { globalProjectionState } from '../../../../../../motion-dom/dist/es/projection/node/state.js';
|
|
8
|
+
import { frame } from '../../../../../../motion-dom/dist/es/frameloop/frame.js';
|
|
9
|
+
import { microtask } from '../../../../../../motion-dom/dist/es/frameloop/microtask.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Track whether we've taken any snapshots yet. If not,
|
|
13
|
+
* we can safely skip notification of didUpdate.
|
|
14
|
+
*
|
|
15
|
+
* Difficult to capture in a test but to prevent flickering
|
|
16
|
+
* we must set this to true either on update or unmount.
|
|
17
|
+
* Running `next-env/layout-id` in Safari will show this behaviour if broken.
|
|
18
|
+
*/
|
|
19
|
+
let hasTakenAnySnapshot = false;
|
|
20
|
+
class MeasureLayoutWithContext extends Component {
|
|
21
|
+
/**
|
|
22
|
+
* This only mounts projection nodes for components that
|
|
23
|
+
* need measuring, we might want to do it for all components
|
|
24
|
+
* in order to incorporate transforms
|
|
25
|
+
*/
|
|
26
|
+
componentDidMount() {
|
|
27
|
+
const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;
|
|
28
|
+
const { projection } = visualElement;
|
|
29
|
+
if (projection) {
|
|
30
|
+
if (layoutGroup.group)
|
|
31
|
+
layoutGroup.group.add(projection);
|
|
32
|
+
if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {
|
|
33
|
+
switchLayoutGroup.register(projection);
|
|
34
|
+
}
|
|
35
|
+
if (hasTakenAnySnapshot) {
|
|
36
|
+
projection.root.didUpdate();
|
|
37
|
+
}
|
|
38
|
+
projection.addEventListener("animationComplete", () => {
|
|
39
|
+
this.safeToRemove();
|
|
40
|
+
});
|
|
41
|
+
projection.setOptions({
|
|
42
|
+
...projection.options,
|
|
43
|
+
layoutDependency: this.props.layoutDependency,
|
|
44
|
+
onExitComplete: () => this.safeToRemove(),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
globalProjectionState.hasEverUpdated = true;
|
|
48
|
+
}
|
|
49
|
+
getSnapshotBeforeUpdate(prevProps) {
|
|
50
|
+
const { layoutDependency, visualElement, drag, isPresent } = this.props;
|
|
51
|
+
const { projection } = visualElement;
|
|
52
|
+
if (!projection)
|
|
53
|
+
return null;
|
|
54
|
+
/**
|
|
55
|
+
* TODO: We use this data in relegate to determine whether to
|
|
56
|
+
* promote a previous element. There's no guarantee its presence data
|
|
57
|
+
* will have updated by this point - if a bug like this arises it will
|
|
58
|
+
* have to be that we markForRelegation and then find a new lead some other way,
|
|
59
|
+
* perhaps in didUpdate
|
|
60
|
+
*/
|
|
61
|
+
projection.isPresent = isPresent;
|
|
62
|
+
if (prevProps.layoutDependency !== layoutDependency) {
|
|
63
|
+
projection.setOptions({
|
|
64
|
+
...projection.options,
|
|
65
|
+
layoutDependency,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
hasTakenAnySnapshot = true;
|
|
69
|
+
if (drag ||
|
|
70
|
+
prevProps.layoutDependency !== layoutDependency ||
|
|
71
|
+
layoutDependency === undefined ||
|
|
72
|
+
prevProps.isPresent !== isPresent) {
|
|
73
|
+
projection.willUpdate();
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this.safeToRemove();
|
|
77
|
+
}
|
|
78
|
+
if (prevProps.isPresent !== isPresent) {
|
|
79
|
+
if (isPresent) {
|
|
80
|
+
projection.promote();
|
|
81
|
+
}
|
|
82
|
+
else if (!projection.relegate()) {
|
|
83
|
+
/**
|
|
84
|
+
* If there's another stack member taking over from this one,
|
|
85
|
+
* it's in charge of the exit animation and therefore should
|
|
86
|
+
* be in charge of the safe to remove. Otherwise we call it here.
|
|
87
|
+
*/
|
|
88
|
+
frame.postRender(() => {
|
|
89
|
+
const stack = projection.getStack();
|
|
90
|
+
if (!stack || !stack.members.length) {
|
|
91
|
+
this.safeToRemove();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
componentDidUpdate() {
|
|
99
|
+
const { visualElement, layoutAnchor } = this.props;
|
|
100
|
+
const { projection } = visualElement;
|
|
101
|
+
if (projection) {
|
|
102
|
+
projection.options.layoutAnchor = layoutAnchor;
|
|
103
|
+
projection.root.didUpdate();
|
|
104
|
+
microtask.postRender(() => {
|
|
105
|
+
if (!projection.currentAnimation && projection.isLead()) {
|
|
106
|
+
this.safeToRemove();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
componentWillUnmount() {
|
|
112
|
+
const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;
|
|
113
|
+
const { projection } = visualElement;
|
|
114
|
+
hasTakenAnySnapshot = true;
|
|
115
|
+
if (projection) {
|
|
116
|
+
projection.scheduleCheckAfterUnmount();
|
|
117
|
+
if (layoutGroup && layoutGroup.group)
|
|
118
|
+
layoutGroup.group.remove(projection);
|
|
119
|
+
if (promoteContext && promoteContext.deregister)
|
|
120
|
+
promoteContext.deregister(projection);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
safeToRemove() {
|
|
124
|
+
const { safeToRemove } = this.props;
|
|
125
|
+
safeToRemove && safeToRemove();
|
|
126
|
+
}
|
|
127
|
+
render() {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function MeasureLayout(props) {
|
|
132
|
+
const [isPresent, safeToRemove] = usePresence();
|
|
133
|
+
const layoutGroup = useContext(LayoutGroupContext);
|
|
134
|
+
return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export { MeasureLayout };
|
|
138
|
+
//# sourceMappingURL=MeasureLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MeasureLayout.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { globalProjectionState, frame, microtask } from 'motion-dom';\nimport { useContext, Component } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\n\n/**\n * Track whether we've taken any snapshots yet. If not,\n * we can safely skip notification of didUpdate.\n *\n * Difficult to capture in a test but to prevent flickering\n * we must set this to true either on update or unmount.\n * Running `next-env/layout-id` in Safari will show this behaviour if broken.\n */\nlet hasTakenAnySnapshot = false;\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n if (hasTakenAnySnapshot) {\n projection.root.didUpdate();\n }\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n layoutDependency: this.props.layoutDependency,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const { projection } = visualElement;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (prevProps.layoutDependency !== layoutDependency) {\n projection.setOptions({\n ...projection.options,\n layoutDependency,\n });\n }\n hasTakenAnySnapshot = true;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { visualElement, layoutAnchor } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.options.layoutAnchor = layoutAnchor;\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n hasTakenAnySnapshot = true;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\n\nexport { MeasureLayout };\n//# sourceMappingURL=MeasureLayout.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MeasureLayout } from './layout/MeasureLayout.js';
|
|
2
|
+
import { HTMLProjectionNode } from '../../../../../motion-dom/dist/es/projection/node/HTMLProjectionNode.js';
|
|
3
|
+
|
|
4
|
+
const layout = {
|
|
5
|
+
layout: {
|
|
6
|
+
ProjectionNode: HTMLProjectionNode,
|
|
7
|
+
MeasureLayout,
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { layout };
|
|
12
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/layout.mjs"],"sourcesContent":["import { HTMLProjectionNode } from 'motion-dom';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n//# sourceMappingURL=layout.mjs.map\n"],"names":[],"mappings":";;;AAGK,MAAC,MAAM,GAAG;AACf,IAAI,MAAM,EAAE;AACZ,QAAQ,cAAc,EAAE,kBAAkB;AAC1C,QAAQ,aAAa;AACrB,KAAK;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getInitializedFeatureDefinitions } from './definitions.js';
|
|
2
|
+
import { setFeatureDefinitions } from '../../../../../motion-dom/dist/es/render/VisualElement.js';
|
|
3
|
+
|
|
4
|
+
function loadFeatures(features) {
|
|
5
|
+
const featureDefinitions = getInitializedFeatureDefinitions();
|
|
6
|
+
for (const key in features) {
|
|
7
|
+
featureDefinitions[key] = {
|
|
8
|
+
...featureDefinitions[key],
|
|
9
|
+
...features[key],
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
setFeatureDefinitions(featureDefinitions);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { loadFeatures };
|
|
16
|
+
//# sourceMappingURL=load-features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-features.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/load-features.mjs"],"sourcesContent":["import { setFeatureDefinitions } from 'motion-dom';\nimport { getInitializedFeatureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n setFeatureDefinitions(featureDefinitions);\n}\n\nexport { loadFeatures };\n//# sourceMappingURL=load-features.mjs.map\n"],"names":[],"mappings":";;;AAGA,SAAS,YAAY,CAAC,QAAQ,EAAE;AAChC,IAAI,MAAM,kBAAkB,GAAG,gCAAgC,EAAE;AACjE,IAAI,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;AAChC,QAAQ,kBAAkB,CAAC,GAAG,CAAC,GAAG;AAClC,YAAY,GAAG,kBAAkB,CAAC,GAAG,CAAC;AACtC,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC5B,SAAS;AACT,IAAI;AACJ,IAAI,qBAAqB,CAAC,kBAAkB,CAAC;AAC7C;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { observeIntersection } from './observers.js';
|
|
2
|
+
import { Feature } from '../../../../../../motion-dom/dist/es/render/Feature.js';
|
|
3
|
+
|
|
4
|
+
const thresholdNames = {
|
|
5
|
+
some: 0,
|
|
6
|
+
all: 1,
|
|
7
|
+
};
|
|
8
|
+
class InViewFeature extends Feature {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.hasEnteredView = false;
|
|
12
|
+
this.isInView = false;
|
|
13
|
+
}
|
|
14
|
+
startObserver() {
|
|
15
|
+
this.stopObserver?.();
|
|
16
|
+
const { viewport = {} } = this.node.getProps();
|
|
17
|
+
const { root, margin: rootMargin, amount = "some", once } = viewport;
|
|
18
|
+
const options = {
|
|
19
|
+
root: root ? root.current : undefined,
|
|
20
|
+
rootMargin,
|
|
21
|
+
threshold: typeof amount === "number" ? amount : thresholdNames[amount],
|
|
22
|
+
};
|
|
23
|
+
const onIntersectionUpdate = (entry) => {
|
|
24
|
+
const { isIntersecting } = entry;
|
|
25
|
+
/**
|
|
26
|
+
* If there's been no change in the viewport state, early return.
|
|
27
|
+
*/
|
|
28
|
+
if (this.isInView === isIntersecting)
|
|
29
|
+
return;
|
|
30
|
+
this.isInView = isIntersecting;
|
|
31
|
+
/**
|
|
32
|
+
* Handle hasEnteredView. If this is only meant to run once, and
|
|
33
|
+
* element isn't visible, early return. Otherwise set hasEnteredView to true.
|
|
34
|
+
*/
|
|
35
|
+
if (once && !isIntersecting && this.hasEnteredView) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
else if (isIntersecting) {
|
|
39
|
+
this.hasEnteredView = true;
|
|
40
|
+
}
|
|
41
|
+
if (this.node.animationState) {
|
|
42
|
+
this.node.animationState.setActive("whileInView", isIntersecting);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Use the latest committed props rather than the ones in scope
|
|
46
|
+
* when this observer is created
|
|
47
|
+
*/
|
|
48
|
+
const { onViewportEnter, onViewportLeave } = this.node.getProps();
|
|
49
|
+
const callback = isIntersecting ? onViewportEnter : onViewportLeave;
|
|
50
|
+
callback && callback(entry);
|
|
51
|
+
};
|
|
52
|
+
this.stopObserver = observeIntersection(this.node.current, options, onIntersectionUpdate);
|
|
53
|
+
}
|
|
54
|
+
mount() {
|
|
55
|
+
this.startObserver();
|
|
56
|
+
}
|
|
57
|
+
update() {
|
|
58
|
+
if (typeof IntersectionObserver === "undefined")
|
|
59
|
+
return;
|
|
60
|
+
const { props, prevProps } = this.node;
|
|
61
|
+
const hasOptionsChanged = ["amount", "margin", "root"].some(hasViewportOptionChanged(props, prevProps));
|
|
62
|
+
if (hasOptionsChanged) {
|
|
63
|
+
this.startObserver();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
unmount() {
|
|
67
|
+
this.stopObserver?.();
|
|
68
|
+
this.hasEnteredView = false;
|
|
69
|
+
this.isInView = false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {
|
|
73
|
+
return (name) => viewport[name] !== prevViewport[name];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { InViewFeature };
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs"],"sourcesContent":["import { Feature } from 'motion-dom';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.stopObserver?.();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n this.stopObserver = observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() {\n this.stopObserver?.();\n this.hasEnteredView = false;\n this.isInView = false;\n }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;AAGA,MAAM,cAAc,GAAG;AACvB,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,GAAG,EAAE,CAAC;AACV,CAAC;AACD,MAAM,aAAa,SAAS,OAAO,CAAC;AACpC,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC;AAC3B,QAAQ,IAAI,CAAC,cAAc,GAAG,KAAK;AACnC,QAAQ,IAAI,CAAC,QAAQ,GAAG,KAAK;AAC7B,IAAI;AACJ,IAAI,aAAa,GAAG;AACpB,QAAQ,IAAI,CAAC,YAAY,IAAI;AAC7B,QAAQ,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AACtD,QAAQ,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ;AAC5E,QAAQ,MAAM,OAAO,GAAG;AACxB,YAAY,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,OAAO,GAAG,SAAS;AACjD,YAAY,UAAU;AACtB,YAAY,SAAS,EAAE,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;AACnF,SAAS;AACT,QAAQ,MAAM,oBAAoB,GAAG,CAAC,KAAK,KAAK;AAChD,YAAY,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK;AAC5C;AACA;AACA;AACA,YAAY,IAAI,IAAI,CAAC,QAAQ,KAAK,cAAc;AAChD,gBAAgB;AAChB,YAAY,IAAI,CAAC,QAAQ,GAAG,cAAc;AAC1C;AACA;AACA;AACA;AACA,YAAY,IAAI,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,EAAE;AAChE,gBAAgB;AAChB,YAAY;AACZ,iBAAiB,IAAI,cAAc,EAAE;AACrC,gBAAgB,IAAI,CAAC,cAAc,GAAG,IAAI;AAC1C,YAAY;AACZ,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;AAC1C,gBAAgB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,aAAa,EAAE,cAAc,CAAC;AACjF,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAC7E,YAAY,MAAM,QAAQ,GAAG,cAAc,GAAG,eAAe,GAAG,eAAe;AAC/E,YAAY,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC;AACvC,QAAQ,CAAC;AACT,QAAQ,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,CAAC;AACjG,IAAI;AACJ,IAAI,KAAK,GAAG;AACZ,QAAQ,IAAI,CAAC,aAAa,EAAE;AAC5B,IAAI;AACJ,IAAI,MAAM,GAAG;AACb,QAAQ,IAAI,OAAO,oBAAoB,KAAK,WAAW;AACvD,YAAY;AACZ,QAAQ,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,IAAI;AAC9C,QAAQ,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC/G,QAAQ,IAAI,iBAAiB,EAAE;AAC/B,YAAY,IAAI,CAAC,aAAa,EAAE;AAChC,QAAQ;AACR,IAAI;AACJ,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,YAAY,IAAI;AAC7B,QAAQ,IAAI,CAAC,cAAc,GAAG,KAAK;AACnC,QAAQ,IAAI,CAAC,QAAQ,GAAG,KAAK;AAC7B,IAAI;AACJ;AACA,SAAS,wBAAwB,CAAC,EAAE,QAAQ,GAAG,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE;AAC3F,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,KAAK,YAAY,CAAC,IAAI,CAAC;AAC1D;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map an IntersectionHandler callback to an element. We only ever make one handler for one
|
|
3
|
+
* element, so even though these handlers might all be triggered by different
|
|
4
|
+
* observers, we can keep them in the same map.
|
|
5
|
+
*/
|
|
6
|
+
const observerCallbacks = new WeakMap();
|
|
7
|
+
/**
|
|
8
|
+
* Multiple observers can be created for multiple element/document roots. Each with
|
|
9
|
+
* different settings. So here we store dictionaries of observers to each root,
|
|
10
|
+
* using serialised settings (threshold/margin) as lookup keys.
|
|
11
|
+
*/
|
|
12
|
+
const observers = new WeakMap();
|
|
13
|
+
const fireObserverCallback = (entry) => {
|
|
14
|
+
const callback = observerCallbacks.get(entry.target);
|
|
15
|
+
callback && callback(entry);
|
|
16
|
+
};
|
|
17
|
+
const fireAllObserverCallbacks = (entries) => {
|
|
18
|
+
entries.forEach(fireObserverCallback);
|
|
19
|
+
};
|
|
20
|
+
function initIntersectionObserver({ root, ...options }) {
|
|
21
|
+
const lookupRoot = root || document;
|
|
22
|
+
/**
|
|
23
|
+
* If we don't have an observer lookup map for this root, create one.
|
|
24
|
+
*/
|
|
25
|
+
if (!observers.has(lookupRoot)) {
|
|
26
|
+
observers.set(lookupRoot, {});
|
|
27
|
+
}
|
|
28
|
+
const rootObservers = observers.get(lookupRoot);
|
|
29
|
+
const key = JSON.stringify(options);
|
|
30
|
+
/**
|
|
31
|
+
* If we don't have an observer for this combination of root and settings,
|
|
32
|
+
* create one.
|
|
33
|
+
*/
|
|
34
|
+
if (!rootObservers[key]) {
|
|
35
|
+
rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });
|
|
36
|
+
}
|
|
37
|
+
return rootObservers[key];
|
|
38
|
+
}
|
|
39
|
+
function observeIntersection(element, options, callback) {
|
|
40
|
+
const rootInteresectionObserver = initIntersectionObserver(options);
|
|
41
|
+
observerCallbacks.set(element, callback);
|
|
42
|
+
rootInteresectionObserver.observe(element);
|
|
43
|
+
return () => {
|
|
44
|
+
observerCallbacks.delete(element);
|
|
45
|
+
rootInteresectionObserver.unobserve(element);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { observeIntersection };
|
|
50
|
+
//# sourceMappingURL=observers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observers.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs"],"sourcesContent":["/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n//# sourceMappingURL=observers.mjs.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAE;AACvC;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,IAAI,OAAO,EAAE;AAC/B,MAAM,oBAAoB,GAAG,CAAC,KAAK,KAAK;AACxC,IAAI,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC;AACxD,IAAI,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC;AAC/B,CAAC;AACD,MAAM,wBAAwB,GAAG,CAAC,OAAO,KAAK;AAC9C,IAAI,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE;AACxD,IAAI,MAAM,UAAU,GAAG,IAAI,IAAI,QAAQ;AACvC;AACA;AACA;AACA,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;AACpC,QAAQ,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,CAAC;AACrC,IAAI;AACJ,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;AACnD,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;AACvC;AACA;AACA;AACA;AACA,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;AAC7B,QAAQ,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,oBAAoB,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC;AACrG,IAAI;AACJ,IAAI,OAAO,aAAa,CAAC,GAAG,CAAC;AAC7B;AACA,SAAS,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;AACzD,IAAI,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,OAAO,CAAC;AACvE,IAAI,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC;AAC5C,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC;AAC9C,IAAI,OAAO,MAAM;AACjB,QAAQ,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC;AACzC,QAAQ,yBAAyB,CAAC,SAAS,CAAC,OAAO,CAAC;AACpD,IAAI,CAAC;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, useContext } from 'react';
|
|
4
|
+
import { LayoutGroupContext } from '../context/LayoutGroupContext.js';
|
|
5
|
+
import { LazyContext } from '../context/LazyContext.js';
|
|
6
|
+
import { MotionConfigContext } from '../context/MotionConfigContext.js';
|
|
7
|
+
import { MotionContext } from '../context/MotionContext/index.js';
|
|
8
|
+
import { useCreateMotionContext } from '../context/MotionContext/create.js';
|
|
9
|
+
import { useRender } from '../render/dom/use-render.js';
|
|
10
|
+
import { isSVGComponent } from '../render/dom/utils/is-svg-component.js';
|
|
11
|
+
import { useHTMLVisualState } from '../render/html/use-html-visual-state.js';
|
|
12
|
+
import { useSVGVisualState } from '../render/svg/use-svg-visual-state.js';
|
|
13
|
+
import { getInitializedFeatureDefinitions } from './features/definitions.js';
|
|
14
|
+
import { loadFeatures } from './features/load-features.js';
|
|
15
|
+
import { motionComponentSymbol } from './utils/symbol.js';
|
|
16
|
+
import { useMotionRef } from './utils/use-motion-ref.js';
|
|
17
|
+
import { useVisualElement } from './utils/use-visual-element.js';
|
|
18
|
+
import { warning, invariant } from '../../../../motion-utils/dist/es/errors.js';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Create a `motion` component.
|
|
22
|
+
*
|
|
23
|
+
* This function accepts a Component argument, which can be either a string (ie "div"
|
|
24
|
+
* for `motion.div`), or an actual React component.
|
|
25
|
+
*
|
|
26
|
+
* Alongside this is a config option which provides a way of rendering the provided
|
|
27
|
+
* component "offline", or outside the React render cycle.
|
|
28
|
+
*/
|
|
29
|
+
function createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) {
|
|
30
|
+
preloadedFeatures && loadFeatures(preloadedFeatures);
|
|
31
|
+
/**
|
|
32
|
+
* Determine whether to use SVG or HTML rendering based on:
|
|
33
|
+
* 1. Explicit `type` option (highest priority)
|
|
34
|
+
* 2. Auto-detection via `isSVGComponent`
|
|
35
|
+
*/
|
|
36
|
+
const isSVG = type ? type === "svg" : isSVGComponent(Component);
|
|
37
|
+
const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState;
|
|
38
|
+
function MotionDOMComponent(props, externalRef) {
|
|
39
|
+
/**
|
|
40
|
+
* If we need to measure the element we load this functionality in a
|
|
41
|
+
* separate class component in order to gain access to getSnapshotBeforeUpdate.
|
|
42
|
+
*/
|
|
43
|
+
let MeasureLayout;
|
|
44
|
+
const configAndProps = {
|
|
45
|
+
...useContext(MotionConfigContext),
|
|
46
|
+
...props,
|
|
47
|
+
layoutId: useLayoutId(props),
|
|
48
|
+
};
|
|
49
|
+
const { isStatic, isValidProp } = configAndProps;
|
|
50
|
+
const context = useCreateMotionContext(props);
|
|
51
|
+
const visualState = useVisualState(props, isStatic);
|
|
52
|
+
if (!isStatic && typeof window !== "undefined") {
|
|
53
|
+
useStrictMode(configAndProps, preloadedFeatures);
|
|
54
|
+
const layoutProjection = getProjectionFunctionality(configAndProps);
|
|
55
|
+
MeasureLayout = layoutProjection.MeasureLayout;
|
|
56
|
+
/**
|
|
57
|
+
* Create a VisualElement for this component. A VisualElement provides a common
|
|
58
|
+
* interface to renderer-specific APIs (ie DOM/Three.js etc) as well as
|
|
59
|
+
* providing a way of rendering to these APIs outside of the React render loop
|
|
60
|
+
* for more performant animations and interactions
|
|
61
|
+
*/
|
|
62
|
+
context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The mount order and hierarchy is specific to ensure our element ref
|
|
66
|
+
* is hydrated by the time features fire their effects.
|
|
67
|
+
*/
|
|
68
|
+
return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG, isValidProp)] }));
|
|
69
|
+
}
|
|
70
|
+
MotionDOMComponent.displayName = `motion.${typeof Component === "string"
|
|
71
|
+
? Component
|
|
72
|
+
: `create(${Component.displayName ?? Component.name ?? ""})`}`;
|
|
73
|
+
const ForwardRefMotionComponent = forwardRef(MotionDOMComponent);
|
|
74
|
+
ForwardRefMotionComponent[motionComponentSymbol] = Component;
|
|
75
|
+
return ForwardRefMotionComponent;
|
|
76
|
+
}
|
|
77
|
+
function useLayoutId({ layoutId }) {
|
|
78
|
+
const layoutGroupId = useContext(LayoutGroupContext).id;
|
|
79
|
+
return layoutGroupId && layoutId !== undefined
|
|
80
|
+
? layoutGroupId + "-" + layoutId
|
|
81
|
+
: layoutId;
|
|
82
|
+
}
|
|
83
|
+
function useStrictMode(configAndProps, preloadedFeatures) {
|
|
84
|
+
const isStrict = useContext(LazyContext).strict;
|
|
85
|
+
/**
|
|
86
|
+
* If we're in development mode, check to make sure we're not rendering a motion component
|
|
87
|
+
* as a child of LazyMotion, as this will break the file-size benefits of using it.
|
|
88
|
+
*/
|
|
89
|
+
if (process.env.NODE_ENV !== "production" &&
|
|
90
|
+
preloadedFeatures &&
|
|
91
|
+
isStrict) {
|
|
92
|
+
const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
93
|
+
configAndProps.ignoreStrict
|
|
94
|
+
? warning(false, strictMessage, "lazy-strict-mode")
|
|
95
|
+
: invariant(false, strictMessage, "lazy-strict-mode");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function getProjectionFunctionality(props) {
|
|
99
|
+
const featureDefinitions = getInitializedFeatureDefinitions();
|
|
100
|
+
const { drag, layout } = featureDefinitions;
|
|
101
|
+
if (!drag && !layout)
|
|
102
|
+
return {};
|
|
103
|
+
const combined = { ...drag, ...layout };
|
|
104
|
+
return {
|
|
105
|
+
MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)
|
|
106
|
+
? combined.MeasureLayout
|
|
107
|
+
: undefined,
|
|
108
|
+
ProjectionNode: combined.ProjectionNode,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export { createMotionComponent };
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/framer-motion/dist/es/motion/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { warning, invariant } from 'motion-utils';\nimport { forwardRef, useContext } from 'react';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { useRender } from '../render/dom/use-render.mjs';\nimport { isSVGComponent } from '../render/dom/utils/is-svg-component.mjs';\nimport { useHTMLVisualState } from '../render/html/use-html-visual-state.mjs';\nimport { useSVGVisualState } from '../render/svg/use-svg-visual-state.mjs';\nimport { getInitializedFeatureDefinitions } from './features/definitions.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent(Component, { forwardMotionProps = false, type } = {}, preloadedFeatures, createVisualElement) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n /**\n * Determine whether to use SVG or HTML rendering based on:\n * 1. Explicit `type` option (highest priority)\n * 2. Auto-detection via `isSVGComponent`\n */\n const isSVG = type ? type === \"svg\" : isSVGComponent(Component);\n const useVisualState = isSVG ? useSVGVisualState : useHTMLVisualState;\n function MotionDOMComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic, isValidProp } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && typeof window !== \"undefined\") {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode, isSVG);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, forwardMotionProps, isSVG, isValidProp)] }));\n }\n MotionDOMComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionDOMComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage, \"lazy-strict-mode\")\n : invariant(false, strictMessage, \"lazy-strict-mode\");\n }\n}\nfunction getProjectionFunctionality(props) {\n const featureDefinitions = getInitializedFeatureDefinitions();\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n\nexport { createMotionComponent };\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/utils/symbol.mjs"],"sourcesContent":["const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n//# sourceMappingURL=symbol.mjs.map\n"],"names":[],"mappings":"AAAK,MAAC,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef, useInsertionEffect, useCallback } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a ref function that, when called, hydrates the provided
|
|
6
|
+
* external ref and VisualElement.
|
|
7
|
+
*/
|
|
8
|
+
function useMotionRef(visualState, visualElement, externalRef) {
|
|
9
|
+
/**
|
|
10
|
+
* Store externalRef in a ref to avoid including it in the useCallback
|
|
11
|
+
* dependency array. Including externalRef in dependencies causes issues
|
|
12
|
+
* with libraries like Radix UI that create new callback refs on each render
|
|
13
|
+
* when using asChild - this would cause the callback to be recreated,
|
|
14
|
+
* triggering element remounts and breaking AnimatePresence exit animations.
|
|
15
|
+
*/
|
|
16
|
+
const externalRefContainer = useRef(externalRef);
|
|
17
|
+
useInsertionEffect(() => {
|
|
18
|
+
externalRefContainer.current = externalRef;
|
|
19
|
+
});
|
|
20
|
+
// Store cleanup function returned by callback refs (React 19 feature)
|
|
21
|
+
const refCleanup = useRef(null);
|
|
22
|
+
return useCallback((instance) => {
|
|
23
|
+
if (instance) {
|
|
24
|
+
visualState.onMount?.(instance);
|
|
25
|
+
}
|
|
26
|
+
if (visualElement) {
|
|
27
|
+
instance ? visualElement.mount(instance) : visualElement.unmount();
|
|
28
|
+
}
|
|
29
|
+
const ref = externalRefContainer.current;
|
|
30
|
+
if (typeof ref === "function") {
|
|
31
|
+
if (instance) {
|
|
32
|
+
const cleanup = ref(instance);
|
|
33
|
+
if (typeof cleanup === "function") {
|
|
34
|
+
refCleanup.current = cleanup;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if (refCleanup.current) {
|
|
38
|
+
refCleanup.current();
|
|
39
|
+
refCleanup.current = null;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
ref(instance);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else if (ref) {
|
|
46
|
+
ref.current = instance;
|
|
47
|
+
}
|
|
48
|
+
}, [visualElement]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { useMotionRef };
|
|
52
|
+
//# sourceMappingURL=use-motion-ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-motion-ref.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs"],"sourcesContent":["\"use client\";\nimport { useRef, useInsertionEffect, useCallback } from 'react';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n /**\n * Store externalRef in a ref to avoid including it in the useCallback\n * dependency array. Including externalRef in dependencies causes issues\n * with libraries like Radix UI that create new callback refs on each render\n * when using asChild - this would cause the callback to be recreated,\n * triggering element remounts and breaking AnimatePresence exit animations.\n */\n const externalRefContainer = useRef(externalRef);\n useInsertionEffect(() => {\n externalRefContainer.current = externalRef;\n });\n // Store cleanup function returned by callback refs (React 19 feature)\n const refCleanup = useRef(null);\n return useCallback((instance) => {\n if (instance) {\n visualState.onMount?.(instance);\n }\n if (visualElement) {\n instance ? visualElement.mount(instance) : visualElement.unmount();\n }\n const ref = externalRefContainer.current;\n if (typeof ref === \"function\") {\n if (instance) {\n const cleanup = ref(instance);\n if (typeof cleanup === \"function\") {\n refCleanup.current = cleanup;\n }\n }\n else if (refCleanup.current) {\n refCleanup.current();\n refCleanup.current = null;\n }\n else {\n ref(instance);\n }\n }\n else if (ref) {\n ref.current = instance;\n }\n }, [visualElement]);\n}\n\nexport { useMotionRef };\n//# sourceMappingURL=use-motion-ref.mjs.map\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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]}
|