@code0-tech/pictor 1.1.0 → 1.1.1

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 (333) hide show
  1. package/dist/_virtual/rolldown_runtime.js +3 -12
  2. package/dist/components/alert/Alert.js +19 -20
  3. package/dist/components/aurora/Aurora.js +15 -16
  4. package/dist/components/avatar/Avatar.js +44 -44
  5. package/dist/components/badge/Badge.js +36 -37
  6. package/dist/components/button/Button.js +16 -17
  7. package/dist/components/button-group/ButtonGroup.js +15 -16
  8. package/dist/components/card/Card.js +21 -22
  9. package/dist/components/card/CardSection.js +15 -15
  10. package/dist/components/chart/Chart.js +82 -82
  11. package/dist/components/chart/LineChart.js +50 -51
  12. package/dist/components/col/Col.js +9 -10
  13. package/dist/components/command/Command.js +32 -33
  14. package/dist/components/container/Container.js +9 -10
  15. package/dist/components/context-menu/ContextMenu.js +76 -77
  16. package/dist/components/data-table/DataTableColumn.js +9 -10
  17. package/dist/components/data-table/DataTableFilterInput.js +83 -83
  18. package/dist/components/data-table/DataTableFilterSuggestionMenu.js +26 -27
  19. package/dist/components/data-table/DataTableHeader.js +20 -21
  20. package/dist/components/data-table/DataTablePagination.js +27 -28
  21. package/dist/components/dialog/Dialog.js +61 -62
  22. package/dist/components/file-tabs/FileTabs.js +51 -52
  23. package/dist/components/flex/Flex.js +9 -10
  24. package/dist/components/form/CheckboxInput.js +50 -51
  25. package/dist/components/form/ColorInput.js +242 -242
  26. package/dist/components/form/DateInput.js +55 -55
  27. package/dist/components/form/EditorInput.js +300 -300
  28. package/dist/components/form/FileInput.js +67 -68
  29. package/dist/components/form/InputDescription.js +3 -4
  30. package/dist/components/form/InputLabel.js +9 -10
  31. package/dist/components/form/InputMessage.js +6 -7
  32. package/dist/components/form/InputWrapper.js +37 -38
  33. package/dist/components/form/PasswordInput.js +2 -2
  34. package/dist/components/form/PinInput.js +30 -31
  35. package/dist/components/form/RadioGroup.js +22 -23
  36. package/dist/components/form/RadioInput.js +19 -20
  37. package/dist/components/form/SelectInput.js +55 -56
  38. package/dist/components/form/TagInput.js +44 -44
  39. package/dist/components/fullscreen/FullScreen.js +14 -15
  40. package/dist/components/gantt/Gantt.js +63 -64
  41. package/dist/components/gantt/GanttGroup.js +2 -2
  42. package/dist/components/gantt/GanttHeader.js +40 -41
  43. package/dist/components/gantt/GanttItem.js +11 -12
  44. package/dist/components/icon/Icon.js +22 -22
  45. package/dist/components/json-view/JsonView.js +37 -38
  46. package/dist/components/layout/Layout.js +64 -65
  47. package/dist/components/menu/Menu.js +91 -92
  48. package/dist/components/quote/Quote.js +29 -30
  49. package/dist/components/resizable/Resizable.js +22 -23
  50. package/dist/components/row/Row.js +9 -10
  51. package/dist/components/scroll-area/ScrollArea.js +46 -47
  52. package/dist/components/segmented-control/SegmentedControl.js +35 -35
  53. package/dist/components/spacing/Spacing.js +8 -9
  54. package/dist/components/tab/Tab.js +53 -53
  55. package/dist/components/text/Text.js +9 -10
  56. package/dist/components/toast/Toast.js +47 -47
  57. package/dist/components/tooltip/Tooltip.js +35 -36
  58. package/dist/utils/contextStore.js +31 -32
  59. package/dist/utils/motion.js +39 -40
  60. package/package.json +4 -4
  61. package/dist/_virtual/__vite-optional-peer-dep_@emotion/is-prop-valid_framer-motion.js +0 -6
  62. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
  63. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -51
  64. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -58
  65. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -18
  66. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -9
  67. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -4
  68. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -4
  69. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -8
  70. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -15
  71. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -4
  72. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -13
  73. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -4
  74. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -4
  75. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -6
  76. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -9
  77. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -256
  78. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -20
  79. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -57
  80. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -25
  81. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -18
  82. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -136
  83. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -40
  84. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -24
  85. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -37
  86. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -23
  87. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -7
  88. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -49
  89. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -13
  90. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -11
  91. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -59
  92. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -7
  93. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -11
  94. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
  95. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -22
  96. package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -68
  97. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -2
  98. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -19
  99. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -56
  100. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -48
  101. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -5
  102. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -8
  103. package/dist/node_modules/framer-motion/dist/es/render/components/m/proxy.js +0 -3
  104. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -11
  105. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -5
  106. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -6
  107. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -19
  108. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -17
  109. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -5
  110. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -9
  111. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -24
  112. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -7
  113. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -28
  114. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -24
  115. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -9
  116. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -6
  117. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -6
  118. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -2
  119. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -2
  120. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -4
  121. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -11
  122. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -23
  123. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -7
  124. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -5
  125. package/dist/node_modules/motion/dist/es/react.js +0 -196
  126. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -105
  127. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -127
  128. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -82
  129. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -26
  130. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -8
  131. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -11
  132. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -30
  133. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -20
  134. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -164
  135. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -7
  136. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -14
  137. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -4
  138. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -7
  139. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -43
  140. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -54
  141. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -24
  142. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -19
  143. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -59
  144. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -65
  145. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -6
  146. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -6
  147. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -10
  148. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -4
  149. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -4
  150. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -5
  151. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
  152. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -34
  153. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -3
  154. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -5
  155. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -20
  156. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -5
  157. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -16
  158. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -23
  159. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -25
  160. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
  161. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -3
  162. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -5
  163. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -17
  164. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -4
  165. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -14
  166. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -11
  167. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -2
  168. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -9
  169. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -33
  170. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -17
  171. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -22
  172. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -8
  173. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -6
  174. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -6
  175. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -6
  176. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -15
  177. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -4
  178. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -28
  179. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -4
  180. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -3
  181. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -11
  182. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -30
  183. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -13
  184. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -8
  185. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -9
  186. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -34
  187. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -34
  188. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -19
  189. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -26
  190. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -2
  191. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -2
  192. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -2
  193. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -14
  194. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -23
  195. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -37
  196. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -10
  197. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -41
  198. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -28
  199. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -27
  200. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -16
  201. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -26
  202. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -11
  203. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -20
  204. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -580
  205. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -5
  206. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -49
  207. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -11
  208. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -11
  209. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -15
  210. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -10
  211. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -2
  212. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -4
  213. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -17
  214. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -16
  215. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -10
  216. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -7
  217. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -201
  218. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -26
  219. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -2
  220. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -54
  221. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -5
  222. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -4
  223. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -37
  224. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -26
  225. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -34
  226. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -6
  227. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -9
  228. package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -2
  229. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -38
  230. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -20
  231. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -26
  232. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -2
  233. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -13
  234. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -7
  235. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -12
  236. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -133
  237. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -17
  238. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -4
  239. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -10
  240. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -6
  241. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -2
  242. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -4
  243. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -11
  244. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -20
  245. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -19
  246. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -9
  247. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -2
  248. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -6
  249. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -18
  250. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -17
  251. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -8
  252. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -10
  253. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -35
  254. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -20
  255. package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -6
  256. package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +0 -5
  257. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +0 -7
  258. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -10
  259. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -31
  260. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -5
  261. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -5
  262. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -5
  263. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -28
  264. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -50
  265. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -4
  266. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -6
  267. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -2
  268. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -5
  269. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -12
  270. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -2
  271. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -10
  272. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -7
  273. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -3
  274. package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -90
  275. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -5
  276. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -17
  277. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -19
  278. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -10
  279. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -13
  280. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -13
  281. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -14
  282. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
  283. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -50
  284. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -12
  285. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -14
  286. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -6
  287. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -22
  288. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -62
  289. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -30
  290. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -13
  291. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -10
  292. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -2
  293. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
  294. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -2
  295. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -10
  296. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -2
  297. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -2
  298. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -4
  299. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -2
  300. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -2
  301. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -2
  302. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -5
  303. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -11
  304. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -5
  305. package/dist/node_modules/motion-utils/dist/es/array.js +0 -8
  306. package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -2
  307. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -3
  308. package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -5
  309. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -4
  310. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -16
  311. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -3
  312. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -2
  313. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -2
  314. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -2
  315. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -2
  316. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -29
  317. package/dist/node_modules/motion-utils/dist/es/errors.js +0 -8
  318. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -4
  319. package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -2
  320. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -2
  321. package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -2
  322. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -2
  323. package/dist/node_modules/motion-utils/dist/es/memo.js +0 -6
  324. package/dist/node_modules/motion-utils/dist/es/noop.js +0 -2
  325. package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -2
  326. package/dist/node_modules/motion-utils/dist/es/progress.js +0 -5
  327. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -24
  328. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -2
  329. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -2
  330. package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -6
  331. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -21
  332. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -18
  333. package/dist/node_modules/react/compiler-runtime.js +0 -8
