lawgic-dev-kit 0.12.8 → 0.12.9

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 (339) hide show
  1. package/dist/_virtual/client.js +22 -3
  2. package/dist/_virtual/index5.js +2 -2
  3. package/dist/_virtual/index6.js +2 -2
  4. package/dist/components/atoms/Avatar/Avatar.js +31 -73
  5. package/dist/components/atoms/UploadContainer/UploadContainer.js +47 -89
  6. package/dist/components/molecules/AlertModal/AlertModal.js +26 -68
  7. package/dist/components/molecules/CalendarSelector/CalendarSelector.js +45 -87
  8. package/dist/components/molecules/DialogModal/DialogModal.js +37 -79
  9. package/dist/components/molecules/FloatingMenu/FloatingMenu.js +25 -67
  10. package/dist/components/molecules/Tabs/Tabs.js +41 -83
  11. package/dist/lawgic-dev-kit.umd.js +243 -884
  12. package/dist/node_modules/prop-types/index.js +1 -1
  13. package/dist/node_modules/scheduler/index.js +1 -1
  14. package/dist/utils/modal.js +59 -101
  15. package/dist/utils/toast.js +73 -106
  16. package/package.json +1 -1
  17. package/dist/dist/_virtual/_commonjsHelpers.js +0 -8
  18. package/dist/dist/_virtual/index.js +0 -7
  19. package/dist/dist/_virtual/index3.js +0 -5
  20. package/dist/dist/_virtual/index4.js +0 -5
  21. package/dist/dist/_virtual/index5.js +0 -7
  22. package/dist/dist/_virtual/index6.js +0 -4
  23. package/dist/dist/_virtual/index7.js +0 -4
  24. package/dist/dist/_virtual/index8.js +0 -4
  25. package/dist/dist/_virtual/jsx-runtime.js +0 -5
  26. package/dist/dist/_virtual/jsx-runtime2.js +0 -4
  27. package/dist/dist/_virtual/lodash.js +0 -2
  28. package/dist/dist/_virtual/lodash2.js +0 -4
  29. package/dist/dist/_virtual/react-is.development.js +0 -4
  30. package/dist/dist/_virtual/react-is.production.min.js +0 -4
  31. package/dist/dist/_virtual/react-jsx-runtime.development.js +0 -4
  32. package/dist/dist/_virtual/react-jsx-runtime.production.js +0 -4
  33. package/dist/dist/components/atoms/AsyncToast/index.js +0 -33
  34. package/dist/dist/components/atoms/ImageProfileInput/ImageProfileInput.validators.js +0 -5
  35. package/dist/dist/components/atoms/Toast/Toast.js +0 -113
  36. package/dist/dist/constants/countries.js +0 -8
  37. package/dist/dist/contexts/themeContext.js +0 -3
  38. package/dist/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -4
  39. package/dist/dist/node_modules/@fortawesome/fontawesome-svg-core/index.js +0 -2661
  40. package/dist/dist/node_modules/@fortawesome/pro-light-svg-icons/index.js +0 -33
  41. package/dist/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +0 -266
  42. package/dist/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -11
  43. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.js +0 -205
  44. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.js +0 -83
  45. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.js +0 -147
  46. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.js +0 -18
  47. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/utils/accelerated-values.js +0 -12
  48. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.js +0 -23
  49. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/index.js +0 -18
  50. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.js +0 -8
  51. package/dist/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.js +0 -6
  52. package/dist/dist/node_modules/framer-motion/dist/es/animation/generators/inertia.js +0 -37
  53. package/dist/dist/node_modules/framer-motion/dist/es/animation/generators/keyframes.js +0 -30
  54. package/dist/dist/node_modules/framer-motion/dist/es/animation/generators/spring/defaults.js +0 -32
  55. package/dist/dist/node_modules/framer-motion/dist/es/animation/generators/spring/find.js +0 -52
  56. package/dist/dist/node_modules/framer-motion/dist/es/animation/generators/spring/index.js +0 -92
  57. package/dist/dist/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.js +0 -10
  58. package/dist/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.js +0 -47
  59. package/dist/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.js +0 -46
  60. package/dist/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.js +0 -33
  61. package/dist/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.js +0 -22
  62. package/dist/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.js +0 -6
  63. package/dist/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
  64. package/dist/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.js +0 -22
  65. package/dist/dist/node_modules/framer-motion/dist/es/animation/utils/is-animatable.js +0 -7
  66. package/dist/dist/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.js +0 -6
  67. package/dist/dist/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js +0 -4
  68. package/dist/dist/node_modules/framer-motion/dist/es/animation/utils/is-none.js +0 -7
  69. package/dist/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.js +0 -6
  70. package/dist/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -53
  71. package/dist/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -41
  72. package/dist/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -45
  73. package/dist/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
  74. package/dist/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
  75. package/dist/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
  76. package/dist/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
  77. package/dist/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
  78. package/dist/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
  79. package/dist/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
  80. package/dist/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
  81. package/dist/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
  82. package/dist/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
  83. package/dist/dist/node_modules/framer-motion/dist/es/easing/anticipate.js +0 -5
  84. package/dist/dist/node_modules/framer-motion/dist/es/easing/back.js +0 -9
  85. package/dist/dist/node_modules/framer-motion/dist/es/easing/circ.js +0 -8
  86. package/dist/dist/node_modules/framer-motion/dist/es/easing/cubic-bezier.js +0 -19
  87. package/dist/dist/node_modules/framer-motion/dist/es/easing/ease.js +0 -7
  88. package/dist/dist/node_modules/framer-motion/dist/es/easing/modifiers/mirror.js +0 -4
  89. package/dist/dist/node_modules/framer-motion/dist/es/easing/modifiers/reverse.js +0 -4
  90. package/dist/dist/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.js +0 -4
  91. package/dist/dist/node_modules/framer-motion/dist/es/easing/utils/map.js +0 -32
  92. package/dist/dist/node_modules/framer-motion/dist/es/events/add-dom-event.js +0 -6
  93. package/dist/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
  94. package/dist/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -15
  95. package/dist/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -256
  96. package/dist/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -19
  97. package/dist/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -68
  98. package/dist/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
  99. package/dist/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -22
  100. package/dist/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -85
  101. package/dist/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -44
  102. package/dist/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -24
  103. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/Feature.js +0 -10
  104. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -27
  105. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -34
  106. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
  107. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -27
  108. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
  109. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
  110. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -75
  111. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
  112. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -11
  113. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
  114. package/dist/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
  115. package/dist/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -59
  116. package/dist/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
  117. package/dist/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
  118. package/dist/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -18
  119. package/dist/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -65
  120. package/dist/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -53
  121. package/dist/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -38
  122. package/dist/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.js +0 -31
  123. package/dist/dist/node_modules/framer-motion/dist/es/projection/geometry/conversion.js +0 -25
  124. package/dist/dist/node_modules/framer-motion/dist/es/projection/geometry/copy.js +0 -14
  125. package/dist/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.js +0 -52
  126. package/dist/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.js +0 -36
  127. package/dist/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.js +0 -25
  128. package/dist/dist/node_modules/framer-motion/dist/es/projection/geometry/models.js +0 -18
  129. package/dist/dist/node_modules/framer-motion/dist/es/projection/geometry/utils.js +0 -34
  130. package/dist/dist/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.js +0 -13
  131. package/dist/dist/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.js +0 -25
  132. package/dist/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.js +0 -608
  133. package/dist/dist/node_modules/framer-motion/dist/es/projection/node/state.js +0 -15
  134. package/dist/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -59
  135. package/dist/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.js +0 -21
  136. package/dist/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.js +0 -16
  137. package/dist/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
  138. package/dist/dist/node_modules/framer-motion/dist/es/projection/styles/transform.js +0 -13
  139. package/dist/dist/node_modules/framer-motion/dist/es/projection/utils/each-axis.js +0 -6
  140. package/dist/dist/node_modules/framer-motion/dist/es/projection/utils/has-transform.js +0 -20
  141. package/dist/dist/node_modules/framer-motion/dist/es/projection/utils/measure.js +0 -13
  142. package/dist/dist/node_modules/framer-motion/dist/es/render/VisualElement.js +0 -229
  143. package/dist/dist/node_modules/framer-motion/dist/es/render/components/create-factory.js +0 -20
  144. package/dist/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
  145. package/dist/dist/node_modules/framer-motion/dist/es/render/components/motion/create.js +0 -15
  146. package/dist/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -6
  147. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.js +0 -66
  148. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.js +0 -27
  149. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
  150. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -18
  151. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
  152. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js +0 -31
  153. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -20
  154. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js +0 -5
  155. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
  156. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.js +0 -6
  157. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js +0 -31
  158. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.js +0 -10
  159. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.js +0 -24
  160. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.js +0 -9
  161. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/find.js +0 -8
  162. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.js +0 -4
  163. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/number-browser.js +0 -41
  164. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/number.js +0 -18
  165. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/test.js +0 -4
  166. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/transform.js +0 -31
  167. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.js +0 -7
  168. package/dist/dist/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.js +0 -8
  169. package/dist/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -37
  170. package/dist/dist/node_modules/framer-motion/dist/es/render/html/config-motion.js +0 -12
  171. package/dist/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
  172. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
  173. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
  174. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
  175. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/keys-position.js +0 -13
  176. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/keys-transform.js +0 -23
  177. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.js +0 -16
  178. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/parse-transform.js +0 -64
  179. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/render.js +0 -8
  180. package/dist/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
  181. package/dist/dist/node_modules/framer-motion/dist/es/render/store.js +0 -4
  182. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -48
  183. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.js +0 -44
  184. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
  185. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
  186. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -26
  187. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
  188. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
  189. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.js +0 -4
  190. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/measure.js +0 -15
  191. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
  192. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/render.js +0 -11
  193. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  194. package/dist/dist/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js +0 -11
  195. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.js +0 -77
  196. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.js +0 -128
  197. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.js +0 -4
  198. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/flat-tree.js +0 -20
  199. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/get-variant-context.js +0 -20
  200. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.js +0 -13
  201. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/is-variant-label.js +0 -6
  202. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.js +0 -27
  203. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
  204. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/resolve-variants.js +0 -20
  205. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/setters.js +0 -19
  206. package/dist/dist/node_modules/framer-motion/dist/es/render/utils/variant-props.js +0 -13
  207. package/dist/dist/node_modules/framer-motion/dist/es/utils/clamp.js +0 -4
  208. package/dist/dist/node_modules/framer-motion/dist/es/utils/delay.js +0 -13
  209. package/dist/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
  210. package/dist/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
  211. package/dist/dist/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.js +0 -22
  212. package/dist/dist/node_modules/framer-motion/dist/es/utils/interpolate.js +0 -41
  213. package/dist/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
  214. package/dist/dist/node_modules/framer-motion/dist/es/utils/is-numerical-string.js +0 -4
  215. package/dist/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
  216. package/dist/dist/node_modules/framer-motion/dist/es/utils/is-zero-value-string.js +0 -4
  217. package/dist/dist/node_modules/framer-motion/dist/es/utils/mix/color.js +0 -29
  218. package/dist/dist/node_modules/framer-motion/dist/es/utils/mix/complex.js +0 -52
  219. package/dist/dist/node_modules/framer-motion/dist/es/utils/mix/immediate.js +0 -6
  220. package/dist/dist/node_modules/framer-motion/dist/es/utils/mix/index.js +0 -8
  221. package/dist/dist/node_modules/framer-motion/dist/es/utils/mix/number.js +0 -4
  222. package/dist/dist/node_modules/framer-motion/dist/es/utils/mix/visibility.js +0 -8
  223. package/dist/dist/node_modules/framer-motion/dist/es/utils/offsets/default.js +0 -8
  224. package/dist/dist/node_modules/framer-motion/dist/es/utils/offsets/fill.js +0 -13
  225. package/dist/dist/node_modules/framer-motion/dist/es/utils/offsets/time.js +0 -6
  226. package/dist/dist/node_modules/framer-motion/dist/es/utils/pipe.js +0 -4
  227. package/dist/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
  228. package/dist/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/state.js +0 -5
  229. package/dist/dist/node_modules/framer-motion/dist/es/utils/resolve-value.js +0 -6
  230. package/dist/dist/node_modules/framer-motion/dist/es/utils/shallow-compare.js +0 -14
  231. package/dist/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
  232. package/dist/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
  233. package/dist/dist/node_modules/framer-motion/dist/es/value/types/color/hex.js +0 -19
  234. package/dist/dist/node_modules/framer-motion/dist/es/value/types/color/hsla.js +0 -12
  235. package/dist/dist/node_modules/framer-motion/dist/es/value/types/color/index.js +0 -11
  236. package/dist/dist/node_modules/framer-motion/dist/es/value/types/color/rgba.js +0 -16
  237. package/dist/dist/node_modules/framer-motion/dist/es/value/types/color/utils.js +0 -18
  238. package/dist/dist/node_modules/framer-motion/dist/es/value/types/complex/filter.js +0 -24
  239. package/dist/dist/node_modules/framer-motion/dist/es/value/types/complex/index.js +0 -49
  240. package/dist/dist/node_modules/framer-motion/dist/es/value/types/numbers/index.js +0 -17
  241. package/dist/dist/node_modules/framer-motion/dist/es/value/types/numbers/units.js +0 -17
  242. package/dist/dist/node_modules/framer-motion/dist/es/value/types/utils/color-regex.js +0 -4
  243. package/dist/dist/node_modules/framer-motion/dist/es/value/types/utils/float-regex.js +0 -4
  244. package/dist/dist/node_modules/framer-motion/dist/es/value/types/utils/is-nullish.js +0 -6
  245. package/dist/dist/node_modules/framer-motion/dist/es/value/types/utils/sanitize.js +0 -4
  246. package/dist/dist/node_modules/framer-motion/dist/es/value/types/utils/single-color-regex.js +0 -4
  247. package/dist/dist/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.js +0 -9
  248. package/dist/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
  249. package/dist/dist/node_modules/framer-motion/dist/es/value/utils/is-motion-value.js +0 -4
  250. package/dist/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -9
  251. package/dist/dist/node_modules/lodash/lodash.js +0 -3677
  252. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/animation/optimized-appear/data-id.js +0 -6
  253. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/context/LayoutGroupContext.js +0 -2
  254. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/context/LazyContext.js +0 -2
  255. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/context/MotionConfigContext.js +0 -6
  256. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -2
  257. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/projection/node/create-projection-node.js +0 -12
  258. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
  259. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -9
  260. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/utils/unit-conversion.js +0 -5
  261. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/value-types/type-int.js +0 -4
  262. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/keys-transform.js +0 -23
  263. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/utils/clamp.js +0 -4
  264. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/hex.js +0 -19
  265. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/hsla.js +0 -12
  266. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/index.js +0 -11
  267. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/rgba.js +0 -16
  268. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/utils.js +0 -18
  269. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/complex/filter.js +0 -4
  270. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/complex/index.js +0 -49
  271. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/numbers/index.js +0 -16
  272. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/numbers/units.js +0 -11
  273. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/color-regex.js +0 -4
  274. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/float-regex.js +0 -4
  275. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/is-nullish.js +0 -6
  276. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/sanitize.js +0 -4
  277. package/dist/dist/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/single-color-regex.js +0 -4
  278. package/dist/dist/node_modules/motion/dist/es/motion-utils/dist/es/errors.js +0 -1
  279. package/dist/dist/node_modules/motion/dist/es/motion-utils/dist/es/noop.js +0 -4
  280. package/dist/dist/node_modules/motion-dom/dist/es/animation/controls/BaseGroup.js +0 -74
  281. package/dist/dist/node_modules/motion-dom/dist/es/animation/controls/Group.js +0 -9
  282. package/dist/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
  283. package/dist/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
  284. package/dist/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
  285. package/dist/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/attach-timeline.js +0 -6
  286. package/dist/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/easing.js +0 -27
  287. package/dist/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -12
  288. package/dist/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
  289. package/dist/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -10
  290. package/dist/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
  291. package/dist/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -17
  292. package/dist/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -41
  293. package/dist/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -16
  294. package/dist/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
  295. package/dist/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
  296. package/dist/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -24
  297. package/dist/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -32
  298. package/dist/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -13
  299. package/dist/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
  300. package/dist/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
  301. package/dist/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
  302. package/dist/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
  303. package/dist/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
  304. package/dist/dist/node_modules/motion-dom/dist/es/utils/is-bezier-definition.js +0 -4
  305. package/dist/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -14
  306. package/dist/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -6
  307. package/dist/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
  308. package/dist/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -13
  309. package/dist/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -6
  310. package/dist/dist/node_modules/motion-dom/dist/es/value/index.js +0 -202
  311. package/dist/dist/node_modules/motion-utils/dist/es/array.js +0 -11
  312. package/dist/dist/node_modules/motion-utils/dist/es/errors.js +0 -12
  313. package/dist/dist/node_modules/motion-utils/dist/es/global-config.js +0 -6
  314. package/dist/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
  315. package/dist/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
  316. package/dist/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
  317. package/dist/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
  318. package/dist/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
  319. package/dist/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -6
  320. package/dist/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -7
  321. package/dist/dist/node_modules/object-assign/index.js +0 -54
  322. package/dist/dist/node_modules/prop-types/checkPropTypes.js +0 -54
  323. package/dist/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -52
  324. package/dist/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -329
  325. package/dist/dist/node_modules/prop-types/index.js +0 -17
  326. package/dist/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -10
  327. package/dist/dist/node_modules/prop-types/lib/has.js +0 -7
  328. package/dist/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -95
  329. package/dist/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -78
  330. package/dist/dist/node_modules/prop-types/node_modules/react-is/index.js +0 -10
  331. package/dist/dist/node_modules/property-expr/index.js +0 -82
  332. package/dist/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -247
  333. package/dist/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -35
  334. package/dist/dist/node_modules/react/jsx-runtime.js +0 -10
  335. package/dist/dist/node_modules/tiny-case/index.js +0 -22
  336. package/dist/dist/node_modules/toposort/index.js +0 -66
  337. package/dist/dist/node_modules/yup/index.esm.js +0 -1359
  338. package/dist/dist/themes/default.js +0 -9
  339. package/dist/src/utils/toast.d.ts +0 -15
