@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,386 @@
1
+ import { time } from '../frameloop/sync-time.js';
2
+ import { mix } from '../utils/mix/index.js';
3
+ import { frameloopDriver } from './drivers/frame.js';
4
+ import { inertia } from './generators/inertia.js';
5
+ import { keyframes } from './generators/keyframes.js';
6
+ import { calcGeneratorDuration } from './generators/utils/calc-duration.js';
7
+ import { getGeneratorVelocity } from './generators/utils/velocity.js';
8
+ import { getFinalKeyframe } from './keyframes/get-final.js';
9
+ import { replaceTransitionType } from './utils/replace-transition-type.js';
10
+ import { WithPromise } from './utils/WithPromise.js';
11
+ import { invariant } from '../../../../motion-utils/dist/es/errors.js';
12
+ import { pipe } from '../../../../motion-utils/dist/es/pipe.js';
13
+ import { millisecondsToSeconds, secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.js';
14
+ import { clamp } from '../../../../motion-utils/dist/es/clamp.js';
15
+
16
+ const percentToProgress = (percent) => percent / 100;
17
+ class JSAnimation extends WithPromise {
18
+ constructor(options) {
19
+ super();
20
+ this.state = "idle";
21
+ this.startTime = null;
22
+ this.isStopped = false;
23
+ /**
24
+ * The current time of the animation.
25
+ */
26
+ this.currentTime = 0;
27
+ /**
28
+ * The time at which the animation was paused.
29
+ */
30
+ this.holdTime = null;
31
+ /**
32
+ * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.
33
+ */
34
+ this.playbackSpeed = 1;
35
+ /**
36
+ * Reusable state object for the delay phase to avoid
37
+ * allocating a new object every frame.
38
+ */
39
+ this.delayState = {
40
+ done: false,
41
+ value: undefined,
42
+ };
43
+ /**
44
+ * This method is bound to the instance to fix a pattern where
45
+ * animation.stop is returned as a reference from a useEffect.
46
+ */
47
+ this.stop = () => {
48
+ const { motionValue } = this.options;
49
+ if (motionValue && motionValue.updatedAt !== time.now()) {
50
+ this.tick(time.now());
51
+ }
52
+ this.isStopped = true;
53
+ if (this.state === "idle")
54
+ return;
55
+ this.teardown();
56
+ this.options.onStop?.();
57
+ };
58
+ this.options = options;
59
+ this.initAnimation();
60
+ this.play();
61
+ if (options.autoplay === false)
62
+ this.pause();
63
+ }
64
+ initAnimation() {
65
+ const { options } = this;
66
+ replaceTransitionType(options);
67
+ const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;
68
+ let { keyframes: keyframes$1 } = options;
69
+ const generatorFactory = type || keyframes;
70
+ if (process.env.NODE_ENV !== "production" &&
71
+ generatorFactory !== keyframes) {
72
+ invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, "spring-two-frames");
73
+ }
74
+ if (generatorFactory !== keyframes &&
75
+ typeof keyframes$1[0] !== "number") {
76
+ this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
77
+ keyframes$1 = [0, 100];
78
+ }
79
+ const generator = generatorFactory({ ...options, keyframes: keyframes$1 });
80
+ /**
81
+ * If we have a mirror repeat type we need to create a second generator that outputs the
82
+ * mirrored (not reversed) animation and later ping pong between the two generators.
83
+ */
84
+ if (repeatType === "mirror") {
85
+ this.mirroredGenerator = generatorFactory({
86
+ ...options,
87
+ keyframes: [...keyframes$1].reverse(),
88
+ velocity: -velocity,
89
+ });
90
+ }
91
+ /**
92
+ * If duration is undefined and we have repeat options,
93
+ * we need to calculate a duration from the generator.
94
+ *
95
+ * We set it to the generator itself to cache the duration.
96
+ * Any timeline resolver will need to have already precalculated
97
+ * the duration by this step.
98
+ */
99
+ if (generator.calculatedDuration === null) {
100
+ generator.calculatedDuration = calcGeneratorDuration(generator);
101
+ }
102
+ const { calculatedDuration } = generator;
103
+ this.calculatedDuration = calculatedDuration;
104
+ this.resolvedDuration = calculatedDuration + repeatDelay;
105
+ this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;
106
+ this.generator = generator;
107
+ }
108
+ updateTime(timestamp) {
109
+ const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;
110
+ // Update currentTime
111
+ if (this.holdTime !== null) {
112
+ this.currentTime = this.holdTime;
113
+ }
114
+ else {
115
+ // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =
116
+ // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for
117
+ // example.
118
+ this.currentTime = animationTime;
119
+ }
120
+ }
121
+ tick(timestamp, sample = false) {
122
+ const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;
123
+ if (this.startTime === null)
124
+ return generator.next(0);
125
+ const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;
126
+ /**
127
+ * requestAnimationFrame timestamps can come through as lower than
128
+ * the startTime as set by performance.now(). Here we prevent this,
129
+ * though in the future it could be possible to make setting startTime
130
+ * a pending operation that gets resolved here.
131
+ */
132
+ if (this.speed > 0) {
133
+ this.startTime = Math.min(this.startTime, timestamp);
134
+ }
135
+ else if (this.speed < 0) {
136
+ this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
137
+ }
138
+ if (sample) {
139
+ this.currentTime = timestamp;
140
+ }
141
+ else {
142
+ this.updateTime(timestamp);
143
+ }
144
+ // Rebase on delay
145
+ const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);
146
+ const isInDelayPhase = this.playbackSpeed >= 0
147
+ ? timeWithoutDelay < 0
148
+ : timeWithoutDelay > totalDuration;
149
+ this.currentTime = Math.max(timeWithoutDelay, 0);
150
+ // If this animation has finished, set the current time to the total duration.
151
+ if (this.state === "finished" && this.holdTime === null) {
152
+ this.currentTime = totalDuration;
153
+ }
154
+ let elapsed = this.currentTime;
155
+ let frameGenerator = generator;
156
+ if (repeat) {
157
+ /**
158
+ * Get the current progress (0-1) of the animation. If t is >
159
+ * than duration we'll get values like 2.5 (midway through the
160
+ * third iteration)
161
+ */
162
+ const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;
163
+ /**
164
+ * Get the current iteration (0 indexed). For instance the floor of
165
+ * 2.5 is 2.
166
+ */
167
+ let currentIteration = Math.floor(progress);
168
+ /**
169
+ * Get the current progress of the iteration by taking the remainder
170
+ * so 2.5 is 0.5 through iteration 2
171
+ */
172
+ let iterationProgress = progress % 1.0;
173
+ /**
174
+ * If iteration progress is 1 we count that as the end
175
+ * of the previous iteration.
176
+ */
177
+ if (!iterationProgress && progress >= 1) {
178
+ iterationProgress = 1;
179
+ }
180
+ iterationProgress === 1 && currentIteration--;
181
+ currentIteration = Math.min(currentIteration, repeat + 1);
182
+ /**
183
+ * Reverse progress if we're not running in "normal" direction
184
+ */
185
+ const isOddIteration = Boolean(currentIteration % 2);
186
+ if (isOddIteration) {
187
+ if (repeatType === "reverse") {
188
+ iterationProgress = 1 - iterationProgress;
189
+ if (repeatDelay) {
190
+ iterationProgress -= repeatDelay / resolvedDuration;
191
+ }
192
+ }
193
+ else if (repeatType === "mirror") {
194
+ frameGenerator = mirroredGenerator;
195
+ }
196
+ }
197
+ elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
198
+ }
199
+ /**
200
+ * If we're in negative time, set state as the initial keyframe.
201
+ * This prevents delay: x, duration: 0 animations from finishing
202
+ * instantly.
203
+ */
204
+ let state;
205
+ if (isInDelayPhase) {
206
+ this.delayState.value = keyframes[0];
207
+ state = this.delayState;
208
+ }
209
+ else {
210
+ state = frameGenerator.next(elapsed);
211
+ }
212
+ if (mixKeyframes && !isInDelayPhase) {
213
+ state.value = mixKeyframes(state.value);
214
+ }
215
+ let { done } = state;
216
+ if (!isInDelayPhase && calculatedDuration !== null) {
217
+ done =
218
+ this.playbackSpeed >= 0
219
+ ? this.currentTime >= totalDuration
220
+ : this.currentTime <= 0;
221
+ }
222
+ const isAnimationFinished = this.holdTime === null &&
223
+ (this.state === "finished" || (this.state === "running" && done));
224
+ // TODO: The exception for inertia could be cleaner here
225
+ if (isAnimationFinished && type !== inertia) {
226
+ state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);
227
+ }
228
+ if (onUpdate) {
229
+ onUpdate(state.value);
230
+ }
231
+ if (isAnimationFinished) {
232
+ this.finish();
233
+ }
234
+ return state;
235
+ }
236
+ /**
237
+ * Allows the returned animation to be awaited or promise-chained. Currently
238
+ * resolves when the animation finishes at all but in a future update could/should
239
+ * reject if its cancels.
240
+ */
241
+ then(resolve, reject) {
242
+ return this.finished.then(resolve, reject);
243
+ }
244
+ get duration() {
245
+ return millisecondsToSeconds(this.calculatedDuration);
246
+ }
247
+ get iterationDuration() {
248
+ const { delay = 0 } = this.options || {};
249
+ return this.duration + millisecondsToSeconds(delay);
250
+ }
251
+ get time() {
252
+ return millisecondsToSeconds(this.currentTime);
253
+ }
254
+ set time(newTime) {
255
+ newTime = secondsToMilliseconds(newTime);
256
+ this.currentTime = newTime;
257
+ if (this.startTime === null ||
258
+ this.holdTime !== null ||
259
+ this.playbackSpeed === 0) {
260
+ this.holdTime = newTime;
261
+ }
262
+ else if (this.driver) {
263
+ this.startTime = this.driver.now() - newTime / this.playbackSpeed;
264
+ }
265
+ if (this.driver) {
266
+ this.driver.start(false);
267
+ }
268
+ else {
269
+ this.startTime = 0;
270
+ this.state = "paused";
271
+ this.holdTime = newTime;
272
+ this.tick(newTime);
273
+ }
274
+ }
275
+ /**
276
+ * Returns the generator's velocity at the current time in units/second.
277
+ * Uses the analytical derivative when available (springs), avoiding
278
+ * the MotionValue's frame-dependent velocity estimation.
279
+ */
280
+ getGeneratorVelocity() {
281
+ const t = this.currentTime;
282
+ if (t <= 0)
283
+ return this.options.velocity || 0;
284
+ if (this.generator.velocity) {
285
+ return this.generator.velocity(t);
286
+ }
287
+ // Fallback: finite difference
288
+ const current = this.generator.next(t).value;
289
+ return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);
290
+ }
291
+ get speed() {
292
+ return this.playbackSpeed;
293
+ }
294
+ set speed(newSpeed) {
295
+ const hasChanged = this.playbackSpeed !== newSpeed;
296
+ if (hasChanged && this.driver) {
297
+ this.updateTime(time.now());
298
+ }
299
+ this.playbackSpeed = newSpeed;
300
+ if (hasChanged && this.driver) {
301
+ this.time = millisecondsToSeconds(this.currentTime);
302
+ }
303
+ }
304
+ play() {
305
+ if (this.isStopped)
306
+ return;
307
+ const { driver = frameloopDriver, startTime } = this.options;
308
+ if (!this.driver) {
309
+ this.driver = driver((timestamp) => this.tick(timestamp));
310
+ }
311
+ this.options.onPlay?.();
312
+ const now = this.driver.now();
313
+ if (this.state === "finished") {
314
+ this.updateFinished();
315
+ this.startTime = now;
316
+ }
317
+ else if (this.holdTime !== null) {
318
+ this.startTime = now - this.holdTime;
319
+ }
320
+ else if (!this.startTime) {
321
+ this.startTime = startTime ?? now;
322
+ }
323
+ if (this.state === "finished" && this.speed < 0) {
324
+ this.startTime += this.calculatedDuration;
325
+ }
326
+ this.holdTime = null;
327
+ /**
328
+ * Set playState to running only after we've used it in
329
+ * the previous logic.
330
+ */
331
+ this.state = "running";
332
+ this.driver.start();
333
+ }
334
+ pause() {
335
+ this.state = "paused";
336
+ this.updateTime(time.now());
337
+ this.holdTime = this.currentTime;
338
+ }
339
+ complete() {
340
+ if (this.state !== "running") {
341
+ this.play();
342
+ }
343
+ this.state = "finished";
344
+ this.holdTime = null;
345
+ }
346
+ finish() {
347
+ this.notifyFinished();
348
+ this.teardown();
349
+ this.state = "finished";
350
+ this.options.onComplete?.();
351
+ }
352
+ cancel() {
353
+ this.holdTime = null;
354
+ this.startTime = 0;
355
+ this.tick(0);
356
+ this.teardown();
357
+ this.options.onCancel?.();
358
+ }
359
+ teardown() {
360
+ this.state = "idle";
361
+ this.stopDriver();
362
+ this.startTime = this.holdTime = null;
363
+ }
364
+ stopDriver() {
365
+ if (!this.driver)
366
+ return;
367
+ this.driver.stop();
368
+ this.driver = undefined;
369
+ }
370
+ sample(sampleTime) {
371
+ this.startTime = 0;
372
+ return this.tick(sampleTime, true);
373
+ }
374
+ attachTimeline(timeline) {
375
+ if (this.options.allowFlatten) {
376
+ this.options.type = "keyframes";
377
+ this.options.ease = "linear";
378
+ this.initAnimation();
379
+ }
380
+ this.driver?.stop();
381
+ return timeline.observe(this);
382
+ }
383
+ }
384
+
385
+ export { JSAnimation };
386
+ //# sourceMappingURL=JSAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JSAnimation.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs"],"sourcesContent":["import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n const t = this.currentTime;\n if (t <= 0)\n return this.options.velocity || 0;\n if (this.generator.velocity) {\n return this.generator.velocity(t);\n }\n // Fallback: finite difference\n const current = this.generator.next(t).value;\n return getGeneratorVelocity((s) => this.generator.next(s).value, t, current);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n//# sourceMappingURL=JSAnimation.mjs.map\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,iBAAiB,GAAG,CAAC,OAAO,K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B,QAAQ,IAAI,CAAC,MAAM,GAAG,SAAS;AAC/B,IAAI;AACJ,IAAI,MAAM,CAAC,UAAU,EAAE;AACvB,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC;AAC1B,QAAQ,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC;AAC1C,IAAI;AACJ,IAAI,cAAc,CAAC,QAAQ,EAAE;AAC7B,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;AACvC,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,WAAW;AAC3C,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,QAAQ;AACxC,YAAY,IAAI,CAAC,aAAa,EAAE;AAChC,QAAQ;AACR,QAAQ,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE;AAC3B,QAAQ,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;AACrC,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,181 @@
1
+ import { setStyle } from '../render/dom/style-set.js';
2
+ import { supportsScrollTimeline } from '../utils/supports/scroll-timeline.js';
3
+ import { getFinalKeyframe } from './keyframes/get-final.js';
4
+ import { WithPromise } from './utils/WithPromise.js';
5
+ import { startWaapiAnimation } from './waapi/start-waapi-animation.js';
6
+ import { applyGeneratorOptions } from './waapi/utils/apply-generator.js';
7
+ import { invariant } from '../../../../motion-utils/dist/es/errors.js';
8
+ import { millisecondsToSeconds, secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.js';
9
+ import { noop } from '../../../../motion-utils/dist/es/noop.js';
10
+
11
+ /**
12
+ * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.
13
+ */
14
+ class NativeAnimation extends WithPromise {
15
+ constructor(options) {
16
+ super();
17
+ this.finishedTime = null;
18
+ this.isStopped = false;
19
+ /**
20
+ * Tracks a manually-set start time that takes precedence over WAAPI's
21
+ * dynamic startTime. This is cleared when play() or time setter is called,
22
+ * allowing WAAPI to take over timing.
23
+ */
24
+ this.manualStartTime = null;
25
+ if (!options)
26
+ return;
27
+ const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
28
+ this.isPseudoElement = Boolean(pseudoElement);
29
+ this.allowFlatten = allowFlatten;
30
+ this.options = options;
31
+ invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
32
+ const transition = applyGeneratorOptions(options);
33
+ this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);
34
+ if (transition.autoplay === false) {
35
+ this.animation.pause();
36
+ }
37
+ this.animation.onfinish = () => {
38
+ this.finishedTime = this.time;
39
+ if (!pseudoElement) {
40
+ const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);
41
+ if (this.updateMotionValue) {
42
+ this.updateMotionValue(keyframe);
43
+ }
44
+ /**
45
+ * If we can, we want to commit the final style as set by the user,
46
+ * rather than the computed keyframe value supplied by the animation.
47
+ * We always do this, even when a motion value is present, to prevent
48
+ * a visual flash in Firefox where the WAAPI animation's fill is removed
49
+ * during cancel() before the scheduled render can apply the correct value.
50
+ */
51
+ setStyle(element, name, keyframe);
52
+ this.animation.cancel();
53
+ }
54
+ onComplete?.();
55
+ this.notifyFinished();
56
+ };
57
+ }
58
+ play() {
59
+ if (this.isStopped)
60
+ return;
61
+ this.manualStartTime = null;
62
+ this.animation.play();
63
+ if (this.state === "finished") {
64
+ this.updateFinished();
65
+ }
66
+ }
67
+ pause() {
68
+ this.animation.pause();
69
+ }
70
+ complete() {
71
+ this.animation.finish?.();
72
+ }
73
+ cancel() {
74
+ try {
75
+ this.animation.cancel();
76
+ }
77
+ catch (e) { }
78
+ }
79
+ stop() {
80
+ if (this.isStopped)
81
+ return;
82
+ this.isStopped = true;
83
+ const { state } = this;
84
+ if (state === "idle" || state === "finished") {
85
+ return;
86
+ }
87
+ if (this.updateMotionValue) {
88
+ this.updateMotionValue();
89
+ }
90
+ else {
91
+ this.commitStyles();
92
+ }
93
+ if (!this.isPseudoElement)
94
+ this.cancel();
95
+ }
96
+ /**
97
+ * WAAPI doesn't natively have any interruption capabilities.
98
+ *
99
+ * In this method, we commit styles back to the DOM before cancelling
100
+ * the animation.
101
+ *
102
+ * This is designed to be overridden by NativeAnimationExtended, which
103
+ * will create a renderless JS animation and sample it twice to calculate
104
+ * its current value, "previous" value, and therefore allow
105
+ * Motion to also correctly calculate velocity for any subsequent animation
106
+ * while deferring the commit until the next animation frame.
107
+ */
108
+ commitStyles() {
109
+ const element = this.options?.element;
110
+ if (!this.isPseudoElement && element?.isConnected) {
111
+ this.animation.commitStyles?.();
112
+ }
113
+ }
114
+ get duration() {
115
+ const duration = this.animation.effect?.getComputedTiming?.().duration || 0;
116
+ return millisecondsToSeconds(Number(duration));
117
+ }
118
+ get iterationDuration() {
119
+ const { delay = 0 } = this.options || {};
120
+ return this.duration + millisecondsToSeconds(delay);
121
+ }
122
+ get time() {
123
+ return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
124
+ }
125
+ set time(newTime) {
126
+ const wasFinished = this.finishedTime !== null;
127
+ this.manualStartTime = null;
128
+ this.finishedTime = null;
129
+ this.animation.currentTime = secondsToMilliseconds(newTime);
130
+ if (wasFinished) {
131
+ this.animation.pause();
132
+ }
133
+ }
134
+ /**
135
+ * The playback speed of the animation.
136
+ * 1 = normal speed, 2 = double speed, 0.5 = half speed.
137
+ */
138
+ get speed() {
139
+ return this.animation.playbackRate;
140
+ }
141
+ set speed(newSpeed) {
142
+ // Allow backwards playback after finishing
143
+ if (newSpeed < 0)
144
+ this.finishedTime = null;
145
+ this.animation.playbackRate = newSpeed;
146
+ }
147
+ get state() {
148
+ return this.finishedTime !== null
149
+ ? "finished"
150
+ : this.animation.playState;
151
+ }
152
+ get startTime() {
153
+ return this.manualStartTime ?? Number(this.animation.startTime);
154
+ }
155
+ set startTime(newStartTime) {
156
+ this.manualStartTime = this.animation.startTime = newStartTime;
157
+ }
158
+ /**
159
+ * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
160
+ */
161
+ attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {
162
+ if (this.allowFlatten) {
163
+ this.animation.effect?.updateTiming({ easing: "linear" });
164
+ }
165
+ this.animation.onfinish = null;
166
+ if (timeline && supportsScrollTimeline()) {
167
+ this.animation.timeline = timeline;
168
+ if (rangeStart)
169
+ this.animation.rangeStart = rangeStart;
170
+ if (rangeEnd)
171
+ this.animation.rangeEnd = rangeEnd;
172
+ return noop;
173
+ }
174
+ else {
175
+ return observe(this);
176
+ }
177
+ }
178
+ }
179
+
180
+ export { NativeAnimation };
181
+ //# sourceMappingURL=NativeAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeAnimation.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs"],"sourcesContent":["import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n if (rangeStart)\n this.animation.rangeStart = rangeStart;\n if (rangeEnd)\n this.animation.rangeEnd = rangeEnd;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n"],"names":[],"mappings":";;;;;;;;;;AAQA;AACA;AACA;AACA,MAAM,eAAe,SAAS,WAAW,CAAC;AAC1C,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,KAAK,EAAE;AACf,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI;AAChC,QAAQ,IAAI,CAAC,SAAS,GAAG,KAAK;AAC9B;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,eAAe,GAAG,IAAI;AACnC,QAAQ,IAAI,CAAC,OAAO;AACpB,YAAY;AACZ,QAAQ,MAAM,EAAE,OAAO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