@vkzstudio/muza-ui 1.0.8 → 1.0.10

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 (275) hide show
  1. package/dist/components/Button/Button.js +19 -19
  2. package/dist/components/Button/ButtonLoader.d.ts +7 -0
  3. package/dist/components/Button/ButtonLoader.d.ts.map +1 -0
  4. package/dist/components/Button/ButtonLoader.js +40 -0
  5. package/dist/components/Button/buttonVariants.d.ts.map +1 -1
  6. package/dist/components/Button/buttonVariants.js +0 -1
  7. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
  8. package/dist/components/Icons/CustomIcons.d.ts +1 -0
  9. package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
  10. package/dist/components/Icons/CustomIcons.js +39 -28
  11. package/dist/components/ReorderableTable/ReorderableTable.js +1 -1
  12. package/dist/components/SwipeButton/SwipeButton.js +1 -1
  13. package/dist/components/TextEditor/EditorToolbar.d.ts +18 -0
  14. package/dist/components/TextEditor/EditorToolbar.d.ts.map +1 -0
  15. package/dist/components/TextEditor/EditorToolbar.js +175 -0
  16. package/dist/components/TextEditor/LinkBubbleMenu.d.ts +52 -0
  17. package/dist/components/TextEditor/LinkBubbleMenu.d.ts.map +1 -0
  18. package/dist/components/TextEditor/LinkBubbleMenu.js +97 -0
  19. package/dist/components/TextEditor/TextEditor.d.ts +134 -0
  20. package/dist/components/TextEditor/TextEditor.d.ts.map +1 -0
  21. package/dist/components/TextEditor/TextEditor.js +240 -0
  22. package/dist/components/TextEditor/TextEditor.stories.d.ts +51 -0
  23. package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -0
  24. package/dist/components/TextEditor/ToolbarButton.d.ts +38 -0
  25. package/dist/components/TextEditor/ToolbarButton.d.ts.map +1 -0
  26. package/dist/components/TextEditor/ToolbarButton.js +68 -0
  27. package/dist/components/TextEditor/ToolbarSeparator.d.ts +22 -0
  28. package/dist/components/TextEditor/ToolbarSeparator.d.ts.map +1 -0
  29. package/dist/components/TextEditor/ToolbarSeparator.js +23 -0
  30. package/dist/components/TextEditor/index.d.ts +4 -0
  31. package/dist/components/TextEditor/index.d.ts.map +1 -0
  32. package/dist/components/TextEditor/useLinkEditor.d.ts +37 -0
  33. package/dist/components/TextEditor/useLinkEditor.d.ts.map +1 -0
  34. package/dist/components/TextEditor/useLinkEditor.js +32 -0
  35. package/dist/components/index.d.ts +1 -0
  36. package/dist/components/index.d.ts.map +1 -1
  37. package/dist/index.js +140 -132
  38. package/dist/muza-ui.css +1 -1
  39. package/dist/node_modules/@popperjs/core/lib/createPopper.js +122 -0
  40. package/dist/node_modules/@popperjs/core/lib/dom-utils/contains.js +18 -0
  41. package/dist/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +23 -0
  42. package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +37 -0
  43. package/dist/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +32 -0
  44. package/dist/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +7 -0
  45. package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +10 -0
  46. package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +17 -0
  47. package/dist/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +9 -0
  48. package/dist/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +13 -0
  49. package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +6 -0
  50. package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +10 -0
  51. package/dist/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +35 -0
  52. package/dist/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +18 -0
  53. package/dist/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +10 -0
  54. package/dist/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +21 -0
  55. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +12 -0
  56. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +11 -0
  57. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +9 -0
  58. package/dist/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +20 -0
  59. package/dist/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +7 -0
  60. package/dist/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +8 -0
  61. package/dist/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +7 -0
  62. package/dist/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +16 -0
  63. package/dist/node_modules/@popperjs/core/lib/enums.js +31 -0
  64. package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +47 -0
  65. package/dist/node_modules/@popperjs/core/lib/modifiers/arrow.js +37 -0
  66. package/dist/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +99 -0
  67. package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +26 -0
  68. package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +74 -0
  69. package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +44 -0
  70. package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +31 -0
  71. package/dist/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +19 -0
  72. package/dist/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +54 -0
  73. package/dist/node_modules/@popperjs/core/lib/popper.js +27 -0
  74. package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +27 -0
  75. package/dist/node_modules/@popperjs/core/lib/utils/computeOffsets.js +54 -0
  76. package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +13 -0
  77. package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +33 -0
  78. package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +8 -0
  79. package/dist/node_modules/@popperjs/core/lib/utils/getAltAxis.js +6 -0
  80. package/dist/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +6 -0
  81. package/dist/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +11 -0
  82. package/dist/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +6 -0
  83. package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +14 -0
  84. package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +12 -0
  85. package/dist/node_modules/@popperjs/core/lib/utils/getVariation.js +6 -0
  86. package/dist/node_modules/@popperjs/core/lib/utils/math.js +6 -0
  87. package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +15 -0
  88. package/dist/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +7 -0
  89. package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +31 -0
  90. package/dist/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +11 -0
  91. package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +9 -0
  92. package/dist/node_modules/@popperjs/core/lib/utils/within.js +12 -0
  93. package/dist/node_modules/@tiptap/core/dist/index.js +2857 -0
  94. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +45 -0
  95. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +76 -0
  96. package/dist/node_modules/@tiptap/extension-bubble-menu/dist/index.js +129 -0
  97. package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +55 -0
  98. package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
  99. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +136 -0
  100. package/dist/node_modules/@tiptap/extension-document/dist/index.js +10 -0
  101. package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +21 -0
  102. package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +25 -0
  103. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +56 -0
  104. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +55 -0
  105. package/dist/node_modules/@tiptap/extension-history/dist/index.js +36 -0
  106. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -0
  107. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +75 -0
  108. package/dist/node_modules/@tiptap/extension-link/dist/index.js +272 -0
  109. package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +34 -0
  110. package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +73 -0
  111. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +34 -0
  112. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +53 -0
  113. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +64 -0
  114. package/dist/node_modules/@tiptap/extension-text/dist/index.js +9 -0
  115. package/dist/node_modules/@tiptap/react/dist/index.js +709 -0
  116. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +30 -0
  117. package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
  118. package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
  119. package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
  120. package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
  121. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
  122. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
  123. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
  124. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +34 -26
  125. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +30 -25
  126. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
  127. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
  128. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
  129. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
  130. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
  131. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
  132. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
  133. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
  134. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
  135. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
  136. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
  137. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
  138. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
  139. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
  140. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
  141. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
  142. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
  143. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
  144. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
  145. package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
  146. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
  147. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
  148. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
  149. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
  150. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
  151. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
  152. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
  153. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
  154. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
  155. package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
  156. package/dist/node_modules/linkifyjs/dist/linkify.js +707 -0
  157. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
  158. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
  159. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
  160. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
  161. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
  162. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
  163. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
  164. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
  166. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
  167. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
  168. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
  169. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
  170. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
  171. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
  172. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
  173. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
  174. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
  175. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
  176. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
  177. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
  178. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
  179. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
  180. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
  181. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
  182. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
  183. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
  184. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
  185. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
  186. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
  187. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
  188. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
  189. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
  191. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
  192. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
  193. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
  194. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
  195. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
  196. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
  197. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
  198. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
  199. package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
  200. package/dist/node_modules/orderedmap/dist/index.js +103 -0
  201. package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
  202. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
  203. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
  204. package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
  205. package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
  206. package/dist/node_modules/prosemirror-model/dist/index.js +2733 -0
  207. package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
  208. package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
  209. package/dist/node_modules/prosemirror-transform/dist/index.js +1520 -0
  210. package/dist/node_modules/prosemirror-view/dist/index.js +3794 -0
  211. package/dist/node_modules/rope-sequence/dist/index.js +100 -0
  212. package/dist/node_modules/tippy.js/dist/tippy.esm.js +813 -0
  213. package/dist/node_modules/w3c-keyname/index.js +93 -0
  214. package/dist/translations/locales/cs.d.ts.map +1 -1
  215. package/dist/translations/locales/cs.js +18 -0
  216. package/dist/translations/locales/en.d.ts.map +1 -1
  217. package/dist/translations/locales/en.js +18 -0
  218. package/dist/translations/locales/sk.d.ts.map +1 -1
  219. package/dist/translations/locales/sk.js +18 -0
  220. package/dist/translations/types.d.ts +22 -0
  221. package/dist/translations/types.d.ts.map +1 -1
  222. package/package.json +17 -1
  223. package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
  224. package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
  225. package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
  226. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
  227. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
  228. package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
  229. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
  230. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
  231. package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
  232. package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
  233. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
  234. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
  235. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  236. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
  237. package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
  238. package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
  239. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
  240. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
  241. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
  242. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
  243. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
  244. /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
  245. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
  246. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
  247. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
  248. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
  249. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
  250. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
  251. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
  252. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
  253. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
  254. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
  255. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
  256. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
  257. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
  258. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
  259. /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
  260. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
  261. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
  262. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
  263. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
  264. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
  265. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
  266. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
  267. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
  268. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
  269. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
  270. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
  271. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
  272. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
  273. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
  274. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
  275. /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.js +0 -0
