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

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 (274) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +36 -28
  4. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +59 -0
  5. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +34 -0
  6. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +47 -0
  7. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +17 -0
  8. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +12 -0
  9. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +5 -0
  10. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +5 -0
  11. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +9 -0
  12. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +13 -0
  13. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +5 -0
  14. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +15 -0
  15. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +5 -0
  16. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +5 -0
  17. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +8 -0
  18. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +14 -0
  19. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +277 -0
  20. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +22 -0
  21. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +67 -0
  22. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +28 -0
  23. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +21 -0
  24. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +131 -0
  25. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +43 -0
  26. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +23 -0
  27. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +27 -0
  28. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +34 -0
  29. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +13 -0
  30. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +39 -0
  31. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +17 -0
  32. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +21 -0
  33. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +60 -0
  34. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +11 -0
  35. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +14 -0
  36. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +44 -0
  37. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +21 -0
  38. package/dist/node_modules/framer-motion/dist/es/motion/index.js +63 -0
  39. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +4 -0
  40. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +22 -0
  41. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +66 -0
  42. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +52 -0
  43. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +38 -0
  44. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +18 -0
  45. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +13 -0
  46. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +7 -0
  47. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +10 -0
  48. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +16 -0
  49. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +20 -0
  50. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +24 -0
  51. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +10 -0
  52. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +27 -0
  53. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +9 -0
  54. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +30 -0
  55. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +22 -0
  56. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +10 -0
  57. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +8 -0
  58. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +9 -0
  59. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +4 -0
  60. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +4 -0
  61. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +6 -0
  62. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +28 -0
  63. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +8 -0
  64. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +6 -0
  65. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +106 -0
  66. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +133 -0
  67. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +109 -0
  68. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +37 -0
  69. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
  70. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +17 -0
  71. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +37 -0
  72. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +30 -0
  73. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.js +32 -0
  74. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +52 -0
  75. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +98 -0
  76. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +13 -0
  77. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +13 -0
  78. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +6 -0
  79. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +9 -0
  80. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +46 -0
  81. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +49 -0
  82. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +30 -0
  83. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +22 -0
  84. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +69 -0
  85. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +75 -0
  86. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +8 -0
  87. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +8 -0
  88. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +12 -0
  89. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +6 -0
  90. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +7 -0
  91. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +7 -0
  92. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +16 -0
  93. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +31 -0
  94. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +6 -0
  95. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +7 -0
  96. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +27 -0
  97. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +7 -0
  98. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +23 -0
  99. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +31 -0
  100. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +22 -0
  101. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-final-keyframe.js +8 -0
  102. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +6 -0
  103. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +7 -0
  104. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +9 -0
  105. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +6 -0
  106. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +6 -0
  107. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +16 -0
  108. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +4 -0
  109. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +12 -0
  110. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +15 -0
  111. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +21 -0
  112. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +24 -0
  113. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +8 -0
  114. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +10 -0
  115. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +17 -0
  116. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +6 -0
  117. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +27 -0
  118. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +9 -0
  119. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +5 -0
  120. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +21 -0
  121. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +41 -0
  122. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +15 -0
  123. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +11 -0
  124. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +11 -0
  125. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +24 -0
  126. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +33 -0
  127. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +13 -0
  128. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +27 -0
  129. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +4 -0
  130. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +4 -0
  131. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +4 -0
  132. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +12 -0
  133. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +27 -0
  134. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +25 -0
  135. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +14 -0
  136. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +52 -0
  137. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +36 -0
  138. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +25 -0
  139. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +18 -0
  140. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +34 -0
  141. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +16 -0
  142. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +25 -0
  143. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +623 -0
  144. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +15 -0
  145. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
  146. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +21 -0
  147. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +16 -0
  148. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
  149. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +13 -0
  150. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +4 -0
  151. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +6 -0
  152. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +19 -0
  153. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +20 -0
  154. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +13 -0
  155. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +10 -0
  156. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +247 -0
  157. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +28 -0
  158. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +4 -0
  159. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +65 -0
  160. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +7 -0
  161. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
  162. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
  163. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
  164. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
  165. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +12 -0
  166. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
  167. package/dist/node_modules/motion-dom/dist/es/render/store.js +4 -0
  168. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
  169. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
  170. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +28 -0
  171. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +4 -0
  172. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
  173. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +11 -0
  174. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
  175. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +141 -0
  176. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +20 -0
  177. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +6 -0
  178. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +13 -0
  179. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
  180. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +4 -0
  181. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +6 -0
  182. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +13 -0
  183. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +23 -0
  184. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +25 -0
  185. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
  186. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +5 -0
  187. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +8 -0
  188. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +20 -0
  189. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +21 -0
  190. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +14 -0
  191. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +13 -0
  192. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +12 -0
  193. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +42 -0
  194. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +7 -0
  195. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +7 -0
  196. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +7 -0
  197. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +29 -0
  198. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +51 -0
  199. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +6 -0
  200. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +8 -0
  201. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +4 -0
  202. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +8 -0
  203. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +15 -0
  204. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +4 -0
  205. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +12 -0
  206. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +9 -0
  207. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +5 -0
  208. package/dist/node_modules/motion-dom/dist/es/value/index.js +215 -0
  209. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +7 -0
  210. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +19 -0
  211. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +22 -0
  212. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +12 -0
  213. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +15 -0
  214. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +16 -0
  215. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +18 -0
  216. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +24 -0
  217. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +49 -0
  218. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +9 -0
  219. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +8 -0
  220. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +24 -0
  221. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +70 -0
  222. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +31 -0
  223. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +17 -0
  224. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +17 -0
  225. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +4 -0
  226. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +10 -0
  227. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +4 -0
  228. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +8 -0
  229. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +4 -0
  230. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +4 -0
  231. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +6 -0
  232. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +4 -0
  233. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +4 -0
  234. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +4 -0
  235. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
  236. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +14 -0
  237. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
  238. package/dist/node_modules/motion-utils/dist/es/array.js +11 -0
  239. package/dist/node_modules/motion-utils/dist/es/clamp.js +4 -0
  240. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +5 -0
  241. package/dist/node_modules/motion-utils/dist/es/easing/back.js +9 -0
  242. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +8 -0
  243. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +18 -0
  244. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +7 -0
  245. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +4 -0
  246. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +4 -0
  247. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +4 -0
  248. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +4 -0
  249. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +32 -0
  250. package/dist/node_modules/motion-utils/dist/es/errors.js +15 -0
  251. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +6 -0
  252. package/dist/node_modules/motion-utils/dist/es/global-config.js +4 -0
  253. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +4 -0
  254. package/dist/node_modules/motion-utils/dist/es/is-object.js +6 -0
  255. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +4 -0
  256. package/dist/node_modules/motion-utils/dist/es/memo.js +8 -0
  257. package/dist/node_modules/motion-utils/dist/es/noop.js +4 -0
  258. package/dist/node_modules/motion-utils/dist/es/pipe.js +4 -0
  259. package/dist/node_modules/motion-utils/dist/es/progress.js +7 -0
  260. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +29 -0
  261. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +5 -0
  262. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +6 -0
  263. package/dist/node_modules/motion-utils/dist/es/warn-once.js +8 -0
  264. package/dist/patterns/table/TableWrapper.d.ts +82 -0
  265. package/dist/patterns/table/TableWrapper.d.ts.map +1 -0
  266. package/dist/patterns/table/TableWrapper.js +141 -0
  267. package/dist/patterns/table/index.d.ts +1 -0
  268. package/dist/patterns/table/index.d.ts.map +1 -1
  269. package/dist/patterns/tree/TreeStructure.js +110 -0
  270. package/dist/patterns/tree/helper.js +21 -0
  271. package/dist/patterns/tree/index.d.ts +4 -0
  272. package/dist/patterns/tree/index.d.ts.map +1 -0
  273. package/dist/styles/components.css +1 -1
  274. package/package.json +4 -3
