@betterinternship/components 2.9.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -9
- package/dist/components/{ui/accordion.d.ts → accordion.d.ts} +7 -1
- package/dist/components/accordion.js +23 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/{ui/animated-count.d.ts → animated-count.d.ts} +1 -4
- package/dist/components/animated-count.js +19 -0
- package/dist/components/animated-count.js.map +1 -0
- package/dist/components/animated-shiny-text.d.ts +5 -0
- package/dist/components/{ui/app-header.d.ts → app-header.d.ts} +3 -1
- package/dist/components/app-header.js +72 -0
- package/dist/components/app-header.js.map +1 -0
- package/dist/components/autocomplete.d.ts +34 -0
- package/dist/components/{ui/avatar.js → avatar.js} +1 -1
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/{ui/badge.js → badge.js} +54 -31
- package/dist/components/badge.js.map +1 -0
- package/dist/components/banner.d.ts +17 -0
- package/dist/components/banner.js +41 -0
- package/dist/components/banner.js.map +1 -0
- package/dist/components/button.d.ts +56 -0
- package/dist/components/button.js +53 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +10 -0
- package/dist/components/calendar.js +56 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/{ui/card.d.ts → card.d.ts} +7 -1
- package/dist/components/{ui/card.js → card.js} +10 -4
- package/dist/components/{ui/card.js.map → card.js.map} +1 -1
- package/dist/components/carousel.d.ts +40 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.js +20 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/chip-select.d.ts +18 -0
- package/dist/components/collapsible.d.ts +18 -0
- package/dist/components/context-menu.d.ts +27 -0
- package/dist/components/{ui/dialog.d.ts → dialog.d.ts} +5 -2
- package/dist/components/dialog.js +44 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/divider.d.ts +3 -0
- package/dist/components/divider.js +10 -0
- package/dist/components/divider.js.map +1 -0
- package/dist/components/dot-matrix.d.ts +21 -0
- package/dist/components/dropdown-menu.js +61 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/dropdown.d.ts +65 -0
- package/dist/components/error.d.ts +8 -0
- package/dist/components/file-upload.d.ts +16 -0
- package/dist/components/file-upload.js +29 -0
- package/dist/components/file-upload.js.map +1 -0
- package/dist/components/filter-chip.d.ts +21 -0
- package/dist/components/filter-chip.js +28 -0
- package/dist/components/filter-chip.js.map +1 -0
- package/dist/components/form-checkbox-group.d.ts +31 -0
- package/dist/components/form-checkbox-group.js +29 -0
- package/dist/components/form-checkbox-group.js.map +1 -0
- package/dist/components/form-checkbox.d.ts +15 -0
- package/dist/components/form-checkbox.js +14 -0
- package/dist/components/form-checkbox.js.map +1 -0
- package/dist/components/form-date-picker.d.ts +47 -0
- package/dist/components/form-date-picker.js +55 -0
- package/dist/components/form-date-picker.js.map +1 -0
- package/dist/components/form-field.d.ts +14 -0
- package/dist/components/form-field.js +10 -0
- package/dist/components/form-field.js.map +1 -0
- package/dist/components/form-input.d.ts +11 -0
- package/dist/components/form-input.js +12 -0
- package/dist/components/form-input.js.map +1 -0
- package/dist/components/form-month-picker.d.ts +26 -0
- package/dist/components/form-month-picker.js +55 -0
- package/dist/components/form-month-picker.js.map +1 -0
- package/dist/components/form-radio.d.ts +15 -0
- package/dist/components/form-radio.js +20 -0
- package/dist/components/form-radio.js.map +1 -0
- package/dist/components/form-textarea.d.ts +11 -0
- package/dist/components/form-textarea.js +11 -0
- package/dist/components/form-textarea.js.map +1 -0
- package/dist/components/form.d.ts +24 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/input-otp.d.ts +39 -0
- package/dist/components/input.js +30 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +15 -0
- package/dist/components/label.js +19 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/loader.d.ts +20 -0
- package/dist/components/loader.js +14 -0
- package/dist/components/loader.js.map +1 -0
- package/dist/components/magnetic-button.d.ts +5 -0
- package/dist/components/messages.d.ts +6 -0
- package/dist/components/mobile-sheet-portal.d.ts +9 -0
- package/dist/components/page-header.d.ts +6 -0
- package/dist/components/page-header.js +9 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/paginator.d.ts +9 -0
- package/dist/components/{ui/popover.js → popover.js} +2 -2
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.js +17 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +50 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/sheet.d.ts +27 -0
- package/dist/components/{ui/skeleton.js → skeleton.js} +2 -2
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/sonner-toast.d.ts +106 -0
- package/dist/components/stepper.d.ts +9 -0
- package/dist/components/stepper.js +14 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.js +10 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +33 -0
- package/dist/components/table.js +88 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +22 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +11 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/time-input-native.d.ts +14 -0
- package/dist/components/time-input-native.js +61 -0
- package/dist/components/time-input-native.js.map +1 -0
- package/dist/components/timeline.d.ts +17 -0
- package/dist/components/toggle.d.ts +5 -0
- package/dist/components/{ui/tooltip.js → tooltip.js} +2 -2
- package/dist/components/tooltip.js.map +1 -0
- package/dist/design-tokens.d.ts +69 -0
- package/dist/hooks/use-detect-click-outside.d.ts +4 -0
- package/dist/hooks/use-field-focus.d.ts +37 -0
- package/dist/hooks/use-field-focus.js +57 -0
- package/dist/hooks/use-field-focus.js.map +1 -0
- package/dist/hooks/use-mobile-sheet-viewport.d.ts +6 -0
- package/dist/hooks/use-mobile-sheet-viewport.js +60 -0
- package/dist/hooks/use-mobile-sheet-viewport.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-resource-table.d.ts +141 -0
- package/dist/index.d.ts +36 -22
- package/dist/index.js +34 -22
- package/dist/index.js.map +1 -1
- package/dist/lib/interaction-styles.d.ts +10 -0
- package/dist/lib/interaction-styles.js +15 -0
- package/dist/lib/interaction-styles.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +118 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +77 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +190 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +46 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +15 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +18 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +11 -0
- package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/events/event-info.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +586 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +51 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +130 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +42 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +31 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +285 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +51 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +38 -0
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +71 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +41 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +49 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +18 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +22 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +138 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +12 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +16 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +77 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +50 -0
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +113 -0
- package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +52 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +166 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +81 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +59 -0
- package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +46 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +14 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +19 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +28 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +37 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +31 -0
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +12 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +59 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +26 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +12 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +9 -0
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js +10 -0
- package/dist/node_modules/framer-motion/dist/es/utils/distance.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +7 -0
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +49 -0
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +61 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +20 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js.map +1 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +8 -0
- package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +200 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +386 -0
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +181 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +88 -0
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +88 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +52 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +331 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +106 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +109 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +60 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +142 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +148 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +47 -0
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +44 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +41 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +55 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +73 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/order.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +84 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +70 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +97 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +39 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +69 -0
- package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +125 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +59 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +55 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +28 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +1660 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/projection/node/state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +85 -0
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +42 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +36 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +53 -0
- package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +25 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/Feature.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +564 -0
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +84 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +55 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +66 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +72 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +22 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/store.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +52 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +64 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +387 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +36 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +56 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +20 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +64 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/resize/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/utils/delay.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +80 -0
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +12 -0
- package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +48 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +94 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +27 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +17 -0
- package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js +320 -0
- package/dist/node_modules/motion-dom/dist/es/value/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +10 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/auto.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +41 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +43 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +23 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +33 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +26 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +30 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +31 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +114 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +13 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js +9 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/int.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +34 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +71 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +19 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/test.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +18 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +16 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +11 -0
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +21 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js.map +1 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +8 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/array.js +12 -0
- package/dist/node_modules/motion-utils/dist/es/array.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/clamp.js +10 -0
- package/dist/node_modules/motion-utils/dist/es/clamp.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +10 -0
- package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/back.js +10 -0
- package/dist/node_modules/motion-utils/dist/es/easing/back.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js +9 -0
- package/dist/node_modules/motion-utils/dist/es/easing/circ.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +53 -0
- package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/easing/ease.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +42 -0
- package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +20 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/format-error-message.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/global-config.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.js +4 -0
- package/dist/node_modules/motion-utils/dist/es/is-object.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/memo.js +12 -0
- package/dist/node_modules/motion-utils/dist/es/memo.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/noop.js +5 -0
- package/dist/node_modules/motion-utils/dist/es/noop.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/pipe.js +11 -0
- package/dist/node_modules/motion-utils/dist/es/pipe.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/progress.js +15 -0
- package/dist/node_modules/motion-utils/dist/es/progress.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +41 -0
- package/dist/node_modules/motion-utils/dist/es/subscription-manager.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js +13 -0
- package/dist/node_modules/motion-utils/dist/es/time-conversion.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +8 -0
- package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js.map +1 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js +12 -0
- package/dist/node_modules/motion-utils/dist/es/warn-once.js.map +1 -0
- package/package.json +107 -71
- package/theme.css +147 -20
- package/theme.legacy.css +84 -0
- package/dist/components/ui/accordion.js +0 -20
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/animated-count.js +0 -22
- package/dist/components/ui/animated-count.js.map +0 -1
- package/dist/components/ui/app-header.js +0 -72
- package/dist/components/ui/app-header.js.map +0 -1
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -22
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/button.d.ts +0 -13
- package/dist/components/ui/button.js +0 -88
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/button.test.d.ts +0 -1
- package/dist/components/ui/calendar.d.ts +0 -7
- package/dist/components/ui/checkbox.d.ts +0 -4
- package/dist/components/ui/checkbox.js +0 -11
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/dialog.js +0 -41
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/dropdown-menu.js +0 -61
- package/dist/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/fab.js +0 -9
- package/dist/components/ui/fab.js.map +0 -1
- package/dist/components/ui/icons.d.ts +0 -10
- package/dist/components/ui/icons.js +0 -39
- package/dist/components/ui/icons.js.map +0 -1
- package/dist/components/ui/input.js +0 -17
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/label.d.ts +0 -4
- package/dist/components/ui/label.js +0 -10
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/page-header.d.ts +0 -18
- package/dist/components/ui/page-header.js +0 -17
- package/dist/components/ui/page-header.js.map +0 -1
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -4
- package/dist/components/ui/separator.js +0 -10
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/status-notice.d.ts +0 -14
- package/dist/components/ui/status-notice.js +0 -27
- package/dist/components/ui/status-notice.js.map +0 -1
- package/dist/components/ui/switch.js +0 -10
- package/dist/components/ui/switch.js.map +0 -1
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/components/ui/table.js +0 -30
- package/dist/components/ui/table.js.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/textarea.js +0 -9
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/tooltip.js.map +0 -1
- package/dist/config.d.ts +0 -6
- package/dist/config.js +0 -9
- package/dist/config.js.map +0 -1
- package/dist/hooks/useClientProcess.d.ts +0 -69
- package/dist/hooks/useClientProcess.js +0 -255
- package/dist/hooks/useClientProcess.js.map +0 -1
- /package/dist/components/{ui/avatar.d.ts → avatar.d.ts} +0 -0
- /package/dist/components/{ui/dropdown-menu.d.ts → dropdown-menu.d.ts} +0 -0
- /package/dist/components/{ui/fab.d.ts → fab.d.ts} +0 -0
- /package/dist/components/{ui/input.d.ts → input.d.ts} +0 -0
- /package/dist/components/{ui/popover.d.ts → popover.d.ts} +0 -0
- /package/dist/components/{ui/skeleton.d.ts → skeleton.d.ts} +0 -0
- /package/dist/components/{ui/switch.d.ts → switch.d.ts} +0 -0
- /package/dist/components/{ui/tooltip.d.ts → tooltip.d.ts} +0 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { time } from '../frameloop/sync-time.js';
|
|
2
|
+
import { frame } from '../frameloop/frame.js';
|
|
3
|
+
import { warnOnce } from '../../../../motion-utils/dist/es/warn-once.js';
|
|
4
|
+
import { SubscriptionManager } from '../../../../motion-utils/dist/es/subscription-manager.js';
|
|
5
|
+
import { velocityPerSecond } from '../../../../motion-utils/dist/es/velocity-per-second.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Maximum time between the value of two frames, beyond which we
|
|
9
|
+
* assume the velocity has since been 0.
|
|
10
|
+
*/
|
|
11
|
+
const MAX_VELOCITY_DELTA = 30;
|
|
12
|
+
const isFloat = (value) => {
|
|
13
|
+
return !isNaN(parseFloat(value));
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* `MotionValue` is used to track the state and velocity of motion values.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
class MotionValue {
|
|
21
|
+
/**
|
|
22
|
+
* @param init - The initiating value
|
|
23
|
+
* @param config - Optional configuration options
|
|
24
|
+
*
|
|
25
|
+
* - `transformer`: A function to transform incoming values with.
|
|
26
|
+
*/
|
|
27
|
+
constructor(init, options = {}) {
|
|
28
|
+
/**
|
|
29
|
+
* Tracks whether this value can output a velocity. Currently this is only true
|
|
30
|
+
* if the value is numerical, but we might be able to widen the scope here and support
|
|
31
|
+
* other value types.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
this.canTrackVelocity = null;
|
|
36
|
+
/**
|
|
37
|
+
* An object containing a SubscriptionManager for each active event.
|
|
38
|
+
*/
|
|
39
|
+
this.events = {};
|
|
40
|
+
this.updateAndNotify = (v) => {
|
|
41
|
+
const currentTime = time.now();
|
|
42
|
+
/**
|
|
43
|
+
* If we're updating the value during another frame or eventloop
|
|
44
|
+
* than the previous frame, then the we set the previous frame value
|
|
45
|
+
* to current.
|
|
46
|
+
*/
|
|
47
|
+
if (this.updatedAt !== currentTime) {
|
|
48
|
+
this.setPrevFrameValue();
|
|
49
|
+
}
|
|
50
|
+
this.prev = this.current;
|
|
51
|
+
this.setCurrent(v);
|
|
52
|
+
// Update update subscribers
|
|
53
|
+
if (this.current !== this.prev) {
|
|
54
|
+
this.events.change?.notify(this.current);
|
|
55
|
+
if (this.dependents) {
|
|
56
|
+
for (const dependent of this.dependents) {
|
|
57
|
+
dependent.dirty();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
this.hasAnimated = false;
|
|
63
|
+
this.setCurrent(init);
|
|
64
|
+
this.owner = options.owner;
|
|
65
|
+
}
|
|
66
|
+
setCurrent(current) {
|
|
67
|
+
this.current = current;
|
|
68
|
+
this.updatedAt = time.now();
|
|
69
|
+
if (this.canTrackVelocity === null && current !== undefined) {
|
|
70
|
+
this.canTrackVelocity = isFloat(this.current);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
setPrevFrameValue(prevFrameValue = this.current) {
|
|
74
|
+
this.prevFrameValue = prevFrameValue;
|
|
75
|
+
this.prevUpdatedAt = this.updatedAt;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
79
|
+
*
|
|
80
|
+
* It returns a function that, when called, will cancel the subscription.
|
|
81
|
+
*
|
|
82
|
+
* When calling `onChange` inside a React component, it should be wrapped with the
|
|
83
|
+
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
|
|
84
|
+
* from the `useEffect` function to ensure you don't add duplicate subscribers..
|
|
85
|
+
*
|
|
86
|
+
* ```jsx
|
|
87
|
+
* export const MyComponent = () => {
|
|
88
|
+
* const x = useMotionValue(0)
|
|
89
|
+
* const y = useMotionValue(0)
|
|
90
|
+
* const opacity = useMotionValue(1)
|
|
91
|
+
*
|
|
92
|
+
* useEffect(() => {
|
|
93
|
+
* function updateOpacity() {
|
|
94
|
+
* const maxXY = Math.max(x.get(), y.get())
|
|
95
|
+
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
|
|
96
|
+
* opacity.set(newOpacity)
|
|
97
|
+
* }
|
|
98
|
+
*
|
|
99
|
+
* const unsubscribeX = x.on("change", updateOpacity)
|
|
100
|
+
* const unsubscribeY = y.on("change", updateOpacity)
|
|
101
|
+
*
|
|
102
|
+
* return () => {
|
|
103
|
+
* unsubscribeX()
|
|
104
|
+
* unsubscribeY()
|
|
105
|
+
* }
|
|
106
|
+
* }, [])
|
|
107
|
+
*
|
|
108
|
+
* return <motion.div style={{ x }} />
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @param subscriber - A function that receives the latest value.
|
|
113
|
+
* @returns A function that, when called, will cancel this subscription.
|
|
114
|
+
*
|
|
115
|
+
* @deprecated
|
|
116
|
+
*/
|
|
117
|
+
onChange(subscription) {
|
|
118
|
+
if (process.env.NODE_ENV !== "production") {
|
|
119
|
+
warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`);
|
|
120
|
+
}
|
|
121
|
+
return this.on("change", subscription);
|
|
122
|
+
}
|
|
123
|
+
on(eventName, callback) {
|
|
124
|
+
if (!this.events[eventName]) {
|
|
125
|
+
this.events[eventName] = new SubscriptionManager();
|
|
126
|
+
}
|
|
127
|
+
const unsubscribe = this.events[eventName].add(callback);
|
|
128
|
+
if (eventName === "change") {
|
|
129
|
+
return () => {
|
|
130
|
+
unsubscribe();
|
|
131
|
+
/**
|
|
132
|
+
* If we have no more change listeners by the start
|
|
133
|
+
* of the next frame, stop active animations.
|
|
134
|
+
*/
|
|
135
|
+
frame.read(() => {
|
|
136
|
+
if (!this.events.change.getSize()) {
|
|
137
|
+
this.stop();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return unsubscribe;
|
|
143
|
+
}
|
|
144
|
+
clearListeners() {
|
|
145
|
+
for (const eventManagers in this.events) {
|
|
146
|
+
this.events[eventManagers].clear();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Attaches a passive effect to the `MotionValue`.
|
|
151
|
+
*/
|
|
152
|
+
attach(passiveEffect, stopPassiveEffect) {
|
|
153
|
+
this.passiveEffect = passiveEffect;
|
|
154
|
+
this.stopPassiveEffect = stopPassiveEffect;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Sets the state of the `MotionValue`.
|
|
158
|
+
*
|
|
159
|
+
* @remarks
|
|
160
|
+
*
|
|
161
|
+
* ```jsx
|
|
162
|
+
* const x = useMotionValue(0)
|
|
163
|
+
* x.set(10)
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* @param latest - Latest value to set.
|
|
167
|
+
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
168
|
+
*
|
|
169
|
+
* @public
|
|
170
|
+
*/
|
|
171
|
+
set(v) {
|
|
172
|
+
if (!this.passiveEffect) {
|
|
173
|
+
this.updateAndNotify(v);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
this.passiveEffect(v, this.updateAndNotify);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
setWithVelocity(prev, current, delta) {
|
|
180
|
+
this.set(current);
|
|
181
|
+
this.prev = undefined;
|
|
182
|
+
this.prevFrameValue = prev;
|
|
183
|
+
this.prevUpdatedAt = this.updatedAt - delta;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Set the state of the `MotionValue`, stopping any active animations,
|
|
187
|
+
* effects, and resets velocity to `0`.
|
|
188
|
+
*/
|
|
189
|
+
jump(v, endAnimation = true) {
|
|
190
|
+
this.updateAndNotify(v);
|
|
191
|
+
this.prev = v;
|
|
192
|
+
this.prevUpdatedAt = this.prevFrameValue = undefined;
|
|
193
|
+
endAnimation && this.stop();
|
|
194
|
+
if (this.stopPassiveEffect)
|
|
195
|
+
this.stopPassiveEffect();
|
|
196
|
+
}
|
|
197
|
+
dirty() {
|
|
198
|
+
this.events.change?.notify(this.current);
|
|
199
|
+
}
|
|
200
|
+
addDependent(dependent) {
|
|
201
|
+
if (!this.dependents) {
|
|
202
|
+
this.dependents = new Set();
|
|
203
|
+
}
|
|
204
|
+
this.dependents.add(dependent);
|
|
205
|
+
}
|
|
206
|
+
removeDependent(dependent) {
|
|
207
|
+
if (this.dependents) {
|
|
208
|
+
this.dependents.delete(dependent);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Returns the latest state of `MotionValue`
|
|
213
|
+
*
|
|
214
|
+
* @returns - The latest state of `MotionValue`
|
|
215
|
+
*
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
get() {
|
|
219
|
+
return this.current;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
224
|
+
getPrevious() {
|
|
225
|
+
return this.prev;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Returns the latest velocity of `MotionValue`
|
|
229
|
+
*
|
|
230
|
+
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
231
|
+
*
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
getVelocity() {
|
|
235
|
+
const currentTime = time.now();
|
|
236
|
+
if (!this.canTrackVelocity ||
|
|
237
|
+
this.prevFrameValue === undefined ||
|
|
238
|
+
currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {
|
|
239
|
+
return 0;
|
|
240
|
+
}
|
|
241
|
+
const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);
|
|
242
|
+
// Casts because of parseFloat's poor typing
|
|
243
|
+
return velocityPerSecond(parseFloat(this.current) -
|
|
244
|
+
parseFloat(this.prevFrameValue), delta);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Registers a new animation to control this `MotionValue`. Only one
|
|
248
|
+
* animation can drive a `MotionValue` at one time.
|
|
249
|
+
*
|
|
250
|
+
* ```jsx
|
|
251
|
+
* value.start()
|
|
252
|
+
* ```
|
|
253
|
+
*
|
|
254
|
+
* @param animation - A function that starts the provided animation
|
|
255
|
+
*/
|
|
256
|
+
start(startAnimation) {
|
|
257
|
+
this.stop();
|
|
258
|
+
return new Promise((resolve) => {
|
|
259
|
+
this.hasAnimated = true;
|
|
260
|
+
this.animation = startAnimation(resolve);
|
|
261
|
+
if (this.events.animationStart) {
|
|
262
|
+
this.events.animationStart.notify();
|
|
263
|
+
}
|
|
264
|
+
}).then(() => {
|
|
265
|
+
if (this.events.animationComplete) {
|
|
266
|
+
this.events.animationComplete.notify();
|
|
267
|
+
}
|
|
268
|
+
this.clearAnimation();
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Stop the currently active animation.
|
|
273
|
+
*
|
|
274
|
+
* @public
|
|
275
|
+
*/
|
|
276
|
+
stop() {
|
|
277
|
+
if (this.animation) {
|
|
278
|
+
this.animation.stop();
|
|
279
|
+
if (this.events.animationCancel) {
|
|
280
|
+
this.events.animationCancel.notify();
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
this.clearAnimation();
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Returns `true` if this value is currently animating.
|
|
287
|
+
*
|
|
288
|
+
* @public
|
|
289
|
+
*/
|
|
290
|
+
isAnimating() {
|
|
291
|
+
return !!this.animation;
|
|
292
|
+
}
|
|
293
|
+
clearAnimation() {
|
|
294
|
+
delete this.animation;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Destroy and clean up subscribers to this `MotionValue`.
|
|
298
|
+
*
|
|
299
|
+
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
300
|
+
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
301
|
+
* created a `MotionValue` via the `motionValue` function.
|
|
302
|
+
*
|
|
303
|
+
* @public
|
|
304
|
+
*/
|
|
305
|
+
destroy() {
|
|
306
|
+
this.dependents?.clear();
|
|
307
|
+
this.events.destroy?.notify();
|
|
308
|
+
this.clearListeners();
|
|
309
|
+
this.stop();
|
|
310
|
+
if (this.stopPassiveEffect) {
|
|
311
|
+
this.stopPassiveEffect();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function motionValue(init, options) {
|
|
316
|
+
return new MotionValue(init, options);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { MotionValue, motionValue };
|
|
320
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/motion-dom/dist/es/value/index.mjs"],"sourcesContent":["import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,GAAG,EAAE;AAC7B,MAAM,OAAO,GAAG,CAAC,KAAK,KAAK;AAC3B,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAID;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI;AACpC;AACA;AACA;AACA,QAAQ,IAAI,CAAC,MAAM,GAAG,EAAE;AACxB,QAAQ,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,KAAK;AACtC,YAAY,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE;AAC1C;AACA;AACA;AACA;AACA;AACA,YAAY,IAAI,IAAI,CAAC,SAAS,KAAK,WAAW,EAAE;AAChD,gBAAgB,IAAI,CAAC,iBAAiB,EAAE;AACxC,YAAY;AACZ,YAAY,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO;AACpC,YAAY,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AAC9B;AACA,YAAY,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,EAAE;AAC5C,gBAAgB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AACxD,gBAAgB,IAAI,IAAI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,SAAS,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE;AACpC,IAAI,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC;AACzC;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/value/types/auto.mjs"],"sourcesContent":["/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n//# sourceMappingURL=auto.mjs.map\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACK,MAAC,IAAI,GAAG;AACb,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,MAAM;AAC7B,IAAI,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;AACnB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { rgba } from './rgba.js';
|
|
2
|
+
import { isColorString } from './utils.js';
|
|
3
|
+
|
|
4
|
+
function parseHex(v) {
|
|
5
|
+
let r = "";
|
|
6
|
+
let g = "";
|
|
7
|
+
let b = "";
|
|
8
|
+
let a = "";
|
|
9
|
+
// If we have 6 characters, ie #FF0000
|
|
10
|
+
if (v.length > 5) {
|
|
11
|
+
r = v.substring(1, 3);
|
|
12
|
+
g = v.substring(3, 5);
|
|
13
|
+
b = v.substring(5, 7);
|
|
14
|
+
a = v.substring(7, 9);
|
|
15
|
+
// Or we have 3 characters, ie #F00
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
r = v.substring(1, 2);
|
|
19
|
+
g = v.substring(2, 3);
|
|
20
|
+
b = v.substring(3, 4);
|
|
21
|
+
a = v.substring(4, 5);
|
|
22
|
+
r += r;
|
|
23
|
+
g += g;
|
|
24
|
+
b += b;
|
|
25
|
+
a += a;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
red: parseInt(r, 16),
|
|
29
|
+
green: parseInt(g, 16),
|
|
30
|
+
blue: parseInt(b, 16),
|
|
31
|
+
alpha: a ? parseInt(a, 16) / 255 : 1,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const hex = {
|
|
35
|
+
test: /*@__PURE__*/ isColorString("#"),
|
|
36
|
+
parse: parseHex,
|
|
37
|
+
transform: rgba.transform,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { hex };
|
|
41
|
+
//# sourceMappingURL=hex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hex.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/hex.mjs"],"sourcesContent":["import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n"],"names":[],"mappings":";;;AAGA,SAAS,QAAQ,CAAC,CAAC,EAAE;AACrB,IAAI,IAAI,CAAC,GAAG,EAAE;AACd,IAAI,IAAI,CAAC,GAAG,EAAE;AACd,IAAI,IAAI,CAAC,GAAG,EAAE;AACd,IAAI,IAAI,CAAC,GAAG,EAAE;AACd;AACA,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;AACtB,QAAQ,CAAC,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List":[0]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Adapted from https://gist.github.com/mjackson/5311256
|
|
2
|
+
function hueToRgb(p, q, t) {
|
|
3
|
+
if (t < 0)
|
|
4
|
+
t += 1;
|
|
5
|
+
if (t > 1)
|
|
6
|
+
t -= 1;
|
|
7
|
+
if (t < 1 / 6)
|
|
8
|
+
return p + (q - p) * 6 * t;
|
|
9
|
+
if (t < 1 / 2)
|
|
10
|
+
return q;
|
|
11
|
+
if (t < 2 / 3)
|
|
12
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
13
|
+
return p;
|
|
14
|
+
}
|
|
15
|
+
function hslaToRgba({ hue, saturation, lightness, alpha }) {
|
|
16
|
+
hue /= 360;
|
|
17
|
+
saturation /= 100;
|
|
18
|
+
lightness /= 100;
|
|
19
|
+
let red = 0;
|
|
20
|
+
let green = 0;
|
|
21
|
+
let blue = 0;
|
|
22
|
+
if (!saturation) {
|
|
23
|
+
red = green = blue = lightness;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const q = lightness < 0.5
|
|
27
|
+
? lightness * (1 + saturation)
|
|
28
|
+
: lightness + saturation - lightness * saturation;
|
|
29
|
+
const p = 2 * lightness - q;
|
|
30
|
+
red = hueToRgb(p, q, hue + 1 / 3);
|
|
31
|
+
green = hueToRgb(p, q, hue);
|
|
32
|
+
blue = hueToRgb(p, q, hue - 1 / 3);
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
red: Math.round(red * 255),
|
|
36
|
+
green: Math.round(green * 255),
|
|
37
|
+
blue: Math.round(blue * 255),
|
|
38
|
+
alpha,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { hslaToRgba };
|
|
43
|
+
//# sourceMappingURL=hsla-to-rgba.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hsla-to-rgba.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs"],"sourcesContent":["// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n//# sourceMappingURL=hsla-to-rgba.mjs.map\n"],"names":[],"mappings":"AAAA;AACA,SAAS,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3B,IAAI,IAAI,CAAC,GAAG,CAAC;AACb,QAAQ,CAAC,IAAI,CAAC;AACd,IAAI,IAAI,CAAC,GAAG,CAAC;AACb,QAAQ,CAAC,IAAI,CAAC;AACd,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACjB,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;AAClC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACjB,QAAQ,OAAO,CAAC;AAChB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACjB,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;AAC5C,IA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
|
+
import { alpha } from '../numbers/index.js';
|
|
2
|
+
import { percent } from '../numbers/units.js';
|
|
3
|
+
import { sanitize } from '../utils/sanitize.js';
|
|
4
|
+
import { isColorString, splitColor } from './utils.js';
|
|
5
|
+
|
|
6
|
+
const hsla = {
|
|
7
|
+
test: /*@__PURE__*/ isColorString("hsl", "hue"),
|
|
8
|
+
parse: /*@__PURE__*/ splitColor("hue", "saturation", "lightness"),
|
|
9
|
+
transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
|
|
10
|
+
return ("hsla(" +
|
|
11
|
+
Math.round(hue) +
|
|
12
|
+
", " +
|
|
13
|
+
percent.transform(sanitize(saturation)) +
|
|
14
|
+
", " +
|
|
15
|
+
percent.transform(sanitize(lightness)) +
|
|
16
|
+
", " +
|
|
17
|
+
sanitize(alpha.transform(alpha$1)) +
|
|
18
|
+
")");
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { hsla };
|
|
23
|
+
//# sourceMappingURL=hsla.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hsla.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/hsla.mjs"],"sourcesContent":["import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n//# sourceMappingURL=hsla.mjs.map\n"],"names":[],"mappings":";;;;;AAKK,MAAC,IAAI,GAAG;AACb,IAAI,IAAI,gBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;AACnD,IAAI,KAAK,gBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC;AACrE,IAAI,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,EAAE,KAAK;AACvE,QAAQ,QAAQ,OAAO;AACvB,YAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AAC3B,YAAY,IAAI;AAChB,YAAY,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACnD,YAAY,IAAI;AAChB,YAAY,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAClD,YAAY,IAAI;AAChB,YAAY,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9C,YAAY,GAAG;AACf,IAAI,CAAC;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { hex } from './hex.js';
|
|
2
|
+
import { hsla } from './hsla.js';
|
|
3
|
+
import { rgba } from './rgba.js';
|
|
4
|
+
|
|
5
|
+
const color = {
|
|
6
|
+
test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),
|
|
7
|
+
parse: (v) => {
|
|
8
|
+
if (rgba.test(v)) {
|
|
9
|
+
return rgba.parse(v);
|
|
10
|
+
}
|
|
11
|
+
else if (hsla.test(v)) {
|
|
12
|
+
return hsla.parse(v);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return hex.parse(v);
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
transform: (v) => {
|
|
19
|
+
return typeof v === "string"
|
|
20
|
+
? v
|
|
21
|
+
: v.hasOwnProperty("red")
|
|
22
|
+
? rgba.transform(v)
|
|
23
|
+
: hsla.transform(v);
|
|
24
|
+
},
|
|
25
|
+
getAnimatableNone: (v) => {
|
|
26
|
+
const parsed = color.parse(v);
|
|
27
|
+
parsed.alpha = 0;
|
|
28
|
+
return color.transform(parsed);
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { color };
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/index.mjs"],"sourcesContent":["import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;AAIK,MAAC,KAAK,GAAG;AACd,IAAI,IAAI,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D,IAAI,KAAK,EAAE,CAAC,CAAC,KAAK;AAClB,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAC1B,YAAY,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAChC,QAAQ;AACR,aAAa,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;AAC/B,YAAY,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAChC,QAAQ;AACR,aAAa;AACb,YAAY,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/B,QAAQ;AACR,IAAI,CAAC;AACL,IAAI,SAAS,EAAE,CAAC,CAAC,KAAK;AACtB,QAAQ,OAAO,OAAO,CAAC,KAAK;AAC5B,cAAc;AACd,cAAc,CAAC,CAAC,cAAc,CAAC,KAAK;AACpC,kBAAkB,IAAI,CAAC,SAAS,CAAC,CAAC;AAClC,kBAAkB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AACnC,IAAI,CAAC;AACL,IAAI,iBAAiB,EAAE,CAAC,CAAC,KAAK;AAC9B,QAAQ,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,QAAQ,MAAM,CAAC,KAAK,GAAG,CAAC;AACxB,QAAQ,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;AACtC,IAAI,CAAC;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { number, alpha } from '../numbers/index.js';
|
|
2
|
+
import { sanitize } from '../utils/sanitize.js';
|
|
3
|
+
import { isColorString, splitColor } from './utils.js';
|
|
4
|
+
import { clamp } from '../../../../../../motion-utils/dist/es/clamp.js';
|
|
5
|
+
|
|
6
|
+
const clampRgbUnit = (v) => clamp(0, 255, v);
|
|
7
|
+
const rgbUnit = {
|
|
8
|
+
...number,
|
|
9
|
+
transform: (v) => Math.round(clampRgbUnit(v)),
|
|
10
|
+
};
|
|
11
|
+
const rgba = {
|
|
12
|
+
test: /*@__PURE__*/ isColorString("rgb", "red"),
|
|
13
|
+
parse: /*@__PURE__*/ splitColor("red", "green", "blue"),
|
|
14
|
+
transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" +
|
|
15
|
+
rgbUnit.transform(red) +
|
|
16
|
+
", " +
|
|
17
|
+
rgbUnit.transform(green) +
|
|
18
|
+
", " +
|
|
19
|
+
rgbUnit.transform(blue) +
|
|
20
|
+
", " +
|
|
21
|
+
sanitize(alpha.transform(alpha$1)) +
|
|
22
|
+
")",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { rgbUnit, rgba };
|
|
26
|
+
//# sourceMappingURL=rgba.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgba.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/rgba.mjs"],"sourcesContent":["import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n//# sourceMappingURL=rgba.mjs.map\n"],"names":[],"mappings":";;;;;AAKA,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AACvC,MAAC,OAAO,GAAG;AAChB,IAAI,GAAG,MAAM;AACb,IAAI,SAAS,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AACjD;AACK,MAAC,IAAI,GAAG;AACb,IAAI,IAAI,gBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;AACnD,IAAI,KAAK,gBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;AAC3D,IAAI,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,EAAE,KAAK,OAAO;AACpE,QAAQ,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC;AAC9B,QAAQ,IAAI;AACZ,QAAQ,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;AAChC,QAAQ,IAAI;AACZ,QAAQ,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;AAC/B,QAAQ,IAAI;AACZ,QAAQ,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC1C,QAAQ,GAAG;AACX;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { floatRegex } from '../utils/float-regex.js';
|
|
2
|
+
import { isNullish } from '../utils/is-nullish.js';
|
|
3
|
+
import { singleColorRegex } from '../utils/single-color-regex.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,
|
|
7
|
+
* but false if a number or multiple colors
|
|
8
|
+
*/
|
|
9
|
+
const isColorString = (type, testProp) => (v) => {
|
|
10
|
+
return Boolean((typeof v === "string" &&
|
|
11
|
+
singleColorRegex.test(v) &&
|
|
12
|
+
v.startsWith(type)) ||
|
|
13
|
+
(testProp &&
|
|
14
|
+
!isNullish(v) &&
|
|
15
|
+
Object.prototype.hasOwnProperty.call(v, testProp)));
|
|
16
|
+
};
|
|
17
|
+
const splitColor = (aName, bName, cName) => (v) => {
|
|
18
|
+
if (typeof v !== "string")
|
|
19
|
+
return v;
|
|
20
|
+
const [a, b, c, alpha] = v.match(floatRegex);
|
|
21
|
+
return {
|
|
22
|
+
[aName]: parseFloat(a),
|
|
23
|
+
[bName]: parseFloat(b),
|
|
24
|
+
[cName]: parseFloat(c),
|
|
25
|
+
alpha: alpha !== undefined ? parseFloat(alpha) : 1,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { isColorString, splitColor };
|
|
30
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/utils.mjs"],"sourcesContent":["import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n//# sourceMappingURL=utils.mjs.map\n"],"names":[],"mappings":";;;;AAIA;AACA;AACA;AACA;AACK,MAAC,aAAa,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK,CAAC,CAAC,KAAK;AACjD,IAAI,OAAO,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ;AACzC,QAAQ,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;AAChC,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;AAC1B,SAAS,QAAQ;AACjB,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;AACzB,YAAY,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC/D;AACK,MAAC,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,CAAC,KAAK;AACnD,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ;AAC7B,QAAQ,OAAO,CAAC;AAChB,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;AAChD,IAAI,OAAO;AACX,QAAQ,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;AAC9B,QAAQ,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;AAC9B,QAAQ,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;AAC9B,QAAQ,KAAK,EAAE,KAAK,KAAK,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;AAC1D,KAAK;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { complex } from './index.js';
|
|
2
|
+
import { floatRegex } from '../utils/float-regex.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Properties that should default to 1 or 100%
|
|
6
|
+
*/
|
|
7
|
+
const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
8
|
+
function applyDefaultFilter(v) {
|
|
9
|
+
const [name, value] = v.slice(0, -1).split("(");
|
|
10
|
+
if (name === "drop-shadow")
|
|
11
|
+
return v;
|
|
12
|
+
const [number] = value.match(floatRegex) || [];
|
|
13
|
+
if (!number)
|
|
14
|
+
return v;
|
|
15
|
+
const unit = value.replace(number, "");
|
|
16
|
+
let defaultValue = maxDefaults.has(name) ? 1 : 0;
|
|
17
|
+
if (number !== value)
|
|
18
|
+
defaultValue *= 100;
|
|
19
|
+
return name + "(" + defaultValue + unit + ")";
|
|
20
|
+
}
|
|
21
|
+
const functionRegex = /\b([a-z-]*)\(.*?\)/gu;
|
|
22
|
+
const filter = {
|
|
23
|
+
...complex,
|
|
24
|
+
getAnimatableNone: (v) => {
|
|
25
|
+
const functions = v.match(functionRegex);
|
|
26
|
+
return functions ? functions.map(applyDefaultFilter).join(" ") : v;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { filter };
|
|
31
|
+
//# sourceMappingURL=filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/complex/filter.mjs"],"sourcesContent":["import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n//# sourceMappingURL=filter.mjs.map\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;AACA,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAC9E,SAAS,kBAAkB,CAAC,CAAC,EAAE;AAC/B,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;AACnD,IAAI,IAAI,IAAI,KAAK,aAAa;AAC9B,QAAQ,OAAO,CAAC;AAChB,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,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