@@ -1,29 +1,34 @@
1
- import { jsx as C } from "react/jsx-runtime";
2
- import { forwardRef as I, useContext as M } from "react";
3
- import { ReorderContext as h } from "../../context/ReorderContext.js";
4
- import { motion as V } from "../../render/components/motion/proxy.js";
5
- import { useConstant as O } from "../../utils/use-constant.js";
6
- import { useMotionValue as S } from "../../value/use-motion-value.js";
7
- import { useTransform as T } from "../../value/use-transform.js";
8
- import { isMotionValue as b } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
9
- import { invariant as j } from "../../../../../motion-utils/dist/es/errors.js";
10
- function f(e, o = 0) {
11
- return b(e) ? e : S(o);
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { forwardRef as V, useContext as O } from "react";
3
+ import { ReorderContext as T } from "../../context/ReorderContext.js";
4
+ import { motion as b } from "../../render/components/motion/proxy.js";
5
+ import { useConstant as j } from "../../utils/use-constant.js";
6
+ import { useMotionValue as w } from "../../value/use-motion-value.js";
7
+ import { useTransform as z } from "../../value/use-transform.js";
8
+ import { autoScrollIfNeeded as A, resetAutoScrollState as B } from "./utils/auto-scroll.js";
9
+ import { isMotionValue as D } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
10
+ import { invariant as G } from "../../../../../motion-utils/dist/es/errors.js";
11
+ function a(i, e = 0) {
12
+ return D(i) ? i : w(e);
12
13
  }
13
- function w({ children: e, style: o = {}, value: m, as: p = "li", onDrag: u, layout: c = !0, ...d }, x) {
14
- const l = O(() => V[p]), s = M(h), r = {
15
- x: f(o.x),
16
- y: f(o.y)
17
- }, y = T([r.x, r.y], ([t, i]) => t || i ? 1 : "unset");
18
- j(!!s, "Reorder.Item must be a child of Reorder.Group", "reorder-item-child");
19
- const { axis: n, registerItem: R, updateOrder: g } = s;
20
- return C(l, { drag: n, ...d, dragSnapToOrigin: !0, style: { ...o, x: r.x, y: r.y, zIndex: y }, layout: c, onDrag: (t, i) => {
21
- const { velocity: a } = i;
22
- a[n] && g(m, r[n].get(), a[n]), u && u(t, i);
23
- }, onLayoutMeasure: (t) => R(m, t), ref: x, ignoreStrict: !0, children: e });
14
+ function L({ children: i, style: e = {}, value: m, as: c = "li", onDrag: u, onDragEnd: f, layout: d = !0, ...l }, x) {
15
+ const y = j(() => b[c]), s = O(T), n = {
16
+ x: a(e.x),
17
+ y: a(e.y)
18
+ }, R = z([n.x, n.y], ([o, t]) => o || t ? 1 : "unset");
19
+ G(!!s, "Reorder.Item must be a child of Reorder.Group", "reorder-item-child");
20
+ const { axis: r, registerItem: g, updateOrder: I, groupRef: C } = s;
21
+ return h(y, { drag: r, ...l, dragSnapToOrigin: !0, style: { ...e, x: n.x, y: n.y, zIndex: R }, layout: d, onDrag: (o, t) => {
22
+ const { velocity: p, point: S } = t, M = n[r].get();
23
+ I(m, M, p[r]), A(C.current, S[r], r, p[r]), u && u(o, t);
24
+ }, onDragEnd: (o, t) => {
25
+ B(), f && f(o, t);
26
+ }, onLayoutMeasure: (o) => {
27
+ g(m, o);
28
+ }, ref: x, ignoreStrict: !0, children: i });
24
29
  }
25
- const E = /* @__PURE__ */ I(w);
30
+ const Q = /* @__PURE__ */ V(L);
26
31
  export {
27
- E as ReorderItem,
28
- w as ReorderItemComponent
32
+ Q as ReorderItem,
33
+ L as ReorderItemComponent
29
34
  };
@@ -0,0 +1,64 @@
1
+ const g = /* @__PURE__ */ new Set(["auto", "scroll"]), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap();
2
+ let i = null;
3
+ function p() {
4
+ if (i) {
5
+ const o = f(i, "y");
6
+ o && (d.delete(o), u.delete(o));
7
+ const l = f(i, "x");
8
+ l && l !== o && (d.delete(l), u.delete(l)), i = null;
9
+ }
10
+ }
11
+ function m(o, l) {
12
+ const t = getComputedStyle(o), n = l === "x" ? t.overflowX : t.overflowY;
13
+ return g.has(n);
14
+ }
15
+ function f(o, l) {
16
+ let t = o == null ? void 0 : o.parentElement;
17
+ for (; t; ) {
18
+ if (m(t, l))
19
+ return t;
20
+ t = t.parentElement;
21
+ }
22
+ return null;
23
+ }
24
+ function w(o, l, t) {
25
+ const n = l.getBoundingClientRect(), e = t === "x" ? n.left : n.top, a = t === "x" ? n.right : n.bottom, c = o - e, r = a - o;
26
+ if (c < 50) {
27
+ const s = 1 - c / 50;
28
+ return { amount: -25 * s * s, edge: "start" };
29
+ } else if (r < 50) {
30
+ const s = 1 - r / 50;
31
+ return { amount: 25 * s * s, edge: "end" };
32
+ }
33
+ return { amount: 0, edge: null };
34
+ }
35
+ function A(o, l, t, n) {
36
+ if (!o)
37
+ return;
38
+ i = o;
39
+ const e = f(o, t);
40
+ if (!e)
41
+ return;
42
+ const a = l - (t === "x" ? window.scrollX : window.scrollY), { amount: c, edge: r } = w(a, e, t);
43
+ if (r === null) {
44
+ d.delete(e), u.delete(e);
45
+ return;
46
+ }
47
+ if (d.get(e) !== r) {
48
+ if (!(r === "start" && n < 0 || r === "end" && n > 0))
49
+ return;
50
+ d.set(e, r);
51
+ const h = t === "x" ? e.scrollWidth - e.clientWidth : e.scrollHeight - e.clientHeight;
52
+ u.set(e, h);
53
+ }
54
+ if (c > 0) {
55
+ const S = u.get(e);
56
+ if ((t === "x" ? e.scrollLeft : e.scrollTop) >= S)
57
+ return;
58
+ }
59
+ t === "x" ? e.scrollLeft += c : e.scrollTop += c;
60
+ }
61
+ export {
62
+ A as autoScrollIfNeeded,
63
+ p as resetAutoScrollState
64
+ };
@@ -1,5 +1,5 @@
1
- import { isControllingVariants as r } from "../../render/utils/is-controlling-variants.js";
2
- import { isVariantLabel as e } from "../../render/utils/is-variant-label.js";
1
+ import { isControllingVariants as r } from "../../../../../motion-dom/dist/es/render/utils/is-controlling-variants.js";
2
+ import { isVariantLabel as e } from "../../../../../motion-dom/dist/es/render/utils/is-variant-label.js";
3
3
  function o(i, a) {
4
4
  if (r(i)) {
5
5
  const { initial: n, animate: t } = i;
@@ -1,7 +1,7 @@
1
- import { addDomEvent as d } from "./add-dom-event.js";
2
- import { addPointerInfo as e } from "./event-info.js";
1
+ import { addPointerInfo as d } from "./event-info.js";
2
+ import { addDomEvent as e } from "../../../../motion-dom/dist/es/events/add-dom-event.js";
3
3
  function f(o, r, t, n) {
4
- return d(o, r, e(t), n);
4
+ return e(o, r, d(t), n);
5
5
  }
6
6
  export {
7
7
  f as addPointerEvent
@@ -1,79 +1,81 @@
1
- import { animateMotionValue as M } from "../../animation/interfaces/motion-value.js";
2
- import { addDomEvent as S } from "../../events/add-dom-event.js";
3
- import { addPointerEvent as B } from "../../events/add-pointer-event.js";
4
- import { extractEventInfo as k } from "../../events/event-info.js";
5
- import { convertBoxToBoundingBox as j, convertBoundingBoxToBox as T } from "../../projection/geometry/conversion.js";
6
- import { calcLength as w } from "../../projection/geometry/delta-calc.js";
7
- import { createBox as b } from "../../projection/geometry/models.js";
8
- import { eachAxis as h } from "../../projection/utils/each-axis.js";
9
- import { measurePageBox as I } from "../../projection/utils/measure.js";
10
- import { getContextWindow as R } from "../../utils/get-context-window.js";
1
+ import { addPointerEvent as M } from "../../events/add-pointer-event.js";
2
+ import { extractEventInfo as S } from "../../events/event-info.js";
3
+ import { getContextWindow as k } from "../../utils/get-context-window.js";
11
4
  import { isRefObject as D } from "../../utils/is-ref-object.js";
12
- import { addValueToWillChange as x } from "../../value/use-will-change/add-will-change.js";
13
- import { PanSession as W } from "../pan/PanSession.js";
14
- import { applyConstraints as O, calcRelativeConstraints as U, resolveDragElastic as z, calcViewportConstraints as _, defaultElastic as F, rebaseAxisConstraints as K, calcOrigin as N } from "./utils/constraints.js";
5
+ import { PanSession as B } from "../pan/PanSession.js";
6
+ import { applyConstraints as j, calcRelativeConstraints as b, resolveDragElastic as T, calcViewportConstraints as w, defaultElastic as I, rebaseAxisConstraints as R, calcOrigin as W } from "./utils/constraints.js";
7
+ import { createBox as O } from "../../../../../motion-dom/dist/es/projection/geometry/models.js";
8
+ import { eachAxis as h } from "../../../../../motion-dom/dist/es/projection/utils/each-axis.js";
15
9
  import { frame as y } from "../../../../../motion-dom/dist/es/frameloop/frame.js";
16
- import { invariant as $ } from "../../../../../motion-utils/dist/es/errors.js";
17
- import { setDragLock as q } from "../../../../../motion-dom/dist/es/gestures/drag/state/set-active.js";
18
- import { percent as G } from "../../../../../motion-dom/dist/es/value/types/numbers/units.js";
10
+ import { invariant as K } from "../../../../../motion-utils/dist/es/errors.js";
11
+ import { measurePageBox as U } from "../../../../../motion-dom/dist/es/projection/utils/measure.js";
12
+ import { convertBoxToBoundingBox as z, convertBoundingBoxToBox as _ } from "../../../../../motion-dom/dist/es/projection/geometry/conversion.js";
13
+ import { addValueToWillChange as x } from "../../../../../motion-dom/dist/es/value/will-change/add-will-change.js";
14
+ import { animateMotionValue as F } from "../../../../../motion-dom/dist/es/animation/interfaces/motion-value.js";
15
+ import { addDomEvent as N } from "../../../../../motion-dom/dist/es/events/add-dom-event.js";
16
+ import { setDragLock as $ } from "../../../../../motion-dom/dist/es/gestures/drag/state/set-active.js";
17
+ import { percent as q } from "../../../../../motion-dom/dist/es/value/types/numbers/units.js";
18
+ import { calcLength as G } from "../../../../../motion-dom/dist/es/projection/geometry/delta-calc.js";
19
19
  import { mixNumber as L } from "../../../../../motion-dom/dist/es/utils/mix/number.js";
20
- const H = /* @__PURE__ */ new WeakMap();
21
- class dt {
20
+ import { isElementKeyboardAccessible as H } from "../../../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js";
21
+ const J = /* @__PURE__ */ new WeakMap();
22
+ class Et {
22
23
  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 = b(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
24
+ this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = O(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
24
25
  }
25
26
  start(t, { snapToCursor: s = !1, distanceThreshold: n } = {}) {
26
27
  const { presenceContext: i } = this.visualElement;
27
28
  if (i && i.isPresent === !1)
28
29
  return;
29
- const r = (a) => {
30
- const { dragSnapToOrigin: l } = this.getProps();
31
- l ? this.pauseAnimation() : this.stopAnimation(), s && this.snapToCursor(k(a).point);
32
- }, e = (a, l) => {
30
+ const r = (o) => {
31
+ s ? (this.stopAnimation(), this.snapToCursor(S(o).point)) : this.pauseAnimation();
32
+ }, e = (o, c) => {
33
+ this.stopAnimation();
33
34
  const { drag: f, dragPropagation: d, onDragStart: v } = this.getProps();
34
- if (f && !d && (this.openDragLock && this.openDragLock(), this.openDragLock = q(f), !this.openDragLock))
35
+ if (f && !d && (this.openDragLock && this.openDragLock(), this.openDragLock = $(f), !this.openDragLock))
35
36
  return;
36
- this.latestPointerEvent = a, this.latestPanInfo = l, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), h((m) => {
37
- let P = this.getAxisMotionValue(m).get() || 0;
38
- if (G.test(P)) {
37
+ this.latestPointerEvent = o, this.latestPanInfo = c, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), h((g) => {
38
+ let P = this.getAxisMotionValue(g).get() || 0;
39
+ if (q.test(P)) {
39
40
  const { projection: C } = this.visualElement;
40
41
  if (C && C.layout) {
41
- const V = C.layout.layoutBox[m];
42
- V && (P = w(V) * (parseFloat(P) / 100));
42
+ const V = C.layout.layoutBox[g];
43
+ V && (P = G(V) * (parseFloat(P) / 100));
43
44
  }
44
45
  }
45
- this.originPoint[m] = P;
46
- }), v && y.postRender(() => v(a, l)), x(this.visualElement, "transform");
46
+ this.originPoint[g] = P;
47
+ }), v && y.postRender(() => v(o, c)), x(this.visualElement, "transform");
47
48
  const { animationState: E } = this.visualElement;
48
49
  E && E.setActive("whileDrag", !0);
49
- }, o = (a, l) => {
50
- this.latestPointerEvent = a, this.latestPanInfo = l;
50
+ }, a = (o, c) => {
51
+ this.latestPointerEvent = o, this.latestPanInfo = c;
51
52
  const { dragPropagation: f, dragDirectionLock: d, onDirectionLock: v, onDrag: E } = this.getProps();
52
53
  if (!f && !this.openDragLock)
53
54
  return;
54
- const { offset: m } = l;
55
+ const { offset: g } = c;
55
56
  if (d && this.currentDirection === null) {
56
- this.currentDirection = J(m), this.currentDirection !== null && v && v(this.currentDirection);
57
+ this.currentDirection = Q(g), this.currentDirection !== null && v && v(this.currentDirection);
57
58
  return;
58
59
  }
59
- this.updateAxis("x", l.point, m), this.updateAxis("y", l.point, m), this.visualElement.render(), E && E(a, l);
60
- }, c = (a, l) => {
61
- this.latestPointerEvent = a, this.latestPanInfo = l, this.stop(a, l), this.latestPointerEvent = null, this.latestPanInfo = null;
62
- }, g = () => h((a) => {
63
- var l;
64
- return this.getAnimationState(a) === "paused" && ((l = this.getAxisMotionValue(a).animation) == null ? void 0 : l.play());
60
+ this.updateAxis("x", c.point, g), this.updateAxis("y", c.point, g), this.visualElement.render(), E && E(o, c);
61
+ }, l = (o, c) => {
62
+ this.latestPointerEvent = o, this.latestPanInfo = c, this.stop(o, c), this.latestPointerEvent = null, this.latestPanInfo = null;
63
+ }, m = () => h((o) => {
64
+ var c;
65
+ return this.getAnimationState(o) === "paused" && ((c = this.getAxisMotionValue(o).animation) == null ? void 0 : c.play());
65
66
  }), { dragSnapToOrigin: u } = this.getProps();
66
- this.panSession = new W(t, {
67
+ this.panSession = new B(t, {
67
68
  onSessionStart: r,
68
69
  onStart: e,
69
- onMove: o,
70
- onSessionEnd: c,
71
- resumeAnimation: g
70
+ onMove: a,
71
+ onSessionEnd: l,
72
+ resumeAnimation: m
72
73
  }, {
73
74
  transformPagePoint: this.visualElement.getTransformPagePoint(),
74
75
  dragSnapToOrigin: u,
75
76
  distanceThreshold: n,
76
- contextWindow: R(this.visualElement)
77
+ contextWindow: k(this.visualElement),
78
+ element: this.visualElement.current
77
79
  });
78
80
  }
79
81
  /**
@@ -85,8 +87,8 @@ class dt {
85
87
  return;
86
88
  const { velocity: e } = i;
87
89
  this.startAnimation(e);
88
- const { onDragEnd: o } = this.getProps();
89
- o && y.postRender(() => o(n, i));
90
+ const { onDragEnd: a } = this.getProps();
91
+ a && y.postRender(() => a(n, i));
90
92
  }
91
93
  /**
92
94
  * @internal
@@ -94,23 +96,32 @@ class dt {
94
96
  cancel() {
95
97
  this.isDragging = !1;
96
98
  const { projection: t, animationState: s } = this.visualElement;
97
- t && (t.isAnimationBlocked = !1), this.panSession && this.panSession.end(), this.panSession = void 0;
99
+ t && (t.isAnimationBlocked = !1), this.endPanSession();
98
100
  const { dragPropagation: n } = this.getProps();
99
101
  !n && this.openDragLock && (this.openDragLock(), this.openDragLock = null), s && s.setActive("whileDrag", !1);
100
102
  }
103
+ /**
104
+ * Clean up the pan session without modifying other drag state.
105
+ * This is used during unmount to ensure event listeners are removed
106
+ * without affecting projection animations or drag locks.
107
+ * @internal
108
+ */
109
+ endPanSession() {
110
+ this.panSession && this.panSession.end(), this.panSession = void 0;
111
+ }
101
112
  updateAxis(t, s, n) {
102
113
  const { drag: i } = this.getProps();
103
114
  if (!n || !A(t, i, this.currentDirection))
104
115
  return;
105
116
  const r = this.getAxisMotionValue(t);
106
117
  let e = this.originPoint[t] + n[t];
107
- this.constraints && this.constraints[t] && (e = O(e, this.constraints[t], this.elastic[t])), r.set(e);
118
+ this.constraints && this.constraints[t] && (e = j(e, this.constraints[t], this.elastic[t])), r.set(e);
108
119
  }
109
120
  resolveConstraints() {
110
121
  var r;
111
122
  const { dragConstraints: t, dragElastic: s } = this.getProps(), n = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (r = this.visualElement.projection) == null ? void 0 : r.layout, i = this.constraints;
112
- t && D(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && n ? this.constraints = U(n.layoutBox, t) : this.constraints = !1, this.elastic = z(s), i !== this.constraints && n && this.constraints && !this.hasMutatedConstraints && h((e) => {
113
- this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = K(n.layoutBox[e], this.constraints[e]));
123
+ t && D(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && n ? this.constraints = b(n.layoutBox, t) : this.constraints = !1, this.elastic = T(s), i !== this.constraints && n && this.constraints && !this.hasMutatedConstraints && h((e) => {
124
+ this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = R(n.layoutBox[e], this.constraints[e]));
114
125
  });
115
126
  }
116
127
  resolveRefConstraints() {
@@ -118,42 +129,42 @@ class dt {
118
129
  if (!t || !D(t))
119
130
  return !1;
120
131
  const n = t.current;
121
- $(n !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
132
+ K(n !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
122
133
  const { projection: i } = this.visualElement;
123
134
  if (!i || !i.layout)
124
135
  return !1;
125
- const r = I(n, i.root, this.visualElement.getTransformPagePoint());
126
- let e = _(i.layout.layoutBox, r);
136
+ const r = U(n, i.root, this.visualElement.getTransformPagePoint());
137
+ let e = w(i.layout.layoutBox, r);
127
138
  if (s) {
128
- const o = s(j(e));
129
- this.hasMutatedConstraints = !!o, o && (e = T(o));
139
+ const a = s(z(e));
140
+ this.hasMutatedConstraints = !!a, a && (e = _(a));
130
141
  }
131
142
  return e;
132
143
  }
133
144
  startAnimation(t) {
134
- const { drag: s, dragMomentum: n, dragElastic: i, dragTransition: r, dragSnapToOrigin: e, onDragTransitionEnd: o } = this.getProps(), c = this.constraints || {}, g = h((u) => {
145
+ const { drag: s, dragMomentum: n, dragElastic: i, dragTransition: r, dragSnapToOrigin: e, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, m = h((u) => {
135
146
  if (!A(u, s, this.currentDirection))
136
147
  return;
137
- let a = c && c[u] || {};
138
- e && (a = { min: 0, max: 0 });
139
- const l = i ? 200 : 1e6, f = i ? 40 : 1e7, d = {
148
+ let o = l && l[u] || {};
149
+ e && (o = { min: 0, max: 0 });
150
+ const c = i ? 200 : 1e6, f = i ? 40 : 1e7, d = {
140
151
  type: "inertia",
141
152
  velocity: n ? t[u] : 0,
142
- bounceStiffness: l,
153
+ bounceStiffness: c,
143
154
  bounceDamping: f,
144
155
  timeConstant: 750,
145
156
  restDelta: 1,
146
157
  restSpeed: 10,
147
158
  ...r,
148
- ...a
159
+ ...o
149
160
  };
150
161
  return this.startAxisValueAnimation(u, d);
151
162
  });
152
- return Promise.all(g).then(o);
163
+ return Promise.all(m).then(a);
153
164
  }
154
165
  startAxisValueAnimation(t, s) {
155
166
  const n = this.getAxisMotionValue(t);
156
- return x(this.visualElement, t), n.start(M(t, n, 0, s, this.visualElement, !1));
167
+ return x(this.visualElement, t), n.start(F(t, n, 0, s, this.visualElement, !1));
157
168
  }
158
169
  stopAnimation() {
159
170
  h((t) => this.getAxisMotionValue(t).stop());
@@ -185,8 +196,8 @@ class dt {
185
196
  return;
186
197
  const { projection: i } = this.visualElement, r = this.getAxisMotionValue(s);
187
198
  if (i && i.layout) {
188
- const { min: e, max: o } = i.layout.layoutBox[s];
189
- r.set(t[s] - L(e, o, 0.5));
199
+ const { min: e, max: a } = i.layout.layoutBox[s], l = r.get() || 0;
200
+ r.set(t[s] - L(e, a, 0.5) + l);
190
201
  }
191
202
  });
192
203
  }
@@ -204,44 +215,44 @@ class dt {
204
215
  this.stopAnimation();
205
216
  const i = { x: 0, y: 0 };
206
217
  h((e) => {
207
- const o = this.getAxisMotionValue(e);
208
- if (o && this.constraints !== !1) {
209
- const c = o.get();
210
- i[e] = N({ min: c, max: c }, this.constraints[e]);
218
+ const a = this.getAxisMotionValue(e);
219
+ if (a && this.constraints !== !1) {
220
+ const l = a.get();
221
+ i[e] = W({ min: l, max: l }, this.constraints[e]);
211
222
  }
212
223
  });
213
224
  const { transformTemplate: r } = this.visualElement.getProps();
214
225
  this.visualElement.current.style.transform = r ? r({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.resolveConstraints(), h((e) => {
215
226
  if (!A(e, t, null))
216
227
  return;
217
- const o = this.getAxisMotionValue(e), { min: c, max: g } = this.constraints[e];
218
- o.set(L(c, g, i[e]));
228
+ const a = this.getAxisMotionValue(e), { min: l, max: m } = this.constraints[e];
229
+ a.set(L(l, m, i[e]));
219
230
  });
220
231
  }
221
232
  addListeners() {
222
233
  if (!this.visualElement.current)
223
234
  return;
224
- H.set(this.visualElement, this);
225
- const t = this.visualElement.current, s = B(t, "pointerdown", (c) => {
226
- const { drag: g, dragListener: u = !0 } = this.getProps();
227
- g && u && this.start(c);
235
+ J.set(this.visualElement, this);
236
+ const t = this.visualElement.current, s = M(t, "pointerdown", (l) => {
237
+ const { drag: m, dragListener: u = !0 } = this.getProps(), o = l.target, c = o !== t && H(o);
238
+ m && u && !c && this.start(l);
228
239
  }), n = () => {
229
- const { dragConstraints: c } = this.getProps();
230
- D(c) && c.current && (this.constraints = this.resolveRefConstraints());
240
+ const { dragConstraints: l } = this.getProps();
241
+ D(l) && l.current && (this.constraints = this.resolveRefConstraints());
231
242
  }, { projection: i } = this.visualElement, r = i.addEventListener("measure", n);
232
243
  i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), y.read(n);
233
- const e = S(window, "resize", () => this.scalePositionWithinConstraints()), o = i.addEventListener("didUpdate", (({ delta: c, hasLayoutChanged: g }) => {
234
- this.isDragging && g && (h((u) => {
235
- const a = this.getAxisMotionValue(u);
236
- a && (this.originPoint[u] += c[u].translate, a.set(a.get() + c[u].translate));
244
+ const e = N(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: m }) => {
245
+ this.isDragging && m && (h((u) => {
246
+ const o = this.getAxisMotionValue(u);
247
+ o && (this.originPoint[u] += l[u].translate, o.set(o.get() + l[u].translate));
237
248
  }), this.visualElement.render());
238
249
  }));
239
250
  return () => {
240
- e(), s(), r(), o && o();
251
+ e(), s(), r(), a && a();
241
252
  };
242
253
  }
243
254
  getProps() {
244
- const t = this.visualElement.getProps(), { drag: s = !1, dragDirectionLock: n = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: e = F, dragMomentum: o = !0 } = t;
255
+ const t = this.visualElement.getProps(), { drag: s = !1, dragDirectionLock: n = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: e = I, dragMomentum: a = !0 } = t;
245
256
  return {
246
257
  ...t,
247
258
  drag: s,
@@ -249,18 +260,18 @@ class dt {
249
260
  dragPropagation: i,
250
261
  dragConstraints: r,
251
262
  dragElastic: e,
252
- dragMomentum: o
263
+ dragMomentum: a
253
264
  };
254
265
  }
255
266
  }
256
267
  function A(p, t, s) {
257
268
  return (t === !0 || t === p) && (s === null || s === p);
258
269
  }
259
- function J(p, t = 10) {
270
+ function Q(p, t = 10) {
260
271
  let s = null;
261
272
  return Math.abs(p.y) > t ? s = "y" : Math.abs(p.x) > t && (s = "x"), s;
262
273
  }
263
274
  export {
264
- dt as VisualElementDragControls,
265
- H as elementDragControls
275
+ Et as VisualElementDragControls,
276
+ J as elementDragControls
266
277
  };
@@ -1,18 +1,22 @@
1
- import { Feature as s } from "../../motion/features/Feature.js";
2
1
  import { VisualElementDragControls as t } from "./VisualElementDragControls.js";
3
- import { noop as r } from "../../../../../motion-utils/dist/es/noop.js";
4
- class u extends s {
2
+ import { Feature as e } from "../../../../../motion-dom/dist/es/render/Feature.js";
3
+ import { noop as s } from "../../../../../motion-utils/dist/es/noop.js";
4
+ class m extends e {
5
5
  constructor(o) {
6
- super(o), this.removeGroupControls = r, this.removeListeners = r, this.controls = new t(o);
6
+ super(o), this.removeGroupControls = s, this.removeListeners = s, this.controls = new t(o);
7
7
  }
8
8
  mount() {
9
9
  const { dragControls: o } = this.node.getProps();
10
- o && (this.removeGroupControls = o.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || r;
10
+ o && (this.removeGroupControls = o.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || s;
11
+ }
12
+ update() {
13
+ const { dragControls: o } = this.node.getProps(), { dragControls: r } = this.node.prevProps || {};
14
+ o !== r && (this.removeGroupControls(), o && (this.removeGroupControls = o.subscribe(this.controls)));
11
15
  }
12
16
  unmount() {
13
- this.removeGroupControls(), this.removeListeners();
17
+ this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
14
18
  }
15
19
  }
16
20
  export {
17
- u as DragGesture
21
+ m as DragGesture
18
22
  };
@@ -1,9 +1,9 @@
1
- import { calcLength as r } from "../../../projection/geometry/delta-calc.js";
2
- import { mixNumber as t } from "../../../../../../motion-dom/dist/es/utils/mix/number.js";
1
+ import { mixNumber as r } from "../../../../../../motion-dom/dist/es/utils/mix/number.js";
2
+ import { calcLength as t } from "../../../../../../motion-dom/dist/es/projection/geometry/delta-calc.js";
3
3
  import { progress as u } from "../../../../../../motion-utils/dist/es/progress.js";
4
4
  import { clamp as C } from "../../../../../../motion-utils/dist/es/clamp.js";
5
5
  function a(n, { min: e, max: m }, i) {
6
- return e !== void 0 && n < e ? n = i ? t(e, n, i.min) : Math.max(n, e) : m !== void 0 && n > m && (n = i ? t(m, n, i.max) : Math.min(n, m)), n;
6
+ return e !== void 0 && n < e ? n = i ? r(e, n, i.min) : Math.max(n, e) : m !== void 0 && n > m && (n = i ? r(m, n, i.max) : Math.min(n, m)), n;
7
7
  }
8
8
  function o(n, e, m) {
9
9
  return {
@@ -29,7 +29,7 @@ function w(n, e) {
29
29
  }
30
30
  function y(n, e) {
31
31
  let m = 0.5;
32
- const i = r(n), f = r(e);
32
+ const i = t(n), f = t(e);
33
33
  return f > i ? m = u(e.min, e.max - i, n.min) : i > f && (m = u(n.min, n.max - f, e.min)), C(0, 1, m);
34
34
  }
35
35
  function M(n, e) {
@@ -1,6 +1,6 @@
1
- import { addDomEvent as e } from "../events/add-dom-event.js";
2
- import { Feature as i } from "../motion/features/Feature.js";
1
+ import { Feature as i } from "../../../../motion-dom/dist/es/render/Feature.js";
3
2
  import { pipe as s } from "../../../../motion-utils/dist/es/pipe.js";
3
+ import { addDomEvent as e } from "../../../../motion-dom/dist/es/events/add-dom-event.js";
4
4
  class a extends i {
5
5
  constructor() {
6
6
  super(...arguments), this.isActive = !1;
@@ -1,5 +1,5 @@
1
1
  import { extractEventInfo as m } from "../events/event-info.js";
2
- import { Feature as s } from "../motion/features/Feature.js";
2
+ import { Feature as s } from "../../../../motion-dom/dist/es/render/Feature.js";
3
3
  import { hover as u } from "../../../../motion-dom/dist/es/gestures/hover.js";
4
4
  import { frame as c } from "../../../../motion-dom/dist/es/frameloop/frame.js";
5
5
  function a(e, t, r) {