@@ -0,0 +1,16 @@
1
+ import { addDomEvent as t } from "../../events/add-dom-event.js";
2
+ import { createProjectionNode as c } from "./create-projection-node.js";
3
+ const l = c({
4
+ attachResizeListener: (o, e) => t(o, "resize", e),
5
+ measureScroll: () => {
6
+ var o, e;
7
+ return {
8
+ x: document.documentElement.scrollLeft || ((o = document.body) == null ? void 0 : o.scrollLeft) || 0,
9
+ y: document.documentElement.scrollTop || ((e = document.body) == null ? void 0 : e.scrollTop) || 0
10
+ };
11
+ },
12
+ checkIsScrollRoot: () => !0
13
+ });
14
+ export {
15
+ l as DocumentProjectionNode
16
+ };
@@ -0,0 +1,25 @@
1
+ import { createProjectionNode as t } from "./create-projection-node.js";
2
+ import { DocumentProjectionNode as n } from "./DocumentProjectionNode.js";
3
+ const e = {
4
+ current: void 0
5
+ }, i = t({
6
+ measureScroll: (o) => ({
7
+ x: o.scrollLeft,
8
+ y: o.scrollTop
9
+ }),
10
+ defaultParent: () => {
11
+ if (!e.current) {
12
+ const o = new n({});
13
+ o.mount(window), o.setOptions({ layoutScroll: !0 }), e.current = o;
14
+ }
15
+ return e.current;
16
+ },
17
+ resetTransform: (o, r) => {
18
+ o.style.transform = r !== void 0 ? r : "none";
19
+ },
20
+ checkIsScrollRoot: (o) => window.getComputedStyle(o).position === "fixed"
21
+ });
22
+ export {
23
+ i as HTMLProjectionNode,
24
+ e as rootProjectionNode
25
+ };
@@ -0,0 +1,623 @@
1
+ import { animateSingleValue as at } from "../../animation/animate/single-value.js";
2
+ import { getOptimisedAppearId as rt } from "../../animation/optimized-appear/get-appear-id.js";
3
+ import { getValueTransition as nt } from "../../animation/utils/get-value-transition.js";
4
+ import { microtask as ht } from "../../frameloop/microtask.js";
5
+ import { time as lt } from "../../frameloop/sync-time.js";
6
+ import { scaleCorrectors as b } from "../styles/scale-correction.js";
7
+ import { delay as ut } from "../../utils/delay.js";
8
+ import { isSVGElement as ct } from "../../utils/is-svg-element.js";
9
+ import { isSVGSVGElement as dt } from "../../utils/is-svg-svg-element.js";
10
+ import { mixNumber as w } from "../../utils/mix/number.js";
11
+ import { motionValue as mt } from "../../value/index.js";
12
+ import { resolveMotionValue as C } from "../../value/utils/resolve-motion-value.js";
13
+ import { mixValues as ft } from "../animation/mix-values.js";
14
+ import { copyBoxInto as p, copyAxisDeltaInto as W } from "../geometry/copy.js";
15
+ import { translateAxis as L, transformBox as E, applyBoxDelta as pt, applyTreeDeltas as yt } from "../geometry/delta-apply.js";
16
+ import { calcLength as P, calcRelativeBox as gt, calcRelativePosition as U, calcBoxDelta as k, isNear as vt } from "../geometry/delta-calc.js";
17
+ import { removeBoxTransforms as z } from "../geometry/delta-remove.js";
18
+ import { createBox as m, createDelta as B } from "../geometry/models.js";
19
+ import { boxEqualsRounded as et, isDeltaZero as it, axisDeltaEquals as N, boxEquals as Tt, aspectRatio as H } from "../geometry/utils.js";
20
+ import { NodeStack as xt } from "../shared/stack.js";
21
+ import { buildProjectionTransform as Dt } from "../styles/transform.js";
22
+ import { eachAxis as G } from "../utils/each-axis.js";
23
+ import { FlatTree as St } from "../utils/flat-tree.js";
24
+ import { hasTransform as S, hasScale as q, has2DTranslate as Pt } from "../utils/has-transform.js";
25
+ import { globalProjectionState as F } from "./state.js";
26
+ import { frame as V, cancelFrame as X, frameSteps as O, frameData as y } from "../../frameloop/frame.js";
27
+ import { SubscriptionManager as Bt } from "../../../../../motion-utils/dist/es/subscription-manager.js";
28
+ import { clamp as Rt } from "../../../../../motion-utils/dist/es/clamp.js";
29
+ import { noop as jt } from "../../../../../motion-utils/dist/es/noop.js";
30
+ const I = ["", "X", "Y", "Z"], At = 1e3;
31
+ let Vt = 0;
32
+ function M(e, n, c, l) {
33
+ const { latestValues: v } = n;
34
+ v[e] && (c[e] = v[e], n.setStaticValue(e, 0), l && (l[e] = 0));
35
+ }
36
+ function st(e) {
37
+ if (e.hasCheckedOptimisedAppear = !0, e.root === e)
38
+ return;
39
+ const { visualElement: n } = e.options;
40
+ if (!n)
41
+ return;
42
+ const c = rt(n);
43
+ if (window.MotionHasOptimisedAnimation(c, "transform")) {
44
+ const { layout: v, layoutId: R } = e.options;
45
+ window.MotionCancelOptimisedAnimation(c, "transform", V, !(v || R));
46
+ }
47
+ const { parent: l } = e;
48
+ l && !l.hasCheckedOptimisedAppear && st(l);
49
+ }
50
+ function xe({ attachResizeListener: e, defaultParent: n, measureScroll: c, checkIsScrollRoot: l, resetTransform: v }) {
51
+ return class {
52
+ constructor(t = {}, i = n == null ? void 0 : n()) {
53
+ this.id = Vt++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
54
+ this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
55
+ }, this.updateProjection = () => {
56
+ this.projectionUpdateScheduled = !1, this.nodes.forEach(Et), this.nodes.forEach(Ft), this.nodes.forEach(Ot), this.nodes.forEach(wt);
57
+ }, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = t, this.root = i ? i.root || i : this, this.path = i ? [...i.path, i] : [], this.parent = i, this.depth = i ? i.depth + 1 : 0;
58
+ for (let s = 0; s < this.path.length; s++)
59
+ this.path[s].shouldResetTransform = !0;
60
+ this.root === this && (this.nodes = new St());
61
+ }
62
+ addEventListener(t, i) {
63
+ return this.eventHandlers.has(t) || this.eventHandlers.set(t, new Bt()), this.eventHandlers.get(t).add(i);
64
+ }
65
+ notifyListeners(t, ...i) {
66
+ const s = this.eventHandlers.get(t);
67
+ s && s.notify(...i);
68
+ }
69
+ hasListeners(t) {
70
+ return this.eventHandlers.has(t);
71
+ }
72
+ /**
73
+ * Lifecycles
74
+ */
75
+ mount(t) {
76
+ if (this.instance)
77
+ return;
78
+ this.isSVG = ct(t) && !dt(t), this.instance = t;
79
+ const { layoutId: i, layout: s, visualElement: o } = this.options;
80
+ if (o && !o.current && o.mount(t), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (s || i) && (this.isLayoutDirty = !0), e) {
81
+ let a, r = 0;
82
+ const h = () => this.root.updateBlockedByResize = !1;
83
+ V.read(() => {
84
+ r = window.innerWidth;
85
+ }), e(t, () => {
86
+ const u = window.innerWidth;
87
+ u !== r && (r = u, this.root.updateBlockedByResize = !0, a && a(), a = ut(h, 250), F.hasAnimatedSinceResize && (F.hasAnimatedSinceResize = !1, this.nodes.forEach(Z)));
88
+ });
89
+ }
90
+ i && this.root.registerSharedNode(i, this), this.options.animate !== !1 && o && (i || s) && this.addEventListener("didUpdate", ({ delta: a, hasLayoutChanged: r, hasRelativeLayoutChanged: h, layout: u }) => {
91
+ if (this.isTreeAnimationBlocked()) {
92
+ this.target = void 0, this.relativeTarget = void 0;
93
+ return;
94
+ }
95
+ const d = this.options.transition || o.getDefaultTransition() || zt, { onLayoutAnimationStart: g, onLayoutAnimationComplete: T } = o.getProps(), D = !this.targetLayout || !et(this.targetLayout, u), x = !r && h;
96
+ if (this.options.layoutRoot || this.resumeFrom || x || r && (D || !this.currentAnimation)) {
97
+ this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
98
+ const f = {
99
+ ...nt(d, "layout"),
100
+ onPlay: g,
101
+ onComplete: T
102
+ };
103
+ (o.shouldReduceMotion || this.options.layoutRoot) && (f.delay = 0, f.type = !1), this.startAnimation(f), this.setAnimationOrigin(a, x);
104
+ } else
105
+ r || Z(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
106
+ this.targetLayout = u;
107
+ });
108
+ }
109
+ unmount() {
110
+ this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
111
+ const t = this.getStack();
112
+ t && t.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), X(this.updateProjection);
113
+ }
114
+ // only on the root
115
+ blockUpdate() {
116
+ this.updateManuallyBlocked = !0;
117
+ }
118
+ unblockUpdate() {
119
+ this.updateManuallyBlocked = !1;
120
+ }
121
+ isUpdateBlocked() {
122
+ return this.updateManuallyBlocked || this.updateBlockedByResize;
123
+ }
124
+ isTreeAnimationBlocked() {
125
+ return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
126
+ }
127
+ // Note: currently only running on root node
128
+ startUpdate() {
129
+ this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(It), this.animationId++);
130
+ }
131
+ getTransformTemplate() {
132
+ const { visualElement: t } = this.options;
133
+ return t && t.getProps().transformTemplate;
134
+ }
135
+ willUpdate(t = !0) {
136
+ if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
137
+ this.options.onExitComplete && this.options.onExitComplete();
138
+ return;
139
+ }
140
+ if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && st(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
141
+ return;
142
+ this.isLayoutDirty = !0;
143
+ for (let a = 0; a < this.path.length; a++) {
144
+ const r = this.path[a];
145
+ r.shouldResetTransform = !0, r.updateScroll("snapshot"), r.options.layoutRoot && r.willUpdate(!1);
146
+ }
147
+ const { layoutId: i, layout: s } = this.options;
148
+ if (i === void 0 && !s)
149
+ return;
150
+ const o = this.getTransformTemplate();
151
+ this.prevTransformTemplateValue = o ? o(this.latestValues, "") : void 0, this.updateSnapshot(), t && this.notifyListeners("willUpdate");
152
+ }
153
+ update() {
154
+ if (this.updateScheduled = !1, this.isUpdateBlocked()) {
155
+ this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Y);
156
+ return;
157
+ }
158
+ if (this.animationId <= this.animationCommitId) {
159
+ this.nodes.forEach($);
160
+ return;
161
+ }
162
+ this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Ct), this.nodes.forEach(kt), this.nodes.forEach(Lt)) : this.nodes.forEach($), this.clearAllSnapshots();
163
+ const i = lt.now();
164
+ y.delta = Rt(0, 1e3 / 60, i - y.timestamp), y.timestamp = i, y.isProcessing = !0, O.update.process(y), O.preRender.process(y), O.render.process(y), y.isProcessing = !1;
165
+ }
166
+ didUpdate() {
167
+ this.updateScheduled || (this.updateScheduled = !0, ht.read(this.scheduleUpdate));
168
+ }
169
+ clearAllSnapshots() {
170
+ this.nodes.forEach(Ut), this.sharedNodes.forEach(Mt);
171
+ }
172
+ scheduleUpdateProjection() {
173
+ this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, V.preRender(this.updateProjection, !1, !0));
174
+ }
175
+ scheduleCheckAfterUnmount() {
176
+ V.postRender(() => {
177
+ this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
178
+ });
179
+ }
180
+ /**
181
+ * Update measurements
182
+ */
183
+ updateSnapshot() {
184
+ this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !P(this.snapshot.measuredBox.x) && !P(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
185
+ }
186
+ updateLayout() {
187
+ if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
188
+ return;
189
+ if (this.resumeFrom && !this.resumeFrom.instance)
190
+ for (let s = 0; s < this.path.length; s++)
191
+ this.path[s].updateScroll();
192
+ const t = this.layout;
193
+ this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = m(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
194
+ const { visualElement: i } = this.options;
195
+ i && i.notify("LayoutMeasure", this.layout.layoutBox, t ? t.layoutBox : void 0);
196
+ }
197
+ updateScroll(t = "measure") {
198
+ let i = !!(this.options.layoutScroll && this.instance);
199
+ if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === t && (i = !1), i && this.instance) {
200
+ const s = l(this.instance);
201
+ this.scroll = {
202
+ animationId: this.root.animationId,
203
+ phase: t,
204
+ isRoot: s,
205
+ offset: c(this.instance),
206
+ wasRoot: this.scroll ? this.scroll.isRoot : s
207
+ };
208
+ }
209
+ }
210
+ resetTransform() {
211
+ if (!v)
212
+ return;
213
+ const t = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, i = this.projectionDelta && !it(this.projectionDelta), s = this.getTransformTemplate(), o = s ? s(this.latestValues, "") : void 0, a = o !== this.prevTransformTemplateValue;
214
+ t && this.instance && (i || S(this.latestValues) || a) && (v(this.instance, o), this.shouldResetTransform = !1, this.scheduleRender());
215
+ }
216
+ measure(t = !0) {
217
+ const i = this.measurePageBox();
218
+ let s = this.removeElementScroll(i);
219
+ return t && (s = this.removeTransform(s)), Nt(s), {
220
+ animationId: this.root.animationId,
221
+ measuredBox: i,
222
+ layoutBox: s,
223
+ latestValues: {},
224
+ source: this.id
225
+ };
226
+ }
227
+ measurePageBox() {
228
+ var o;
229
+ const { visualElement: t } = this.options;
230
+ if (!t)
231
+ return m();
232
+ const i = t.measureViewportBox();
233
+ if (!(((o = this.scroll) == null ? void 0 : o.wasRoot) || this.path.some(Ht))) {
234
+ const { scroll: a } = this.root;
235
+ a && (L(i.x, a.offset.x), L(i.y, a.offset.y));
236
+ }
237
+ return i;
238
+ }
239
+ removeElementScroll(t) {
240
+ var s;
241
+ const i = m();
242
+ if (p(i, t), (s = this.scroll) != null && s.wasRoot)
243
+ return i;
244
+ for (let o = 0; o < this.path.length; o++) {
245
+ const a = this.path[o], { scroll: r, options: h } = a;
246
+ a !== this.root && r && h.layoutScroll && (r.wasRoot && p(i, t), L(i.x, r.offset.x), L(i.y, r.offset.y));
247
+ }
248
+ return i;
249
+ }
250
+ applyTransform(t, i = !1) {
251
+ const s = m();
252
+ p(s, t);
253
+ for (let o = 0; o < this.path.length; o++) {
254
+ const a = this.path[o];
255
+ !i && a.options.layoutScroll && a.scroll && a !== a.root && E(s, {
256
+ x: -a.scroll.offset.x,
257
+ y: -a.scroll.offset.y
258
+ }), S(a.latestValues) && E(s, a.latestValues);
259
+ }
260
+ return S(this.latestValues) && E(s, this.latestValues), s;
261
+ }
262
+ removeTransform(t) {
263
+ const i = m();
264
+ p(i, t);
265
+ for (let s = 0; s < this.path.length; s++) {
266
+ const o = this.path[s];
267
+ if (!o.instance || !S(o.latestValues))
268
+ continue;
269
+ q(o.latestValues) && o.updateSnapshot();
270
+ const a = m(), r = o.measurePageBox();
271
+ p(a, r), z(i, o.latestValues, o.snapshot ? o.snapshot.layoutBox : void 0, a);
272
+ }
273
+ return S(this.latestValues) && z(i, this.latestValues), i;
274
+ }
275
+ setTargetDelta(t) {
276
+ this.targetDelta = t, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
277
+ }
278
+ setOptions(t) {
279
+ this.options = {
280
+ ...this.options,
281
+ ...t,
282
+ crossfade: t.crossfade !== void 0 ? t.crossfade : !0
283
+ };
284
+ }
285
+ clearMeasurements() {
286
+ this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
287
+ }
288
+ forceRelativeParentToResolveTarget() {
289
+ this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== y.timestamp && this.relativeParent.resolveTargetDelta(!0);
290
+ }
291
+ resolveTargetDelta(t = !1) {
292
+ var u;
293
+ const i = this.getLead();
294
+ this.isProjectionDirty || (this.isProjectionDirty = i.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = i.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = i.isSharedProjectionDirty);
295
+ const s = !!this.resumingFrom || this !== i;
296
+ if (!(t || s && this.isSharedProjectionDirty || this.isProjectionDirty || (u = this.parent) != null && u.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
297
+ return;
298
+ const { layout: a, layoutId: r } = this.options;
299
+ if (!this.layout || !(a || r))
300
+ return;
301
+ this.resolvedRelativeTargetAt = y.timestamp;
302
+ const h = this.getClosestProjectingParent();
303
+ h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = m(), this.targetWithTransforms = m()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), gt(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : p(this.target, this.layout.layoutBox), pt(this.target, this.targetDelta)) : p(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, h && !!h.resumingFrom == !!this.resumingFrom && !h.options.layoutScroll && h.target && this.animationProgress !== 1 ? this.createRelativeTarget(h, this.target, h.target) : this.relativeParent = this.relativeTarget = void 0));
304
+ }
305
+ getClosestProjectingParent() {
306
+ if (!(!this.parent || q(this.parent.latestValues) || Pt(this.parent.latestValues)))
307
+ return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
308
+ }
309
+ isProjecting() {
310
+ return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
311
+ }
312
+ createRelativeTarget(t, i, s) {
313
+ this.relativeParent = t, this.linkedParentVersion = t.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = m(), this.relativeTargetOrigin = m(), U(this.relativeTargetOrigin, i, s), p(this.relativeTarget, this.relativeTargetOrigin);
314
+ }
315
+ removeRelativeTarget() {
316
+ this.relativeParent = this.relativeTarget = void 0;
317
+ }
318
+ calcProjection() {
319
+ var d;
320
+ const t = this.getLead(), i = !!this.resumingFrom || this !== t;
321
+ let s = !0;
322
+ if ((this.isProjectionDirty || (d = this.parent) != null && d.isProjectionDirty) && (s = !1), i && (this.isSharedProjectionDirty || this.isTransformDirty) && (s = !1), this.resolvedRelativeTargetAt === y.timestamp && (s = !1), s)
323
+ return;
324
+ const { layout: o, layoutId: a } = this.options;
325
+ if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(o || a))
326
+ return;
327
+ p(this.layoutCorrected, this.layout.layoutBox);
328
+ const r = this.treeScale.x, h = this.treeScale.y;
329
+ yt(this.layoutCorrected, this.treeScale, this.path, i), t.layout && !t.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (t.target = t.layout.layoutBox, t.targetWithTransforms = m());
330
+ const { target: u } = t;
331
+ if (!u) {
332
+ this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
333
+ return;
334
+ }
335
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (W(this.prevProjectionDelta.x, this.projectionDelta.x), W(this.prevProjectionDelta.y, this.projectionDelta.y)), k(this.projectionDelta, this.layoutCorrected, u, this.latestValues), (this.treeScale.x !== r || this.treeScale.y !== h || !N(this.projectionDelta.x, this.prevProjectionDelta.x) || !N(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", u));
336
+ }
337
+ hide() {
338
+ this.isVisible = !1;
339
+ }
340
+ show() {
341
+ this.isVisible = !0;
342
+ }
343
+ scheduleRender(t = !0) {
344
+ var i;
345
+ if ((i = this.options.visualElement) == null || i.scheduleRender(), t) {
346
+ const s = this.getStack();
347
+ s && s.scheduleRender();
348
+ }
349
+ this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
350
+ }
351
+ createProjectionDeltas() {
352
+ this.prevProjectionDelta = B(), this.projectionDelta = B(), this.projectionDeltaWithTransform = B();
353
+ }
354
+ setAnimationOrigin(t, i = !1) {
355
+ const s = this.snapshot, o = s ? s.latestValues : {}, a = { ...this.latestValues }, r = B();
356
+ (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !i;
357
+ const h = m(), u = s ? s.source : void 0, d = this.layout ? this.layout.source : void 0, g = u !== d, T = this.getStack(), D = !T || T.members.length <= 1, x = !!(g && !D && this.options.crossfade === !0 && !this.path.some(Wt));
358
+ this.animationProgress = 0;
359
+ let f;
360
+ this.mixTargetDelta = (j) => {
361
+ const A = j / 1e3;
362
+ J(r.x, t.x, A), J(r.y, t.y, A), this.setTargetDelta(r), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (U(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), bt(this.relativeTarget, this.relativeTargetOrigin, h, A), f && Tt(this.relativeTarget, f) && (this.isProjectionDirty = !1), f || (f = m()), p(f, this.relativeTarget)), g && (this.animationValues = a, ft(a, o, this.latestValues, A, x, D)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
363
+ }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
364
+ }
365
+ startAnimation(t) {
366
+ var i, s, o;
367
+ this.notifyListeners("animationStart"), (i = this.currentAnimation) == null || i.stop(), (o = (s = this.resumingFrom) == null ? void 0 : s.currentAnimation) == null || o.stop(), this.pendingAnimation && (X(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = V.update(() => {
368
+ F.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = mt(0)), this.currentAnimation = at(this.motionValue, [0, 1e3], {
369
+ ...t,
370
+ velocity: 0,
371
+ isSync: !0,
372
+ onUpdate: (a) => {
373
+ this.mixTargetDelta(a), t.onUpdate && t.onUpdate(a);
374
+ },
375
+ onStop: () => {
376
+ },
377
+ onComplete: () => {
378
+ t.onComplete && t.onComplete(), this.completeAnimation();
379
+ }
380
+ }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
381
+ });
382
+ }
383
+ completeAnimation() {
384
+ this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
385
+ const t = this.getStack();
386
+ t && t.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
387
+ }
388
+ finishAnimation() {
389
+ this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(At), this.currentAnimation.stop()), this.completeAnimation();
390
+ }
391
+ applyTransformsToTarget() {
392
+ const t = this.getLead();
393
+ let { targetWithTransforms: i, target: s, layout: o, latestValues: a } = t;
394
+ if (!(!i || !s || !o)) {
395
+ if (this !== t && this.layout && o && ot(this.options.animationType, this.layout.layoutBox, o.layoutBox)) {
396
+ s = this.target || m();
397
+ const r = P(this.layout.layoutBox.x);
398
+ s.x.min = t.target.x.min, s.x.max = s.x.min + r;
399
+ const h = P(this.layout.layoutBox.y);
400
+ s.y.min = t.target.y.min, s.y.max = s.y.min + h;
401
+ }
402
+ p(i, s), E(i, a), k(this.projectionDeltaWithTransform, this.layoutCorrected, i, a);
403
+ }
404
+ }
405
+ registerSharedNode(t, i) {
406
+ this.sharedNodes.has(t) || this.sharedNodes.set(t, new xt()), this.sharedNodes.get(t).add(i);
407
+ const o = i.options.initialPromotionConfig;
408
+ i.promote({
409
+ transition: o ? o.transition : void 0,
410
+ preserveFollowOpacity: o && o.shouldPreserveFollowOpacity ? o.shouldPreserveFollowOpacity(i) : void 0
411
+ });
412
+ }
413
+ isLead() {
414
+ const t = this.getStack();
415
+ return t ? t.lead === this : !0;
416
+ }
417
+ getLead() {
418
+ var i;
419
+ const { layoutId: t } = this.options;
420
+ return t ? ((i = this.getStack()) == null ? void 0 : i.lead) || this : this;
421
+ }
422
+ getPrevLead() {
423
+ var i;
424
+ const { layoutId: t } = this.options;
425
+ return t ? (i = this.getStack()) == null ? void 0 : i.prevLead : void 0;
426
+ }
427
+ getStack() {
428
+ const { layoutId: t } = this.options;
429
+ if (t)
430
+ return this.root.sharedNodes.get(t);
431
+ }
432
+ promote({ needsReset: t, transition: i, preserveFollowOpacity: s } = {}) {
433
+ const o = this.getStack();
434
+ o && o.promote(this, s), t && (this.projectionDelta = void 0, this.needsReset = !0), i && this.setOptions({ transition: i });
435
+ }
436
+ relegate() {
437
+ const t = this.getStack();
438
+ return t ? t.relegate(this) : !1;
439
+ }
440
+ resetSkewAndRotation() {
441
+ const { visualElement: t } = this.options;
442
+ if (!t)
443
+ return;
444
+ let i = !1;
445
+ const { latestValues: s } = t;
446
+ if ((s.z || s.rotate || s.rotateX || s.rotateY || s.rotateZ || s.skewX || s.skewY) && (i = !0), !i)
447
+ return;
448
+ const o = {};
449
+ s.z && M("z", t, o, this.animationValues);
450
+ for (let a = 0; a < I.length; a++)
451
+ M(`rotate${I[a]}`, t, o, this.animationValues), M(`skew${I[a]}`, t, o, this.animationValues);
452
+ t.render();
453
+ for (const a in o)
454
+ t.setStaticValue(a, o[a]), this.animationValues && (this.animationValues[a] = o[a]);
455
+ t.scheduleRender();
456
+ }
457
+ applyProjectionStyles(t, i) {
458
+ if (!this.instance || this.isSVG)
459
+ return;
460
+ if (!this.isVisible) {
461
+ t.visibility = "hidden";
462
+ return;
463
+ }
464
+ const s = this.getTransformTemplate();
465
+ if (this.needsReset) {
466
+ this.needsReset = !1, t.visibility = "", t.opacity = "", t.pointerEvents = C(i == null ? void 0 : i.pointerEvents) || "", t.transform = s ? s(this.latestValues, "") : "none";
467
+ return;
468
+ }
469
+ const o = this.getLead();
470
+ if (!this.projectionDelta || !this.layout || !o.target) {
471
+ this.options.layoutId && (t.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, t.pointerEvents = C(i == null ? void 0 : i.pointerEvents) || ""), this.hasProjected && !S(this.latestValues) && (t.transform = s ? s({}, "") : "none", this.hasProjected = !1);
472
+ return;
473
+ }
474
+ t.visibility = "";
475
+ const a = o.animationValues || o.latestValues;
476
+ this.applyTransformsToTarget();
477
+ let r = Dt(this.projectionDeltaWithTransform, this.treeScale, a);
478
+ s && (r = s(a, r)), t.transform = r;
479
+ const { x: h, y: u } = this.projectionDelta;
480
+ t.transformOrigin = `${h.origin * 100}% ${u.origin * 100}% 0`, o.animationValues ? t.opacity = o === this ? a.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : a.opacityExit : t.opacity = o === this ? a.opacity !== void 0 ? a.opacity : "" : a.opacityExit !== void 0 ? a.opacityExit : 0;
481
+ for (const d in b) {
482
+ if (a[d] === void 0)
483
+ continue;
484
+ const { correct: g, applyTo: T, isCSSVariable: D } = b[d], x = r === "none" ? a[d] : g(a[d], o);
485
+ if (T) {
486
+ const f = T.length;
487
+ for (let j = 0; j < f; j++)
488
+ t[T[j]] = x;
489
+ } else
490
+ D ? this.options.visualElement.renderState.vars[d] = x : t[d] = x;
491
+ }
492
+ this.options.layoutId && (t.pointerEvents = o === this ? C(i == null ? void 0 : i.pointerEvents) || "" : "none");
493
+ }
494
+ clearSnapshot() {
495
+ this.resumeFrom = this.snapshot = void 0;
496
+ }
497
+ // Only run on root
498
+ resetTree() {
499
+ this.root.nodes.forEach((t) => {
500
+ var i;
501
+ return (i = t.currentAnimation) == null ? void 0 : i.stop();
502
+ }), this.root.nodes.forEach(Y), this.root.sharedNodes.clear();
503
+ }
504
+ };
505
+ }
506
+ function kt(e) {
507
+ e.updateLayout();
508
+ }
509
+ function Lt(e) {
510
+ var c;
511
+ const n = ((c = e.resumeFrom) == null ? void 0 : c.snapshot) || e.snapshot;
512
+ if (e.isLead() && e.layout && n && e.hasListeners("didUpdate")) {
513
+ const { layoutBox: l, measuredBox: v } = e.layout, { animationType: R } = e.options, t = n.source !== e.layout.source;
514
+ R === "size" ? G((r) => {
515
+ const h = t ? n.measuredBox[r] : n.layoutBox[r], u = P(h);
516
+ h.min = l[r].min, h.max = h.min + u;
517
+ }) : ot(R, n.layoutBox, l) && G((r) => {
518
+ const h = t ? n.measuredBox[r] : n.layoutBox[r], u = P(l[r]);
519
+ h.max = h.min + u, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[r].max = e.relativeTarget[r].min + u);
520
+ });
521
+ const i = B();
522
+ k(i, l, n.layoutBox);
523
+ const s = B();
524
+ t ? k(s, e.applyTransform(v, !0), n.measuredBox) : k(s, l, n.layoutBox);
525
+ const o = !it(i);
526
+ let a = !1;
527
+ if (!e.resumeFrom) {
528
+ const r = e.getClosestProjectingParent();
529
+ if (r && !r.resumeFrom) {
530
+ const { snapshot: h, layout: u } = r;
531
+ if (h && u) {
532
+ const d = m();
533
+ U(d, n.layoutBox, h.layoutBox);
534
+ const g = m();
535
+ U(g, l, u.layoutBox), et(d, g) || (a = !0), r.options.layoutRoot && (e.relativeTarget = g, e.relativeTargetOrigin = d, e.relativeParent = r);
536
+ }
537
+ }
538
+ }
539
+ e.notifyListeners("didUpdate", {
540
+ layout: l,
541
+ snapshot: n,
542
+ delta: s,
543
+ layoutDelta: i,
544
+ hasLayoutChanged: o,
545
+ hasRelativeLayoutChanged: a
546
+ });
547
+ } else if (e.isLead()) {
548
+ const { onExitComplete: l } = e.options;
549
+ l && l();
550
+ }
551
+ e.options.transition = void 0;
552
+ }
553
+ function Et(e) {
554
+ e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty || (e.isSharedProjectionDirty = !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty)), e.isTransformDirty || (e.isTransformDirty = e.parent.isTransformDirty));
555
+ }
556
+ function wt(e) {
557
+ e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1;
558
+ }
559
+ function Ut(e) {
560
+ e.clearSnapshot();
561
+ }
562
+ function Y(e) {
563
+ e.clearMeasurements();
564
+ }
565
+ function $(e) {
566
+ e.isLayoutDirty = !1;
567
+ }
568
+ function Ct(e) {
569
+ const { visualElement: n } = e.options;
570
+ n && n.getProps().onBeforeLayoutMeasure && n.notify("BeforeLayoutMeasure"), e.resetTransform();
571
+ }
572
+ function Z(e) {
573
+ e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
574
+ }
575
+ function Ft(e) {
576
+ e.resolveTargetDelta();
577
+ }
578
+ function Ot(e) {
579
+ e.calcProjection();
580
+ }
581
+ function It(e) {
582
+ e.resetSkewAndRotation();
583
+ }
584
+ function Mt(e) {
585
+ e.removeLeadSnapshot();
586
+ }
587
+ function J(e, n, c) {
588
+ e.translate = w(n.translate, 0, c), e.scale = w(n.scale, 1, c), e.origin = n.origin, e.originPoint = n.originPoint;
589
+ }
590
+ function K(e, n, c, l) {
591
+ e.min = w(n.min, c.min, l), e.max = w(n.max, c.max, l);
592
+ }
593
+ function bt(e, n, c, l) {
594
+ K(e.x, n.x, c.x, l), K(e.y, n.y, c.y, l);
595
+ }
596
+ function Wt(e) {
597
+ return e.animationValues && e.animationValues.opacityExit !== void 0;
598
+ }
599
+ const zt = {
600
+ duration: 0.45,
601
+ ease: [0.4, 0, 0.1, 1]
602
+ }, Q = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), _ = Q("applewebkit/") && !Q("chrome/") ? Math.round : jt;
603
+ function tt(e) {
604
+ e.min = _(e.min), e.max = _(e.max);
605
+ }
606
+ function Nt(e) {
607
+ tt(e.x), tt(e.y);
608
+ }
609
+ function ot(e, n, c) {
610
+ return e === "position" || e === "preserve-aspect" && !vt(H(n), H(c), 0.2);
611
+ }
612
+ function Ht(e) {
613
+ var n;
614
+ return e !== e.root && ((n = e.scroll) == null ? void 0 : n.wasRoot);
615
+ }
616
+ export {
617
+ wt as cleanDirtyNodes,
618
+ xe as createProjectionNode,
619
+ K as mixAxis,
620
+ J as mixAxisDelta,
621
+ bt as mixBox,
622
+ Et as propagateDirtyNodes
623
+ };
@@ -0,0 +1,15 @@
1
+ const e = {
2
+ /**
3
+ * Global flag as to whether the tree has animated since the last time
4
+ * we resized the window
5
+ */
6
+ hasAnimatedSinceResize: !0,
7
+ /**
8
+ * We set this to true once, on the first update. Any nodes added to the tree beyond that
9
+ * update will be given a `data-projection-id` attribute.
10
+ */
11
+ hasEverUpdated: !1
12
+ };
13
+ export {
14
+ e as globalProjectionState
15
+ };