@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.
Files changed (746) hide show
  1. package/README.md +4 -9
  2. package/dist/components/{ui/accordion.d.ts → accordion.d.ts} +7 -1
  3. package/dist/components/accordion.js +23 -0
  4. package/dist/components/accordion.js.map +1 -0
  5. package/dist/components/{ui/animated-count.d.ts → animated-count.d.ts} +1 -4
  6. package/dist/components/animated-count.js +19 -0
  7. package/dist/components/animated-count.js.map +1 -0
  8. package/dist/components/animated-shiny-text.d.ts +5 -0
  9. package/dist/components/{ui/app-header.d.ts → app-header.d.ts} +3 -1
  10. package/dist/components/app-header.js +72 -0
  11. package/dist/components/app-header.js.map +1 -0
  12. package/dist/components/autocomplete.d.ts +34 -0
  13. package/dist/components/{ui/avatar.js → avatar.js} +1 -1
  14. package/dist/components/avatar.js.map +1 -0
  15. package/dist/components/badge.d.ts +13 -0
  16. package/dist/components/{ui/badge.js → badge.js} +54 -31
  17. package/dist/components/badge.js.map +1 -0
  18. package/dist/components/banner.d.ts +17 -0
  19. package/dist/components/banner.js +41 -0
  20. package/dist/components/banner.js.map +1 -0
  21. package/dist/components/button.d.ts +56 -0
  22. package/dist/components/button.js +53 -0
  23. package/dist/components/button.js.map +1 -0
  24. package/dist/components/calendar.d.ts +10 -0
  25. package/dist/components/calendar.js +56 -0
  26. package/dist/components/calendar.js.map +1 -0
  27. package/dist/components/{ui/card.d.ts → card.d.ts} +7 -1
  28. package/dist/components/{ui/card.js → card.js} +10 -4
  29. package/dist/components/{ui/card.js.map → card.js.map} +1 -1
  30. package/dist/components/carousel.d.ts +40 -0
  31. package/dist/components/checkbox.d.ts +8 -0
  32. package/dist/components/checkbox.js +20 -0
  33. package/dist/components/checkbox.js.map +1 -0
  34. package/dist/components/chip-select.d.ts +18 -0
  35. package/dist/components/collapsible.d.ts +18 -0
  36. package/dist/components/context-menu.d.ts +27 -0
  37. package/dist/components/{ui/dialog.d.ts → dialog.d.ts} +5 -2
  38. package/dist/components/dialog.js +44 -0
  39. package/dist/components/dialog.js.map +1 -0
  40. package/dist/components/divider.d.ts +3 -0
  41. package/dist/components/divider.js +10 -0
  42. package/dist/components/divider.js.map +1 -0
  43. package/dist/components/dot-matrix.d.ts +21 -0
  44. package/dist/components/dropdown-menu.js +61 -0
  45. package/dist/components/dropdown-menu.js.map +1 -0
  46. package/dist/components/dropdown.d.ts +65 -0
  47. package/dist/components/error.d.ts +8 -0
  48. package/dist/components/file-upload.d.ts +16 -0
  49. package/dist/components/file-upload.js +29 -0
  50. package/dist/components/file-upload.js.map +1 -0
  51. package/dist/components/filter-chip.d.ts +21 -0
  52. package/dist/components/filter-chip.js +28 -0
  53. package/dist/components/filter-chip.js.map +1 -0
  54. package/dist/components/form-checkbox-group.d.ts +31 -0
  55. package/dist/components/form-checkbox-group.js +29 -0
  56. package/dist/components/form-checkbox-group.js.map +1 -0
  57. package/dist/components/form-checkbox.d.ts +15 -0
  58. package/dist/components/form-checkbox.js +14 -0
  59. package/dist/components/form-checkbox.js.map +1 -0
  60. package/dist/components/form-date-picker.d.ts +47 -0
  61. package/dist/components/form-date-picker.js +55 -0
  62. package/dist/components/form-date-picker.js.map +1 -0
  63. package/dist/components/form-field.d.ts +14 -0
  64. package/dist/components/form-field.js +10 -0
  65. package/dist/components/form-field.js.map +1 -0
  66. package/dist/components/form-input.d.ts +11 -0
  67. package/dist/components/form-input.js +12 -0
  68. package/dist/components/form-input.js.map +1 -0
  69. package/dist/components/form-month-picker.d.ts +26 -0
  70. package/dist/components/form-month-picker.js +55 -0
  71. package/dist/components/form-month-picker.js.map +1 -0
  72. package/dist/components/form-radio.d.ts +15 -0
  73. package/dist/components/form-radio.js +20 -0
  74. package/dist/components/form-radio.js.map +1 -0
  75. package/dist/components/form-textarea.d.ts +11 -0
  76. package/dist/components/form-textarea.js +11 -0
  77. package/dist/components/form-textarea.js.map +1 -0
  78. package/dist/components/form.d.ts +24 -0
  79. package/dist/components/hover-card.d.ts +6 -0
  80. package/dist/components/input-otp.d.ts +39 -0
  81. package/dist/components/input.js +30 -0
  82. package/dist/components/input.js.map +1 -0
  83. package/dist/components/label.d.ts +15 -0
  84. package/dist/components/label.js +19 -0
  85. package/dist/components/label.js.map +1 -0
  86. package/dist/components/loader.d.ts +20 -0
  87. package/dist/components/loader.js +14 -0
  88. package/dist/components/loader.js.map +1 -0
  89. package/dist/components/magnetic-button.d.ts +5 -0
  90. package/dist/components/messages.d.ts +6 -0
  91. package/dist/components/mobile-sheet-portal.d.ts +9 -0
  92. package/dist/components/page-header.d.ts +6 -0
  93. package/dist/components/page-header.js +9 -0
  94. package/dist/components/page-header.js.map +1 -0
  95. package/dist/components/paginator.d.ts +9 -0
  96. package/dist/components/{ui/popover.js → popover.js} +2 -2
  97. package/dist/components/popover.js.map +1 -0
  98. package/dist/components/progress.d.ts +4 -0
  99. package/dist/components/radio-group.d.ts +5 -0
  100. package/dist/components/radio-group.js +17 -0
  101. package/dist/components/radio-group.js.map +1 -0
  102. package/dist/components/select.d.ts +15 -0
  103. package/dist/components/select.js +50 -0
  104. package/dist/components/select.js.map +1 -0
  105. package/dist/components/sheet.d.ts +27 -0
  106. package/dist/components/{ui/skeleton.js → skeleton.js} +2 -2
  107. package/dist/components/skeleton.js.map +1 -0
  108. package/dist/components/slider.d.ts +4 -0
  109. package/dist/components/sonner-toast.d.ts +106 -0
  110. package/dist/components/stepper.d.ts +9 -0
  111. package/dist/components/stepper.js +14 -0
  112. package/dist/components/stepper.js.map +1 -0
  113. package/dist/components/switch.js +10 -0
  114. package/dist/components/switch.js.map +1 -0
  115. package/dist/components/table.d.ts +33 -0
  116. package/dist/components/table.js +88 -0
  117. package/dist/components/table.js.map +1 -0
  118. package/dist/components/tabs.d.ts +22 -0
  119. package/dist/components/textarea.d.ts +3 -0
  120. package/dist/components/textarea.js +11 -0
  121. package/dist/components/textarea.js.map +1 -0
  122. package/dist/components/time-input-native.d.ts +14 -0
  123. package/dist/components/time-input-native.js +61 -0
  124. package/dist/components/time-input-native.js.map +1 -0
  125. package/dist/components/timeline.d.ts +17 -0
  126. package/dist/components/toggle.d.ts +5 -0
  127. package/dist/components/{ui/tooltip.js → tooltip.js} +2 -2
  128. package/dist/components/tooltip.js.map +1 -0
  129. package/dist/design-tokens.d.ts +69 -0
  130. package/dist/hooks/use-detect-click-outside.d.ts +4 -0
  131. package/dist/hooks/use-field-focus.d.ts +37 -0
  132. package/dist/hooks/use-field-focus.js +57 -0
  133. package/dist/hooks/use-field-focus.js.map +1 -0
  134. package/dist/hooks/use-mobile-sheet-viewport.d.ts +6 -0
  135. package/dist/hooks/use-mobile-sheet-viewport.js +60 -0
  136. package/dist/hooks/use-mobile-sheet-viewport.js.map +1 -0
  137. package/dist/hooks/use-mobile.d.ts +1 -0
  138. package/dist/hooks/use-mobile.js +16 -0
  139. package/dist/hooks/use-mobile.js.map +1 -0
  140. package/dist/hooks/use-resource-table.d.ts +141 -0
  141. package/dist/index.d.ts +36 -22
  142. package/dist/index.js +34 -22
  143. package/dist/index.js.map +1 -1
  144. package/dist/lib/interaction-styles.d.ts +10 -0
  145. package/dist/lib/interaction-styles.js +15 -0
  146. package/dist/lib/interaction-styles.js.map +1 -0
  147. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +118 -0
  148. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +1 -0
  149. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +77 -0
  150. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +1 -0
  151. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +190 -0
  152. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js.map +1 -0
  153. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +46 -0
  154. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +1 -0
  155. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +15 -0
  156. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js.map +1 -0
  157. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +7 -0
  158. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js.map +1 -0
  159. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +7 -0
  160. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js.map +1 -0
  161. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +14 -0
  162. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js.map +1 -0
  163. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +15 -0
  164. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js.map +1 -0
  165. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +7 -0
  166. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js.map +1 -0
  167. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +18 -0
  168. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +1 -0
  169. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +11 -0
  170. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js.map +1 -0
  171. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +10 -0
  172. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js.map +1 -0
  173. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +9 -0
  174. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js.map +1 -0
  175. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
  176. package/dist/node_modules/framer-motion/dist/es/events/event-info.js.map +1 -0
  177. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +586 -0
  178. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +1 -0
  179. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +51 -0
  180. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +1 -0
  181. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +130 -0
  182. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js.map +1 -0
  183. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +42 -0
  184. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +1 -0
  185. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +31 -0
  186. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +1 -0
  187. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +285 -0
  188. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +1 -0
  189. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +51 -0
  190. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +1 -0
  191. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +38 -0
  192. package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +1 -0
  193. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +71 -0
  194. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +1 -0
  195. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +41 -0
  196. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +1 -0
  197. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +14 -0
  198. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js.map +1 -0
  199. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +49 -0
  200. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js.map +1 -0
  201. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +18 -0
  202. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js.map +1 -0
  203. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +22 -0
  204. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js.map +1 -0
  205. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +138 -0
  206. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +1 -0
  207. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +12 -0
  208. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js.map +1 -0
  209. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +16 -0
  210. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js.map +1 -0
  211. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +77 -0
  212. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +1 -0
  213. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +50 -0
  214. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +1 -0
  215. package/dist/node_modules/framer-motion/dist/es/motion/index.js +113 -0
  216. package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +1 -0
  217. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
  218. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js.map +1 -0
  219. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +52 -0
  220. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +1 -0
  221. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +166 -0
  222. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +1 -0
  223. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +81 -0
  224. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +1 -0
  225. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +59 -0
  226. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js.map +1 -0
  227. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +46 -0
  228. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js.map +1 -0
  229. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +14 -0
  230. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js.map +1 -0
  231. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +8 -0
  232. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js.map +1 -0
  233. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +19 -0
  234. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js.map +1 -0
  235. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +28 -0
  236. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +1 -0
  237. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +37 -0
  238. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js.map +1 -0
  239. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +31 -0
  240. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js.map +1 -0
  241. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +12 -0
  242. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js.map +1 -0
  243. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +59 -0
  244. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +1 -0
  245. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
  246. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js.map +1 -0
  247. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +34 -0
  248. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js.map +1 -0
  249. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +26 -0
  250. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +1 -0
  251. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +12 -0
  252. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js.map +1 -0
  253. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +9 -0
  254. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js.map +1 -0
  255. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +10 -0
  256. package/dist/node_modules/framer-motion/dist/es/utils/distance.js.map +1 -0
  257. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +7 -0
  258. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js.map +1 -0
  259. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
  260. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js.map +1 -0
  261. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +8 -0
  262. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js.map +1 -0
  263. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +49 -0
  264. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +1 -0
  265. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +61 -0
  266. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js.map +1 -0
  267. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +20 -0
  268. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js.map +1 -0
  269. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +8 -0
  270. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js.map +1 -0
  271. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +200 -0
  272. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js.map +1 -0
  273. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +386 -0
  274. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js.map +1 -0
  275. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +181 -0
  276. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js.map +1 -0
  277. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +88 -0
  278. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js.map +1 -0
  279. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +12 -0
  280. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js.map +1 -0
  281. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +18 -0
  282. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js.map +1 -0
  283. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +88 -0
  284. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js.map +1 -0
  285. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +52 -0
  286. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js.map +1 -0
  287. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +331 -0
  288. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js.map +1 -0
  289. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +18 -0
  290. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js.map +1 -0
  291. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +20 -0
  292. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js.map +1 -0
  293. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
  294. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js.map +1 -0
  295. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +10 -0
  296. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js.map +1 -0
  297. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +106 -0
  298. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js.map +1 -0
  299. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +109 -0
  300. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js.map +1 -0
  301. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +60 -0
  302. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js.map +1 -0
  303. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +27 -0
  304. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js.map +1 -0
  305. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +142 -0
  306. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js.map +1 -0
  307. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +148 -0
  308. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js.map +1 -0
  309. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +12 -0
  310. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js.map +1 -0
  311. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +10 -0
  312. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js.map +1 -0
  313. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +13 -0
  314. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js.map +1 -0
  315. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
  316. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js.map +1 -0
  317. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +8 -0
  318. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js.map +1 -0
  319. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +16 -0
  320. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js.map +1 -0
  321. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +31 -0
  322. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js.map +1 -0
  323. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +47 -0
  324. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js.map +1 -0
  325. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +7 -0
  326. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js.map +1 -0
  327. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +8 -0
  328. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js.map +1 -0
  329. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
  330. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js.map +1 -0
  331. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +16 -0
  332. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js.map +1 -0
  333. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +44 -0
  334. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js.map +1 -0
  335. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +43 -0
  336. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js.map +1 -0
  337. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +41 -0
  338. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js.map +1 -0
  339. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +14 -0
  340. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js.map +1 -0
  341. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +31 -0
  342. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js.map +1 -0
  343. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +27 -0
  344. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js.map +1 -0
  345. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +27 -0
  346. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js.map +1 -0
  347. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +7 -0
  348. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js.map +1 -0
  349. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +19 -0
  350. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js.map +1 -0
  351. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +15 -0
  352. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js.map +1 -0
  353. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
  354. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js.map +1 -0
  355. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +29 -0
  356. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js.map +1 -0
  357. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +16 -0
  358. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js.map +1 -0
  359. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +29 -0
  360. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js.map +1 -0
  361. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +55 -0
  362. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js.map +1 -0
  363. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +13 -0
  364. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js.map +1 -0
  365. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +16 -0
  366. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js.map +1 -0
  367. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +13 -0
  368. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js.map +1 -0
  369. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +13 -0
  370. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js.map +1 -0
  371. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +21 -0
  372. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js.map +1 -0
  373. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +7 -0
  374. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js.map +1 -0
  375. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +73 -0
  376. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js.map +1 -0
  377. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +7 -0
  378. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js.map +1 -0
  379. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +7 -0
  380. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js.map +1 -0
  381. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +13 -0
  382. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js.map +1 -0
  383. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +84 -0
  384. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js.map +1 -0
  385. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +32 -0
  386. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js.map +1 -0
  387. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +10 -0
  388. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js.map +1 -0
  389. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +29 -0
  390. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +1 -0
  391. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +70 -0
  392. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +1 -0
  393. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +97 -0
  394. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +1 -0
  395. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +34 -0
  396. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map +1 -0
  397. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +39 -0
  398. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +1 -0
  399. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
  400. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js.map +1 -0
  401. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +21 -0
  402. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js.map +1 -0
  403. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +19 -0
  404. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js.map +1 -0
  405. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +16 -0
  406. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js.map +1 -0
  407. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +69 -0
  408. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js.map +1 -0
  409. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +34 -0
  410. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js.map +1 -0
  411. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +32 -0
  412. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js.map +1 -0
  413. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +125 -0
  414. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js.map +1 -0
  415. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +59 -0
  416. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js.map +1 -0
  417. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +55 -0
  418. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js.map +1 -0
  419. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +18 -0
  420. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js.map +1 -0
  421. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +32 -0
  422. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js.map +1 -0
  423. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +14 -0
  424. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js.map +1 -0
  425. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +28 -0
  426. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js.map +1 -0
  427. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +1660 -0
  428. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js.map +1 -0
  429. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +20 -0
  430. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js.map +1 -0
  431. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +85 -0
  432. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js.map +1 -0
  433. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +42 -0
  434. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js.map +1 -0
  435. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +36 -0
  436. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js.map +1 -0
  437. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +18 -0
  438. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js.map +1 -0
  439. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +53 -0
  440. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js.map +1 -0
  441. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
  442. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js.map +1 -0
  443. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
  444. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js.map +1 -0
  445. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +25 -0
  446. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js.map +1 -0
  447. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +27 -0
  448. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js.map +1 -0
  449. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +18 -0
  450. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js.map +1 -0
  451. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +15 -0
  452. package/dist/node_modules/motion-dom/dist/es/render/Feature.js.map +1 -0
  453. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +564 -0
  454. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js.map +1 -0
  455. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +43 -0
  456. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js.map +1 -0
  457. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
  458. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js.map +1 -0
  459. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +84 -0
  460. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js.map +1 -0
  461. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +10 -0
  462. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js.map +1 -0
  463. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
  464. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js.map +1 -0
  465. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +55 -0
  466. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js.map +1 -0
  467. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +66 -0
  468. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js.map +1 -0
  469. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +72 -0
  470. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js.map +1 -0
  471. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +18 -0
  472. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js.map +1 -0
  473. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +22 -0
  474. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js.map +1 -0
  475. package/dist/node_modules/motion-dom/dist/es/render/store.js +4 -0
  476. package/dist/node_modules/motion-dom/dist/es/render/store.js.map +1 -0
  477. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +52 -0
  478. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js.map +1 -0
  479. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +64 -0
  480. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js.map +1 -0
  481. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +31 -0
  482. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js.map +1 -0
  483. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
  484. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js.map +1 -0
  485. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +32 -0
  486. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js.map +1 -0
  487. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +13 -0
  488. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js.map +1 -0
  489. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +20 -0
  490. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js.map +1 -0
  491. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +387 -0
  492. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js.map +1 -0
  493. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +33 -0
  494. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js.map +1 -0
  495. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +8 -0
  496. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js.map +1 -0
  497. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +14 -0
  498. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js.map +1 -0
  499. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +12 -0
  500. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js.map +1 -0
  501. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +6 -0
  502. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js.map +1 -0
  503. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +9 -0
  504. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js.map +1 -0
  505. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +14 -0
  506. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js.map +1 -0
  507. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +36 -0
  508. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js.map +1 -0
  509. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +56 -0
  510. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js.map +1 -0
  511. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +20 -0
  512. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js.map +1 -0
  513. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +6 -0
  514. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js.map +1 -0
  515. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +9 -0
  516. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js.map +1 -0
  517. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +37 -0
  518. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js.map +1 -0
  519. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +32 -0
  520. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js.map +1 -0
  521. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +15 -0
  522. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js.map +1 -0
  523. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +13 -0
  524. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js.map +1 -0
  525. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +64 -0
  526. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js.map +1 -0
  527. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +32 -0
  528. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js.map +1 -0
  529. package/dist/node_modules/motion-dom/dist/es/resize/index.js +9 -0
  530. package/dist/node_modules/motion-dom/dist/es/resize/index.js.map +1 -0
  531. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +15 -0
  532. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js.map +1 -0
  533. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +21 -0
  534. package/dist/node_modules/motion-dom/dist/es/utils/delay.js.map +1 -0
  535. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +80 -0
  536. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js.map +1 -0
  537. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +14 -0
  538. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js.map +1 -0
  539. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +12 -0
  540. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js.map +1 -0
  541. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +12 -0
  542. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js.map +1 -0
  543. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +48 -0
  544. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js.map +1 -0
  545. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +94 -0
  546. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js.map +1 -0
  547. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
  548. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js.map +1 -0
  549. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +15 -0
  550. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js.map +1 -0
  551. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +27 -0
  552. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js.map +1 -0
  553. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +17 -0
  554. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js.map +1 -0
  555. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +18 -0
  556. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +1 -0
  557. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +8 -0
  558. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js.map +1 -0
  559. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +16 -0
  560. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +1 -0
  561. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +10 -0
  562. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +1 -0
  563. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +6 -0
  564. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js.map +1 -0
  565. package/dist/node_modules/motion-dom/dist/es/value/index.js +320 -0
  566. package/dist/node_modules/motion-dom/dist/es/value/index.js.map +1 -0
  567. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +10 -0
  568. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js.map +1 -0
  569. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +41 -0
  570. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js.map +1 -0
  571. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +43 -0
  572. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js.map +1 -0
  573. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +23 -0
  574. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js.map +1 -0
  575. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +33 -0
  576. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js.map +1 -0
  577. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +26 -0
  578. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js.map +1 -0
  579. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +30 -0
  580. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js.map +1 -0
  581. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +31 -0
  582. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js.map +1 -0
  583. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +114 -0
  584. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js.map +1 -0
  585. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +13 -0
  586. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js.map +1 -0
  587. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +16 -0
  588. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js.map +1 -0
  589. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +9 -0
  590. package/dist/node_modules/motion-dom/dist/es/value/types/int.js.map +1 -0
  591. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +34 -0
  592. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js.map +1 -0
  593. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +71 -0
  594. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js.map +1 -0
  595. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +38 -0
  596. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js.map +1 -0
  597. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +18 -0
  598. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js.map +1 -0
  599. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +19 -0
  600. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js.map +1 -0
  601. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +7 -0
  602. package/dist/node_modules/motion-dom/dist/es/value/types/test.js.map +1 -0
  603. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +18 -0
  604. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js.map +1 -0
  605. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
  606. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js.map +1 -0
  607. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +16 -0
  608. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js.map +1 -0
  609. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
  610. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js.map +1 -0
  611. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +11 -0
  612. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js.map +1 -0
  613. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
  614. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js.map +1 -0
  615. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +6 -0
  616. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js.map +1 -0
  617. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
  618. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js.map +1 -0
  619. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
  620. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js.map +1 -0
  621. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +11 -0
  622. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js.map +1 -0
  623. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +21 -0
  624. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js.map +1 -0
  625. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +8 -0
  626. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js.map +1 -0
  627. package/dist/node_modules/motion-utils/dist/es/array.js +12 -0
  628. package/dist/node_modules/motion-utils/dist/es/array.js.map +1 -0
  629. package/dist/node_modules/motion-utils/dist/es/clamp.js +10 -0
  630. package/dist/node_modules/motion-utils/dist/es/clamp.js.map +1 -0
  631. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +10 -0
  632. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js.map +1 -0
  633. package/dist/node_modules/motion-utils/dist/es/easing/back.js +10 -0
  634. package/dist/node_modules/motion-utils/dist/es/easing/back.js.map +1 -0
  635. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +9 -0
  636. package/dist/node_modules/motion-utils/dist/es/easing/circ.js.map +1 -0
  637. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +53 -0
  638. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js.map +1 -0
  639. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +8 -0
  640. package/dist/node_modules/motion-utils/dist/es/easing/ease.js.map +1 -0
  641. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +7 -0
  642. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js.map +1 -0
  643. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +7 -0
  644. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js.map +1 -0
  645. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +5 -0
  646. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js.map +1 -0
  647. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +7 -0
  648. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js.map +1 -0
  649. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +42 -0
  650. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js.map +1 -0
  651. package/dist/node_modules/motion-utils/dist/es/errors.js +20 -0
  652. package/dist/node_modules/motion-utils/dist/es/errors.js.map +1 -0
  653. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +8 -0
  654. package/dist/node_modules/motion-utils/dist/es/format-error-message.js.map +1 -0
  655. package/dist/node_modules/motion-utils/dist/es/global-config.js +4 -0
  656. package/dist/node_modules/motion-utils/dist/es/global-config.js.map +1 -0
  657. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +7 -0
  658. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js.map +1 -0
  659. package/dist/node_modules/motion-utils/dist/es/is-object.js +4 -0
  660. package/dist/node_modules/motion-utils/dist/es/is-object.js.map +1 -0
  661. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +7 -0
  662. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js.map +1 -0
  663. package/dist/node_modules/motion-utils/dist/es/memo.js +12 -0
  664. package/dist/node_modules/motion-utils/dist/es/memo.js.map +1 -0
  665. package/dist/node_modules/motion-utils/dist/es/noop.js +5 -0
  666. package/dist/node_modules/motion-utils/dist/es/noop.js.map +1 -0
  667. package/dist/node_modules/motion-utils/dist/es/pipe.js +11 -0
  668. package/dist/node_modules/motion-utils/dist/es/pipe.js.map +1 -0
  669. package/dist/node_modules/motion-utils/dist/es/progress.js +15 -0
  670. package/dist/node_modules/motion-utils/dist/es/progress.js.map +1 -0
  671. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +41 -0
  672. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js.map +1 -0
  673. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +13 -0
  674. package/dist/node_modules/motion-utils/dist/es/time-conversion.js.map +1 -0
  675. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +8 -0
  676. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js.map +1 -0
  677. package/dist/node_modules/motion-utils/dist/es/warn-once.js +12 -0
  678. package/dist/node_modules/motion-utils/dist/es/warn-once.js.map +1 -0
  679. package/package.json +107 -71
  680. package/theme.css +147 -20
  681. package/theme.legacy.css +84 -0
  682. package/dist/components/ui/accordion.js +0 -20
  683. package/dist/components/ui/accordion.js.map +0 -1
  684. package/dist/components/ui/animated-count.js +0 -22
  685. package/dist/components/ui/animated-count.js.map +0 -1
  686. package/dist/components/ui/app-header.js +0 -72
  687. package/dist/components/ui/app-header.js.map +0 -1
  688. package/dist/components/ui/avatar.js.map +0 -1
  689. package/dist/components/ui/badge.d.ts +0 -22
  690. package/dist/components/ui/badge.js.map +0 -1
  691. package/dist/components/ui/button.d.ts +0 -13
  692. package/dist/components/ui/button.js +0 -88
  693. package/dist/components/ui/button.js.map +0 -1
  694. package/dist/components/ui/button.test.d.ts +0 -1
  695. package/dist/components/ui/calendar.d.ts +0 -7
  696. package/dist/components/ui/checkbox.d.ts +0 -4
  697. package/dist/components/ui/checkbox.js +0 -11
  698. package/dist/components/ui/checkbox.js.map +0 -1
  699. package/dist/components/ui/dialog.js +0 -41
  700. package/dist/components/ui/dialog.js.map +0 -1
  701. package/dist/components/ui/dropdown-menu.js +0 -61
  702. package/dist/components/ui/dropdown-menu.js.map +0 -1
  703. package/dist/components/ui/fab.js +0 -9
  704. package/dist/components/ui/fab.js.map +0 -1
  705. package/dist/components/ui/icons.d.ts +0 -10
  706. package/dist/components/ui/icons.js +0 -39
  707. package/dist/components/ui/icons.js.map +0 -1
  708. package/dist/components/ui/input.js +0 -17
  709. package/dist/components/ui/input.js.map +0 -1
  710. package/dist/components/ui/label.d.ts +0 -4
  711. package/dist/components/ui/label.js +0 -10
  712. package/dist/components/ui/label.js.map +0 -1
  713. package/dist/components/ui/page-header.d.ts +0 -18
  714. package/dist/components/ui/page-header.js +0 -17
  715. package/dist/components/ui/page-header.js.map +0 -1
  716. package/dist/components/ui/popover.js.map +0 -1
  717. package/dist/components/ui/separator.d.ts +0 -4
  718. package/dist/components/ui/separator.js +0 -10
  719. package/dist/components/ui/separator.js.map +0 -1
  720. package/dist/components/ui/skeleton.js.map +0 -1
  721. package/dist/components/ui/status-notice.d.ts +0 -14
  722. package/dist/components/ui/status-notice.js +0 -27
  723. package/dist/components/ui/status-notice.js.map +0 -1
  724. package/dist/components/ui/switch.js +0 -10
  725. package/dist/components/ui/switch.js.map +0 -1
  726. package/dist/components/ui/table.d.ts +0 -10
  727. package/dist/components/ui/table.js +0 -30
  728. package/dist/components/ui/table.js.map +0 -1
  729. package/dist/components/ui/textarea.d.ts +0 -3
  730. package/dist/components/ui/textarea.js +0 -9
  731. package/dist/components/ui/textarea.js.map +0 -1
  732. package/dist/components/ui/tooltip.js.map +0 -1
  733. package/dist/config.d.ts +0 -6
  734. package/dist/config.js +0 -9
  735. package/dist/config.js.map +0 -1
  736. package/dist/hooks/useClientProcess.d.ts +0 -69
  737. package/dist/hooks/useClientProcess.js +0 -255
  738. package/dist/hooks/useClientProcess.js.map +0 -1
  739. /package/dist/components/{ui/avatar.d.ts → avatar.d.ts} +0 -0
  740. /package/dist/components/{ui/dropdown-menu.d.ts → dropdown-menu.d.ts} +0 -0
  741. /package/dist/components/{ui/fab.d.ts → fab.d.ts} +0 -0
  742. /package/dist/components/{ui/input.d.ts → input.d.ts} +0 -0
  743. /package/dist/components/{ui/popover.d.ts → popover.d.ts} +0 -0
  744. /package/dist/components/{ui/skeleton.d.ts → skeleton.d.ts} +0 -0
  745. /package/dist/components/{ui/switch.d.ts → switch.d.ts} +0 -0
  746. /package/dist/components/{ui/tooltip.d.ts → tooltip.d.ts} +0 -0
