@pibit.ai/cure-design-system 0.3.6 → 0.3.8

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 (303) hide show
  1. package/dist/foundations/dot-icon/index.d.ts +7 -0
  2. package/dist/foundations/dot-icon/index.d.ts.map +1 -0
  3. package/dist/foundations/dot-icon/index.js +10 -0
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +42 -36
  7. package/dist/patterns/table/TableWrapper.d.ts +6 -3
  8. package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
  9. package/dist/patterns/table/TableWrapper.js +80 -76
  10. package/dist/patterns/table/table.d.ts +5 -3
  11. package/dist/patterns/table/table.d.ts.map +1 -1
  12. package/dist/patterns/table/table.js +195 -173
  13. package/dist/patterns/tree-view/index.d.ts +2 -0
  14. package/dist/patterns/tree-view/index.d.ts.map +1 -0
  15. package/dist/patterns/tree-view/tree-view.d.ts +61 -0
  16. package/dist/patterns/tree-view/tree-view.d.ts.map +1 -0
  17. package/dist/patterns/tree-view/tree-view.js +167 -0
  18. package/dist/primitives/badge/badge-types.d.ts +17 -0
  19. package/dist/primitives/badge/badge-types.d.ts.map +1 -0
  20. package/dist/primitives/badge/badge-types.js +8 -0
  21. package/dist/primitives/badge/badge.d.ts +115 -22
  22. package/dist/primitives/badge/badge.d.ts.map +1 -1
  23. package/dist/primitives/badge/badge.js +272 -38
  24. package/dist/primitives/badge/index.d.ts +2 -1
  25. package/dist/primitives/badge/index.d.ts.map +1 -1
  26. package/dist/primitives/heading/heading.d.ts +1 -1
  27. package/dist/primitives/text/text.d.ts +1 -1
  28. package/dist/styles/components.css +1 -1
  29. package/package.json +2 -1
  30. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
  31. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -34
  32. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
  33. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
  34. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
  35. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
  36. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
  37. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
  38. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
  39. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
  40. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
  41. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
  42. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
  43. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
  44. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
  45. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -277
  46. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
  47. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
  48. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
  49. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
  50. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -131
  51. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
  52. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -23
  53. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -27
  54. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -34
  55. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
  56. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
  57. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
  58. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
  59. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
  60. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
  61. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
  62. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
  63. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
  64. package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -63
  65. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
  66. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -22
  67. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -66
  68. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
  69. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -38
  70. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
  71. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
  72. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
  73. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
  74. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
  75. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -20
  76. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
  77. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
  78. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
  79. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
  80. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
  81. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
  82. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
  83. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
  84. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
  85. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
  86. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
  87. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
  88. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
  89. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
  90. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
  91. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -106
  92. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -133
  93. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -109
  94. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -37
  95. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
  96. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
  97. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
  98. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
  99. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.js +0 -32
  100. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +0 -52
  101. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +0 -98
  102. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
  103. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
  104. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
  105. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
  106. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
  107. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -49
  108. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -30
  109. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
  110. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -69
  111. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -75
  112. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
  113. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
  114. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
  115. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
  116. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
  117. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
  118. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
  119. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -31
  120. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
  121. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
  122. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
  123. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
  124. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
  125. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
  126. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
  127. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-final-keyframe.js +0 -8
  128. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
  129. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
  130. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
  131. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -6
  132. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
  133. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
  134. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
  135. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
  136. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
  137. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
  138. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -24
  139. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
  140. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
  141. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
  142. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
  143. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
  144. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
  145. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
  146. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
  147. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -41
  148. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
  149. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
  150. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
  151. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -24
  152. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -33
  153. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -13
  154. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
  155. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
  156. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
  157. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
  158. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
  159. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -27
  160. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
  161. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
  162. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -52
  163. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -36
  164. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
  165. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
  166. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
  167. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -16
  168. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
  169. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -623
  170. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
  171. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -60
  172. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
  173. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
  174. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
  175. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
  176. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
  177. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
  178. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
  179. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
  180. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
  181. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
  182. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -247
  183. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
  184. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
  185. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
  186. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
  187. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
  188. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -38
  189. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -29
  190. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -37
  191. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
  192. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -14
  193. package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
  194. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
  195. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
  196. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
  197. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
  198. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
  199. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
  200. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  201. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -141
  202. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
  203. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
  204. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
  205. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
  206. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
  207. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
  208. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
  209. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
  210. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
  211. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
  212. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
  213. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
  214. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
  215. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
  216. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
  217. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
  218. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
  219. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
  220. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
  221. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
  222. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
  223. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
  224. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
  225. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
  226. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
  227. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
  228. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
  229. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
  230. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
  231. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
  232. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
  233. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
  234. package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -215
  235. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
  236. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
  237. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
  238. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
  239. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
  240. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
  241. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
  242. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
  243. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -49
  244. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
  245. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
  246. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -24
  247. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
  248. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -31
  249. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
  250. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
  251. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
  252. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
  253. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
  254. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
  255. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
  256. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
  257. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
  258. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
  259. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
  260. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
  261. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
  262. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
  263. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
  264. package/dist/node_modules/motion-utils/dist/es/array.js +0 -11
  265. package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
  266. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
  267. package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
  268. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
  269. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -18
  270. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
  271. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
  272. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
  273. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
  274. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
  275. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
  276. package/dist/node_modules/motion-utils/dist/es/errors.js +0 -15
  277. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
  278. package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
  279. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
  280. package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -6
  281. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
  282. package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
  283. package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
  284. package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
  285. package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
  286. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
  287. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
  288. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -6
  289. package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
  290. package/dist/patterns/tree/TreeDemo.d.ts +0 -7
  291. package/dist/patterns/tree/TreeDemo.d.ts.map +0 -1
  292. package/dist/patterns/tree/TreeStructure.d.ts +0 -14
  293. package/dist/patterns/tree/TreeStructure.d.ts.map +0 -1
  294. package/dist/patterns/tree/TreeStructure.js +0 -110
  295. package/dist/patterns/tree/constants.d.ts +0 -18
  296. package/dist/patterns/tree/constants.d.ts.map +0 -1
  297. package/dist/patterns/tree/helper.d.ts +0 -6
  298. package/dist/patterns/tree/helper.d.ts.map +0 -1
  299. package/dist/patterns/tree/helper.js +0 -21
  300. package/dist/patterns/tree/index.d.ts +0 -4
  301. package/dist/patterns/tree/index.d.ts.map +0 -1
  302. package/dist/patterns/tree/interface.d.ts +0 -9
  303. package/dist/patterns/tree/interface.d.ts.map +0 -1