@@ -1,105 +0,0 @@
1
- import { MotionGlobalConfig } from "../../../../motion-utils/dist/es/global-config.js";
2
- import { noop } from "../../../../motion-utils/dist/es/noop.js";
3
- import { time } from "../frameloop/sync-time.js";
4
- import { getFinalKeyframe } from "./keyframes/get-final.js";
5
- import { WithPromise } from "./utils/WithPromise.js";
6
- import { JSAnimation } from "./JSAnimation.js";
7
- import { KeyframeResolver, flushKeyframeResolvers } from "./keyframes/KeyframesResolver.js";
8
- import { NativeAnimationExtended } from "./NativeAnimationExtended.js";
9
- import { canAnimate } from "./utils/can-animate.js";
10
- import { makeAnimationInstant } from "./utils/make-animation-instant.js";
11
- import { supportsBrowserAnimation } from "./waapi/supports/waapi.js";
12
- var MAX_RESOLVE_DELAY = 40, AsyncMotionValueAnimation = class extends WithPromise {
13
- constructor({ autoplay: e = !0, delay: t = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: c, name: l, motionValue: u, element: d, ...f }) {
14
- super(), this.stop = () => {
15
- this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
16
- }, this.createdAt = time.now();
17
- let p = {
18
- autoplay: e,
19
- delay: t,
20
- type: r,
21
- repeat: i,
22
- repeatDelay: a,
23
- repeatType: s,
24
- name: l,
25
- motionValue: u,
26
- element: d,
27
- ...f
28
- };
29
- this.keyframeResolver = new (d?.KeyframeResolver || KeyframeResolver)(c, (e, t, n) => this.onKeyframesResolved(e, t, p, !n), l, u, d), this.keyframeResolver?.scheduleResolve();
30
- }
31
- onKeyframesResolved(i, o, s, p) {
32
- this.keyframeResolver = void 0;
33
- let { name: m, type: h, velocity: g, delay: _, isHandoff: v, onUpdate: y } = s;
34
- this.resolvedAt = time.now();
35
- let b = !0;
36
- canAnimate(i, m, h, g) || (b = !1, (MotionGlobalConfig.instantAnimations || !_) && y?.(getFinalKeyframe(i, s, o)), i[0] = i[i.length - 1], makeAnimationInstant(s), s.repeat = 0);
37
- let x = {
38
- startTime: p ? this.resolvedAt && this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt : void 0,
39
- finalKeyframe: o,
40
- ...s,
41
- keyframes: i
42
- }, S = b && !v && supportsBrowserAnimation(x), C = x.motionValue?.owner?.current, w;
43
- if (S) try {
44
- w = new NativeAnimationExtended({
45
- ...x,
46
- element: C
47
- });
48
- } catch {
49
- w = new JSAnimation(x);
50
- }
51
- else w = new JSAnimation(x);
52
- w.finished.then(() => {
53
- this.notifyFinished();
54
- }).catch(noop), this.pendingTimeline &&= (this.stopTimeline = w.attachTimeline(this.pendingTimeline), void 0), this._animation = w;
55
- }
56
- get finished() {
57
- return this._animation ? this.animation.finished : this._finished;
58
- }
59
- then(e, t) {
60
- return this.finished.finally(e).then(() => {});
61
- }
62
- get animation() {
63
- return this._animation || (this.keyframeResolver?.resume(), flushKeyframeResolvers()), this._animation;
64
- }
65
- get duration() {
66
- return this.animation.duration;
67
- }
68
- get iterationDuration() {
69
- return this.animation.iterationDuration;
70
- }
71
- get time() {
72
- return this.animation.time;
73
- }
74
- set time(e) {
75
- this.animation.time = e;
76
- }
77
- get speed() {
78
- return this.animation.speed;
79
- }
80
- get state() {
81
- return this.animation.state;
82
- }
83
- set speed(e) {
84
- this.animation.speed = e;
85
- }
86
- get startTime() {
87
- return this.animation.startTime;
88
- }
89
- attachTimeline(e) {
90
- return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
91
- }
92
- play() {
93
- this.animation.play();
94
- }
95
- pause() {
96
- this.animation.pause();
97
- }
98
- complete() {
99
- this.animation.complete();
100
- }
101
- cancel() {
102
- this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
103
- }
104
- };
105
- export { AsyncMotionValueAnimation };
@@ -1,127 +0,0 @@
1
- import { clamp } from "../../../../motion-utils/dist/es/clamp.js";
2
- import { invariant } from "../../../../motion-utils/dist/es/errors.js";
3
- import { pipe } from "../../../../motion-utils/dist/es/pipe.js";
4
- import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../motion-utils/dist/es/time-conversion.js";
5
- import { time } from "../frameloop/sync-time.js";
6
- import { mix } from "../utils/mix/index.js";
7
- import { frameloopDriver } from "./drivers/frame.js";
8
- import { calcGeneratorDuration } from "./generators/utils/calc-duration.js";
9
- import { getGeneratorVelocity } from "./generators/utils/velocity.js";
10
- import { inertia } from "./generators/inertia.js";
11
- import { keyframes } from "./generators/keyframes.js";
12
- import { getFinalKeyframe } from "./keyframes/get-final.js";
13
- import { replaceTransitionType } from "./utils/replace-transition-type.js";
14
- import { WithPromise } from "./utils/WithPromise.js";
15
- var percentToProgress = (e) => e / 100, JSAnimation = class extends WithPromise {
16
- constructor(e) {
17
- super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
18
- done: !1,
19
- value: void 0
20
- }, this.stop = () => {
21
- let { motionValue: e } = this.options;
22
- e && e.updatedAt !== time.now() && this.tick(time.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
23
- }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
24
- }
25
- initAnimation() {
26
- let { options: e } = this;
27
- replaceTransitionType(e);
28
- let { type: r = keyframes, repeat: i = 0, repeatDelay: a = 0, repeatType: s, velocity: l = 0 } = e, { keyframes: u } = e, f = r || keyframes;
29
- process.env.NODE_ENV !== "production" && f !== keyframes && invariant(u.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`, "spring-two-frames"), f !== keyframes && typeof u[0] != "number" && (this.mixKeyframes = pipe(percentToProgress, mix(u[0], u[1])), u = [0, 100]);
30
- let m = f({
31
- ...e,
32
- keyframes: u
33
- });
34
- s === "mirror" && (this.mirroredGenerator = f({
35
- ...e,
36
- keyframes: [...u].reverse(),
37
- velocity: -l
38
- })), m.calculatedDuration === null && (m.calculatedDuration = calcGeneratorDuration(m));
39
- let { calculatedDuration: g } = m;
40
- this.calculatedDuration = g, this.resolvedDuration = g + a, this.totalDuration = this.resolvedDuration * (i + 1) - a, this.generator = m;
41
- }
42
- updateTime(e) {
43
- let t = Math.round(e - this.startTime) * this.playbackSpeed;
44
- this.holdTime === null ? this.currentTime = t : this.currentTime = this.holdTime;
45
- }
46
- tick(t, n = !1) {
47
- let { generator: r, totalDuration: i, mixKeyframes: a, mirroredGenerator: o, resolvedDuration: s, calculatedDuration: c } = this;
48
- if (this.startTime === null) return r.next(0);
49
- let { delay: l = 0, keyframes: d, repeat: p, repeatType: m, repeatDelay: h, type: g, onUpdate: _, finalKeyframe: v } = this.options;
50
- this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - i / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
51
- let y = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), b = this.playbackSpeed >= 0 ? y < 0 : y > i;
52
- this.currentTime = Math.max(y, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
53
- let x = this.currentTime, S = r;
54
- if (p) {
55
- let t = Math.min(this.currentTime, i) / s, n = Math.floor(t), r = t % 1;
56
- !r && t >= 1 && (r = 1), r === 1 && n--, n = Math.min(n, p + 1), n % 2 && (m === "reverse" ? (r = 1 - r, h && (r -= h / s)) : m === "mirror" && (S = o)), x = clamp(0, 1, r) * s;
57
- }
58
- let C;
59
- b ? (this.delayState.value = d[0], C = this.delayState) : C = S.next(x), a && !b && (C.value = a(C.value));
60
- let { done: w } = C;
61
- !b && c !== null && (w = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
62
- let T = this.holdTime === null && (this.state === "finished" || this.state === "running" && w);
63
- return T && g !== inertia && (C.value = getFinalKeyframe(d, this.options, v, this.speed)), _ && _(C.value), T && this.finish(), C;
64
- }
65
- then(e, t) {
66
- return this.finished.then(e, t);
67
- }
68
- get duration() {
69
- return millisecondsToSeconds(this.calculatedDuration);
70
- }
71
- get iterationDuration() {
72
- let { delay: e = 0 } = this.options || {};
73
- return this.duration + millisecondsToSeconds(e);
74
- }
75
- get time() {
76
- return millisecondsToSeconds(this.currentTime);
77
- }
78
- set time(e) {
79
- e = secondsToMilliseconds(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
80
- }
81
- getGeneratorVelocity() {
82
- let e = this.currentTime;
83
- if (e <= 0) return this.options.velocity || 0;
84
- if (this.generator.velocity) return this.generator.velocity(e);
85
- let t = this.generator.next(e).value;
86
- return getGeneratorVelocity((e) => this.generator.next(e).value, e, t);
87
- }
88
- get speed() {
89
- return this.playbackSpeed;
90
- }
91
- set speed(e) {
92
- let t = this.playbackSpeed !== e;
93
- t && this.driver && this.updateTime(time.now()), this.playbackSpeed = e, t && this.driver && (this.time = millisecondsToSeconds(this.currentTime));
94
- }
95
- play() {
96
- if (this.isStopped) return;
97
- let { driver: e = frameloopDriver, startTime: t } = this.options;
98
- this.driver ||= e((e) => this.tick(e)), this.options.onPlay?.();
99
- let n = this.driver.now();
100
- this.state === "finished" ? (this.updateFinished(), this.startTime = n) : this.holdTime === null ? this.startTime ||= t ?? n : this.startTime = n - this.holdTime, this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
101
- }
102
- pause() {
103
- this.state = "paused", this.updateTime(time.now()), this.holdTime = this.currentTime;
104
- }
105
- complete() {
106
- this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
107
- }
108
- finish() {
109
- this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
110
- }
111
- cancel() {
112
- this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
113
- }
114
- teardown() {
115
- this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
116
- }
117
- stopDriver() {
118
- this.driver &&= (this.driver.stop(), void 0);
119
- }
120
- sample(e) {
121
- return this.startTime = 0, this.tick(e, !0);
122
- }
123
- attachTimeline(e) {
124
- return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
125
- }
126
- };
127
- export { JSAnimation };
@@ -1,82 +0,0 @@
1
- import { invariant } from "../../../../motion-utils/dist/es/errors.js";
2
- import { noop } from "../../../../motion-utils/dist/es/noop.js";
3
- import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../motion-utils/dist/es/time-conversion.js";
4
- import { getFinalKeyframe } from "./keyframes/get-final.js";
5
- import { WithPromise } from "./utils/WithPromise.js";
6
- import { setStyle } from "../render/dom/style-set.js";
7
- import { supportsScrollTimeline } from "../utils/supports/scroll-timeline.js";
8
- import { startWaapiAnimation } from "./waapi/start-waapi-animation.js";
9
- import { applyGeneratorOptions } from "./waapi/utils/apply-generator.js";
10
- var NativeAnimation = class extends WithPromise {
11
- constructor(i) {
12
- if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !i) return;
13
- let { element: a, name: o, keyframes: c, pseudoElement: l, allowFlatten: u = !1, finalKeyframe: d, onComplete: f } = i;
14
- this.isPseudoElement = !!l, this.allowFlatten = u, this.options = i, invariant(typeof i.type != "string", "Mini animate() doesn't support \"type\" as a string.", "mini-spring");
15
- let p = applyGeneratorOptions(i);
16
- this.animation = startWaapiAnimation(a, o, c, p, l), p.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
17
- if (this.finishedTime = this.time, !l) {
18
- let e = getFinalKeyframe(c, this.options, d, this.speed);
19
- this.updateMotionValue && this.updateMotionValue(e), setStyle(a, o, e), this.animation.cancel();
20
- }
21
- f?.(), this.notifyFinished();
22
- };
23
- }
24
- play() {
25
- this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
26
- }
27
- pause() {
28
- this.animation.pause();
29
- }
30
- complete() {
31
- this.animation.finish?.();
32
- }
33
- cancel() {
34
- try {
35
- this.animation.cancel();
36
- } catch {}
37
- }
38
- stop() {
39
- if (this.isStopped) return;
40
- this.isStopped = !0;
41
- let { state: e } = this;
42
- e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
43
- }
44
- commitStyles() {
45
- let e = this.options?.element;
46
- !this.isPseudoElement && e?.isConnected && this.animation.commitStyles?.();
47
- }
48
- get duration() {
49
- let e = this.animation.effect?.getComputedTiming?.().duration || 0;
50
- return millisecondsToSeconds(Number(e));
51
- }
52
- get iterationDuration() {
53
- let { delay: e = 0 } = this.options || {};
54
- return this.duration + millisecondsToSeconds(e);
55
- }
56
- get time() {
57
- return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
58
- }
59
- set time(e) {
60
- let i = this.finishedTime !== null;
61
- this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = secondsToMilliseconds(e), i && this.animation.pause();
62
- }
63
- get speed() {
64
- return this.animation.playbackRate;
65
- }
66
- set speed(e) {
67
- e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
68
- }
69
- get state() {
70
- return this.finishedTime === null ? this.animation.playState : "finished";
71
- }
72
- get startTime() {
73
- return this.manualStartTime ?? Number(this.animation.startTime);
74
- }
75
- set startTime(e) {
76
- this.manualStartTime = this.animation.startTime = e;
77
- }
78
- attachTimeline({ timeline: e, rangeStart: a, rangeEnd: o, observe: s }) {
79
- return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && supportsScrollTimeline() ? (this.animation.timeline = e, a && (this.animation.rangeStart = a), o && (this.animation.rangeEnd = o), noop) : s(this);
80
- }
81
- };
82
- export { NativeAnimation };
@@ -1,26 +0,0 @@
1
- import { clamp } from "../../../../motion-utils/dist/es/clamp.js";
2
- import { time } from "../frameloop/sync-time.js";
3
- import { replaceTransitionType } from "./utils/replace-transition-type.js";
4
- import { JSAnimation } from "./JSAnimation.js";
5
- import { setStyle } from "../render/dom/style-set.js";
6
- import { NativeAnimation } from "./NativeAnimation.js";
7
- import { replaceStringEasing } from "./waapi/utils/unsupported-easing.js";
8
- var sampleDelta = 10, NativeAnimationExtended = class extends NativeAnimation {
9
- constructor(e) {
10
- replaceStringEasing(e), replaceTransitionType(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
11
- }
12
- updateMotionValue(a) {
13
- let { motionValue: o, onUpdate: s, onComplete: c, element: l, ...u } = this.options;
14
- if (!o) return;
15
- if (a !== void 0) {
16
- o.set(a);
17
- return;
18
- }
19
- let d = new JSAnimation({
20
- ...u,
21
- autoplay: !1
22
- }), f = Math.max(sampleDelta, time.now() - this.startTime), p = clamp(0, sampleDelta, f - sampleDelta), m = d.sample(f).value, { name: h } = this.options;
23
- l && h && setStyle(l, h, m), o.setWithVelocity(d.sample(Math.max(0, f - p)).value, m, p), d.stop();
24
- }
25
- };
26
- export { NativeAnimationExtended };
@@ -1,8 +0,0 @@
1
- import { motionValue } from "../../value/index.js";
2
- import { animateMotionValue } from "../interfaces/motion-value.js";
3
- import { isMotionValue } from "../../value/utils/is-motion-value.js";
4
- function animateSingleValue(r, i, a) {
5
- let o = isMotionValue(r) ? r : motionValue(r);
6
- return o.start(animateMotionValue("", o, i, a)), o.animation;
7
- }
8
- export { animateSingleValue };
@@ -1,11 +0,0 @@
1
- import { cancelFrame, frame, frameData } from "../../frameloop/frame.js";
2
- import { time } from "../../frameloop/sync-time.js";
3
- var frameloopDriver = (i) => {
4
- let a = ({ timestamp: e }) => i(e);
5
- return {
6
- start: (e = !0) => frame.update(a, e),
7
- stop: () => cancelFrame(a),
8
- now: () => frameData.isProcessing ? frameData.timestamp : time.now()
9
- };
10
- };
11
- export { frameloopDriver };
@@ -1,30 +0,0 @@
1
- import { spring } from "./spring.js";
2
- import { getGeneratorVelocity } from "./utils/velocity.js";
3
- function inertia({ keyframes: n, velocity: r = 0, power: i = .8, timeConstant: a = 325, bounceDamping: o = 10, bounceStiffness: s = 500, modifyTarget: c, min: l, max: u, restDelta: d = .5, restSpeed: f }) {
4
- let p = n[0], m = {
5
- done: !1,
6
- value: p
7
- }, h = (e) => l !== void 0 && e < l || u !== void 0 && e > u, g = (e) => l === void 0 ? u : u === void 0 || Math.abs(l - e) < Math.abs(u - e) ? l : u, _ = i * r, v = p + _, y = c === void 0 ? v : c(v);
8
- y !== v && (_ = y - p);
9
- let b = (e) => -_ * Math.exp(-e / a), x = (e) => y + b(e), S = (e) => {
10
- let t = b(e), n = x(e);
11
- m.done = Math.abs(t) <= d, m.value = m.done ? y : n;
12
- }, C, w, T = (n) => {
13
- h(m.value) && (C = n, w = spring({
14
- keyframes: [m.value, g(m.value)],
15
- velocity: getGeneratorVelocity(x, n, m.value),
16
- damping: o,
17
- stiffness: s,
18
- restDelta: d,
19
- restSpeed: f
20
- }));
21
- };
22
- return T(0), {
23
- calculatedDuration: null,
24
- next: (e) => {
25
- let t = !1;
26
- return !w && C === void 0 && (t = !0, S(e), T(e)), C !== void 0 && e >= C ? w.next(e - C) : (!t && S(e), m);
27
- }
28
- };
29
- }
30
- export { inertia };
@@ -1,20 +0,0 @@
1
- import { easeInOut } from "../../../../../motion-utils/dist/es/easing/ease.js";
2
- import { isEasingArray } from "../../../../../motion-utils/dist/es/easing/utils/is-easing-array.js";
3
- import { easingDefinitionToFunction } from "../../../../../motion-utils/dist/es/easing/utils/map.js";
4
- import { interpolate } from "../../utils/interpolate.js";
5
- import { defaultOffset } from "../keyframes/offsets/default.js";
6
- import { convertOffsetToTimes } from "../keyframes/offsets/time.js";
7
- function defaultEasing(a, o) {
8
- return a.map(() => o || easeInOut).splice(0, a.length - 1);
9
- }
10
- function keyframes({ duration: e = 300, keyframes: s, times: c, ease: l = "easeInOut" }) {
11
- let u = isEasingArray(l) ? l.map(easingDefinitionToFunction) : easingDefinitionToFunction(l), d = {
12
- done: !1,
13
- value: s[0]
14
- }, f = interpolate(convertOffsetToTimes(c && c.length === s.length ? c : defaultOffset(s), e), s, { ease: Array.isArray(u) ? u : defaultEasing(s, u) });
15
- return {
16
- calculatedDuration: e,
17
- next: (a) => (d.value = f(a), d.done = a >= e, d)
18
- };
19
- }
20
- export { defaultEasing, keyframes };
@@ -1,164 +0,0 @@
1
- import { clamp } from "../../../../../motion-utils/dist/es/clamp.js";
2
- import { warning } from "../../../../../motion-utils/dist/es/errors.js";
3
- import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../motion-utils/dist/es/time-conversion.js";
4
- import { generateLinearEasing } from "../waapi/utils/linear.js";
5
- import { calcGeneratorDuration, maxGeneratorDuration } from "./utils/calc-duration.js";
6
- import { createGeneratorEasing } from "./utils/create-generator-easing.js";
7
- var springDefaults = {
8
- stiffness: 100,
9
- damping: 10,
10
- mass: 1,
11
- velocity: 0,
12
- duration: 800,
13
- bounce: .3,
14
- visualDuration: .3,
15
- restSpeed: {
16
- granular: .01,
17
- default: 2
18
- },
19
- restDelta: {
20
- granular: .005,
21
- default: .5
22
- },
23
- minDuration: .01,
24
- maxDuration: 10,
25
- minDamping: .05,
26
- maxDamping: 1
27
- };
28
- function calcAngularFreq(n, i) {
29
- return n * Math.sqrt(1 - i * i);
30
- }
31
- var rootIterations = 12;
32
- function approximateRoot(n, i, a) {
33
- let o = a;
34
- for (let a = 1; a < rootIterations; a++) o -= n(o) / i(o);
35
- return o;
36
- }
37
- var safeMin = .001;
38
- function findSpring({ duration: s = springDefaults.duration, bounce: c = springDefaults.bounce, velocity: l = springDefaults.velocity, mass: u = springDefaults.mass }) {
39
- let d, m;
40
- warning(s <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
41
- let h = 1 - c;
42
- h = clamp(springDefaults.minDamping, springDefaults.maxDamping, h), s = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(s)), h < 1 ? (d = (n) => {
43
- let i = n * h, a = i * s, o = i - l, c = calcAngularFreq(n, h), u = Math.exp(-a);
44
- return safeMin - o / c * u;
45
- }, m = (n) => {
46
- let i = n * h * s, a = i * l + l, o = h ** 2 * n ** 2 * s, c = Math.exp(-i), u = calcAngularFreq(n ** 2, h);
47
- return (-d(n) + safeMin > 0 ? -1 : 1) * ((a - o) * c) / u;
48
- }) : (d = (n) => {
49
- let i = Math.exp(-n * s), a = (n - l) * s + 1;
50
- return -safeMin + i * a;
51
- }, m = (n) => Math.exp(-n * s) * ((l - n) * (s * s)));
52
- let g = 5 / s, _ = approximateRoot(d, m, g);
53
- if (s = secondsToMilliseconds(s), isNaN(_)) return {
54
- stiffness: springDefaults.stiffness,
55
- damping: springDefaults.damping,
56
- duration: s
57
- };
58
- {
59
- let n = _ ** 2 * u;
60
- return {
61
- stiffness: n,
62
- damping: h * 2 * Math.sqrt(u * n),
63
- duration: s
64
- };
65
- }
66
- }
67
- var durationKeys = ["duration", "bounce"], physicsKeys = [
68
- "stiffness",
69
- "damping",
70
- "mass"
71
- ];
72
- function isSpringType(n, i) {
73
- return i.some((i) => n[i] !== void 0);
74
- }
75
- function getSpringOptions(i) {
76
- let a = {
77
- velocity: springDefaults.velocity,
78
- stiffness: springDefaults.stiffness,
79
- damping: springDefaults.damping,
80
- mass: springDefaults.mass,
81
- isResolvedFromDuration: !1,
82
- ...i
83
- };
84
- if (!isSpringType(i, physicsKeys) && isSpringType(i, durationKeys)) if (a.velocity = 0, i.visualDuration) {
85
- let o = i.visualDuration, s = 2 * Math.PI / (o * 1.2), c = s * s, l = 2 * clamp(.05, 1, 1 - (i.bounce || 0)) * Math.sqrt(c);
86
- a = {
87
- ...a,
88
- mass: springDefaults.mass,
89
- stiffness: c,
90
- damping: l
91
- };
92
- } else {
93
- let n = findSpring({
94
- ...i,
95
- velocity: 0
96
- });
97
- a = {
98
- ...a,
99
- ...n,
100
- mass: springDefaults.mass
101
- }, a.isResolvedFromDuration = !0;
102
- }
103
- return a;
104
- }
105
- function spring(n = springDefaults.visualDuration, i = springDefaults.bounce) {
106
- let u = typeof n == "object" ? n : {
107
- visualDuration: n,
108
- keyframes: [0, 1],
109
- bounce: i
110
- }, { restSpeed: d, restDelta: f } = u, p = u.keyframes[0], m = u.keyframes[u.keyframes.length - 1], h = {
111
- done: !1,
112
- value: p
113
- }, { stiffness: g, damping: _, mass: v, duration: y, velocity: b, isResolvedFromDuration: x } = getSpringOptions({
114
- ...u,
115
- velocity: -millisecondsToSeconds(u.velocity || 0)
116
- }), S = b || 0, C = _ / (2 * Math.sqrt(g * v)), w = m - p, T = millisecondsToSeconds(Math.sqrt(g / v)), E = Math.abs(w) < 5;
117
- d ||= E ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default, f ||= E ? springDefaults.restDelta.granular : springDefaults.restDelta.default;
118
- let D, O, k, A, j, M;
119
- if (C < 1) k = calcAngularFreq(T, C), A = (S + C * T * w) / k, D = (n) => m - Math.exp(-C * T * n) * (A * Math.sin(k * n) + w * Math.cos(k * n)), j = C * T * A + w * k, M = C * T * w - A * k, O = (n) => Math.exp(-C * T * n) * (j * Math.sin(k * n) + M * Math.cos(k * n));
120
- else if (C === 1) {
121
- D = (n) => m - Math.exp(-T * n) * (w + (S + T * w) * n);
122
- let n = S + T * w;
123
- O = (i) => Math.exp(-T * i) * (T * n * i - S);
124
- } else {
125
- let n = T * Math.sqrt(C * C - 1);
126
- D = (i) => {
127
- let a = Math.exp(-C * T * i), o = Math.min(n * i, 300);
128
- return m - a * ((S + C * T * w) * Math.sinh(o) + n * w * Math.cosh(o)) / n;
129
- };
130
- let i = (S + C * T * w) / n, a = C * T * i - w * n, o = C * T * w - i * n;
131
- O = (i) => {
132
- let s = Math.exp(-C * T * i), c = Math.min(n * i, 300);
133
- return s * (a * Math.sinh(c) + o * Math.cosh(c));
134
- };
135
- }
136
- let N = {
137
- calculatedDuration: x && y || null,
138
- velocity: (n) => secondsToMilliseconds(O(n)),
139
- next: (n) => {
140
- if (!x && C < 1) {
141
- let i = Math.exp(-C * T * n), a = Math.sin(k * n), s = Math.cos(k * n), c = m - i * (A * a + w * s), l = secondsToMilliseconds(i * (j * a + M * s));
142
- return h.done = Math.abs(l) <= d && Math.abs(m - c) <= f, h.value = h.done ? m : c, h;
143
- }
144
- let i = D(n);
145
- if (x) h.done = n >= y;
146
- else {
147
- let a = secondsToMilliseconds(O(n));
148
- h.done = Math.abs(a) <= d && Math.abs(m - i) <= f;
149
- }
150
- return h.value = h.done ? m : i, h;
151
- },
152
- toString: () => {
153
- let n = Math.min(calcGeneratorDuration(N), maxGeneratorDuration), i = generateLinearEasing((i) => N.next(n * i).value, n, 30);
154
- return n + "ms " + i;
155
- },
156
- toTransition: () => {}
157
- };
158
- return N;
159
- }
160
- spring.applyToOptions = (n) => {
161
- let i = createGeneratorEasing(n, 100, spring);
162
- return n.ease = i.ease, n.duration = secondsToMilliseconds(i.duration), n.type = "keyframes", n;
163
- };
164
- export { spring };
@@ -1,7 +0,0 @@
1
- var maxGeneratorDuration = 2e4;
2
- function calcGeneratorDuration(e) {
3
- let t = 0, n = e.next(t);
4
- for (; !n.done && t < 2e4;) t += 50, n = e.next(t);
5
- return t >= 2e4 ? Infinity : t;
6
- }
7
- export { calcGeneratorDuration, maxGeneratorDuration };
@@ -1,14 +0,0 @@
1
- import { millisecondsToSeconds } from "../../../../../../motion-utils/dist/es/time-conversion.js";
2
- import { calcGeneratorDuration, maxGeneratorDuration } from "./calc-duration.js";
3
- function createGeneratorEasing(r, i = 100, a) {
4
- let o = a({
5
- ...r,
6
- keyframes: [0, i]
7
- }), s = Math.min(calcGeneratorDuration(o), maxGeneratorDuration);
8
- return {
9
- type: "keyframes",
10
- ease: (e) => o.next(s * e).value / i,
11
- duration: millisecondsToSeconds(s)
12
- };
13
- }
14
- export { createGeneratorEasing };
@@ -1,4 +0,0 @@
1
- function isGenerator(e) {
2
- return typeof e == "function" && "applyToOptions" in e;
3
- }
4
- export { isGenerator };
@@ -1,7 +0,0 @@
1
- import { velocityPerSecond } from "../../../../../../motion-utils/dist/es/velocity-per-second.js";
2
- var velocitySampleDuration = 5;
3
- function getGeneratorVelocity(n, r, i) {
4
- let a = Math.max(r - velocitySampleDuration, 0);
5
- return velocityPerSecond(i - n(a), r - a);
6
- }
7
- export { getGeneratorVelocity };
@@ -1,43 +0,0 @@
1
- import { MotionGlobalConfig } from "../../../../../motion-utils/dist/es/global-config.js";
2
- import { secondsToMilliseconds } from "../../../../../motion-utils/dist/es/time-conversion.js";
3
- import { frame } from "../../frameloop/frame.js";
4
- import { getFinalKeyframe } from "../keyframes/get-final.js";
5
- import { JSAnimation } from "../JSAnimation.js";
6
- import { makeAnimationInstant } from "../utils/make-animation-instant.js";
7
- import { AsyncMotionValueAnimation } from "../AsyncMotionValueAnimation.js";
8
- import { getValueTransition } from "../utils/get-value-transition.js";
9
- import { getDefaultTransition } from "../utils/default-transitions.js";
10
- import { isTransitionDefined } from "../utils/is-transition-defined.js";
11
- var animateMotionValue = (u, d, f, p = {}, m, h) => (g) => {
12
- let _ = getValueTransition(p, u) || {}, v = _.delay || p.delay || 0, { elapsed: y = 0 } = p;
13
- y -= secondsToMilliseconds(v);
14
- let b = {
15
- keyframes: Array.isArray(f) ? f : [null, f],
16
- ease: "easeOut",
17
- velocity: d.getVelocity(),
18
- ..._,
19
- delay: -y,
20
- onUpdate: (e) => {
21
- d.set(e), _.onUpdate && _.onUpdate(e);
22
- },
23
- onComplete: () => {
24
- g(), _.onComplete && _.onComplete();
25
- },
26
- name: u,
27
- motionValue: d,
28
- element: h ? void 0 : m
29
- };
30
- isTransitionDefined(_) || Object.assign(b, getDefaultTransition(u, b)), b.duration &&= secondsToMilliseconds(b.duration), b.repeatDelay &&= secondsToMilliseconds(b.repeatDelay), b.from !== void 0 && (b.keyframes[0] = b.from);
31
- let x = !1;
32
- if ((b.type === !1 || b.duration === 0 && !b.repeatDelay) && (makeAnimationInstant(b), b.delay === 0 && (x = !0)), (MotionGlobalConfig.instantAnimations || MotionGlobalConfig.skipAnimations || m?.shouldSkipAnimations || _.skipAnimations) && (x = !0, makeAnimationInstant(b), b.delay = 0), b.allowFlatten = !_.type && !_.ease, x && !h && d.get() !== void 0) {
33
- let e = getFinalKeyframe(b.keyframes, _);
34
- if (e !== void 0) {
35
- frame.update(() => {
36
- b.onUpdate(e), b.onComplete();
37
- });
38
- return;
39
- }
40
- }
41
- return _.isSync ? new JSAnimation(b) : new AsyncMotionValueAnimation(b);
42
- };
43
- export { animateMotionValue };