@betterinternship/components 2.9.7 → 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 +45 -50
- 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/card.js.map +1 -0
- 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/hooks/useMQJob.d.ts +2 -2
- package/dist/hooks/useMQJob.js.map +1 -1
- 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/dist/utils.js.map +1 -1
- package/package.json +285 -249
- package/theme.css +355 -228
- 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/card.js.map +0 -1
- 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 -30
- 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,141 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type ResourceSortDirection = "asc" | "desc";
|
|
3
|
+
export type ResourceSortValue = string | number | Date | null | undefined;
|
|
4
|
+
export type ResourceFilterValue = Record<string, string[]>;
|
|
5
|
+
export type ResourceFilterOption = {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
count?: number;
|
|
9
|
+
};
|
|
10
|
+
export type ResourceFilterGroup = {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
options: ResourceFilterOption[];
|
|
14
|
+
};
|
|
15
|
+
export type ResourceTableColumn<TData> = {
|
|
16
|
+
id: string;
|
|
17
|
+
header: ReactNode;
|
|
18
|
+
width?: string;
|
|
19
|
+
align?: "left" | "center" | "right";
|
|
20
|
+
sortable?: boolean;
|
|
21
|
+
defaultSortDirection?: ResourceSortDirection;
|
|
22
|
+
getSortValue?: (row: TData) => ResourceSortValue;
|
|
23
|
+
render: (row: TData) => ReactNode;
|
|
24
|
+
};
|
|
25
|
+
export type ResourceSortColumn<TData> = {
|
|
26
|
+
id: string;
|
|
27
|
+
getValue: (row: TData) => ResourceSortValue;
|
|
28
|
+
defaultDirection?: ResourceSortDirection;
|
|
29
|
+
};
|
|
30
|
+
export type ResourceTableState<TData> = ReturnType<typeof useResourceTable<TData>>;
|
|
31
|
+
export type ResourceSelectionState<TData> = {
|
|
32
|
+
selectedIds: Set<string>;
|
|
33
|
+
selectedRows: TData[];
|
|
34
|
+
isSelected: (row: TData) => boolean;
|
|
35
|
+
isRowSelectable: (row: TData) => boolean;
|
|
36
|
+
toggle: (row: TData) => void;
|
|
37
|
+
selectPage: () => void;
|
|
38
|
+
deselectPage: () => void;
|
|
39
|
+
selectAllMatching: () => void;
|
|
40
|
+
clear: () => void;
|
|
41
|
+
selectedCount: number;
|
|
42
|
+
selectablePageCount: number;
|
|
43
|
+
selectableMatchingCount: number;
|
|
44
|
+
isAllPageSelected: boolean;
|
|
45
|
+
isAllMatchingSelected: boolean;
|
|
46
|
+
};
|
|
47
|
+
export declare function useResourceTable<TData>({ data, getRowId, columns, search, filters, sort, pagination, selection, }: {
|
|
48
|
+
data: TData[];
|
|
49
|
+
getRowId: (row: TData) => string;
|
|
50
|
+
columns?: Array<ResourceTableColumn<TData>>;
|
|
51
|
+
search?: {
|
|
52
|
+
initialValue?: string;
|
|
53
|
+
placeholder: string;
|
|
54
|
+
ariaLabel: string;
|
|
55
|
+
matches: (row: TData, normalizedQuery: string) => boolean;
|
|
56
|
+
onChange?: (value: string) => void;
|
|
57
|
+
};
|
|
58
|
+
filters?: {
|
|
59
|
+
initialValue?: ResourceFilterValue;
|
|
60
|
+
groups: ResourceFilterGroup[];
|
|
61
|
+
matches: (row: TData, filters: ResourceFilterValue) => boolean;
|
|
62
|
+
onApply?: (filters: ResourceFilterValue) => void;
|
|
63
|
+
};
|
|
64
|
+
sort?: {
|
|
65
|
+
initialColumn?: string;
|
|
66
|
+
initialDirection?: ResourceSortDirection;
|
|
67
|
+
columns?: Array<ResourceSortColumn<TData>>;
|
|
68
|
+
};
|
|
69
|
+
pagination: {
|
|
70
|
+
initialPage?: number;
|
|
71
|
+
pageSize: number;
|
|
72
|
+
pageSizeOptions?: number[];
|
|
73
|
+
onPageChange?: (page: number) => void;
|
|
74
|
+
};
|
|
75
|
+
selection?: {
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
isSelectable?: (row: TData) => boolean;
|
|
78
|
+
};
|
|
79
|
+
}): {
|
|
80
|
+
columns: ResourceTableColumn<TData>[];
|
|
81
|
+
dataCount: number;
|
|
82
|
+
rows: TData[];
|
|
83
|
+
pagedRows: TData[];
|
|
84
|
+
totalCount: number;
|
|
85
|
+
pageCount: number;
|
|
86
|
+
page: number;
|
|
87
|
+
pageStart: number;
|
|
88
|
+
pageEnd: number;
|
|
89
|
+
getRowId: (row: TData) => string;
|
|
90
|
+
search: {
|
|
91
|
+
value: string;
|
|
92
|
+
placeholder: string;
|
|
93
|
+
ariaLabel: string;
|
|
94
|
+
setValue: (value: string) => void;
|
|
95
|
+
} | undefined;
|
|
96
|
+
filters: {
|
|
97
|
+
groups: ResourceFilterGroup[];
|
|
98
|
+
open: boolean;
|
|
99
|
+
setOpen: (open: boolean) => void;
|
|
100
|
+
value: ResourceFilterValue;
|
|
101
|
+
draftValue: ResourceFilterValue;
|
|
102
|
+
setDraftValue: import("react").Dispatch<import("react").SetStateAction<ResourceFilterValue>>;
|
|
103
|
+
activeCount: number;
|
|
104
|
+
draftActiveCount: number;
|
|
105
|
+
apply: () => void;
|
|
106
|
+
cancel: () => void;
|
|
107
|
+
clear: () => void;
|
|
108
|
+
clearDraft: () => void;
|
|
109
|
+
toggleDraftOption: (groupId: string, optionValue: string, checked: boolean) => void;
|
|
110
|
+
toggleDraftGroup: (groupId: string) => void;
|
|
111
|
+
} | undefined;
|
|
112
|
+
sort: {
|
|
113
|
+
column: string | null;
|
|
114
|
+
direction: ResourceSortDirection;
|
|
115
|
+
columns: ResourceSortColumn<TData>[];
|
|
116
|
+
setSort: (columnId: string, defaultDirection?: ResourceSortDirection) => void;
|
|
117
|
+
} | undefined;
|
|
118
|
+
pagination: {
|
|
119
|
+
page: number;
|
|
120
|
+
pageSize: number;
|
|
121
|
+
pageSizeOptions: number[];
|
|
122
|
+
setPage: (nextPage: number) => void;
|
|
123
|
+
setPageSize: (nextPageSize: number) => void;
|
|
124
|
+
};
|
|
125
|
+
selection: {
|
|
126
|
+
selectedIds: Set<string>;
|
|
127
|
+
selectedRows: TData[];
|
|
128
|
+
isSelected: (row: TData) => boolean;
|
|
129
|
+
isRowSelectable: (row: TData) => boolean;
|
|
130
|
+
toggle: (row: TData) => void;
|
|
131
|
+
selectPage: () => void;
|
|
132
|
+
deselectPage: () => void;
|
|
133
|
+
selectAllMatching: () => void;
|
|
134
|
+
clear: () => void;
|
|
135
|
+
selectedCount: number;
|
|
136
|
+
selectablePageCount: number;
|
|
137
|
+
selectableMatchingCount: number;
|
|
138
|
+
isAllPageSelected: boolean;
|
|
139
|
+
isAllMatchingSelected: boolean;
|
|
140
|
+
} | undefined;
|
|
141
|
+
};
|
package/dist/hooks/useMQJob.d.ts
CHANGED
|
@@ -30,9 +30,9 @@ export declare const MQJobsProvider: ({ poll, children, }: MQJobsConfig & {
|
|
|
30
30
|
* `status` is terminal.
|
|
31
31
|
*/
|
|
32
32
|
export declare function useMQJob<T = unknown>(jobId?: string | null): {
|
|
33
|
-
job: MQJob<
|
|
33
|
+
job: MQJob<T> | undefined;
|
|
34
34
|
status: MQJobStatus | undefined;
|
|
35
|
-
result:
|
|
35
|
+
result: T | undefined;
|
|
36
36
|
error: string | undefined;
|
|
37
37
|
isPending: boolean;
|
|
38
38
|
isDone: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMQJob.js","sources":["../../src/hooks/useMQJob.tsx"],"sourcesContent":["'use client';\
|
|
1
|
+
{"version":3,"file":"useMQJob.js","sources":["../../src/hooks/useMQJob.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useRef } from 'react';\nimport { useQueries, useQuery, Query } from '@tanstack/react-query';\n\nexport type MQJobStatus = 'queued' | 'processing' | 'done' | 'failed';\n\nexport interface MQJob<T = unknown> {\n id: string;\n type: string;\n status: MQJobStatus;\n progress?: { total: number; done: number; failed: number };\n result?: T;\n error?: string;\n}\n\ninterface MQJobsConfig {\n /**\n * Fetches the current state of a job. The package knows no URL and no\n * response envelope — the consuming app owns both (plan §5.2). Reject/throw\n * on a transport or not-found failure; React Query's own retry handles it.\n */\n poll: (jobId: string) => Promise<MQJob>;\n}\n\nconst MQJobsContext = createContext<MQJobsConfig | null>(null);\n\n/** Mount once near the root, alongside the app's other data providers. */\nexport const MQJobsProvider = ({\n poll,\n children,\n}: MQJobsConfig & { children: React.ReactNode }) => (\n <MQJobsContext.Provider value={{ poll }}>{children}</MQJobsContext.Provider>\n);\n\nconst useMQJobsConfig = (caller: string): MQJobsConfig => {\n const ctx = useContext(MQJobsContext);\n if (!ctx)\n throw new Error(`${caller}() must be used within a <MQJobsProvider>.`);\n return ctx;\n};\n\nconst BASE_INTERVAL_MS = 2000;\nconst MAX_INTERVAL_MS = 10000;\n\n/** Capped backoff keyed per job id, so each job restarts its own count. */\nconst nextInterval = (\n attempts: { current: Record<string, number> },\n key: string,\n status: MQJobStatus | undefined,\n): number | false => {\n if (status === 'done' || status === 'failed') return false;\n const attempt = attempts.current[key] ?? 0;\n attempts.current[key] = attempt + 1;\n return Math.min(BASE_INTERVAL_MS * 1.5 ** attempt, MAX_INTERVAL_MS);\n};\n\nconst summarize = <T,>(job: MQJob<T> | undefined) => ({\n job,\n status: job?.status,\n result: job?.result,\n error: job?.error,\n isPending: !job || job.status === 'queued' || job.status === 'processing',\n isDone: job?.status === 'done',\n isFailed: job?.status === 'failed',\n});\n\n/**\n * Polls a single `internal.mq_jobs` row to completion. Replaces\n * `useClientProcess` for anything queued through the broker: no\n * callback-URL dance, the result comes back inline on the job itself once\n * `status` is terminal.\n */\nexport function useMQJob<T = unknown>(jobId?: string | null) {\n const { poll } = useMQJobsConfig('useMQJob');\n const attempts = useRef<Record<string, number>>({});\n\n const query = useQuery<MQJob<T>>({\n queryKey: ['.__mq_job', jobId],\n // `poll`'s result field is caller-typed via `T`; the transport itself\n // doesn't know or care what shape a given job's result has.\n queryFn: () => poll(jobId as string) as Promise<MQJob<T>>,\n enabled: !!jobId,\n staleTime: Infinity,\n refetchOnWindowFocus: true,\n refetchIntervalInBackground: true,\n refetchInterval: (query: Query<MQJob<T>>) =>\n nextInterval(attempts, jobId ?? '', query.state.data?.status),\n });\n\n return summarize(query.data);\n}\n\n/**\n * Polls a dynamic set of `internal.mq_jobs` rows to completion — for a\n * feature that can have several jobs in flight at once (e.g. a list of\n * pending/handled items). Built on `useQueries` directly rather than\n * composing `useMQJob` in a loop, since the number of tracked ids changes\n * over time and that would violate the rules of hooks.\n */\nexport function useMQJobs<T = unknown>(jobIds: readonly string[]) {\n const { poll } = useMQJobsConfig('useMQJobs');\n const attempts = useRef<Record<string, number>>({});\n\n const queries = useQueries({\n queries: jobIds.map((jobId) => ({\n queryKey: ['.__mq_job', jobId],\n queryFn: () => poll(jobId) as Promise<MQJob<T>>,\n staleTime: Infinity,\n refetchOnWindowFocus: true,\n refetchIntervalInBackground: true,\n refetchInterval: (query: Query<MQJob<T>>) =>\n nextInterval(attempts, jobId, query.state.data?.status),\n })),\n });\n\n return jobIds.map((jobId, index) => ({\n jobId,\n ...summarize(queries[index]?.data as MQJob<T> | undefined),\n }));\n}\n"],"names":[],"mappings":";;;;;AAyBA;AAEA;AACO;AAOP;AACE;AACA;AACE;AACF;AACF;AAEA;AACA;AAEA;AACA;AAKE;AAA8C;;;AAG9C;AACF;AAEA;;;;;AAKE;AACA;AACA;AACD;AAED;;;;;AAKG;AACG;;AAEJ;;AAGE;;;AAGA;;AAEA;AACA;AACA;;AAGD;AAED;AACF;AAEA;;;;;;AAMG;AACG;;AAEJ;;;AAII;AACA;AACA;AACA;AACA;AACA;AAED;AACF;;;;AAKA;AACH;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
export * from './utils';
|
|
2
|
+
export { Spinner, Loader } from './components/loader';
|
|
3
|
+
export type { SpinnerProps, LoaderProps } from './components/loader';
|
|
2
4
|
export * from './hooks/useMQJob';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './components/
|
|
6
|
-
export * from './components/
|
|
7
|
-
export * from './components/
|
|
8
|
-
export * from './components/
|
|
9
|
-
export * from './components/
|
|
10
|
-
export * from './components/
|
|
11
|
-
export * from './components/
|
|
12
|
-
export * from './components/
|
|
13
|
-
export * from './components/
|
|
14
|
-
export * from './components/
|
|
15
|
-
export * from './components/
|
|
16
|
-
export * from './components/
|
|
17
|
-
export * from './components/
|
|
18
|
-
export * from './components/
|
|
19
|
-
export * from './components/
|
|
20
|
-
export * from './components/
|
|
21
|
-
export * from './components/
|
|
22
|
-
export * from './components/
|
|
23
|
-
export * from './components/
|
|
24
|
-
export * from './components/
|
|
5
|
+
export { Button, ExpandingButton, FilterChip as ButtonFilterChip, buttonClassName } from './components/button';
|
|
6
|
+
export type { ButtonProps, UnifiedButtonProps, ExpandingButtonProps, FilterChipProps as ButtonFilterChipProps, ButtonVariant, ButtonScheme, ButtonSize, ButtonShape } from './components/button';
|
|
7
|
+
export * from './components/accordion';
|
|
8
|
+
export * from './components/animated-count';
|
|
9
|
+
export * from './components/app-header';
|
|
10
|
+
export * from './components/input';
|
|
11
|
+
export * from './components/avatar';
|
|
12
|
+
export * from './components/badge';
|
|
13
|
+
export * from './components/card';
|
|
14
|
+
export * from './components/checkbox';
|
|
15
|
+
export * from './components/dialog';
|
|
16
|
+
export * from './components/dropdown-menu';
|
|
17
|
+
export * from './components/file-upload';
|
|
18
|
+
export * from './components/filter-chip';
|
|
19
|
+
export * from './components/select';
|
|
20
|
+
export * from './components/label';
|
|
21
|
+
export * from './components/form-field';
|
|
22
|
+
export * from './components/form-input';
|
|
23
|
+
export * from './components/form-textarea';
|
|
24
|
+
export * from './components/form-checkbox';
|
|
25
|
+
export * from './components/form-checkbox-group';
|
|
26
|
+
export * from './components/form-radio';
|
|
27
|
+
export * from './components/form-date-picker';
|
|
28
|
+
export * from './components/form-month-picker';
|
|
29
|
+
export * from './components/time-input-native';
|
|
30
|
+
export * from './components/page-header';
|
|
31
|
+
export * from './components/popover';
|
|
32
|
+
export * from './components/skeleton';
|
|
33
|
+
export * from './components/banner';
|
|
34
|
+
export * from './components/switch';
|
|
35
|
+
export * from './components/table';
|
|
36
|
+
export * from './components/textarea';
|
|
37
|
+
export * from './components/tooltip';
|
|
38
|
+
export * from './components/stepper';
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
export { cn } from './utils.js';
|
|
2
|
+
export { Loader, Spinner } from './components/loader.js';
|
|
2
3
|
export { MQJobsProvider, useMQJob, useMQJobs } from './hooks/useMQJob.js';
|
|
3
|
-
export { Button,
|
|
4
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './components/
|
|
5
|
-
export { AnimatedCount } from './components/
|
|
6
|
-
export { AppHeader } from './components/
|
|
7
|
-
export { Input } from './components/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
4
|
+
export { Button, FilterChip as ButtonFilterChip, ExpandingButton, buttonClassName } from './components/button.js';
|
|
5
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './components/accordion.js';
|
|
6
|
+
export { AnimatedCount } from './components/animated-count.js';
|
|
7
|
+
export { AppHeader } from './components/app-header.js';
|
|
8
|
+
export { Input } from './components/input.js';
|
|
9
|
+
export { Avatar, AvatarFallback, AvatarImage } from './components/avatar.js';
|
|
10
|
+
export { Badge } from './components/badge.js';
|
|
11
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './components/card.js';
|
|
12
|
+
export { Checkbox, CheckboxVisual } from './components/checkbox.js';
|
|
13
|
+
export { Dialog, DialogBottomSheet, DialogClose, DialogContent, DialogDescription, DialogDivider, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './components/dialog.js';
|
|
14
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/dropdown-menu.js';
|
|
15
|
+
export { FileUpload } from './components/file-upload.js';
|
|
16
|
+
export { FilterChip, FilterChipGroup } from './components/filter-chip.js';
|
|
17
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/select.js';
|
|
18
|
+
export { FieldLabel, Label } from './components/label.js';
|
|
19
|
+
export { FormField } from './components/form-field.js';
|
|
20
|
+
export { FormInput } from './components/form-input.js';
|
|
21
|
+
export { FormTextarea } from './components/form-textarea.js';
|
|
22
|
+
export { FormCheckbox } from './components/form-checkbox.js';
|
|
23
|
+
export { FormCheckBoxGroup } from './components/form-checkbox-group.js';
|
|
24
|
+
export { FormRadio } from './components/form-radio.js';
|
|
25
|
+
export { FormDatePicker } from './components/form-date-picker.js';
|
|
26
|
+
export { FormMonthPicker } from './components/form-month-picker.js';
|
|
27
|
+
export { TimeInputNative } from './components/time-input-native.js';
|
|
28
|
+
export { PageHeader } from './components/page-header.js';
|
|
29
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './components/popover.js';
|
|
30
|
+
export { Skeleton } from './components/skeleton.js';
|
|
31
|
+
export { Banner } from './components/banner.js';
|
|
32
|
+
export { Switch } from './components/switch.js';
|
|
33
|
+
export { ResourceTable, Table } from './components/table.js';
|
|
34
|
+
export { Textarea } from './components/textarea.js';
|
|
35
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/tooltip.js';
|
|
36
|
+
export { Stepper } from './components/stepper.js';
|
|
25
37
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared landing interaction: a restrained lift, interactive shadow, and
|
|
3
|
+
* border emphasis. Hover motion is limited to fine pointers and is removed
|
|
4
|
+
* when the user prefers reduced motion.
|
|
5
|
+
*/
|
|
6
|
+
export declare const interactiveSurfaceClassName = "transition-[border-color,box-shadow,translate] duration-200 ease-landing-out motion-safe:pointer-fine:hover:-translate-y-0.5 pointer-fine:hover:border-landing-border-hover pointer-fine:hover:shadow-landing-interactive focus-within:border-landing-border-hover focus-within:shadow-landing-interactive motion-reduce:transition-none";
|
|
7
|
+
/** Shared control feedback, including the properties used by the lift and press. */
|
|
8
|
+
export declare const interactiveControlTransitionClassName = "transition-[background-color,border-color,color,box-shadow,transform,translate,scale] duration-200 ease-landing-out motion-reduce:transition-none";
|
|
9
|
+
/** The motion and elevation portion for controls with their own color rules. */
|
|
10
|
+
export declare const interactiveControlClassName: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from '../utils.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shared landing interaction: a restrained lift, interactive shadow, and
|
|
5
|
+
* border emphasis. Hover motion is limited to fine pointers and is removed
|
|
6
|
+
* when the user prefers reduced motion.
|
|
7
|
+
*/
|
|
8
|
+
const interactiveSurfaceClassName = 'transition-[border-color,box-shadow,translate] duration-200 ease-landing-out motion-safe:pointer-fine:hover:-translate-y-0.5 pointer-fine:hover:border-landing-border-hover pointer-fine:hover:shadow-landing-interactive focus-within:border-landing-border-hover focus-within:shadow-landing-interactive motion-reduce:transition-none';
|
|
9
|
+
/** Shared control feedback, including the properties used by the lift and press. */
|
|
10
|
+
const interactiveControlTransitionClassName = 'transition-[background-color,border-color,color,box-shadow,transform,translate,scale] duration-200 ease-landing-out motion-reduce:transition-none';
|
|
11
|
+
/** The motion and elevation portion for controls with their own color rules. */
|
|
12
|
+
const interactiveControlClassName = cn(interactiveControlTransitionClassName, 'pointer-fine:hover:shadow-landing-interactive motion-safe:pointer-fine:hover:-translate-y-0.5 motion-safe:active:scale-[.98] motion-safe:active:translate-y-0 motion-safe:active:duration-100 motion-safe:aria-disabled:active:scale-100 motion-safe:aria-busy:active:scale-100');
|
|
13
|
+
|
|
14
|
+
export { interactiveControlClassName, interactiveControlTransitionClassName, interactiveSurfaceClassName };
|
|
15
|
+
//# sourceMappingURL=interaction-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-styles.js","sources":["../../src/lib/interaction-styles.ts"],"sourcesContent":["import { cn } from '@/utils';\n\n/**\n * The shared landing interaction: a restrained lift, interactive shadow, and\n * border emphasis. Hover motion is limited to fine pointers and is removed\n * when the user prefers reduced motion.\n */\nexport const interactiveSurfaceClassName =\n 'transition-[border-color,box-shadow,translate] duration-200 ease-landing-out motion-safe:pointer-fine:hover:-translate-y-0.5 pointer-fine:hover:border-landing-border-hover pointer-fine:hover:shadow-landing-interactive focus-within:border-landing-border-hover focus-within:shadow-landing-interactive motion-reduce:transition-none';\n\n/** Shared control feedback, including the properties used by the lift and press. */\nexport const interactiveControlTransitionClassName =\n 'transition-[background-color,border-color,color,box-shadow,transform,translate,scale] duration-200 ease-landing-out motion-reduce:transition-none';\n\n/** The motion and elevation portion for controls with their own color rules. */\nexport const interactiveControlClassName =\n cn(interactiveControlTransitionClassName, 'pointer-fine:hover:shadow-landing-interactive motion-safe:pointer-fine:hover:-translate-y-0.5 motion-safe:active:scale-[.98] motion-safe:active:translate-y-0 motion-safe:active:duration-100 motion-safe:aria-disabled:active:scale-100 motion-safe:aria-busy:active:scale-100');\n"],"names":[],"mappings":";;AAEA;;;;AAIG;AACI,MAAM,2BAA2B,GACtC;AAEF;AACO,MAAM,qCAAqC,GAChD;AAEF;AACO,MAAM,2BAA2B,GACtC,EAAE,CAAC,qCAAqC,EAAE,iRAAiR;;;;"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useId, useRef, useContext, useInsertionEffect } from 'react';
|
|
5
|
+
import { MotionConfigContext } from '../../context/MotionConfigContext.js';
|
|
6
|
+
import { useComposedRefs } from '../../utils/use-composed-ref.js';
|
|
7
|
+
import { isHTMLElement } from '../../../../../motion-dom/dist/es/utils/is-html-element.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Measurement functionality has to be within a separate component
|
|
11
|
+
* to leverage snapshot lifecycle.
|
|
12
|
+
*/
|
|
13
|
+
class PopChildMeasure extends React.Component {
|
|
14
|
+
getSnapshotBeforeUpdate(prevProps) {
|
|
15
|
+
const element = this.props.childRef.current;
|
|
16
|
+
if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {
|
|
17
|
+
const parent = element.offsetParent;
|
|
18
|
+
const parentWidth = isHTMLElement(parent)
|
|
19
|
+
? parent.offsetWidth || 0
|
|
20
|
+
: 0;
|
|
21
|
+
const parentHeight = isHTMLElement(parent)
|
|
22
|
+
? parent.offsetHeight || 0
|
|
23
|
+
: 0;
|
|
24
|
+
const computedStyle = getComputedStyle(element);
|
|
25
|
+
const size = this.props.sizeRef.current;
|
|
26
|
+
size.height = parseFloat(computedStyle.height);
|
|
27
|
+
size.width = parseFloat(computedStyle.width);
|
|
28
|
+
size.top = element.offsetTop;
|
|
29
|
+
size.left = element.offsetLeft;
|
|
30
|
+
size.right = parentWidth - size.width - size.left;
|
|
31
|
+
size.bottom = parentHeight - size.height - size.top;
|
|
32
|
+
size.direction = computedStyle.direction;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
38
|
+
*/
|
|
39
|
+
componentDidUpdate() { }
|
|
40
|
+
render() {
|
|
41
|
+
return this.props.children;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {
|
|
45
|
+
const id = useId();
|
|
46
|
+
const ref = useRef(null);
|
|
47
|
+
const size = useRef({
|
|
48
|
+
width: 0,
|
|
49
|
+
height: 0,
|
|
50
|
+
top: 0,
|
|
51
|
+
left: 0,
|
|
52
|
+
right: 0,
|
|
53
|
+
bottom: 0,
|
|
54
|
+
direction: "ltr",
|
|
55
|
+
});
|
|
56
|
+
const { nonce } = useContext(MotionConfigContext);
|
|
57
|
+
/**
|
|
58
|
+
* In React 19, refs are passed via props.ref instead of element.ref.
|
|
59
|
+
* We check props.ref first (React 19) and fall back to element.ref (React 18).
|
|
60
|
+
*
|
|
61
|
+
* The composed ref is only used when popping the child out (pop !== false),
|
|
62
|
+
* so we avoid reading children.props.ref otherwise. In React 18.3 that read
|
|
63
|
+
* triggers a spurious "`ref` is not a prop" warning getter (#3745).
|
|
64
|
+
*/
|
|
65
|
+
const childRef = pop !== false
|
|
66
|
+
? (children.props?.ref ??
|
|
67
|
+
children?.ref)
|
|
68
|
+
: undefined;
|
|
69
|
+
const composedRef = useComposedRefs(ref, childRef);
|
|
70
|
+
/**
|
|
71
|
+
* We create and inject a style block so we can apply this explicit
|
|
72
|
+
* sizing in a non-destructive manner by just deleting the style block.
|
|
73
|
+
*
|
|
74
|
+
* We can't apply size via render as the measurement happens
|
|
75
|
+
* in getSnapshotBeforeUpdate (post-render), likewise if we apply the
|
|
76
|
+
* styles directly on the DOM node, we might be overwriting
|
|
77
|
+
* styles set via the style prop.
|
|
78
|
+
*/
|
|
79
|
+
useInsertionEffect(() => {
|
|
80
|
+
const { width, height, top, left, right, bottom, direction } = size.current;
|
|
81
|
+
if (isPresent || pop === false || !ref.current || !width || !height)
|
|
82
|
+
return;
|
|
83
|
+
const isRTL = direction === "rtl";
|
|
84
|
+
const x = anchorX === "left"
|
|
85
|
+
? (isRTL ? `right: ${right}` : `left: ${left}`)
|
|
86
|
+
: (isRTL ? `left: ${left}` : `right: ${right}`);
|
|
87
|
+
const y = anchorY === "bottom" ? `bottom: ${bottom}` : `top: ${top}`;
|
|
88
|
+
ref.current.dataset.motionPopId = id;
|
|
89
|
+
const style = document.createElement("style");
|
|
90
|
+
if (nonce)
|
|
91
|
+
style.nonce = nonce;
|
|
92
|
+
const parent = root ?? document.head;
|
|
93
|
+
parent.appendChild(style);
|
|
94
|
+
if (style.sheet) {
|
|
95
|
+
style.sheet.insertRule(`
|
|
96
|
+
[data-motion-pop-id="${id}"] {
|
|
97
|
+
position: absolute !important;
|
|
98
|
+
width: ${width}px !important;
|
|
99
|
+
height: ${height}px !important;
|
|
100
|
+
${x}px !important;
|
|
101
|
+
${y}px !important;
|
|
102
|
+
}
|
|
103
|
+
`);
|
|
104
|
+
}
|
|
105
|
+
return () => {
|
|
106
|
+
ref.current?.removeAttribute("data-motion-pop-id");
|
|
107
|
+
if (parent.contains(style)) {
|
|
108
|
+
parent.removeChild(style);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}, [isPresent]);
|
|
112
|
+
return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false
|
|
113
|
+
? children
|
|
114
|
+
: React.cloneElement(children, { ref: composedRef }) }));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { PopChild };
|
|
118
|
+
//# sourceMappingURL=PopChild.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopChild.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n if (isPresent || pop === false || !ref.current || !width || !height)\n return;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`);\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? document.head;\n parent.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `);\n }\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":[],"mappings":";;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useId, useRef, useMemo } from 'react';
|
|
5
|
+
import { PresenceContext } from '../../context/PresenceContext.js';
|
|
6
|
+
import { useConstant } from '../../utils/use-constant.js';
|
|
7
|
+
import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.js';
|
|
8
|
+
import { PopChild } from './PopChild.js';
|
|
9
|
+
|
|
10
|
+
const PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {
|
|
11
|
+
const presenceChildren = useConstant(newChildrenMap);
|
|
12
|
+
const id = useId();
|
|
13
|
+
// Written in a layout effect (not render) so discarded concurrent
|
|
14
|
+
// renders can't leave the refs pointing at uncommitted state.
|
|
15
|
+
const isPresentRef = useRef(isPresent);
|
|
16
|
+
const onExitCompleteRef = useRef(onExitComplete);
|
|
17
|
+
useIsomorphicLayoutEffect(() => {
|
|
18
|
+
isPresentRef.current = isPresent;
|
|
19
|
+
onExitCompleteRef.current = onExitComplete;
|
|
20
|
+
});
|
|
21
|
+
let isReusedContext = true;
|
|
22
|
+
let context = useMemo(() => {
|
|
23
|
+
isReusedContext = false;
|
|
24
|
+
return {
|
|
25
|
+
id,
|
|
26
|
+
initial,
|
|
27
|
+
isPresent,
|
|
28
|
+
custom,
|
|
29
|
+
onExitComplete: (childId) => {
|
|
30
|
+
presenceChildren.set(childId, true);
|
|
31
|
+
for (const isComplete of presenceChildren.values()) {
|
|
32
|
+
if (!isComplete)
|
|
33
|
+
return; // can stop searching when any is incomplete
|
|
34
|
+
}
|
|
35
|
+
onExitComplete && onExitComplete();
|
|
36
|
+
},
|
|
37
|
+
register: (childId) => {
|
|
38
|
+
presenceChildren.set(childId, false);
|
|
39
|
+
return () => {
|
|
40
|
+
presenceChildren.delete(childId);
|
|
41
|
+
!isPresentRef.current &&
|
|
42
|
+
!presenceChildren.size &&
|
|
43
|
+
onExitCompleteRef.current?.();
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}, [isPresent, presenceChildren, onExitComplete]);
|
|
48
|
+
/**
|
|
49
|
+
* If the presence of a child affects the layout of the components around it,
|
|
50
|
+
* we want to make a new context value to ensure they get re-rendered
|
|
51
|
+
* so they can detect that layout change.
|
|
52
|
+
*/
|
|
53
|
+
if (presenceAffectsLayout && isReusedContext) {
|
|
54
|
+
context = { ...context };
|
|
55
|
+
}
|
|
56
|
+
useMemo(() => {
|
|
57
|
+
presenceChildren.forEach((_, key) => presenceChildren.set(key, false));
|
|
58
|
+
}, [isPresent]);
|
|
59
|
+
/**
|
|
60
|
+
* If there's no `motion` components to fire exit animations, we want to remove this
|
|
61
|
+
* component immediately.
|
|
62
|
+
*/
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
!isPresent &&
|
|
65
|
+
!presenceChildren.size &&
|
|
66
|
+
onExitComplete &&
|
|
67
|
+
onExitComplete();
|
|
68
|
+
}, [isPresent]);
|
|
69
|
+
children = (jsx(PopChild, { pop: mode === "popLayout", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));
|
|
70
|
+
return (jsx(PresenceContext.Provider, { value: context, children: children }));
|
|
71
|
+
};
|
|
72
|
+
function newChildrenMap() {
|
|
73
|
+
return new Map();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { PresenceChild };
|
|
77
|
+
//# sourceMappingURL=PresenceChild.js.map
|
package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresenceChild.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n // Written in a layout effect (not render) so discarded concurrent\n // renders can't leave the refs pointing at uncommitted state.\n const isPresentRef = useRef(isPresent);\n const onExitCompleteRef = useRef(onExitComplete);\n useIsomorphicLayoutEffect(() => {\n isPresentRef.current = isPresent;\n onExitCompleteRef.current = onExitComplete;\n });\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => {\n presenceChildren.delete(childId);\n !isPresentRef.current &&\n !presenceChildren.size &&\n onExitCompleteRef.current?.();\n };\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n children = (jsx(PopChild, { pop: mode === \"popLayout\", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n//# sourceMappingURL=PresenceChild.mjs.map\n"],"names":[],"mappings":";;;;;;;;;AASK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","x_google_ignoreList":[0]}
|