@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,21 @@
|
|
|
1
|
+
import { circInOut } from '../../../../../../motion-utils/dist/es/easing/circ.js';
|
|
2
|
+
import { backInOut } from '../../../../../../motion-utils/dist/es/easing/back.js';
|
|
3
|
+
import { anticipate } from '../../../../../../motion-utils/dist/es/easing/anticipate.js';
|
|
4
|
+
|
|
5
|
+
const unsupportedEasingFunctions = {
|
|
6
|
+
anticipate,
|
|
7
|
+
backInOut,
|
|
8
|
+
circInOut,
|
|
9
|
+
};
|
|
10
|
+
function isUnsupportedEase(key) {
|
|
11
|
+
return key in unsupportedEasingFunctions;
|
|
12
|
+
}
|
|
13
|
+
function replaceStringEasing(transition) {
|
|
14
|
+
if (typeof transition.ease === "string" &&
|
|
15
|
+
isUnsupportedEase(transition.ease)) {
|
|
16
|
+
transition.ease = unsupportedEasingFunctions[transition.ease];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { replaceStringEasing };
|
|
21
|
+
//# sourceMappingURL=unsupported-easing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsupported-easing.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs"],"sourcesContent":["import { circInOut, backInOut, anticipate } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n if (typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)) {\n transition.ease = unsupportedEasingFunctions[transition.ease];\n }\n}\n\nexport { replaceStringEasing };\n//# sourceMappingURL=unsupported-easing.mjs.map\n"],"names":[],"mappings":";;;;AAEA,MAAM,0BAA0B,GAAG;AACnC,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,SAAS;AACb,CAAC;AACD,SAAS,iBAAiB,CAAC,GAAG,EAAE;AAChC,IAAI,OAAO,GAAG,IAAI,0BAA0B;AAC5C;AACA,SAAS,mBAAmB,CAAC,UAAU,EAAE;AACzC,IAAI,IAAI,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;AAC3C,QAAQ,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,UAAU,CAAC,IAAI,GAAG,0BAA0B,CAAC,UAAU,CAAC,IAAI,CAAC;AACrE,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function addDomEvent(target, eventName, handler, options = { passive: true }) {
|
|
2
|
+
target.addEventListener(eventName, handler, options);
|
|
3
|
+
return () => target.removeEventListener(eventName, handler, options);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export { addDomEvent };
|
|
7
|
+
//# sourceMappingURL=add-dom-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-dom-event.js","sources":["../../../../../../node_modules/motion-dom/dist/es/events/add-dom-event.mjs"],"sourcesContent":["function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler, options);\n}\n\nexport { addDomEvent };\n//# sourceMappingURL=add-dom-event.mjs.map\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;AAC9E,IAAI,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC;AACxD,IAAI,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC;AACxE;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { stepsOrder } from './order.js';
|
|
2
|
+
import { createRenderStep } from './render-step.js';
|
|
3
|
+
import { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.js';
|
|
4
|
+
|
|
5
|
+
const maxElapsed = 40;
|
|
6
|
+
function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
7
|
+
let runNextFrame = false;
|
|
8
|
+
let useDefaultElapsed = true;
|
|
9
|
+
const state = {
|
|
10
|
+
delta: 0.0,
|
|
11
|
+
timestamp: 0.0,
|
|
12
|
+
isProcessing: false,
|
|
13
|
+
};
|
|
14
|
+
const flagRunNextFrame = () => (runNextFrame = true);
|
|
15
|
+
const steps = stepsOrder.reduce((acc, key) => {
|
|
16
|
+
acc[key] = createRenderStep(flagRunNextFrame);
|
|
17
|
+
return acc;
|
|
18
|
+
}, {});
|
|
19
|
+
const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;
|
|
20
|
+
const processBatch = () => {
|
|
21
|
+
const useManualTiming = MotionGlobalConfig.useManualTiming;
|
|
22
|
+
const timestamp = useManualTiming
|
|
23
|
+
? state.timestamp
|
|
24
|
+
: performance.now();
|
|
25
|
+
runNextFrame = false;
|
|
26
|
+
if (!useManualTiming) {
|
|
27
|
+
state.delta = useDefaultElapsed
|
|
28
|
+
? 1000 / 60
|
|
29
|
+
: Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);
|
|
30
|
+
}
|
|
31
|
+
state.timestamp = timestamp;
|
|
32
|
+
state.isProcessing = true;
|
|
33
|
+
// Unrolled render loop for better per-frame performance
|
|
34
|
+
setup.process(state);
|
|
35
|
+
read.process(state);
|
|
36
|
+
resolveKeyframes.process(state);
|
|
37
|
+
preUpdate.process(state);
|
|
38
|
+
update.process(state);
|
|
39
|
+
preRender.process(state);
|
|
40
|
+
render.process(state);
|
|
41
|
+
postRender.process(state);
|
|
42
|
+
state.isProcessing = false;
|
|
43
|
+
if (runNextFrame && allowKeepAlive) {
|
|
44
|
+
useDefaultElapsed = false;
|
|
45
|
+
scheduleNextBatch(processBatch);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const wake = () => {
|
|
49
|
+
runNextFrame = true;
|
|
50
|
+
useDefaultElapsed = true;
|
|
51
|
+
if (!state.isProcessing) {
|
|
52
|
+
scheduleNextBatch(processBatch);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const schedule = stepsOrder.reduce((acc, key) => {
|
|
56
|
+
const step = steps[key];
|
|
57
|
+
acc[key] = (process, keepAlive = false, immediate = false) => {
|
|
58
|
+
if (!runNextFrame)
|
|
59
|
+
wake();
|
|
60
|
+
return step.schedule(process, keepAlive, immediate);
|
|
61
|
+
};
|
|
62
|
+
return acc;
|
|
63
|
+
}, {});
|
|
64
|
+
const cancel = (process) => {
|
|
65
|
+
for (let i = 0; i < stepsOrder.length; i++) {
|
|
66
|
+
steps[stepsOrder[i]].cancel(process);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return { schedule, cancel, state, steps };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { createRenderBatcher };
|
|
73
|
+
//# sourceMappingURL=batcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batcher.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/batcher.mjs"],"sourcesContent":["import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const useManualTiming = MotionGlobalConfig.useManualTiming;\n const timestamp = useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n//# sourceMappingURL=batcher.mjs.map\n"],"names":[],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRenderBatcher } from './batcher.js';
|
|
2
|
+
import { noop } from '../../../../motion-utils/dist/es/noop.js';
|
|
3
|
+
|
|
4
|
+
const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true);
|
|
5
|
+
|
|
6
|
+
export { cancelFrame, frame, frameData, frameSteps };
|
|
7
|
+
//# sourceMappingURL=frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/frame.mjs"],"sourcesContent":["import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n//# sourceMappingURL=frame.mjs.map\n"],"names":[],"mappings":";;;AAGK,MAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,GAAG,mBAAmB,mBAAmB,CAAC,OAAO,qBAAqB,KAAK,WAAW,GAAG,qBAAqB,GAAG,IAAI,EAAE,IAAI;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microtask.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/microtask.mjs"],"sourcesContent":["import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = \n/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n//# sourceMappingURL=microtask.mjs.map\n"],"names":[],"mappings":";;AAEK,MAAC,EAAE,QAAQ,EAAE,SAAmC,CAAC;AACtD,gBAAgB,mBAAmB,CAAC,cAAc,EAAE,KAAK;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const stepsOrder = [
|
|
2
|
+
"setup", // Compute
|
|
3
|
+
"read", // Read
|
|
4
|
+
"resolveKeyframes", // Write/Read/Write/Read
|
|
5
|
+
"preUpdate", // Compute
|
|
6
|
+
"update", // Compute
|
|
7
|
+
"preRender", // Compute
|
|
8
|
+
"render", // Write
|
|
9
|
+
"postRender", // Compute
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export { stepsOrder };
|
|
13
|
+
//# sourceMappingURL=order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/order.mjs"],"sourcesContent":["const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n//# sourceMappingURL=order.mjs.map\n"],"names":[],"mappings":"AAAK,MAAC,UAAU,GAAG;AACnB,IAAI,OAAO;AACX,IAAI,MAAM;AACV,IAAI,kBAAkB;AACtB,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
function createRenderStep(runNextFrame) {
|
|
2
|
+
/**
|
|
3
|
+
* We create and reuse two queues, one to queue jobs for the current frame
|
|
4
|
+
* and one for the next. We reuse to avoid triggering GC after x frames.
|
|
5
|
+
*/
|
|
6
|
+
let thisFrame = new Set();
|
|
7
|
+
let nextFrame = new Set();
|
|
8
|
+
/**
|
|
9
|
+
* Track whether we're currently processing jobs in this step. This way
|
|
10
|
+
* we can decide whether to schedule new jobs for this frame or next.
|
|
11
|
+
*/
|
|
12
|
+
let isProcessing = false;
|
|
13
|
+
let flushNextFrame = false;
|
|
14
|
+
/**
|
|
15
|
+
* A set of processes which were marked keepAlive when scheduled.
|
|
16
|
+
*/
|
|
17
|
+
const toKeepAlive = new WeakSet();
|
|
18
|
+
let latestFrameData = {
|
|
19
|
+
delta: 0.0,
|
|
20
|
+
timestamp: 0.0,
|
|
21
|
+
isProcessing: false,
|
|
22
|
+
};
|
|
23
|
+
function triggerCallback(callback) {
|
|
24
|
+
if (toKeepAlive.has(callback)) {
|
|
25
|
+
step.schedule(callback);
|
|
26
|
+
runNextFrame();
|
|
27
|
+
}
|
|
28
|
+
callback(latestFrameData);
|
|
29
|
+
}
|
|
30
|
+
const step = {
|
|
31
|
+
/**
|
|
32
|
+
* Schedule a process to run on the next frame.
|
|
33
|
+
*/
|
|
34
|
+
schedule: (callback, keepAlive = false, immediate = false) => {
|
|
35
|
+
const addToCurrentFrame = immediate && isProcessing;
|
|
36
|
+
const queue = addToCurrentFrame ? thisFrame : nextFrame;
|
|
37
|
+
if (keepAlive)
|
|
38
|
+
toKeepAlive.add(callback);
|
|
39
|
+
queue.add(callback);
|
|
40
|
+
return callback;
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Cancel the provided callback from running on the next frame.
|
|
44
|
+
*/
|
|
45
|
+
cancel: (callback) => {
|
|
46
|
+
nextFrame.delete(callback);
|
|
47
|
+
toKeepAlive.delete(callback);
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* Execute all schedule callbacks.
|
|
51
|
+
*/
|
|
52
|
+
process: (frameData) => {
|
|
53
|
+
latestFrameData = frameData;
|
|
54
|
+
/**
|
|
55
|
+
* If we're already processing we've probably been triggered by a flushSync
|
|
56
|
+
* inside an existing process. Instead of executing, mark flushNextFrame
|
|
57
|
+
* as true and ensure we flush the following frame at the end of this one.
|
|
58
|
+
*/
|
|
59
|
+
if (isProcessing) {
|
|
60
|
+
flushNextFrame = true;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
isProcessing = true;
|
|
64
|
+
// Swap this frame and the next to avoid GC
|
|
65
|
+
const prevFrame = thisFrame;
|
|
66
|
+
thisFrame = nextFrame;
|
|
67
|
+
nextFrame = prevFrame;
|
|
68
|
+
// Execute this frame
|
|
69
|
+
thisFrame.forEach(triggerCallback);
|
|
70
|
+
// Clear the frame so no callbacks remain. This is to avoid
|
|
71
|
+
// memory leaks should this render step not run for a while.
|
|
72
|
+
thisFrame.clear();
|
|
73
|
+
isProcessing = false;
|
|
74
|
+
if (flushNextFrame) {
|
|
75
|
+
flushNextFrame = false;
|
|
76
|
+
step.process(frameData);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
return step;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { createRenderStep };
|
|
84
|
+
//# sourceMappingURL=render-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-step.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/render-step.mjs"],"sourcesContent":["function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n // Swap this frame and the next to avoid GC\n const prevFrame = thisFrame;\n thisFrame = nextFrame;\n nextFrame = prevFrame;\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n//# sourceMappingURL=render-step.mjs.map\n"],"names":[],"mappings":"AAAA,SAAS,gBAAgB,CAAC,YAAY,EAAE;AACxC;AACA;AACA;AACA;AACA,IAAI,IAAI,SAAS,GAAG,IAAI,GAAG,EAAE;AAC7B,IAAI,IAAI,SAAS,GAAG,IAAI,GAAG,EAAE;AAC7B;AACA;AACA;AACA;AACA,IAAI,IAAI,YAAY,GAAG,KAAK;AAC5B,IAAI,IAAI,cAAc,GAAG,KAAK;AAC9B;AACA;AACA;AACA,IAAI,MAAM,WAAW,GAAG,IAAI,OAAO,EAAE;AACrC,IAAI,IAAI,eAAe,GAAG;AAC1B,QAAQ,KAAK,EAAE,GAAG;AAClB,QAAQ,SAAS,EAAE,GAAG;AACtB,QAAQ,YAAY,EAAE,KAAK;AAC3B,KAAK;AACL,IAAI,SAAS,eAAe,CAAC,QAAQ,EAAE;AACvC,QAAQ,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;AACvC,YAAY,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;AACnC,YAAY,YAAY,EAAE;AAC1B,QAAQ;AACR,QAAQ,QAAQ,CAAC,eAAe,CAAC;AACjC,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB;AACA;AACA;AACA,QAAQ,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,KAAK;AACtE,YAAY,MAAM,iBAAiB,GAAG,SAAS,IAAI,YAAY;AAC/D,YAAY,MAAM,KAAK,GAAG,iBAAiB,GAAG,SAAS,GAAG,SAAS;AACnE,YAAY,IAAI,SAAS;AACzB,gBAAgB,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC;AACzC,YAAY,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC/B,YAAY,OAAO,QAAQ;AAC3B,QAAQ,CAAC;AACT;AACA;AACA;AACA,QAAQ,MAAM,EAAE,CAAC,QAAQ,KAAK;AAC9B,YAAY,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC;AACtC,YAAY,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC;AACxC,QAAQ,CAAC;AACT;AACA;AACA;AACA,QAAQ,OAAO,EAAE,CAAC,SAAS,KAAK;AAChC,YAAY,eAAe,GAAG,SAAS;AACvC;AACA;AACA;AACA;AACA;AACA,YAAY,IAAI,YAAY,EAAE;AAC9B,gBAAgB,cAAc,GAAG,IAAI;AACrC,gBAAgB;AAChB,YAAY;AACZ,YAAY,YAAY,GAAG,IAAI;AAC/B;AACA,YAAY,MAAM,SAAS,GAAG,SAAS;AACvC,YAAY,SAAS,GAAG,SAAS;AACjC,YAAY,SAAS,GAAG,SAAS;AACjC;AACA,YAAY,SAAS,CAAC,OAAO,CAAC,eAAe,CAAC;AAC9C;AACA;AACA,YAAY,SAAS,CAAC,KAAK,EAAE;AAC7B,YAAY,YAAY,GAAG,KAAK;AAChC,YAAY,IAAI,cAAc,EAAE;AAChC,gBAAgB,cAAc,GAAG,KAAK;AACtC,gBAAgB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;AACvC,YAAY;AACZ,QAAQ,CAAC;AACT,KAAK;AACL,IAAI,OAAO,IAAI;AACf;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { frameData } from './frame.js';
|
|
2
|
+
import { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.js';
|
|
3
|
+
|
|
4
|
+
let now;
|
|
5
|
+
function clearTime() {
|
|
6
|
+
now = undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* An eventloop-synchronous alternative to performance.now().
|
|
10
|
+
*
|
|
11
|
+
* Ensures that time measurements remain consistent within a synchronous context.
|
|
12
|
+
* Usually calling performance.now() twice within the same synchronous context
|
|
13
|
+
* will return different values which isn't useful for animations when we're usually
|
|
14
|
+
* trying to sync animations to the same frame.
|
|
15
|
+
*/
|
|
16
|
+
const time = {
|
|
17
|
+
now: () => {
|
|
18
|
+
if (now === undefined) {
|
|
19
|
+
time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming
|
|
20
|
+
? frameData.timestamp
|
|
21
|
+
: performance.now());
|
|
22
|
+
}
|
|
23
|
+
return now;
|
|
24
|
+
},
|
|
25
|
+
set: (newTime) => {
|
|
26
|
+
now = newTime;
|
|
27
|
+
queueMicrotask(clearTime);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { time };
|
|
32
|
+
//# sourceMappingURL=sync-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-time.js","sources":["../../../../../../node_modules/motion-dom/dist/es/frameloop/sync-time.mjs"],"sourcesContent":["import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n//# sourceMappingURL=sync-time.mjs.map\n"],"names":[],"mappings":";;;AAGA,IAAI,GAAG;AACP,SAAS,SAAS,GAAG;AACrB,IAAI,GAAG,GAAG,SAAS;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,IAAI,GAAG;AACb,IAAI,GAAG,EAAE,MAAM;AACf,QAAQ,IAAI,GAAG,KAAK,SAAS,EAAE;AAC/B,YAAY,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,IAAI,kBAAkB,CAAC;AAClE,kBAAkB,SAAS,CAAC;AAC5B,kBAAkB,WAAW,CAAC,GAAG,EAAE,CAAC;AACpC,QAAQ;AACR,QAAQ,OAAO,GAAG;AAClB,IAAI,CAAC;AACL,IAAI,GAAG,EAAE,CAAC,OAAO,KAAK;AACtB,QAAQ,GAAG,GAAG,OAAO;AACrB,QAAQ,cAAc,CAAC,SAAS,CAAC;AACjC,IAAI,CAAC;AACL;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-active.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs"],"sourcesContent":["const isDragging = {\n x: false,\n y: false,\n};\nfunction isDragActive() {\n return isDragging.x || isDragging.y;\n}\n\nexport { isDragActive, isDragging };\n//# sourceMappingURL=is-active.mjs.map\n"],"names":[],"mappings":"AAAK,MAAC,UAAU,GAAG;AACnB,IAAI,CAAC,EAAE,KAAK;AACZ,IAAI,CAAC,EAAE,KAAK;AACZ;AACA,SAAS,YAAY,GAAG;AACxB,IAAI,OAAO,UAAU,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC;AACvC;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isDragging } from './is-active.js';
|
|
2
|
+
|
|
3
|
+
function setDragLock(axis) {
|
|
4
|
+
if (axis === "x" || axis === "y") {
|
|
5
|
+
if (isDragging[axis]) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
isDragging[axis] = true;
|
|
10
|
+
return () => {
|
|
11
|
+
isDragging[axis] = false;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
if (isDragging.x || isDragging.y) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
isDragging.x = isDragging.y = true;
|
|
21
|
+
return () => {
|
|
22
|
+
isDragging.x = isDragging.y = false;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { setDragLock };
|
|
29
|
+
//# sourceMappingURL=set-active.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-active.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs"],"sourcesContent":["import { isDragging } from './is-active.mjs';\n\nfunction setDragLock(axis) {\n if (axis === \"x\" || axis === \"y\") {\n if (isDragging[axis]) {\n return null;\n }\n else {\n isDragging[axis] = true;\n return () => {\n isDragging[axis] = false;\n };\n }\n }\n else {\n if (isDragging.x || isDragging.y) {\n return null;\n }\n else {\n isDragging.x = isDragging.y = true;\n return () => {\n isDragging.x = isDragging.y = false;\n };\n }\n }\n}\n\nexport { setDragLock };\n//# sourceMappingURL=set-active.mjs.map\n"],"names":[],"mappings":";;AAEA,SAAS,WAAW,CAAC,IAAI,EAAE;AAC3B,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,EAAE;AACtC,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;AAC9B,YAAY,OAAO,IAAI;AACvB,QAAQ;AACR,aAAa;AACb,YAAY,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI;AACnC,YAAY,OAAO,MAAM;AACzB,gBAAgB,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK;AACxC,YAAY,CAAC;AACb,QAAQ;AACR,IAAI;AACJ,SAAS;AACT,QAAQ,IAAI,UAAU,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE;AAC1C,YAAY,OAAO,IAAI;AACvB,QAAQ;AACR,aAAa;AACb,YAAY,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI;AAC9C,YAAY,OAAO,MAAM;AACzB,gBAAgB,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,KAAK;AACnD,YAAY,CAAC;AACb,QAAQ;AACR,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { isDragActive } from './drag/state/is-active.js';
|
|
2
|
+
import { setupGesture } from './utils/setup.js';
|
|
3
|
+
|
|
4
|
+
function isValidHover(event) {
|
|
5
|
+
return !(event.pointerType === "touch" || isDragActive());
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Create a hover gesture. hover() is different to .addEventListener("pointerenter")
|
|
9
|
+
* in that it has an easier syntax, filters out polyfilled touch events, interoperates
|
|
10
|
+
* with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
function hover(elementOrSelector, onHoverStart, options = {}) {
|
|
15
|
+
const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);
|
|
16
|
+
elements.forEach((element) => {
|
|
17
|
+
let isPressed = false;
|
|
18
|
+
let deferredHoverEnd = false;
|
|
19
|
+
let hoverEndCallback;
|
|
20
|
+
const removePointerLeave = () => {
|
|
21
|
+
element.removeEventListener("pointerleave", onPointerLeave);
|
|
22
|
+
};
|
|
23
|
+
const endHover = (event) => {
|
|
24
|
+
if (hoverEndCallback) {
|
|
25
|
+
hoverEndCallback(event);
|
|
26
|
+
hoverEndCallback = undefined;
|
|
27
|
+
}
|
|
28
|
+
removePointerLeave();
|
|
29
|
+
};
|
|
30
|
+
const onPointerUp = (event) => {
|
|
31
|
+
isPressed = false;
|
|
32
|
+
window.removeEventListener("pointerup", onPointerUp);
|
|
33
|
+
window.removeEventListener("pointercancel", onPointerUp);
|
|
34
|
+
if (deferredHoverEnd) {
|
|
35
|
+
deferredHoverEnd = false;
|
|
36
|
+
endHover(event);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const onPointerDown = () => {
|
|
40
|
+
isPressed = true;
|
|
41
|
+
window.addEventListener("pointerup", onPointerUp, eventOptions);
|
|
42
|
+
window.addEventListener("pointercancel", onPointerUp, eventOptions);
|
|
43
|
+
};
|
|
44
|
+
const onPointerLeave = (leaveEvent) => {
|
|
45
|
+
if (leaveEvent.pointerType === "touch")
|
|
46
|
+
return;
|
|
47
|
+
if (isPressed) {
|
|
48
|
+
deferredHoverEnd = true;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
endHover(leaveEvent);
|
|
52
|
+
};
|
|
53
|
+
const onPointerEnter = (enterEvent) => {
|
|
54
|
+
if (!isValidHover(enterEvent))
|
|
55
|
+
return;
|
|
56
|
+
deferredHoverEnd = false;
|
|
57
|
+
const onHoverEnd = onHoverStart(element, enterEvent);
|
|
58
|
+
if (typeof onHoverEnd !== "function")
|
|
59
|
+
return;
|
|
60
|
+
hoverEndCallback = onHoverEnd;
|
|
61
|
+
element.addEventListener("pointerleave", onPointerLeave, eventOptions);
|
|
62
|
+
};
|
|
63
|
+
element.addEventListener("pointerenter", onPointerEnter, eventOptions);
|
|
64
|
+
element.addEventListener("pointerdown", onPointerDown, eventOptions);
|
|
65
|
+
});
|
|
66
|
+
return cancel;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { hover };
|
|
70
|
+
//# sourceMappingURL=hover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover.js","sources":["../../../../../../node_modules/motion-dom/dist/es/gestures/hover.mjs"],"sourcesContent":["import { isDragActive } from './drag/state/is-active.mjs';\nimport { setupGesture } from './utils/setup.mjs';\n\nfunction isValidHover(event) {\n return !(event.pointerType === \"touch\" || isDragActive());\n}\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nfunction hover(elementOrSelector, onHoverStart, options = {}) {\n const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);\n elements.forEach((element) => {\n let isPressed = false;\n let deferredHoverEnd = false;\n let hoverEndCallback;\n const removePointerLeave = () => {\n element.removeEventListener(\"pointerleave\", onPointerLeave);\n };\n const endHover = (event) => {\n if (hoverEndCallback) {\n hoverEndCallback(event);\n hoverEndCallback = undefined;\n }\n removePointerLeave();\n };\n const onPointerUp = (event) => {\n isPressed = false;\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerUp);\n if (deferredHoverEnd) {\n deferredHoverEnd = false;\n endHover(event);\n }\n };\n const onPointerDown = () => {\n isPressed = true;\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n window.addEventListener(\"pointercancel\", onPointerUp, eventOptions);\n };\n const onPointerLeave = (leaveEvent) => {\n if (leaveEvent.pointerType === \"touch\")\n return;\n if (isPressed) {\n deferredHoverEnd = true;\n return;\n }\n endHover(leaveEvent);\n };\n const onPointerEnter = (enterEvent) => {\n if (!isValidHover(enterEvent))\n return;\n deferredHoverEnd = false;\n const onHoverEnd = onHoverStart(element, enterEvent);\n if (typeof onHoverEnd !== \"function\")\n return;\n hoverEndCallback = onHoverEnd;\n element.addEventListener(\"pointerleave\", onPointerLeave, eventOptions);\n };\n element.addEventListener(\"pointerenter\", onPointerEnter, eventOptions);\n element.addEventListener(\"pointerdown\", onPointerDown, eventOptions);\n });\n return cancel;\n}\n\nexport { hover };\n//# sourceMappingURL=hover.mjs.map\n"],"names":[],"mappings":";;;AAGA,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,EAAE,KAAK,CAAC,WAAW,KAAK,OAAO,IAAI,YAAY,EAAE,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,KAAK,CAAC,iBAAiB,EAAE,YAAY,EAAE,OAAO,GAAG,EAAE,EAAE;AAC9D,IAAI,MAAM,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,GAAG,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACrF,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK;AAClC,QAAQ,IAAI,SAAS,GAAG,KAAK;AAC7B,QAAQ,IAAI,gBAAgB,GAAG,KAAK;AACpC,QAAQ,IAAI,gBAAgB;AAC5B,QAAQ,MAAM,kBAAkB,GAAG,MAAM;AACzC,YAAY,OAAO,CAAC,mBAAmB,CAAC,cAAc,EAAE,cAAc,CAAC;AACvE,QAAQ,CAAC;AACT,QAAQ,MAAM,QAAQ,GAAG,CAAC,KAAK,KAAK;AACpC,YAAY,IAAI,gBAAgB,EAAE;AAClC,gBAAgB,gBAAgB,CAAC,KAAK,CAAC;AACvC,gBAAgB,gBAAgB,GAAG,SAAS;AAC5C,YAAY;AACZ,YAAY,kBAAkB,EAAE;AAChC,QAAQ,CAAC;AACT,QAAQ,MAAM,WAAW,GAAG,CAAC,KAAK,KAAK;AACvC,YAAY,SAAS,GAAG,KAAK;AAC7B,YAAY,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC;AAChE,YAAY,MAAM,CAAC,mBAAmB,CAAC,eAAe,EAAE,WAAW,CAAC;AACpE,YAAY,IAAI,gBAAgB,EAAE;AAClC,gBAAgB,gBAAgB,GAAG,KAAK;AACxC,gBAAgB,QAAQ,CAAC,KAAK,CAAC;AAC/B,YAAY;AACZ,QAAQ,CAAC;AACT,QAAQ,MAAM,aAAa,GAAG,MAAM;AACpC,YAAY,SAAS,GAAG,IAAI;AAC5B,YAAY,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC;AAC3E,YAAY,MAAM,CAAC,gBAAgB,CAAC,eAAe,EAAE,WAAW,EAAE,YAAY,CAAC;AAC/E,QAAQ,CAAC;AACT,QAAQ,MAAM,cAAc,GAAG,CAAC,UAAU,KAAK;AAC/C,YAAY,IAAI,UAAU,CAAC,WAAW,KAAK,OAAO;AAClD,gBAAgB;AAChB,YAAY,IAAI,SAAS,EAAE;AAC3B,gBAAgB,gBAAgB,GAAG,IAAI;AACvC,gBAAgB;AAChB,YAAY;AACZ,YAAY,QAAQ,CAAC,UAAU,CAAC;AAChC,QAAQ,CAAC;AACT,QAAQ,MAAM,cAAc,GAAG,CAAC,UAAU,KAAK;AAC/C,YAAY,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;AACzC,gBAAgB;AAChB,YAAY,gBAAgB,GAAG,KAAK;AACpC,YAAY,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC;AAChE,YAAY,IAAI,OAAO,UAAU,KAAK,UAAU;AAChD,gBAAgB;AAChB,YAAY,gBAAgB,GAAG,UAAU;AACzC,YAAY,OAAO,CAAC,gBAAgB,CAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC;AAClF,QAAQ,CAAC;AACT,QAAQ,OAAO,CAAC,gBAAgB,CAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC;AAC9E,QAAQ,OAAO,CAAC,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC;AAC5E,IAAI,CAAC,CAAC;AACN,IAAI,OAAO,MAAM;AACjB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { isHTMLElement } from '../../utils/is-html-element.js';
|
|
2
|
+
import { isDragActive } from '../drag/state/is-active.js';
|
|
3
|
+
import { isNodeOrChild } from '../utils/is-node-or-child.js';
|
|
4
|
+
import { isPrimaryPointer } from '../utils/is-primary-pointer.js';
|
|
5
|
+
import { setupGesture } from '../utils/setup.js';
|
|
6
|
+
import { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.js';
|
|
7
|
+
import { enableKeyboardPress } from './utils/keyboard.js';
|
|
8
|
+
import { isPressing } from './utils/state.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Filter out events that are not primary pointer events, or are triggering
|
|
12
|
+
* while a Motion gesture is active.
|
|
13
|
+
*/
|
|
14
|
+
function isValidPressEvent(event) {
|
|
15
|
+
return isPrimaryPointer(event) && !isDragActive();
|
|
16
|
+
}
|
|
17
|
+
const claimedPointerDownEvents = new WeakSet();
|
|
18
|
+
/**
|
|
19
|
+
* Create a press gesture.
|
|
20
|
+
*
|
|
21
|
+
* Press is different to `"pointerdown"`, `"pointerup"` in that it
|
|
22
|
+
* automatically filters out secondary pointer events like right
|
|
23
|
+
* click and multitouch.
|
|
24
|
+
*
|
|
25
|
+
* It also adds accessibility support for keyboards, where
|
|
26
|
+
* an element with a press gesture will receive focus and
|
|
27
|
+
* trigger on Enter `"keydown"` and `"keyup"` events.
|
|
28
|
+
*
|
|
29
|
+
* This is different to a browser's `"click"` event, which does
|
|
30
|
+
* respond to keyboards but only for the `"click"` itself, rather
|
|
31
|
+
* than the press start and end/cancel. The element also needs
|
|
32
|
+
* to be focusable for this to work, whereas a press gesture will
|
|
33
|
+
* make an element focusable by default.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
function press(targetOrSelector, onPressStart, options = {}) {
|
|
38
|
+
const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);
|
|
39
|
+
const startPress = (startEvent) => {
|
|
40
|
+
const target = startEvent.currentTarget;
|
|
41
|
+
if (!isValidPressEvent(startEvent))
|
|
42
|
+
return;
|
|
43
|
+
if (claimedPointerDownEvents.has(startEvent))
|
|
44
|
+
return;
|
|
45
|
+
isPressing.add(target);
|
|
46
|
+
if (options.stopPropagation) {
|
|
47
|
+
claimedPointerDownEvents.add(startEvent);
|
|
48
|
+
}
|
|
49
|
+
const onPressEnd = onPressStart(target, startEvent);
|
|
50
|
+
/**
|
|
51
|
+
* End listeners run in the capture phase so a descendant calling
|
|
52
|
+
* stopPropagation() in its own pointerup handler can't prevent the
|
|
53
|
+
* press gesture from ending. This also keeps the gesture-end
|
|
54
|
+
* ordering consistent with the drag gesture. See #2794.
|
|
55
|
+
*/
|
|
56
|
+
const endEventOptions = { ...eventOptions, capture: true };
|
|
57
|
+
const onPointerEnd = (endEvent, success) => {
|
|
58
|
+
window.removeEventListener("pointerup", onPointerUp, endEventOptions);
|
|
59
|
+
window.removeEventListener("pointercancel", onPointerCancel, endEventOptions);
|
|
60
|
+
if (isPressing.has(target)) {
|
|
61
|
+
isPressing.delete(target);
|
|
62
|
+
}
|
|
63
|
+
if (!isValidPressEvent(endEvent)) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (typeof onPressEnd === "function") {
|
|
67
|
+
onPressEnd(endEvent, { success });
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const onPointerUp = (upEvent) => {
|
|
71
|
+
onPointerEnd(upEvent, target === window ||
|
|
72
|
+
target === document ||
|
|
73
|
+
options.useGlobalTarget ||
|
|
74
|
+
isNodeOrChild(target, upEvent.target));
|
|
75
|
+
};
|
|
76
|
+
const onPointerCancel = (cancelEvent) => {
|
|
77
|
+
onPointerEnd(cancelEvent, false);
|
|
78
|
+
};
|
|
79
|
+
window.addEventListener("pointerup", onPointerUp, endEventOptions);
|
|
80
|
+
window.addEventListener("pointercancel", onPointerCancel, endEventOptions);
|
|
81
|
+
};
|
|
82
|
+
targets.forEach((target) => {
|
|
83
|
+
const pointerDownTarget = options.useGlobalTarget ? window : target;
|
|
84
|
+
pointerDownTarget.addEventListener("pointerdown", startPress, eventOptions);
|
|
85
|
+
if (isHTMLElement(target)) {
|
|
86
|
+
target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions));
|
|
87
|
+
if (!isElementKeyboardAccessible(target) &&
|
|
88
|
+
!target.hasAttribute("tabindex")) {
|
|
89
|
+
target.tabIndex = 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
return cancelEvents;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { press };
|
|
97
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/gestures/press/index.mjs"],"sourcesContent":["import { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isDragActive } from '../drag/state/is-active.mjs';\nimport { isNodeOrChild } from '../utils/is-node-or-child.mjs';\nimport { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';\nimport { setupGesture } from '../utils/setup.mjs';\nimport { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';\nimport { enableKeyboardPress } from './utils/keyboard.mjs';\nimport { isPressing } from './utils/state.mjs';\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event) {\n return isPrimaryPointer(event) && !isDragActive();\n}\nconst claimedPointerDownEvents = new WeakSet();\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nfunction press(targetOrSelector, onPressStart, options = {}) {\n const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);\n const startPress = (startEvent) => {\n const target = startEvent.currentTarget;\n if (!isValidPressEvent(startEvent))\n return;\n if (claimedPointerDownEvents.has(startEvent))\n return;\n isPressing.add(target);\n if (options.stopPropagation) {\n claimedPointerDownEvents.add(startEvent);\n }\n const onPressEnd = onPressStart(target, startEvent);\n /**\n * End listeners run in the capture phase so a descendant calling\n * stopPropagation() in its own pointerup handler can't prevent the\n * press gesture from ending. This also keeps the gesture-end\n * ordering consistent with the drag gesture. See #2794.\n */\n const endEventOptions = { ...eventOptions, capture: true };\n const onPointerEnd = (endEvent, success) => {\n window.removeEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.removeEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n if (isPressing.has(target)) {\n isPressing.delete(target);\n }\n if (!isValidPressEvent(endEvent)) {\n return;\n }\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success });\n }\n };\n const onPointerUp = (upEvent) => {\n onPointerEnd(upEvent, target === window ||\n target === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target));\n };\n const onPointerCancel = (cancelEvent) => {\n onPointerEnd(cancelEvent, false);\n };\n window.addEventListener(\"pointerup\", onPointerUp, endEventOptions);\n window.addEventListener(\"pointercancel\", onPointerCancel, endEventOptions);\n };\n targets.forEach((target) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target;\n pointerDownTarget.addEventListener(\"pointerdown\", startPress, eventOptions);\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) => enableKeyboardPress(event, eventOptions));\n if (!isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")) {\n target.tabIndex = 0;\n }\n }\n });\n return cancelEvents;\n}\n\nexport { press };\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const keyboardAccessibleElements = new Set([
|
|
2
|
+
"BUTTON",
|
|
3
|
+
"INPUT",
|
|
4
|
+
"SELECT",
|
|
5
|
+
"TEXTAREA",
|
|
6
|
+
"A",
|
|
7
|
+
]);
|
|
8
|
+
/**
|
|
9
|
+
* Checks if an element is natively keyboard accessible (focusable).
|
|
10
|
+
* Used by the press gesture to determine if we need to add tabIndex.
|
|
11
|
+
*/
|
|
12
|
+
function isElementKeyboardAccessible(element) {
|
|
13
|
+
return (keyboardAccessibleElements.has(element.tagName) ||
|
|
14
|
+
element.isContentEditable === true);
|
|
15
|
+
}
|
|
16
|
+
const textInputElements = new Set(["INPUT", "SELECT", "TEXTAREA"]);
|
|
17
|
+
/**
|
|
18
|
+
* Checks if an element has text selection or direct interaction behavior
|
|
19
|
+
* that should block drag gestures from starting.
|
|
20
|
+
*
|
|
21
|
+
* This specifically targets form controls where the user might want to select
|
|
22
|
+
* text or interact with the control (e.g., sliders, dropdowns).
|
|
23
|
+
*
|
|
24
|
+
* Buttons and links are NOT included because they don't have click-and-move
|
|
25
|
+
* actions of their own - they only respond to click events, so dragging
|
|
26
|
+
* should still work when initiated from these elements.
|
|
27
|
+
*/
|
|
28
|
+
function isElementTextInput(element) {
|
|
29
|
+
return (textInputElements.has(element.tagName) ||
|
|
30
|
+
element.isContentEditable === true);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { isElementKeyboardAccessible, isElementTextInput };
|
|
34
|
+
//# sourceMappingURL=is-keyboard-accessible.js.map
|
package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-keyboard-accessible.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs"],"sourcesContent":["const keyboardAccessibleElements = new Set([\n \"BUTTON\",\n \"INPUT\",\n \"SELECT\",\n \"TEXTAREA\",\n \"A\",\n]);\n/**\n * Checks if an element is natively keyboard accessible (focusable).\n * Used by the press gesture to determine if we need to add tabIndex.\n */\nfunction isElementKeyboardAccessible(element) {\n return (keyboardAccessibleElements.has(element.tagName) ||\n element.isContentEditable === true);\n}\nconst textInputElements = new Set([\"INPUT\", \"SELECT\", \"TEXTAREA\"]);\n/**\n * Checks if an element has text selection or direct interaction behavior\n * that should block drag gestures from starting.\n *\n * This specifically targets form controls where the user might want to select\n * text or interact with the control (e.g., sliders, dropdowns).\n *\n * Buttons and links are NOT included because they don't have click-and-move\n * actions of their own - they only respond to click events, so dragging\n * should still work when initiated from these elements.\n */\nfunction isElementTextInput(element) {\n return (textInputElements.has(element.tagName) ||\n element.isContentEditable === true);\n}\n\nexport { isElementKeyboardAccessible, isElementTextInput };\n//# sourceMappingURL=is-keyboard-accessible.mjs.map\n"],"names":[],"mappings":"AAAA,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;AAC3C,IAAI,QAAQ;AACZ,IAAI,OAAO;AACX,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,GAAG;AACP,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA,SAAS,2BAA2B,CAAC,OAAO,EAAE;AAC9C,IAAI,QAAQ,0BAA0B,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;AAC3D,QAAQ,OAAO,CAAC,iBAAiB,KAAK,IAAI;AAC1C;AACA,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,OAAO,EAAE;AACrC,IAAI,QAAQ,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;AAClD,QAAQ,OAAO,CAAC,iBAAiB,KAAK,IAAI;AAC1C;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isPressing } from './state.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Filter out events that are not "Enter" keys.
|
|
5
|
+
*/
|
|
6
|
+
function filterEvents(callback) {
|
|
7
|
+
return (event) => {
|
|
8
|
+
if (event.key !== "Enter")
|
|
9
|
+
return;
|
|
10
|
+
callback(event);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function firePointerEvent(target, type) {
|
|
14
|
+
target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true }));
|
|
15
|
+
}
|
|
16
|
+
const enableKeyboardPress = (focusEvent, eventOptions) => {
|
|
17
|
+
const element = focusEvent.currentTarget;
|
|
18
|
+
if (!element)
|
|
19
|
+
return;
|
|
20
|
+
const handleKeydown = filterEvents(() => {
|
|
21
|
+
if (isPressing.has(element))
|
|
22
|
+
return;
|
|
23
|
+
firePointerEvent(element, "down");
|
|
24
|
+
const handleKeyup = filterEvents(() => {
|
|
25
|
+
firePointerEvent(element, "up");
|
|
26
|
+
});
|
|
27
|
+
const handleBlur = () => firePointerEvent(element, "cancel");
|
|
28
|
+
element.addEventListener("keyup", handleKeyup, eventOptions);
|
|
29
|
+
element.addEventListener("blur", handleBlur, eventOptions);
|
|
30
|
+
});
|
|
31
|
+
element.addEventListener("keydown", handleKeydown, eventOptions);
|
|
32
|
+
/**
|
|
33
|
+
* Add an event listener that fires on blur to remove the keydown events.
|
|
34
|
+
*/
|
|
35
|
+
element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { enableKeyboardPress };
|
|
39
|
+
//# sourceMappingURL=keyboard.js.map
|