@@ -1,256 +0,0 @@
1
- import { invariant as L } from "../../../../../motion-utils/dist/es/errors.js";
2
- import { frame as A } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
3
- import { setDragLock as S } from "../../../../../motion-dom/dist/es/gestures/drag/state/set-active.js";
4
- import { animateMotionValue as V } from "../../animation/interfaces/motion-value.js";
5
- import { addDomEvent as $ } from "../../events/add-dom-event.js";
6
- import { addPointerEvent as k } from "../../events/add-pointer-event.js";
7
- import { extractEventInfo as B } from "../../events/event-info.js";
8
- import { convertBoxToBoundingBox as T, convertBoundingBoxToBox as j } from "../../projection/geometry/conversion.js";
9
- import { calcLength as w } from "../../projection/geometry/delta-calc.js";
10
- import { createBox as R } from "../../projection/geometry/models.js";
11
- import { eachAxis as u } from "../../projection/utils/each-axis.js";
12
- import { measurePageBox as b } from "../../projection/utils/measure.js";
13
- import { getContextWindow as O } from "../../utils/get-context-window.js";
14
- import { isRefObject as x } from "../../utils/is-ref-object.js";
15
- import { mixNumber as y } from "../../utils/mix/number.js";
16
- import { percent as W } from "../../value/types/numbers/units.js";
17
- import { addValueToWillChange as M } from "../../value/use-will-change/add-will-change.js";
18
- import { PanSession as I } from "../pan/PanSession.js";
19
- import { applyConstraints as U, calcRelativeConstraints as z, resolveDragElastic as F, calcViewportConstraints as G, defaultElastic as H, rebaseAxisConstraints as N, calcOrigin as _ } from "./utils/constraints.js";
20
- const q = /* @__PURE__ */ new WeakMap();
21
- class pt {
22
- constructor(t) {
23
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = R(), this.visualElement = t;
24
- }
25
- start(t, { snapToCursor: s = !1 } = {}) {
26
- const { presenceContext: n } = this.visualElement;
27
- if (n && n.isPresent === !1)
28
- return;
29
- const i = (e) => {
30
- const { dragSnapToOrigin: a } = this.getProps();
31
- a ? this.pauseAnimation() : this.stopAnimation(), s && this.snapToCursor(B(e).point);
32
- }, r = (e, a) => {
33
- const { drag: d, dragPropagation: f, onDragStart: g } = this.getProps();
34
- if (d && !f && (this.openDragLock && this.openDragLock(), this.openDragLock = S(d), !this.openDragLock))
35
- return;
36
- this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), u((m) => {
37
- let E = this.getAxisMotionValue(m).get() || 0;
38
- if (W.test(E)) {
39
- const { projection: P } = this.visualElement;
40
- if (P && P.layout) {
41
- const C = P.layout.layoutBox[m];
42
- C && (E = w(C) * (parseFloat(E) / 100));
43
- }
44
- }
45
- this.originPoint[m] = E;
46
- }), g && A.postRender(() => g(e, a)), M(this.visualElement, "transform");
47
- const { animationState: v } = this.visualElement;
48
- v && v.setActive("whileDrag", !0);
49
- }, o = (e, a) => {
50
- const { dragPropagation: d, dragDirectionLock: f, onDirectionLock: g, onDrag: v } = this.getProps();
51
- if (!d && !this.openDragLock)
52
- return;
53
- const { offset: m } = a;
54
- if (f && this.currentDirection === null) {
55
- this.currentDirection = J(m), this.currentDirection !== null && g && g(this.currentDirection);
56
- return;
57
- }
58
- this.updateAxis("x", a.point, m), this.updateAxis("y", a.point, m), this.visualElement.render(), v && v(e, a);
59
- }, l = (e, a) => this.stop(e, a), c = () => u((e) => {
60
- var a;
61
- return this.getAnimationState(e) === "paused" && ((a = this.getAxisMotionValue(e).animation) === null || a === void 0 ? void 0 : a.play());
62
- }), { dragSnapToOrigin: h } = this.getProps();
63
- this.panSession = new I(t, {
64
- onSessionStart: i,
65
- onStart: r,
66
- onMove: o,
67
- onSessionEnd: l,
68
- resumeAnimation: c
69
- }, {
70
- transformPagePoint: this.visualElement.getTransformPagePoint(),
71
- dragSnapToOrigin: h,
72
- contextWindow: O(this.visualElement)
73
- });
74
- }
75
- stop(t, s) {
76
- const n = this.isDragging;
77
- if (this.cancel(), !n)
78
- return;
79
- const { velocity: i } = s;
80
- this.startAnimation(i);
81
- const { onDragEnd: r } = this.getProps();
82
- r && A.postRender(() => r(t, s));
83
- }
84
- cancel() {
85
- this.isDragging = !1;
86
- const { projection: t, animationState: s } = this.visualElement;
87
- t && (t.isAnimationBlocked = !1), this.panSession && this.panSession.end(), this.panSession = void 0;
88
- const { dragPropagation: n } = this.getProps();
89
- !n && this.openDragLock && (this.openDragLock(), this.openDragLock = null), s && s.setActive("whileDrag", !1);
90
- }
91
- updateAxis(t, s, n) {
92
- const { drag: i } = this.getProps();
93
- if (!n || !D(t, i, this.currentDirection))
94
- return;
95
- const r = this.getAxisMotionValue(t);
96
- let o = this.originPoint[t] + n[t];
97
- this.constraints && this.constraints[t] && (o = U(o, this.constraints[t], this.elastic[t])), r.set(o);
98
- }
99
- resolveConstraints() {
100
- var t;
101
- const { dragConstraints: s, dragElastic: n } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (t = this.visualElement.projection) === null || t === void 0 ? void 0 : t.layout, r = this.constraints;
102
- s && x(s) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : s && i ? this.constraints = z(i.layoutBox, s) : this.constraints = !1, this.elastic = F(n), r !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && u((o) => {
103
- this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = N(i.layoutBox[o], this.constraints[o]));
104
- });
105
- }
106
- resolveRefConstraints() {
107
- const { dragConstraints: t, onMeasureDragConstraints: s } = this.getProps();
108
- if (!t || !x(t))
109
- return !1;
110
- const n = t.current;
111
- L(n !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
112
- const { projection: i } = this.visualElement;
113
- if (!i || !i.layout)
114
- return !1;
115
- const r = b(n, i.root, this.visualElement.getTransformPagePoint());
116
- let o = G(i.layout.layoutBox, r);
117
- if (s) {
118
- const l = s(T(o));
119
- this.hasMutatedConstraints = !!l, l && (o = j(l));
120
- }
121
- return o;
122
- }
123
- startAnimation(t) {
124
- const { drag: s, dragMomentum: n, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: l } = this.getProps(), c = this.constraints || {}, h = u((e) => {
125
- if (!D(e, s, this.currentDirection))
126
- return;
127
- let a = c && c[e] || {};
128
- o && (a = { min: 0, max: 0 });
129
- const d = i ? 200 : 1e6, f = i ? 40 : 1e7, g = {
130
- type: "inertia",
131
- velocity: n ? t[e] : 0,
132
- bounceStiffness: d,
133
- bounceDamping: f,
134
- timeConstant: 750,
135
- restDelta: 1,
136
- restSpeed: 10,
137
- ...r,
138
- ...a
139
- };
140
- return this.startAxisValueAnimation(e, g);
141
- });
142
- return Promise.all(h).then(l);
143
- }
144
- startAxisValueAnimation(t, s) {
145
- const n = this.getAxisMotionValue(t);
146
- return M(this.visualElement, t), n.start(V(t, n, 0, s, this.visualElement, !1));
147
- }
148
- stopAnimation() {
149
- u((t) => this.getAxisMotionValue(t).stop());
150
- }
151
- pauseAnimation() {
152
- u((t) => {
153
- var s;
154
- return (s = this.getAxisMotionValue(t).animation) === null || s === void 0 ? void 0 : s.pause();
155
- });
156
- }
157
- getAnimationState(t) {
158
- var s;
159
- return (s = this.getAxisMotionValue(t).animation) === null || s === void 0 ? void 0 : s.state;
160
- }
161
- /**
162
- * Drag works differently depending on which props are provided.
163
- *
164
- * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
165
- * - Otherwise, we apply the delta to the x/y motion values.
166
- */
167
- getAxisMotionValue(t) {
168
- const s = `_drag${t.toUpperCase()}`, n = this.visualElement.getProps();
169
- return n[s] || this.visualElement.getValue(t, (n.initial ? n.initial[t] : void 0) || 0);
170
- }
171
- snapToCursor(t) {
172
- u((s) => {
173
- const { drag: n } = this.getProps();
174
- if (!D(s, n, this.currentDirection))
175
- return;
176
- const { projection: i } = this.visualElement, r = this.getAxisMotionValue(s);
177
- if (i && i.layout) {
178
- const { min: o, max: l } = i.layout.layoutBox[s];
179
- r.set(t[s] - y(o, l, 0.5));
180
- }
181
- });
182
- }
183
- /**
184
- * When the viewport resizes we want to check if the measured constraints
185
- * have changed and, if so, reposition the element within those new constraints
186
- * relative to where it was before the resize.
187
- */
188
- scalePositionWithinConstraints() {
189
- if (!this.visualElement.current)
190
- return;
191
- const { drag: t, dragConstraints: s } = this.getProps(), { projection: n } = this.visualElement;
192
- if (!x(s) || !n || !this.constraints)
193
- return;
194
- this.stopAnimation();
195
- const i = { x: 0, y: 0 };
196
- u((o) => {
197
- const l = this.getAxisMotionValue(o);
198
- if (l && this.constraints !== !1) {
199
- const c = l.get();
200
- i[o] = _({ min: c, max: c }, this.constraints[o]);
201
- }
202
- });
203
- const { transformTemplate: r } = this.visualElement.getProps();
204
- this.visualElement.current.style.transform = r ? r({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.resolveConstraints(), u((o) => {
205
- if (!D(o, t, null))
206
- return;
207
- const l = this.getAxisMotionValue(o), { min: c, max: h } = this.constraints[o];
208
- l.set(y(c, h, i[o]));
209
- });
210
- }
211
- addListeners() {
212
- if (!this.visualElement.current)
213
- return;
214
- q.set(this.visualElement, this);
215
- const t = this.visualElement.current, s = k(t, "pointerdown", (c) => {
216
- const { drag: h, dragListener: e = !0 } = this.getProps();
217
- h && e && this.start(c);
218
- }), n = () => {
219
- const { dragConstraints: c } = this.getProps();
220
- x(c) && c.current && (this.constraints = this.resolveRefConstraints());
221
- }, { projection: i } = this.visualElement, r = i.addEventListener("measure", n);
222
- i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), A.read(n);
223
- const o = $(window, "resize", () => this.scalePositionWithinConstraints()), l = i.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h }) => {
224
- this.isDragging && h && (u((e) => {
225
- const a = this.getAxisMotionValue(e);
226
- a && (this.originPoint[e] += c[e].translate, a.set(a.get() + c[e].translate));
227
- }), this.visualElement.render());
228
- });
229
- return () => {
230
- o(), s(), r(), l && l();
231
- };
232
- }
233
- getProps() {
234
- const t = this.visualElement.getProps(), { drag: s = !1, dragDirectionLock: n = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o = H, dragMomentum: l = !0 } = t;
235
- return {
236
- ...t,
237
- drag: s,
238
- dragDirectionLock: n,
239
- dragPropagation: i,
240
- dragConstraints: r,
241
- dragElastic: o,
242
- dragMomentum: l
243
- };
244
- }
245
- }
246
- function D(p, t, s) {
247
- return (t === !0 || t === p) && (s === null || s === p);
248
- }
249
- function J(p, t = 10) {
250
- let s = null;
251
- return Math.abs(p.y) > t ? s = "y" : Math.abs(p.x) > t && (s = "x"), s;
252
- }
253
- export {
254
- pt as VisualElementDragControls,
255
- q as elementDragControls
256
- };
@@ -1,19 +0,0 @@
1
- import { Feature as r } from "../../motion/features/Feature.js";
2
- import "../../../../../motion-utils/dist/es/errors.js";
3
- import { noop as s } from "../../../../../motion-utils/dist/es/noop.js";
4
- import { VisualElementDragControls as t } from "./VisualElementDragControls.js";
5
- class u extends r {
6
- constructor(o) {
7
- super(o), this.removeGroupControls = s, this.removeListeners = s, this.controls = new t(o);
8
- }
9
- mount() {
10
- const { dragControls: o } = this.node.getProps();
11
- o && (this.removeGroupControls = o.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || s;
12
- }
13
- unmount() {
14
- this.removeGroupControls(), this.removeListeners();
15
- }
16
- }
17
- export {
18
- u as DragGesture
19
- };
@@ -1,68 +0,0 @@
1
- import "../../../../../../motion-utils/dist/es/errors.js";
2
- import { progress as r } from "../../../../../../motion-utils/dist/es/progress.js";
3
- import { calcLength as s } from "../../../projection/geometry/delta-calc.js";
4
- import { clamp as f } from "../../../utils/clamp.js";
5
- import { mixNumber as n } from "../../../utils/mix/number.js";
6
- function C(t, { min: i, max: a }, m) {
7
- return i !== void 0 && t < i ? t = m ? n(i, t, m.min) : Math.max(t, i) : a !== void 0 && t > a && (t = m ? n(a, t, m.max) : Math.min(t, a)), t;
8
- }
9
- function c(t, i, a) {
10
- return {
11
- min: i !== void 0 ? t.min + i : void 0,
12
- max: a !== void 0 ? t.max + a - (t.max - t.min) : void 0
13
- };
14
- }
15
- function b(t, { top: i, left: a, bottom: m, right: o }) {
16
- return {
17
- x: c(t.x, a, o),
18
- y: c(t.y, i, m)
19
- };
20
- }
21
- function x(t, i) {
22
- let a = i.min - t.min, m = i.max - t.max;
23
- return i.max - i.min < t.max - t.min && ([a, m] = [m, a]), { min: a, max: m };
24
- }
25
- function h(t, i) {
26
- return {
27
- x: x(t.x, i.x),
28
- y: x(t.y, i.y)
29
- };
30
- }
31
- function A(t, i) {
32
- let a = 0.5;
33
- const m = s(t), o = s(i);
34
- return o > m ? a = r(i.min, i.max - m, t.min) : m > o && (a = r(t.min, t.max - o, i.min)), f(0, 1, a);
35
- }
36
- function E(t, i) {
37
- const a = {};
38
- return i.min !== void 0 && (a.min = i.min - t.min), i.max !== void 0 && (a.max = i.max - t.min), a;
39
- }
40
- const l = 0.35;
41
- function w(t = l) {
42
- return t === !1 ? t = 0 : t === !0 && (t = l), {
43
- x: u(t, "left", "right"),
44
- y: u(t, "top", "bottom")
45
- };
46
- }
47
- function u(t, i, a) {
48
- return {
49
- min: e(t, i),
50
- max: e(t, a)
51
- };
52
- }
53
- function e(t, i) {
54
- return typeof t == "number" ? t : t[i] || 0;
55
- }
56
- export {
57
- C as applyConstraints,
58
- A as calcOrigin,
59
- c as calcRelativeAxisConstraints,
60
- b as calcRelativeConstraints,
61
- x as calcViewportAxisConstraints,
62
- h as calcViewportConstraints,
63
- l as defaultElastic,
64
- E as rebaseAxisConstraints,
65
- u as resolveAxisElastic,
66
- w as resolveDragElastic,
67
- e as resolvePointElastic
68
- };
@@ -1,28 +0,0 @@
1
- import { addDomEvent as e } from "../events/add-dom-event.js";
2
- import { Feature as s } from "../motion/features/Feature.js";
3
- import { pipe as i } from "../utils/pipe.js";
4
- class u extends s {
5
- constructor() {
6
- super(...arguments), this.isActive = !1;
7
- }
8
- onFocus() {
9
- let t = !1;
10
- try {
11
- t = this.node.current.matches(":focus-visible");
12
- } catch {
13
- t = !0;
14
- }
15
- !t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
16
- }
17
- onBlur() {
18
- !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
19
- }
20
- mount() {
21
- this.unmount = i(e(this.node.current, "focus", () => this.onFocus()), e(this.node.current, "blur", () => this.onBlur()));
22
- }
23
- unmount() {
24
- }
25
- }
26
- export {
27
- u as FocusGesture
28
- };
@@ -1,22 +0,0 @@
1
- import "../../../../motion-utils/dist/es/errors.js";
2
- import { frame as a } from "../../../../motion-dom/dist/es/frameloop/frame.js";
3
- import { hover as m } from "../../../../motion-dom/dist/es/gestures/hover.js";
4
- import { extractEventInfo as p } from "../events/event-info.js";
5
- import { Feature as u } from "../motion/features/Feature.js";
6
- function i(o, t, n) {
7
- const { props: e } = o;
8
- o.animationState && e.whileHover && o.animationState.setActive("whileHover", n === "Start");
9
- const r = "onHover" + n, s = e[r];
10
- s && a.postRender(() => s(t, p(t)));
11
- }
12
- class l extends u {
13
- mount() {
14
- const { current: t } = this.node;
15
- t && (this.unmount = m(t, (n, e) => (i(this.node, e, "Start"), (r) => i(this.node, r, "End"))));
16
- }
17
- unmount() {
18
- }
19
- }
20
- export {
21
- l as HoverGesture
22
- };
@@ -1,85 +0,0 @@
1
- import "../../../../../motion-utils/dist/es/errors.js";
2
- import { secondsToMilliseconds as S, millisecondsToSeconds as I } from "../../../../../motion-utils/dist/es/time-conversion.js";
3
- import { frameData as y, frame as W, cancelFrame as T } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
4
- import { isPrimaryPointer as L } from "../../../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.js";
5
- import { addPointerEvent as c } from "../../events/add-pointer-event.js";
6
- import { extractEventInfo as O } from "../../events/event-info.js";
7
- import { distance2D as U } from "../../utils/distance.js";
8
- import { pipe as $ } from "../../utils/pipe.js";
9
- class z {
10
- constructor(n, o, { transformPagePoint: e, contextWindow: r, dragSnapToOrigin: h = !1 } = {}) {
11
- if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
12
- if (!(this.lastMoveEvent && this.lastMoveEventInfo))
13
- return;
14
- const s = d(this.lastMoveEventInfo, this.history), a = this.startEvent !== null, m = U(s.offset, { x: 0, y: 0 }) >= 3;
15
- if (!a && !m)
16
- return;
17
- const { point: p } = s, { timestamp: f } = y;
18
- this.history.push({ ...p, timestamp: f });
19
- const { onStart: l, onMove: E } = this.handlers;
20
- a || (l && l(this.lastMoveEvent, s), this.startEvent = this.lastMoveEvent), E && E(this.lastMoveEvent, s);
21
- }, this.handlePointerMove = (s, a) => {
22
- this.lastMoveEvent = s, this.lastMoveEventInfo = v(a, this.transformPagePoint), W.update(this.updatePoint, !0);
23
- }, this.handlePointerUp = (s, a) => {
24
- this.end();
25
- const { onEnd: m, onSessionEnd: p, resumeAnimation: f } = this.handlers;
26
- if (this.dragSnapToOrigin && f && f(), !(this.lastMoveEvent && this.lastMoveEventInfo))
27
- return;
28
- const l = d(s.type === "pointercancel" ? this.lastMoveEventInfo : v(a, this.transformPagePoint), this.history);
29
- this.startEvent && m && m(s, l), p && p(s, l);
30
- }, !L(n))
31
- return;
32
- this.dragSnapToOrigin = h, this.handlers = o, this.transformPagePoint = e, this.contextWindow = r || window;
33
- const i = O(n), u = v(i, this.transformPagePoint), { point: g } = u, { timestamp: w } = y;
34
- this.history = [{ ...g, timestamp: w }];
35
- const { onSessionStart: P } = o;
36
- P && P(n, d(u, this.history)), this.removeListeners = $(c(this.contextWindow, "pointermove", this.handlePointerMove), c(this.contextWindow, "pointerup", this.handlePointerUp), c(this.contextWindow, "pointercancel", this.handlePointerUp));
37
- }
38
- updateHandlers(n) {
39
- this.handlers = n;
40
- }
41
- end() {
42
- this.removeListeners && this.removeListeners(), T(this.updatePoint);
43
- }
44
- }
45
- function v(t, n) {
46
- return n ? { point: n(t.point) } : t;
47
- }
48
- function x(t, n) {
49
- return { x: t.x - n.x, y: t.y - n.y };
50
- }
51
- function d({ point: t }, n) {
52
- return {
53
- point: t,
54
- delta: x(t, M(n)),
55
- offset: x(t, D(n)),
56
- velocity: b(n, 0.1)
57
- };
58
- }
59
- function D(t) {
60
- return t[0];
61
- }
62
- function M(t) {
63
- return t[t.length - 1];
64
- }
65
- function b(t, n) {
66
- if (t.length < 2)
67
- return { x: 0, y: 0 };
68
- let o = t.length - 1, e = null;
69
- const r = M(t);
70
- for (; o >= 0 && (e = t[o], !(r.timestamp - e.timestamp > S(n))); )
71
- o--;
72
- if (!e)
73
- return { x: 0, y: 0 };
74
- const h = I(r.timestamp - e.timestamp);
75
- if (h === 0)
76
- return { x: 0, y: 0 };
77
- const i = {
78
- x: (r.x - e.x) / h,
79
- y: (r.y - e.y) / h
80
- };
81
- return i.x === 1 / 0 && (i.x = 0), i.y === 1 / 0 && (i.y = 0), i;
82
- }
83
- export {
84
- z as PanSession
85
- };
@@ -1,44 +0,0 @@
1
- import "../../../../../motion-utils/dist/es/errors.js";
2
- import { noop as m } from "../../../../../motion-utils/dist/es/noop.js";
3
- import { frame as r } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
4
- import { addPointerEvent as P } from "../../events/add-pointer-event.js";
5
- import { Feature as h } from "../../motion/features/Feature.js";
6
- import { getContextWindow as p } from "../../utils/get-context-window.js";
7
- import { PanSession as u } from "./PanSession.js";
8
- const s = (o) => (n, t) => {
9
- o && r.postRender(() => o(n, t));
10
- };
11
- class v extends h {
12
- constructor() {
13
- super(...arguments), this.removePointerDownListener = m;
14
- }
15
- onPointerDown(n) {
16
- this.session = new u(n, this.createPanHandlers(), {
17
- transformPagePoint: this.node.getTransformPagePoint(),
18
- contextWindow: p(this.node)
19
- });
20
- }
21
- createPanHandlers() {
22
- const { onPanSessionStart: n, onPanStart: t, onPan: i, onPanEnd: e } = this.node.getProps();
23
- return {
24
- onSessionStart: s(n),
25
- onStart: s(t),
26
- onMove: i,
27
- onEnd: (a, d) => {
28
- delete this.session, e && r.postRender(() => e(a, d));
29
- }
30
- };
31
- }
32
- mount() {
33
- this.removePointerDownListener = P(this.node.current, "pointerdown", (n) => this.onPointerDown(n));
34
- }
35
- update() {
36
- this.session && this.session.updateHandlers(this.createPanHandlers());
37
- }
38
- unmount() {
39
- this.removePointerDownListener(), this.session && this.session.end();
40
- }
41
- }
42
- export {
43
- v as PanGesture
44
- };
@@ -1,24 +0,0 @@
1
- import "../../../../motion-utils/dist/es/errors.js";
2
- import { frame as i } from "../../../../motion-dom/dist/es/frameloop/frame.js";
3
- import { press as m } from "../../../../motion-dom/dist/es/gestures/press/index.js";
4
- import { extractEventInfo as p } from "../events/event-info.js";
5
- import { Feature as u } from "../motion/features/Feature.js";
6
- function a(t, e, o) {
7
- const { props: n } = t;
8
- if (t.current instanceof HTMLButtonElement && t.current.disabled)
9
- return;
10
- t.animationState && n.whileTap && t.animationState.setActive("whileTap", o === "Start");
11
- const r = "onTap" + (o === "End" ? "" : o), s = n[r];
12
- s && i.postRender(() => s(e, p(e)));
13
- }
14
- class h extends u {
15
- mount() {
16
- const { current: e } = this.node;
17
- e && (this.unmount = m(e, (o, n) => (a(this.node, n, "Start"), (r, { success: s }) => a(this.node, r, s ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
18
- }
19
- unmount() {
20
- }
21
- }
22
- export {
23
- h as PressGesture
24
- };
@@ -1,10 +0,0 @@
1
- class e {
2
- constructor(s) {
3
- this.isMounted = !1, this.node = s;
4
- }
5
- update() {
6
- }
7
- }
8
- export {
9
- e as Feature
10
- };
@@ -1,27 +0,0 @@
1
- import { Feature as s } from "../Feature.js";
2
- let o = 0;
3
- class d extends s {
4
- constructor() {
5
- super(...arguments), this.id = o++;
6
- }
7
- update() {
8
- if (!this.node.presenceContext)
9
- return;
10
- const { isPresent: t, onExitComplete: e } = this.node.presenceContext, { isPresent: n } = this.node.prevPresenceContext || {};
11
- if (!this.node.animationState || t === n)
12
- return;
13
- const i = this.node.animationState.setActive("exit", !t);
14
- e && !t && i.then(() => {
15
- e(this.id);
16
- });
17
- }
18
- mount() {
19
- const { register: t, onExitComplete: e } = this.node.presenceContext || {};
20
- e && e(this.id), t && (this.unmount = t(this.id));
21
- }
22
- unmount() {
23
- }
24
- }
25
- export {
26
- d as ExitAnimationFeature
27
- };
@@ -1,34 +0,0 @@
1
- import { isAnimationControls as n } from "../../../animation/utils/is-animation-controls.js";
2
- import { createAnimationState as i } from "../../../render/utils/animation-state.js";
3
- import { Feature as s } from "../Feature.js";
4
- class u extends s {
5
- /**
6
- * We dynamically generate the AnimationState manager as it contains a reference
7
- * to the underlying animation library. We only want to load that if we load this,
8
- * so people can optionally code split it out using the `m` component.
9
- */
10
- constructor(t) {
11
- super(t), t.animationState || (t.animationState = i(t));
12
- }
13
- updateAnimationControlsSubscription() {
14
- const { animate: t } = this.node.getProps();
15
- n(t) && (this.unmountControls = t.subscribe(this.node));
16
- }
17
- /**
18
- * Subscribe any provided AnimationControls to the component's VisualElement
19
- */
20
- mount() {
21
- this.updateAnimationControlsSubscription();
22
- }
23
- update() {
24
- const { animate: t } = this.node.getProps(), { animate: o } = this.node.prevProps || {};
25
- t !== o && this.updateAnimationControlsSubscription();
26
- }
27
- unmount() {
28
- var t;
29
- this.node.animationState.reset(), (t = this.unmountControls) === null || t === void 0 || t.call(this);
30
- }
31
- }
32
- export {
33
- u as AnimationFeature
34
- };
@@ -1,13 +0,0 @@
1
- import { AnimationFeature as t } from "./animation/index.js";
2
- import { ExitAnimationFeature as a } from "./animation/exit.js";
3
- const e = {
4
- animation: {
5
- Feature: t
6
- },
7
- exit: {
8
- Feature: a
9
- }
10
- };
11
- export {
12
- e as animations
13
- };
@@ -1,27 +0,0 @@
1
- const e = {
2
- animation: [
3
- "animate",
4
- "variants",
5
- "whileHover",
6
- "whileTap",
7
- "exit",
8
- "whileInView",
9
- "whileFocus",
10
- "whileDrag"
11
- ],
12
- exit: ["exit"],
13
- drag: ["drag", "dragControls"],
14
- focus: ["whileFocus"],
15
- hover: ["whileHover", "onHoverStart", "onHoverEnd"],
16
- tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
17
- pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
18
- inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
19
- layout: ["layout", "layoutId"]
20
- }, i = {};
21
- for (const n in e)
22
- i[n] = {
23
- isEnabled: (o) => e[n].some((a) => !!o[a])
24
- };
25
- export {
26
- i as featureDefinitions
27
- };