@@ -0,0 +1,586 @@
1
+ import { addPointerEvent } from '../../events/add-pointer-event.js';
2
+ import { extractEventInfo } from '../../events/event-info.js';
3
+ import { getContextWindow } from '../../utils/get-context-window.js';
4
+ import { isRefObject } from '../../utils/is-ref-object.js';
5
+ import { PanSession } from '../pan/PanSession.js';
6
+ import { applyConstraints, calcRelativeConstraints, resolveDragElastic, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, calcOrigin } from './utils/constraints.js';
7
+ import { createBox } from '../../../../../motion-dom/dist/es/projection/geometry/models.js';
8
+ import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.js';
9
+ import { eachAxis } from '../../../../../motion-dom/dist/es/projection/utils/each-axis.js';
10
+ import { invariant } from '../../../../../motion-utils/dist/es/errors.js';
11
+ import { measurePageBox } from '../../../../../motion-dom/dist/es/projection/utils/measure.js';
12
+ import { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../../../../motion-dom/dist/es/projection/geometry/conversion.js';
13
+ import { addValueToWillChange } from '../../../../../motion-dom/dist/es/value/will-change/add-will-change.js';
14
+ import { animateMotionValue } from '../../../../../motion-dom/dist/es/animation/interfaces/motion-value.js';
15
+ import { addDomEvent } from '../../../../../motion-dom/dist/es/events/add-dom-event.js';
16
+ import { setDragLock } from '../../../../../motion-dom/dist/es/gestures/drag/state/set-active.js';
17
+ import { percent } from '../../../../../motion-dom/dist/es/value/types/numbers/units.js';
18
+ import { calcLength } from '../../../../../motion-dom/dist/es/projection/geometry/delta-calc.js';
19
+ import { mixNumber } from '../../../../../motion-dom/dist/es/utils/mix/number.js';
20
+ import { resize } from '../../../../../motion-dom/dist/es/resize/index.js';
21
+ import { isElementTextInput } from '../../../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js';
22
+
23
+ const elementDragControls = new WeakMap();
24
+ class VisualElementDragControls {
25
+ constructor(visualElement) {
26
+ this.openDragLock = null;
27
+ this.isDragging = false;
28
+ this.currentDirection = null;
29
+ this.originPoint = { x: 0, y: 0 };
30
+ /**
31
+ * The permitted boundaries of travel, in pixels.
32
+ */
33
+ this.constraints = false;
34
+ this.hasMutatedConstraints = false;
35
+ /**
36
+ * The per-axis resolved elastic values.
37
+ */
38
+ this.elastic = createBox();
39
+ /**
40
+ * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.
41
+ */
42
+ this.latestPointerEvent = null;
43
+ /**
44
+ * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.
45
+ */
46
+ this.latestPanInfo = null;
47
+ this.visualElement = visualElement;
48
+ }
49
+ start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {
50
+ /**
51
+ * Don't start dragging if this component is exiting
52
+ */
53
+ const { presenceContext } = this.visualElement;
54
+ if (presenceContext && presenceContext.isPresent === false)
55
+ return;
56
+ const onSessionStart = (event) => {
57
+ if (snapToCursor) {
58
+ this.snapToCursor(extractEventInfo(event).point);
59
+ }
60
+ this.stopAnimation();
61
+ };
62
+ const onStart = (event, info) => {
63
+ // Attempt to grab the global drag gesture lock - maybe make this part of PanSession
64
+ const { drag, dragPropagation, onDragStart } = this.getProps();
65
+ if (drag && !dragPropagation) {
66
+ if (this.openDragLock)
67
+ this.openDragLock();
68
+ this.openDragLock = setDragLock(drag);
69
+ // If we don 't have the lock, don't start dragging
70
+ if (!this.openDragLock)
71
+ return;
72
+ }
73
+ this.latestPointerEvent = event;
74
+ this.latestPanInfo = info;
75
+ this.isDragging = true;
76
+ this.currentDirection = null;
77
+ this.resolveConstraints();
78
+ if (this.visualElement.projection) {
79
+ this.visualElement.projection.isAnimationBlocked = true;
80
+ this.visualElement.projection.target = undefined;
81
+ }
82
+ /**
83
+ * Record gesture origin and pointer offset
84
+ */
85
+ eachAxis((axis) => {
86
+ let current = this.getAxisMotionValue(axis).get() || 0;
87
+ /**
88
+ * If the MotionValue is a percentage value convert to px
89
+ */
90
+ if (percent.test(current)) {
91
+ const { projection } = this.visualElement;
92
+ if (projection && projection.layout) {
93
+ const measuredAxis = projection.layout.layoutBox[axis];
94
+ if (measuredAxis) {
95
+ const length = calcLength(measuredAxis);
96
+ current = length * (parseFloat(current) / 100);
97
+ }
98
+ }
99
+ }
100
+ this.originPoint[axis] = current;
101
+ });
102
+ // Fire onDragStart event
103
+ if (onDragStart) {
104
+ frame.update(() => onDragStart(event, info), false, true);
105
+ }
106
+ addValueToWillChange(this.visualElement, "transform");
107
+ const { animationState } = this.visualElement;
108
+ animationState && animationState.setActive("whileDrag", true);
109
+ };
110
+ const onMove = (event, info) => {
111
+ this.latestPointerEvent = event;
112
+ this.latestPanInfo = info;
113
+ const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();
114
+ // If we didn't successfully receive the gesture lock, early return.
115
+ if (!dragPropagation && !this.openDragLock)
116
+ return;
117
+ const { offset } = info;
118
+ // Attempt to detect drag direction if directionLock is true
119
+ if (dragDirectionLock && this.currentDirection === null) {
120
+ this.currentDirection = getCurrentDirection(offset);
121
+ // If we've successfully set a direction, notify listener
122
+ if (this.currentDirection !== null) {
123
+ onDirectionLock && onDirectionLock(this.currentDirection);
124
+ }
125
+ return;
126
+ }
127
+ // Update each point with the latest position
128
+ this.updateAxis("x", info.point, offset);
129
+ this.updateAxis("y", info.point, offset);
130
+ /**
131
+ * Ideally we would leave the renderer to fire naturally at the end of
132
+ * this frame but if the element is about to change layout as the result
133
+ * of a re-render we want to ensure the browser can read the latest
134
+ * bounding box to ensure the pointer and element don't fall out of sync.
135
+ */
136
+ this.visualElement.render();
137
+ /**
138
+ * This must fire after the render call as it might trigger a state
139
+ * change which itself might trigger a layout update.
140
+ */
141
+ if (onDrag) {
142
+ frame.update(() => onDrag(event, info), false, true);
143
+ }
144
+ };
145
+ const onSessionEnd = (event, info) => {
146
+ this.latestPointerEvent = event;
147
+ this.latestPanInfo = info;
148
+ this.stop(event, info);
149
+ this.latestPointerEvent = null;
150
+ this.latestPanInfo = null;
151
+ };
152
+ const resumeAnimation = () => {
153
+ const { dragSnapToOrigin: snap } = this.getProps();
154
+ if (snap || this.constraints) {
155
+ this.startAnimation({ x: 0, y: 0 });
156
+ }
157
+ };
158
+ const { dragSnapToOrigin } = this.getProps();
159
+ this.panSession = new PanSession(originEvent, {
160
+ onSessionStart,
161
+ onStart,
162
+ onMove,
163
+ onSessionEnd,
164
+ resumeAnimation,
165
+ }, {
166
+ transformPagePoint: this.visualElement.getTransformPagePoint(),
167
+ dragSnapToOrigin,
168
+ distanceThreshold,
169
+ contextWindow: getContextWindow(this.visualElement),
170
+ element: this.visualElement.current,
171
+ });
172
+ }
173
+ /**
174
+ * @internal
175
+ */
176
+ stop(event, panInfo) {
177
+ const finalEvent = event || this.latestPointerEvent;
178
+ const finalPanInfo = panInfo || this.latestPanInfo;
179
+ const isDragging = this.isDragging;
180
+ this.cancel();
181
+ if (!isDragging || !finalPanInfo || !finalEvent)
182
+ return;
183
+ const { velocity } = finalPanInfo;
184
+ this.startAnimation(velocity);
185
+ const { onDragEnd } = this.getProps();
186
+ if (onDragEnd) {
187
+ frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));
188
+ }
189
+ }
190
+ /**
191
+ * @internal
192
+ */
193
+ cancel() {
194
+ this.isDragging = false;
195
+ const { projection, animationState } = this.visualElement;
196
+ if (projection) {
197
+ projection.isAnimationBlocked = false;
198
+ }
199
+ this.endPanSession();
200
+ const { dragPropagation } = this.getProps();
201
+ if (!dragPropagation && this.openDragLock) {
202
+ this.openDragLock();
203
+ this.openDragLock = null;
204
+ }
205
+ animationState && animationState.setActive("whileDrag", false);
206
+ }
207
+ /**
208
+ * Clean up the pan session without modifying other drag state.
209
+ * This is used during unmount to ensure event listeners are removed
210
+ * without affecting projection animations or drag locks.
211
+ * @internal
212
+ */
213
+ endPanSession() {
214
+ this.panSession && this.panSession.end();
215
+ this.panSession = undefined;
216
+ }
217
+ updateAxis(axis, _point, offset) {
218
+ const { drag } = this.getProps();
219
+ // If we're not dragging this axis, do an early return.
220
+ if (!offset || !shouldDrag(axis, drag, this.currentDirection))
221
+ return;
222
+ const axisValue = this.getAxisMotionValue(axis);
223
+ let next = this.originPoint[axis] + offset[axis];
224
+ // Apply constraints
225
+ if (this.constraints && this.constraints[axis]) {
226
+ next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);
227
+ }
228
+ axisValue.set(next);
229
+ }
230
+ resolveConstraints() {
231
+ const { dragConstraints, dragElastic } = this.getProps();
232
+ const layout = this.visualElement.projection &&
233
+ !this.visualElement.projection.layout
234
+ ? this.visualElement.projection.measure(false)
235
+ : this.visualElement.projection?.layout;
236
+ const prevConstraints = this.constraints;
237
+ if (dragConstraints && isRefObject(dragConstraints)) {
238
+ if (!this.constraints) {
239
+ this.constraints = this.resolveRefConstraints();
240
+ }
241
+ }
242
+ else {
243
+ if (dragConstraints && layout) {
244
+ this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);
245
+ }
246
+ else {
247
+ this.constraints = false;
248
+ }
249
+ }
250
+ this.elastic = resolveDragElastic(dragElastic);
251
+ /**
252
+ * If we're outputting to external MotionValues, we want to rebase the measured constraints
253
+ * from viewport-relative to component-relative. This only applies to relative (non-ref)
254
+ * constraints, as ref-based constraints from calcViewportConstraints are already in the
255
+ * correct coordinate space for the motion value transform offset.
256
+ */
257
+ if (prevConstraints !== this.constraints &&
258
+ !isRefObject(dragConstraints) &&
259
+ layout &&
260
+ this.constraints &&
261
+ !this.hasMutatedConstraints) {
262
+ eachAxis((axis) => {
263
+ if (this.constraints !== false &&
264
+ this.getAxisMotionValue(axis)) {
265
+ this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);
266
+ }
267
+ });
268
+ }
269
+ }
270
+ resolveRefConstraints() {
271
+ const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();
272
+ if (!constraints || !isRefObject(constraints))
273
+ return false;
274
+ const constraintsElement = constraints.current;
275
+ invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
276
+ const { projection } = this.visualElement;
277
+ // TODO
278
+ if (!projection || !projection.layout)
279
+ return false;
280
+ /**
281
+ * Refresh the root scroll offset so the constraint's viewport box
282
+ * translates to correct page coordinates. The scroll captured at
283
+ * drag mount can be stale if the document was scrolled afterwards —
284
+ * e.g. via the browser restoring scroll on refresh, or an ancestor
285
+ * layout effect running after this element's mount (#2829).
286
+ *
287
+ * Clear the cached scroll first so `updateScroll` bypasses its
288
+ * per-animationId cache and re-reads the live value.
289
+ */
290
+ if (projection.root) {
291
+ projection.root.scroll = undefined;
292
+ projection.root.updateScroll();
293
+ }
294
+ const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
295
+ let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);
296
+ /**
297
+ * If there's an onMeasureDragConstraints listener we call it and
298
+ * if different constraints are returned, set constraints to that
299
+ */
300
+ if (onMeasureDragConstraints) {
301
+ const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));
302
+ this.hasMutatedConstraints = !!userConstraints;
303
+ if (userConstraints) {
304
+ measuredConstraints = convertBoundingBoxToBox(userConstraints);
305
+ }
306
+ }
307
+ return measuredConstraints;
308
+ }
309
+ startAnimation(velocity) {
310
+ const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();
311
+ const constraints = this.constraints || {};
312
+ const momentumAnimations = eachAxis((axis) => {
313
+ if (!shouldDrag(axis, drag, this.currentDirection)) {
314
+ return;
315
+ }
316
+ let transition = (constraints && constraints[axis]) || {};
317
+ if (dragSnapToOrigin === true ||
318
+ dragSnapToOrigin === axis)
319
+ transition = { min: 0, max: 0 };
320
+ /**
321
+ * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame
322
+ * of spring animations so we should look into adding a disable spring option to `inertia`.
323
+ * We could do something here where we affect the `bounceStiffness` and `bounceDamping`
324
+ * using the value of `dragElastic`.
325
+ */
326
+ const bounceStiffness = dragElastic ? 200 : 1000000;
327
+ const bounceDamping = dragElastic ? 40 : 10000000;
328
+ const inertia = {
329
+ type: "inertia",
330
+ velocity: dragMomentum ? velocity[axis] : 0,
331
+ bounceStiffness,
332
+ bounceDamping,
333
+ timeConstant: 750,
334
+ restDelta: 1,
335
+ restSpeed: 10,
336
+ ...dragTransition,
337
+ ...transition,
338
+ };
339
+ // If we're not animating on an externally-provided `MotionValue` we can use the
340
+ // component's animation controls which will handle interactions with whileHover (etc),
341
+ // otherwise we just have to animate the `MotionValue` itself.
342
+ return this.startAxisValueAnimation(axis, inertia);
343
+ });
344
+ // Run all animations and then resolve the new drag constraints.
345
+ return Promise.all(momentumAnimations).then(onDragTransitionEnd);
346
+ }
347
+ startAxisValueAnimation(axis, transition) {
348
+ const axisValue = this.getAxisMotionValue(axis);
349
+ addValueToWillChange(this.visualElement, axis);
350
+ return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));
351
+ }
352
+ stopAnimation() {
353
+ eachAxis((axis) => this.getAxisMotionValue(axis).stop());
354
+ }
355
+ /**
356
+ * Drag works differently depending on which props are provided.
357
+ *
358
+ * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
359
+ * - Otherwise, we apply the delta to the x/y motion values.
360
+ */
361
+ getAxisMotionValue(axis) {
362
+ const dragKey = `_drag${axis.toUpperCase()}`;
363
+ const props = this.visualElement.getProps();
364
+ const externalMotionValue = props[dragKey];
365
+ return externalMotionValue
366
+ ? externalMotionValue
367
+ : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);
368
+ }
369
+ snapToCursor(point) {
370
+ eachAxis((axis) => {
371
+ const { drag } = this.getProps();
372
+ // If we're not dragging this axis, do an early return.
373
+ if (!shouldDrag(axis, drag, this.currentDirection))
374
+ return;
375
+ const { projection } = this.visualElement;
376
+ const axisValue = this.getAxisMotionValue(axis);
377
+ if (projection && projection.layout) {
378
+ const { min, max } = projection.layout.layoutBox[axis];
379
+ /**
380
+ * The layout measurement includes the current transform value,
381
+ * so we need to add it back to get the correct snap position.
382
+ * This fixes an issue where elements with initial coordinates
383
+ * would snap to the wrong position on the first drag.
384
+ */
385
+ const current = axisValue.get() || 0;
386
+ axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);
387
+ }
388
+ });
389
+ }
390
+ /**
391
+ * When the viewport resizes we want to check if the measured constraints
392
+ * have changed and, if so, reposition the element within those new constraints
393
+ * relative to where it was before the resize.
394
+ */
395
+ scalePositionWithinConstraints() {
396
+ if (!this.visualElement.current)
397
+ return;
398
+ const { drag, dragConstraints } = this.getProps();
399
+ const { projection } = this.visualElement;
400
+ if (!isRefObject(dragConstraints) || !projection || !this.constraints)
401
+ return;
402
+ /**
403
+ * Stop current animations as there can be visual glitching if we try to do
404
+ * this mid-animation
405
+ */
406
+ this.stopAnimation();
407
+ /**
408
+ * Record the relative position of the dragged element relative to the
409
+ * constraints box and save as a progress value.
410
+ */
411
+ const boxProgress = { x: 0, y: 0 };
412
+ eachAxis((axis) => {
413
+ const axisValue = this.getAxisMotionValue(axis);
414
+ if (axisValue && this.constraints !== false) {
415
+ const latest = axisValue.get();
416
+ boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);
417
+ }
418
+ });
419
+ /**
420
+ * Update the layout of this element and resolve the latest drag constraints
421
+ */
422
+ const { transformTemplate } = this.visualElement.getProps();
423
+ this.visualElement.current.style.transform = transformTemplate
424
+ ? transformTemplate({}, "")
425
+ : "none";
426
+ projection.root && projection.root.updateScroll();
427
+ projection.updateLayout();
428
+ /**
429
+ * Reset constraints so resolveConstraints() will recalculate them
430
+ * with the freshly measured layout rather than returning the cached value.
431
+ */
432
+ this.constraints = false;
433
+ this.resolveConstraints();
434
+ /**
435
+ * For each axis, calculate the current progress of the layout axis
436
+ * within the new constraints.
437
+ */
438
+ eachAxis((axis) => {
439
+ if (!shouldDrag(axis, drag, null))
440
+ return;
441
+ /**
442
+ * Calculate a new transform based on the previous box progress
443
+ */
444
+ const axisValue = this.getAxisMotionValue(axis);
445
+ const { min, max } = this.constraints[axis];
446
+ axisValue.set(mixNumber(min, max, boxProgress[axis]));
447
+ });
448
+ /**
449
+ * Flush the updated transform to the DOM synchronously to prevent
450
+ * a visual flash at the element's CSS layout position (0,0) when
451
+ * the transform was stripped for measurement.
452
+ */
453
+ this.visualElement.render();
454
+ }
455
+ addListeners() {
456
+ if (!this.visualElement.current)
457
+ return;
458
+ elementDragControls.set(this.visualElement, this);
459
+ const element = this.visualElement.current;
460
+ /**
461
+ * Attach a pointerdown event listener on this DOM element to initiate drag tracking.
462
+ */
463
+ const stopPointerListener = addPointerEvent(element, "pointerdown", (event) => {
464
+ const { drag, dragListener = true } = this.getProps();
465
+ const target = event.target;
466
+ /**
467
+ * Only block drag if clicking on a text input child element
468
+ * (input, textarea, select, contenteditable) where users might
469
+ * want to select text or interact with the control.
470
+ *
471
+ * Buttons and links don't block drag since they don't have
472
+ * click-and-move actions of their own.
473
+ */
474
+ const isClickingTextInputChild = target !== element && isElementTextInput(target);
475
+ if (drag && dragListener && !isClickingTextInputChild) {
476
+ this.start(event);
477
+ }
478
+ });
479
+ /**
480
+ * If using ref-based constraints, observe both the draggable element
481
+ * and the constraint container for size changes via ResizeObserver.
482
+ * Setup is deferred because dragConstraints.current is null when
483
+ * addListeners first runs (React hasn't committed the ref yet).
484
+ */
485
+ let stopResizeObservers;
486
+ const measureDragConstraints = () => {
487
+ const { dragConstraints } = this.getProps();
488
+ if (isRefObject(dragConstraints) && dragConstraints.current) {
489
+ this.constraints = this.resolveRefConstraints();
490
+ if (!stopResizeObservers) {
491
+ stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());
492
+ }
493
+ }
494
+ };
495
+ const { projection } = this.visualElement;
496
+ const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
497
+ if (projection && !projection.layout) {
498
+ projection.root && projection.root.updateScroll();
499
+ projection.updateLayout();
500
+ }
501
+ frame.read(measureDragConstraints);
502
+ /**
503
+ * Attach a window resize listener to scale the draggable target within its defined
504
+ * constraints as the window resizes.
505
+ */
506
+ const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints());
507
+ /**
508
+ * If the element's layout changes, calculate the delta and apply that to
509
+ * the drag gesture's origin point.
510
+ */
511
+ const stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => {
512
+ if (this.isDragging && hasLayoutChanged) {
513
+ eachAxis((axis) => {
514
+ const motionValue = this.getAxisMotionValue(axis);
515
+ if (!motionValue)
516
+ return;
517
+ this.originPoint[axis] += delta[axis].translate;
518
+ motionValue.set(motionValue.get() + delta[axis].translate);
519
+ });
520
+ this.visualElement.render();
521
+ }
522
+ }));
523
+ return () => {
524
+ stopResizeListener();
525
+ stopPointerListener();
526
+ stopMeasureLayoutListener();
527
+ stopLayoutUpdateListener && stopLayoutUpdateListener();
528
+ stopResizeObservers && stopResizeObservers();
529
+ };
530
+ }
531
+ getProps() {
532
+ const props = this.visualElement.getProps();
533
+ const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;
534
+ return {
535
+ ...props,
536
+ drag,
537
+ dragDirectionLock,
538
+ dragPropagation,
539
+ dragConstraints,
540
+ dragElastic,
541
+ dragMomentum,
542
+ };
543
+ }
544
+ }
545
+ function skipFirstCall(callback) {
546
+ let isFirst = true;
547
+ return () => {
548
+ if (isFirst) {
549
+ isFirst = false;
550
+ return;
551
+ }
552
+ callback();
553
+ };
554
+ }
555
+ function startResizeObservers(element, constraintsElement, onResize) {
556
+ const stopElement = resize(element, skipFirstCall(onResize));
557
+ const stopContainer = resize(constraintsElement, skipFirstCall(onResize));
558
+ return () => {
559
+ stopElement();
560
+ stopContainer();
561
+ };
562
+ }
563
+ function shouldDrag(direction, drag, currentDirection) {
564
+ return ((drag === true || drag === direction) &&
565
+ (currentDirection === null || currentDirection === direction));
566
+ }
567
+ /**
568
+ * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower
569
+ * than the provided threshold, return `null`.
570
+ *
571
+ * @param offset - The x/y offset from origin.
572
+ * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.
573
+ */
574
+ function getCurrentDirection(offset, lockThreshold = 10) {
575
+ let direction = null;
576
+ if (Math.abs(offset.y) > lockThreshold) {
577
+ direction = "y";
578
+ }
579
+ else if (Math.abs(offset.x) > lockThreshold) {
580
+ direction = "x";
581
+ }
582
+ return direction;
583
+ }
584
+
585
+ export { VisualElementDragControls, elementDragControls };
586
+ //# sourceMappingURL=VisualElementDragControls.js.map