@@ -1,66 +0,0 @@
1
- import { useContext as s, useRef as l, useInsertionEffect as k, useEffect as S } from "react";
2
- import { LazyContext as L } from "../../context/LazyContext.js";
3
- import { MotionConfigContext as O } from "../../context/MotionConfigContext.js";
4
- import { MotionContext as R } from "../../context/MotionContext/index.js";
5
- import { PresenceContext as b } from "../../context/PresenceContext.js";
6
- import { SwitchLayoutGroupContext as H } from "../../context/SwitchLayoutGroupContext.js";
7
- import { isRefObject as z } from "../../utils/is-ref-object.js";
8
- import { useIsomorphicLayoutEffect as P } from "../../utils/use-isomorphic-effect.js";
9
- import { optimizedAppearDataAttribute as B } from "../../../../../motion-dom/dist/es/animation/optimized-appear/data-id.js";
10
- function W(o, u, n, e, f, a) {
11
- var w, h;
12
- const { visualElement: C } = s(R), c = s(L), i = s(b), d = s(O), y = d.reducedMotion, j = d.skipAnimations, r = l(null), M = l(!1);
13
- e = e || c.renderer, !r.current && e && (r.current = e(o, {
14
- visualState: u,
15
- parent: C,
16
- props: n,
17
- presenceContext: i,
18
- blockInitialAnimation: i ? i.initial === !1 : !1,
19
- reducedMotionConfig: y,
20
- skipAnimations: j,
21
- isSVG: a
22
- }), M.current && r.current && (r.current.manuallyAnimateOnMount = !0));
23
- const t = r.current, I = s(H);
24
- t && !t.projection && f && (t.type === "html" || t.type === "svg") && G(r.current, n, f, I);
25
- const g = l(!1);
26
- k(() => {
27
- t && g.current && t.update(n, i);
28
- });
29
- const m = n[B], p = l(!!m && !((w = window.MotionHandoffIsComplete) != null && w.call(window, m)) && ((h = window.MotionHasOptimisedAnimation) == null ? void 0 : h.call(window, m)));
30
- return P(() => {
31
- M.current = !0, t && (g.current = !0, window.MotionIsMounted = !0, t.updateFeatures(), t.scheduleRenderMicrotask(), p.current && t.animationState && t.animationState.animateChanges());
32
- }), S(() => {
33
- t && (!p.current && t.animationState && t.animationState.animateChanges(), p.current && (queueMicrotask(() => {
34
- var x;
35
- (x = window.MotionHandoffMarkAsComplete) == null || x.call(window, m);
36
- }), p.current = !1), t.enteringChildren = void 0);
37
- }), t;
38
- }
39
- function G(o, u, n, e) {
40
- const { layoutId: f, layout: a, drag: C, dragConstraints: c, layoutScroll: i, layoutRoot: d, layoutCrossfade: y } = u;
41
- o.projection = new n(o.latestValues, u["data-framer-portal-id"] ? void 0 : A(o.parent)), o.projection.setOptions({
42
- layoutId: f,
43
- layout: a,
44
- alwaysMeasureLayout: !!C || c && z(c),
45
- visualElement: o,
46
- /**
47
- * TODO: Update options in an effect. This could be tricky as it'll be too late
48
- * to update by the time layout animations run.
49
- * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
50
- * ensuring it gets called if there's no potential layout animations.
51
- *
52
- */
53
- animationType: typeof a == "string" ? a : "both",
54
- initialPromotionConfig: e,
55
- crossfade: y,
56
- layoutScroll: i,
57
- layoutRoot: d
58
- });
59
- }
60
- function A(o) {
61
- if (o)
62
- return o.options.allowProjection !== !1 ? o.projection : A(o.parent);
63
- }
64
- export {
65
- W as useVisualElement
66
- };
@@ -1,52 +0,0 @@
1
- import { useContext as C } from "react";
2
- import { MotionContext as x } from "../../context/MotionContext/index.js";
3
- import { PresenceContext as S } from "../../context/PresenceContext.js";
4
- import { useConstant as h } from "../../utils/use-constant.js";
5
- import { resolveMotionValue as M } from "../../../../../motion-dom/dist/es/value/utils/resolve-motion-value.js";
6
- import { isControllingVariants as N, isVariantNode as P } from "../../../../../motion-dom/dist/es/render/utils/is-controlling-variants.js";
7
- import { isAnimationControls as T } from "../../../../../motion-dom/dist/es/render/utils/is-animation-controls.js";
8
- import { resolveVariantFromProps as $ } from "../../../../../motion-dom/dist/es/render/utils/resolve-variants.js";
9
- function b({ scrapeMotionValuesFromProps: t, createRenderState: i }, e, s, n) {
10
- return {
11
- latestValues: p(e, s, n, t),
12
- renderState: i()
13
- };
14
- }
15
- function p(t, i, e, s) {
16
- const n = {}, o = s(t, {});
17
- for (const l in o)
18
- n[l] = M(o[l]);
19
- let { initial: m, animate: u } = t;
20
- const g = N(t), v = P(t);
21
- i && v && !g && t.inherit !== !1 && (m === void 0 && (m = i.initial), u === void 0 && (u = i.animate));
22
- let c = e ? e.initial === !1 : !1;
23
- c = c || m === !1;
24
- const a = c ? u : m;
25
- if (a && typeof a != "boolean" && !T(a)) {
26
- const l = Array.isArray(a) ? a : [a];
27
- for (let d = 0; d < l.length; d++) {
28
- const V = $(t, l[d]);
29
- if (V) {
30
- const { transitionEnd: k, transition: B, ...y } = V;
31
- for (const f in y) {
32
- let r = y[f];
33
- if (Array.isArray(r)) {
34
- const A = c ? r.length - 1 : 0;
35
- r = r[A];
36
- }
37
- r !== null && (n[f] = r);
38
- }
39
- for (const f in k)
40
- n[f] = k[f];
41
- }
42
- }
43
- }
44
- return n;
45
- }
46
- const z = (t) => (i, e) => {
47
- const s = C(x), n = C(S), o = () => b(t, i, s, n);
48
- return e ? o() : h(o);
49
- };
50
- export {
51
- z as makeUseVisualState
52
- };
@@ -1,38 +0,0 @@
1
- const a = /* @__PURE__ */ new Set([
2
- "animate",
3
- "exit",
4
- "variants",
5
- "initial",
6
- "style",
7
- "values",
8
- "variants",
9
- "transition",
10
- "transformTemplate",
11
- "custom",
12
- "inherit",
13
- "onBeforeLayoutMeasure",
14
- "onAnimationStart",
15
- "onAnimationComplete",
16
- "onUpdate",
17
- "onDragStart",
18
- "onDrag",
19
- "onDragEnd",
20
- "onMeasureDragConstraints",
21
- "onDirectionLock",
22
- "onDragTransitionEnd",
23
- "_dragX",
24
- "_dragY",
25
- "onHoverStart",
26
- "onHoverEnd",
27
- "onViewportEnter",
28
- "onViewportLeave",
29
- "globalTapTarget",
30
- "ignoreStrict",
31
- "viewport"
32
- ]);
33
- function n(t) {
34
- return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || a.has(t);
35
- }
36
- export {
37
- n as isValidMotionProp
38
- };
@@ -1,18 +0,0 @@
1
- import { createMotionComponent as e } from "../../motion/index.js";
2
- import { warnOnce as a } from "../../../../../motion-utils/dist/es/warn-once.js";
3
- function u(r, c) {
4
- if (typeof Proxy > "u")
5
- return e;
6
- const o = /* @__PURE__ */ new Map(), i = (n, t) => e(n, t, r, c), f = (n, t) => (process.env.NODE_ENV !== "production" && a(!1, "motion() is deprecated. Use motion.create() instead."), i(n, t));
7
- return new Proxy(f, {
8
- /**
9
- * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
10
- * The prop name is passed through as `key` and we can use that to generate a `motion`
11
- * DOM component with that name.
12
- */
13
- get: (n, t) => t === "create" ? i : (o.has(t) || o.set(t, e(t, void 0, r, c)), o.get(t))
14
- });
15
- }
16
- export {
17
- u as createMotionProxy
18
- };
@@ -1,13 +0,0 @@
1
- import { animations as o } from "../../../motion/features/animations.js";
2
- import { drag as r } from "../../../motion/features/drag.js";
3
- import { gestureAnimations as t } from "../../../motion/features/gestures.js";
4
- import { layout as m } from "../../../motion/features/layout.js";
5
- const f = {
6
- ...o,
7
- ...t,
8
- ...r,
9
- ...m
10
- };
11
- export {
12
- f as featureBundle
13
- };
@@ -1,7 +0,0 @@
1
- import { createDomVisualElement as o } from "../../dom/create-visual-element.js";
2
- import { createMotionProxy as r } from "../create-proxy.js";
3
- import { featureBundle as t } from "./feature-bundle.js";
4
- const n = /* @__PURE__ */ r(t, o);
5
- export {
6
- n as motion
7
- };
@@ -1,10 +0,0 @@
1
- import { Fragment as m } from "react";
2
- import { isSVGComponent as t } from "./utils/is-svg-component.js";
3
- import { SVGVisualElement as o } from "../../../../../motion-dom/dist/es/render/svg/SVGVisualElement.js";
4
- import { HTMLVisualElement as i } from "../../../../../motion-dom/dist/es/render/html/HTMLVisualElement.js";
5
- const G = (r, e) => e.isSVG ?? t(r) ? new o(e) : new i(e, {
6
- allowProjection: r !== m
7
- });
8
- export {
9
- G as createDomVisualElement
10
- };
@@ -1,16 +0,0 @@
1
- import { Fragment as p, useMemo as P, createElement as a } from "react";
2
- import { useHTMLProps as d } from "../html/use-props.js";
3
- import { useSVGProps as V } from "../svg/use-props.js";
4
- import { filterProps as g } from "./utils/filter-props.js";
5
- import { isSVGComponent as h } from "./utils/is-svg-component.js";
6
- import { isMotionValue as M } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
7
- function H(r, s, o, { latestValues: t }, i, m = !1, n) {
8
- const l = (n ?? h(r) ? V : d)(s, t, i, r), u = g(s, typeof r == "string", m), f = r !== p ? { ...u, ...l, ref: o } : {}, { children: e } = s, c = P(() => M(e) ? e.get() : e, [e]);
9
- return a(r, {
10
- ...f,
11
- children: c
12
- });
13
- }
14
- export {
15
- H as useRender
16
- };
@@ -1,20 +0,0 @@
1
- import { isValidMotionProp as e } from "../../../motion/utils/valid-prop.js";
2
- let i = (t) => !e(t);
3
- function f(t) {
4
- typeof t == "function" && (i = (o) => o.startsWith("on") ? !e(o) : t(o));
5
- }
6
- try {
7
- f(require("@emotion/is-prop-valid").default);
8
- } catch {
9
- }
10
- function l(t, o, a) {
11
- const n = {};
12
- for (const r in t)
13
- r === "values" && typeof t.values == "object" || (i(r) || a === !0 && e(r) || !o && !e(r) || // If trying to use native HTML drag events, forward drag listeners
14
- t.draggable && r.startsWith("onDrag")) && (n[r] = t[r]);
15
- return n;
16
- }
17
- export {
18
- l as filterProps,
19
- f as loadExternalIsValidProp
20
- };
@@ -1,24 +0,0 @@
1
- import { lowercaseSVGElements as r } from "../../svg/lowercase-elements.js";
2
- function s(e) {
3
- return (
4
- /**
5
- * If it's not a string, it's a custom React component. Currently we only support
6
- * HTML custom React components.
7
- */
8
- typeof e != "string" || /**
9
- * If it contains a dash, the element is a custom HTML webcomponent.
10
- */
11
- e.includes("-") ? !1 : (
12
- /**
13
- * If it's in our list of lowercase SVG tags, it's an SVG component
14
- */
15
- !!(r.indexOf(e) > -1 || /**
16
- * If it contains a capital letter, it's an SVG component
17
- */
18
- /[A-Z]/u.test(e))
19
- )
20
- );
21
- }
22
- export {
23
- s as isSVGComponent
24
- };
@@ -1,10 +0,0 @@
1
- import { makeUseVisualState as e } from "../../motion/utils/use-visual-state.js";
2
- import { createHtmlRenderState as t } from "./utils/create-render-state.js";
3
- import { scrapeMotionValuesFromProps as r } from "../../../../../motion-dom/dist/es/render/html/utils/scrape-motion-values.js";
4
- const m = /* @__PURE__ */ e({
5
- scrapeMotionValuesFromProps: r,
6
- createRenderState: t
7
- });
8
- export {
9
- m as useHTMLVisualState
10
- };
@@ -1,27 +0,0 @@
1
- import { useMemo as i } from "react";
2
- import { createHtmlRenderState as a } from "./utils/create-render-state.js";
3
- import { isMotionValue as r } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
4
- import { isForcedMotionValue as l } from "../../../../../motion-dom/dist/es/render/utils/is-forced-motion-value.js";
5
- import { buildHTMLStyles as s } from "../../../../../motion-dom/dist/es/render/html/utils/build-styles.js";
6
- function u(t, o, n) {
7
- for (const e in o)
8
- !r(o[e]) && !l(e, n) && (t[e] = o[e]);
9
- }
10
- function c({ transformTemplate: t }, o) {
11
- return i(() => {
12
- const n = a();
13
- return s(n, o, t), Object.assign({}, n.vars, n.style);
14
- }, [o]);
15
- }
16
- function f(t, o) {
17
- const n = t.style || {}, e = {};
18
- return u(e, n, t), Object.assign(e, c(t, o)), e;
19
- }
20
- function M(t, o) {
21
- const n = {}, e = f(t, o);
22
- return t.drag && t.dragListener !== !1 && (n.draggable = !1, e.userSelect = e.WebkitUserSelect = e.WebkitTouchCallout = "none", e.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = e, n;
23
- }
24
- export {
25
- u as copyRawValuesOnly,
26
- M as useHTMLProps
27
- };
@@ -1,9 +0,0 @@
1
- const r = () => ({
2
- style: {},
3
- transform: {},
4
- transformOrigin: {},
5
- vars: {}
6
- });
7
- export {
8
- r as createHtmlRenderState
9
- };
@@ -1,30 +0,0 @@
1
- const e = [
2
- "animate",
3
- "circle",
4
- "defs",
5
- "desc",
6
- "ellipse",
7
- "g",
8
- "image",
9
- "line",
10
- "filter",
11
- "marker",
12
- "mask",
13
- "metadata",
14
- "path",
15
- "pattern",
16
- "polygon",
17
- "polyline",
18
- "rect",
19
- "stop",
20
- "switch",
21
- "symbol",
22
- "svg",
23
- "text",
24
- "tspan",
25
- "use",
26
- "view"
27
- ];
28
- export {
29
- e as lowercaseSVGElements
30
- };
@@ -1,22 +0,0 @@
1
- import { useMemo as m } from "react";
2
- import { copyRawValuesOnly as l } from "../html/use-props.js";
3
- import { createSvgRenderState as i } from "./utils/create-render-state.js";
4
- import { buildSVGAttrs as a } from "../../../../../motion-dom/dist/es/render/svg/utils/build-attrs.js";
5
- import { isSVGTag as n } from "../../../../../motion-dom/dist/es/render/svg/utils/is-svg-tag.js";
6
- function G(e, s, y, o) {
7
- const r = m(() => {
8
- const t = i();
9
- return a(t, s, n(o), e.transformTemplate, e.style), {
10
- ...t.attrs,
11
- style: { ...t.style }
12
- };
13
- }, [s]);
14
- if (e.style) {
15
- const t = {};
16
- l(t, e.style, e), r.style = { ...t, ...r.style };
17
- }
18
- return r;
19
- }
20
- export {
21
- G as useSVGProps
22
- };
@@ -1,10 +0,0 @@
1
- import { makeUseVisualState as e } from "../../motion/utils/use-visual-state.js";
2
- import { createSvgRenderState as r } from "./utils/create-render-state.js";
3
- import { scrapeMotionValuesFromProps as t } from "../../../../../motion-dom/dist/es/render/svg/utils/scrape-motion-values.js";
4
- const m = /* @__PURE__ */ e({
5
- scrapeMotionValuesFromProps: t,
6
- createRenderState: r
7
- });
8
- export {
9
- m as useSVGVisualState
10
- };
@@ -1,8 +0,0 @@
1
- import { createHtmlRenderState as t } from "../../html/utils/create-render-state.js";
2
- const r = () => ({
3
- ...t(),
4
- attrs: {}
5
- });
6
- export {
7
- r as createSvgRenderState
8
- };
@@ -1,9 +0,0 @@
1
- const s = (t, n) => Math.abs(t - n);
2
- function e(t, n) {
3
- const a = s(t.x, n.x), c = s(t.y, n.y);
4
- return Math.sqrt(a ** 2 + c ** 2);
5
- }
6
- export {
7
- s as distance,
8
- e as distance2D
9
- };
@@ -1,4 +0,0 @@
1
- const t = ({ current: e }) => e ? e.ownerDocument.defaultView : null;
2
- export {
3
- t as getContextWindow
4
- };
@@ -1,4 +0,0 @@
1
- const e = typeof window < "u";
2
- export {
3
- e as isBrowser
4
- };
@@ -1,6 +0,0 @@
1
- function e(t) {
2
- return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
3
- }
4
- export {
5
- e as isRefObject
6
- };
@@ -1,28 +0,0 @@
1
- import * as l from "react";
2
- function f(n, u) {
3
- if (typeof n == "function")
4
- return n(u);
5
- n != null && (n.current = u);
6
- }
7
- function i(...n) {
8
- return (u) => {
9
- let o = !1;
10
- const c = n.map((e) => {
11
- const t = f(e, u);
12
- return !o && typeof t == "function" && (o = !0), t;
13
- });
14
- if (o)
15
- return () => {
16
- for (let e = 0; e < c.length; e++) {
17
- const t = c[e];
18
- typeof t == "function" ? t() : f(n[e], null);
19
- }
20
- };
21
- };
22
- }
23
- function s(...n) {
24
- return l.useCallback(i(...n), n);
25
- }
26
- export {
27
- s as useComposedRefs
28
- };
@@ -1,8 +0,0 @@
1
- import { useRef as t } from "react";
2
- function u(n) {
3
- const r = t(null);
4
- return r.current === null && (r.current = n()), r.current;
5
- }
6
- export {
7
- u as useConstant
8
- };
@@ -1,6 +0,0 @@
1
- import { useLayoutEffect as o, useEffect as t } from "react";
2
- import { isBrowser as e } from "./is-browser.js";
3
- const s = e ? o : t;
4
- export {
5
- s as useIsomorphicLayoutEffect
6
- };
@@ -1,106 +0,0 @@
1
- import { time as A } from "../frameloop/sync-time.js";
2
- import { JSAnimation as y } from "./JSAnimation.js";
3
- import { getFinalKeyframe as g } from "./keyframes/get-final.js";
4
- import { KeyframeResolver as R, flushKeyframeResolvers as T } from "./keyframes/KeyframesResolver.js";
5
- import { NativeAnimationExtended as _ } from "./NativeAnimationExtended.js";
6
- import { canAnimate as w } from "./utils/can-animate.js";
7
- import { makeAnimationInstant as K } from "./utils/make-animation-instant.js";
8
- import { WithPromise as D } from "./utils/WithPromise.js";
9
- import { supportsBrowserAnimation as E } from "./waapi/supports/waapi.js";
10
- import { MotionGlobalConfig as k } from "../../../../motion-utils/dist/es/global-config.js";
11
- import { noop as x } from "../../../../motion-utils/dist/es/noop.js";
12
- const M = 40;
13
- class I extends D {
14
- constructor({ autoplay: i = !0, delay: a = 0, type: n = "keyframes", repeat: f = 0, repeatDelay: d = 0, repeatType: c = "loop", keyframes: p, name: r, motionValue: m, element: t, ...v }) {
15
- var h;
16
- super(), this.stop = () => {
17
- var e, s;
18
- this._animation && (this._animation.stop(), (e = this.stopTimeline) == null || e.call(this)), (s = this.keyframeResolver) == null || s.cancel();
19
- }, this.createdAt = A.now();
20
- const o = {
21
- autoplay: i,
22
- delay: a,
23
- type: n,
24
- repeat: f,
25
- repeatDelay: d,
26
- repeatType: c,
27
- name: r,
28
- motionValue: m,
29
- element: t,
30
- ...v
31
- }, u = (t == null ? void 0 : t.KeyframeResolver) || R;
32
- this.keyframeResolver = new u(p, (e, s, l) => this.onKeyframesResolved(e, s, o, !l), r, m, t), (h = this.keyframeResolver) == null || h.scheduleResolve();
33
- }
34
- onKeyframesResolved(i, a, n, f) {
35
- var s, l;
36
- this.keyframeResolver = void 0;
37
- const { name: d, type: c, velocity: p, delay: r, isHandoff: m, onUpdate: t } = n;
38
- this.resolvedAt = A.now(), w(i, d, c, p) || ((k.instantAnimations || !r) && (t == null || t(g(i, n, a))), i[0] = i[i.length - 1], K(n), n.repeat = 0);
39
- const o = {
40
- startTime: f ? this.resolvedAt ? this.resolvedAt - this.createdAt > M ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
41
- finalKeyframe: a,
42
- ...n,
43
- keyframes: i
44
- }, u = !m && E(o), h = (l = (s = o.motionValue) == null ? void 0 : s.owner) == null ? void 0 : l.current, e = u ? new _({
45
- ...o,
46
- element: h
47
- }) : new y(o);
48
- e.finished.then(() => {
49
- this.notifyFinished();
50
- }).catch(x), this.pendingTimeline && (this.stopTimeline = e.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = e;
51
- }
52
- get finished() {
53
- return this._animation ? this.animation.finished : this._finished;
54
- }
55
- then(i, a) {
56
- return this.finished.finally(i).then(() => {
57
- });
58
- }
59
- get animation() {
60
- var i;
61
- return this._animation || ((i = this.keyframeResolver) == null || i.resume(), T()), this._animation;
62
- }
63
- get duration() {
64
- return this.animation.duration;
65
- }
66
- get iterationDuration() {
67
- return this.animation.iterationDuration;
68
- }
69
- get time() {
70
- return this.animation.time;
71
- }
72
- set time(i) {
73
- this.animation.time = i;
74
- }
75
- get speed() {
76
- return this.animation.speed;
77
- }
78
- get state() {
79
- return this.animation.state;
80
- }
81
- set speed(i) {
82
- this.animation.speed = i;
83
- }
84
- get startTime() {
85
- return this.animation.startTime;
86
- }
87
- attachTimeline(i) {
88
- return this._animation ? this.stopTimeline = this.animation.attachTimeline(i) : this.pendingTimeline = i, () => this.stop();
89
- }
90
- play() {
91
- this.animation.play();
92
- }
93
- pause() {
94
- this.animation.pause();
95
- }
96
- complete() {
97
- this.animation.complete();
98
- }
99
- cancel() {
100
- var i;
101
- this._animation && this.animation.cancel(), (i = this.keyframeResolver) == null || i.cancel();
102
- }
103
- }
104
- export {
105
- I as AsyncMotionValueAnimation
106
- };