@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
@@ -0,0 +1,30 @@
1
+ import { Extension as i } from "../../core/dist/index.js";
2
+ import { Blockquote as t } from "../../extension-blockquote/dist/index.js";
3
+ import { Bold as s } from "../../extension-bold/dist/index.js";
4
+ import { BulletList as r } from "../../extension-bullet-list/dist/index.js";
5
+ import { Code as e } from "../../extension-code/dist/index.js";
6
+ import { CodeBlock as p } from "../../extension-code-block/dist/index.js";
7
+ import { Document as f } from "../../extension-document/dist/index.js";
8
+ import { Dropcursor as n } from "../../extension-dropcursor/dist/index.js";
9
+ import { Gapcursor as h } from "../../extension-gapcursor/dist/index.js";
10
+ import { HardBreak as u } from "../../extension-hard-break/dist/index.js";
11
+ import { Heading as a } from "../../extension-heading/dist/index.js";
12
+ import { History as l } from "../../extension-history/dist/index.js";
13
+ import { HorizontalRule as m } from "../../extension-horizontal-rule/dist/index.js";
14
+ import { Italic as c } from "../../extension-italic/dist/index.js";
15
+ import { ListItem as d } from "../../extension-list-item/dist/index.js";
16
+ import { OrderedList as g } from "../../extension-ordered-list/dist/index.js";
17
+ import { Paragraph as k } from "../../extension-paragraph/dist/index.js";
18
+ import { Strike as B } from "../../extension-strike/dist/index.js";
19
+ import { Text as x } from "../../extension-text/dist/index.js";
20
+ const w = i.create({
21
+ name: "starterKit",
22
+ addExtensions() {
23
+ const o = [];
24
+ return this.options.bold !== !1 && o.push(s.configure(this.options.bold)), this.options.blockquote !== !1 && o.push(t.configure(this.options.blockquote)), this.options.bulletList !== !1 && o.push(r.configure(this.options.bulletList)), this.options.code !== !1 && o.push(e.configure(this.options.code)), this.options.codeBlock !== !1 && o.push(p.configure(this.options.codeBlock)), this.options.document !== !1 && o.push(f.configure(this.options.document)), this.options.dropcursor !== !1 && o.push(n.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && o.push(h.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && o.push(u.configure(this.options.hardBreak)), this.options.heading !== !1 && o.push(a.configure(this.options.heading)), this.options.history !== !1 && o.push(l.configure(this.options.history)), this.options.horizontalRule !== !1 && o.push(m.configure(this.options.horizontalRule)), this.options.italic !== !1 && o.push(c.configure(this.options.italic)), this.options.listItem !== !1 && o.push(d.configure(this.options.listItem)), this.options.orderedList !== !1 && o.push(g.configure(this.options.orderedList)), this.options.paragraph !== !1 && o.push(k.configure(this.options.paragraph)), this.options.strike !== !1 && o.push(B.configure(this.options.strike)), this.options.text !== !1 && o.push(x.configure(this.options.text)), o;
25
+ }
26
+ });
27
+ export {
28
+ w as StarterKit,
29
+ w as default
30
+ };
@@ -1,7 +1,7 @@
1
- import { isDOMKeyframes as f } from "../utils/is-dom-keyframes.js";
2
- import { resolveElements as n } from "../../../../../motion-dom/dist/es/utils/resolve-elements.js";
3
- function s(r, e, o, i) {
4
- return typeof r == "string" && f(e) ? n(r, o, i) : r instanceof NodeList ? Array.from(r) : Array.isArray(r) ? r : [r];
1
+ import { isDOMKeyframes as o } from "../utils/is-dom-keyframes.js";
2
+ import { resolveElements as l } from "../../../../../motion-dom/dist/es/utils/resolve-elements.js";
3
+ function s(r, e, i, n) {
4
+ return r == null ? [] : typeof r == "string" && o(e) ? l(r, i, n) : r instanceof NodeList ? Array.from(r) : Array.isArray(r) ? r.filter((f) => f != null) : [r];
5
5
  }
6
6
  export {
7
7
  s as resolveSubjects
@@ -1,31 +1,31 @@
1
- import { visualElementStore as u } from "../../render/store.js";
2
- import { animateTarget as g } from "../interfaces/visual-element-target.js";
3
- import { createDOMVisualElement as h, createObjectVisualElement as v } from "../utils/create-visual-element.js";
4
- import { isDOMKeyframes as c } from "../utils/is-dom-keyframes.js";
5
- import { resolveSubjects as E } from "./resolve-subjects.js";
6
- import { animateSingleValue as S } from "./single-value.js";
7
- import { isMotionValue as y } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
8
- import { invariant as s } from "../../../../../motion-utils/dist/es/errors.js";
9
- function V(t, e) {
10
- return y(t) || typeof t == "number" || typeof t == "string" && !c(e);
1
+ import { createDOMVisualElement as d, createObjectVisualElement as v } from "../utils/create-visual-element.js";
2
+ import { isDOMKeyframes as f } from "../utils/is-dom-keyframes.js";
3
+ import { resolveSubjects as S } from "./resolve-subjects.js";
4
+ import { animateSingleValue as g } from "../../../../../motion-dom/dist/es/animation/animate/single-value.js";
5
+ import { visualElementStore as u } from "../../../../../motion-dom/dist/es/render/store.js";
6
+ import { animateTarget as E } from "../../../../../motion-dom/dist/es/animation/interfaces/visual-element-target.js";
7
+ import { isMotionValue as V } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
8
+ import { invariant as h } from "../../../../../motion-utils/dist/es/errors.js";
9
+ function M(e, t) {
10
+ return V(e) || typeof e == "number" || typeof e == "string" && !f(t);
11
11
  }
12
- function N(t, e, n, f) {
13
- const l = [];
14
- if (V(t, e))
15
- l.push(S(t, c(e) && e.default || e, n && (n.default || n)));
12
+ function N(e, t, n, s) {
13
+ const o = [];
14
+ if (M(e, t))
15
+ o.push(g(e, f(t) && t.default || t, n && (n.default || n)));
16
16
  else {
17
- const m = E(t, e, f), a = m.length;
18
- s(!!a, "No valid elements provided.", "no-valid-elements");
19
- for (let r = 0; r < a; r++) {
20
- const i = m[r];
21
- s(i !== null, "You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.", "animate-null");
22
- const d = i instanceof Element ? h : v;
23
- u.has(i) || d(i);
24
- const p = u.get(i), o = { ...n };
25
- "delay" in o && typeof o.delay == "function" && (o.delay = o.delay(r, a)), l.push(...g(p, { ...e, transition: o }, {}));
17
+ if (e == null)
18
+ return o;
19
+ const m = S(e, t, s), a = m.length;
20
+ h(!!a, "No valid elements provided.", "no-valid-elements");
21
+ for (let l = 0; l < a; l++) {
22
+ const r = m[l], c = r instanceof Element ? d : v;
23
+ u.has(r) || c(r);
24
+ const p = u.get(r), i = { ...n };
25
+ "delay" in i && typeof i.delay == "function" && (i.delay = i.delay(l, a)), o.push(...E(p, { ...t, transition: i }, {}));
26
26
  }
27
27
  }
28
- return l;
28
+ return o;
29
29
  }
30
30
  export {
31
31
  N as animateSubject
@@ -13,111 +13,116 @@ import { isGenerator as oe } from "../../../../../motion-dom/dist/es/animation/g
13
13
  import { secondsToMilliseconds as re } from "../../../../../motion-utils/dist/es/time-conversion.js";
14
14
  import { invariant as se } from "../../../../../motion-utils/dist/es/errors.js";
15
15
  import { progress as ie } from "../../../../../motion-utils/dist/es/progress.js";
16
- const ae = "easeInOut", fe = 20;
17
- function Ke(e, { defaultTransition: n = {}, ...C } = {}, P, k) {
18
- const X = n.duration || 0.3, M = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), _ = {}, v = /* @__PURE__ */ new Map();
19
- let K = 0, p = 0, x = 0;
16
+ const ae = "easeInOut", ce = 20;
17
+ function Ke(e, { defaultTransition: n = {}, ...B } = {}, C, O) {
18
+ const P = n.duration || 0.3, M = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), X = {}, v = /* @__PURE__ */ new Map();
19
+ let I = 0, l = 0, x = 0;
20
20
  for (let g = 0; g < e.length; g++) {
21
21
  const s = e[g];
22
22
  if (typeof s == "string") {
23
- v.set(s, p);
23
+ v.set(s, l);
24
24
  continue;
25
25
  } else if (!Array.isArray(s)) {
26
- v.set(s.name, F(p, s.at, K, v));
26
+ v.set(s.name, F(l, s.at, I, v));
27
27
  continue;
28
28
  }
29
- let [h, i, o = {}] = s;
30
- o.at !== void 0 && (p = F(p, o.at, K, v));
29
+ let [p, i, o = {}] = s;
30
+ o.at !== void 0 && (l = F(l, o.at, I, v));
31
31
  let r = 0;
32
- const y = (a, f, m, d = 0, b = 0) => {
33
- const t = ce(a), { delay: I = 0, times: c = $(t), type: V = "keyframes", repeat: A, repeatType: pe, repeatDelay: he = 0, ...H } = f;
34
- let { ease: l = n.ease || "easeOut", duration: u } = f;
35
- const w = typeof I == "function" ? I(d, b) : I, G = t.length, L = oe(V) ? V : k == null ? void 0 : k[V || "keyframes"];
32
+ const y = (a, d, m, h = 0, b = 0) => {
33
+ const t = fe(a), { delay: A = 0, times: c = $(t), type: V = n.type || "keyframes", repeat: S, repeatType: pe, repeatDelay: he = 0, ...H } = d;
34
+ let { ease: u = n.ease || "easeOut", duration: f } = d;
35
+ const w = typeof A == "function" ? A(h, b) : A, G = t.length, L = oe(V) ? V : O == null ? void 0 : O[V || "keyframes"];
36
36
  if (G <= 2 && L) {
37
- let S = 100;
37
+ let T = 100;
38
38
  if (G === 2 && le(t)) {
39
- const T = t[1] - t[0];
40
- S = Math.abs(T);
39
+ const D = t[1] - t[0];
40
+ T = Math.abs(D);
41
41
  }
42
- const D = { ...H };
43
- u !== void 0 && (D.duration = re(u));
44
- const j = ee(D, S, L);
45
- l = j.ease, u = j.duration;
42
+ const j = {
43
+ ...n,
44
+ ...H
45
+ };
46
+ f !== void 0 && (j.duration = re(f));
47
+ const k = ee(j, T, L);
48
+ u = k.ease, f = k.duration;
46
49
  }
47
- u ?? (u = X);
48
- const N = p + w;
50
+ f ?? (f = P);
51
+ const N = l + w;
49
52
  c.length === 1 && c[0] === 0 && (c[1] = 1);
50
53
  const R = c.length - t.length;
51
- if (R > 0 && te(c, R), t.length === 1 && t.unshift(null), A) {
52
- se(A < fe, "Repeat count too high, must be less than 20", "repeat-count-high"), u = Q(u, A);
53
- const S = [...t], D = [...c];
54
- l = Array.isArray(l) ? [...l] : [l];
55
- const j = [...l];
56
- for (let T = 0; T < A; T++) {
57
- t.push(...S);
58
- for (let E = 0; E < S.length; E++)
59
- c.push(D[E] + (T + 1)), l.push(E === 0 ? "linear" : ne(j, E - 1));
54
+ if (R > 0 && te(c, R), t.length === 1 && t.unshift(null), S) {
55
+ se(S < ce, "Repeat count too high, must be less than 20", "repeat-count-high"), f = Q(f, S);
56
+ const T = [...t], j = [...c];
57
+ u = Array.isArray(u) ? [...u] : [u];
58
+ const k = [...u];
59
+ for (let D = 0; D < S; D++) {
60
+ t.push(...T);
61
+ for (let E = 0; E < T.length; E++)
62
+ c.push(j[E] + (D + 1)), u.push(E === 0 ? "linear" : ne(k, E - 1));
60
63
  }
61
- W(c, A);
64
+ W(c, S);
62
65
  }
63
- const q = N + u;
64
- U(m, t, l, c, N, q), r = Math.max(w + u, r), x = Math.max(q, x);
66
+ const q = N + f;
67
+ U(m, t, u, c, N, q), r = Math.max(w + f, r), x = Math.max(q, x);
65
68
  };
66
- if (Z(h)) {
67
- const a = z(h, O);
68
- y(i, o, B("default", a));
69
+ if (Z(p)) {
70
+ const a = _(p, K);
71
+ y(i, o, z("default", a));
69
72
  } else {
70
- const a = J(h, i, P, _), f = a.length;
71
- for (let m = 0; m < f; m++) {
73
+ const a = J(p, i, C, X), d = a.length;
74
+ for (let m = 0; m < d; m++) {
72
75
  i = i, o = o;
73
- const d = a[m], b = z(d, O);
76
+ const h = a[m], b = _(h, K);
74
77
  for (const t in i)
75
- y(i[t], ue(o, t), B(t, b), m, f);
78
+ y(i[t], me(o, t), z(t, b), m, d);
76
79
  }
77
80
  }
78
- K = p, p += r;
81
+ I = l, l += r;
79
82
  }
80
- return O.forEach((g, s) => {
81
- for (const h in g) {
82
- const i = g[h];
83
+ return K.forEach((g, s) => {
84
+ for (const p in g) {
85
+ const i = g[p];
83
86
  i.sort(Y);
84
87
  const o = [], r = [], y = [];
85
- for (let f = 0; f < i.length; f++) {
86
- const { at: m, value: d, easing: b } = i[f];
87
- o.push(d), r.push(ie(0, x, m)), y.push(b || "easeOut");
88
+ for (let h = 0; h < i.length; h++) {
89
+ const { at: b, value: t, easing: A } = i[h];
90
+ o.push(t), r.push(ie(0, x, b)), y.push(A || "easeOut");
88
91
  }
89
92
  r[0] !== 0 && (r.unshift(0), o.unshift(o[0]), y.unshift(ae)), r[r.length - 1] !== 1 && (r.push(1), o.push(null)), M.has(s) || M.set(s, {
90
93
  keyframes: {},
91
94
  transition: {}
92
95
  });
93
96
  const a = M.get(s);
94
- a.keyframes[h] = o, a.transition[h] = {
95
- ...n,
97
+ a.keyframes[p] = o;
98
+ const { type: d, ...m } = n;
99
+ a.transition[p] = {
100
+ ...m,
96
101
  duration: x,
97
102
  ease: y,
98
103
  times: r,
99
- ...C
104
+ ...B
100
105
  };
101
106
  }
102
107
  }), M;
103
108
  }
104
- function z(e, n) {
109
+ function _(e, n) {
105
110
  return !n.has(e) && n.set(e, {}), n.get(e);
106
111
  }
107
- function B(e, n) {
112
+ function z(e, n) {
108
113
  return n[e] || (n[e] = []), n[e];
109
114
  }
110
- function ce(e) {
115
+ function fe(e) {
111
116
  return Array.isArray(e) ? e : [e];
112
117
  }
113
- function ue(e, n) {
118
+ function me(e, n) {
114
119
  return e && e[n] ? {
115
120
  ...e,
116
121
  ...e[n]
117
122
  } : { ...e };
118
123
  }
119
- const me = (e) => typeof e == "number", le = (e) => e.every(me);
124
+ const ue = (e) => typeof e == "number", le = (e) => e.every(ue);
120
125
  export {
121
126
  Ke as createAnimationsFromSequence,
122
- ue as getValueTransition
127
+ me as getValueTransition
123
128
  };
@@ -1,9 +1,9 @@
1
- import { HTMLVisualElement as r } from "../../render/html/HTMLVisualElement.js";
2
- import { ObjectVisualElement as s } from "../../render/object/ObjectVisualElement.js";
3
- import { visualElementStore as n } from "../../render/store.js";
4
- import { SVGVisualElement as a } from "../../render/svg/SVGVisualElement.js";
5
- import { isSVGElement as i } from "../../../../../motion-dom/dist/es/utils/is-svg-element.js";
6
- import { isSVGSVGElement as l } from "../../../../../motion-dom/dist/es/utils/is-svg-svg-element.js";
1
+ import { isSVGElement as r } from "../../../../../motion-dom/dist/es/utils/is-svg-element.js";
2
+ import { isSVGSVGElement as s } from "../../../../../motion-dom/dist/es/utils/is-svg-svg-element.js";
3
+ import { SVGVisualElement as a } from "../../../../../motion-dom/dist/es/render/svg/SVGVisualElement.js";
4
+ import { HTMLVisualElement as i } from "../../../../../motion-dom/dist/es/render/html/HTMLVisualElement.js";
5
+ import { visualElementStore as n } from "../../../../../motion-dom/dist/es/render/store.js";
6
+ import { ObjectVisualElement as l } from "../../../../../motion-dom/dist/es/render/object/ObjectVisualElement.js";
7
7
  function S(t) {
8
8
  const o = {
9
9
  presenceContext: null,
@@ -18,7 +18,7 @@ function S(t) {
18
18
  },
19
19
  latestValues: {}
20
20
  }
21
- }, e = i(t) && !l(t) ? new a(o) : new r(o);
21
+ }, e = r(t) && !s(t) ? new a(o) : new i(o);
22
22
  e.mount(t), n.set(t, e);
23
23
  }
24
24
  function E(t) {
@@ -31,7 +31,7 @@ function E(t) {
31
31
  },
32
32
  latestValues: {}
33
33
  }
34
- }, e = new s(o);
34
+ }, e = new l(o);
35
35
  e.mount(t), n.set(t, e);
36
36
  }
37
37
  export {
@@ -1,15 +1,15 @@
1
- import { jsx as R } from "react/jsx-runtime";
2
- import * as a from "react";
3
- import { useId as $, useRef as d, useContext as w, useInsertionEffect as P } from "react";
4
- import { MotionConfigContext as z } from "../../context/MotionConfigContext.js";
5
- import { useComposedRefs as E } from "../../utils/use-composed-ref.js";
6
- import { isHTMLElement as I } from "../../../../../motion-dom/dist/es/utils/is-html-element.js";
7
- class M extends a.Component {
1
+ import { jsx as E } from "react/jsx-runtime";
2
+ import * as g from "react";
3
+ import { useId as H, useRef as l, useContext as y, useInsertionEffect as I } from "react";
4
+ import { MotionConfigContext as M } from "../../context/MotionConfigContext.js";
5
+ import { useComposedRefs as W } from "../../utils/use-composed-ref.js";
6
+ import { isHTMLElement as u } from "../../../../../motion-dom/dist/es/utils/is-html-element.js";
7
+ class L extends g.Component {
8
8
  getSnapshotBeforeUpdate(i) {
9
9
  const e = this.props.childRef.current;
10
10
  if (e && i.isPresent && !this.props.isPresent) {
11
- const r = e.offsetParent, s = I(r) && r.offsetWidth || 0, t = this.props.sizeRef.current;
12
- t.height = e.offsetHeight || 0, t.width = e.offsetWidth || 0, t.top = e.offsetTop, t.left = e.offsetLeft, t.right = s - t.width - t.left;
11
+ const n = e.offsetParent, p = u(n) && n.offsetWidth || 0, r = u(n) && n.offsetHeight || 0, t = this.props.sizeRef.current;
12
+ t.height = e.offsetHeight || 0, t.width = e.offsetWidth || 0, t.top = e.offsetTop, t.left = e.offsetLeft, t.right = p - t.width - t.left, t.bottom = r - t.height - t.top;
13
13
  }
14
14
  return null;
15
15
  }
@@ -22,36 +22,38 @@ class M extends a.Component {
22
22
  return this.props.children;
23
23
  }
24
24
  }
25
- function U({ children: n, isPresent: i, anchorX: e, root: r }) {
26
- const s = $(), t = d(null), f = d({
25
+ function D({ children: o, isPresent: i, anchorX: e, anchorY: n, root: p }) {
26
+ var c;
27
+ const r = H(), t = l(null), h = l({
27
28
  width: 0,
28
29
  height: 0,
29
30
  top: 0,
30
31
  left: 0,
31
- right: 0
32
- }), { nonce: h } = w(z), l = E(t, n == null ? void 0 : n.ref);
33
- return P(() => {
34
- const { width: c, height: m, top: u, left: g, right: x } = f.current;
35
- if (i || !t.current || !c || !m)
32
+ right: 0,
33
+ bottom: 0
34
+ }), { nonce: m } = y(M), x = ((c = o.props) == null ? void 0 : c.ref) ?? (o == null ? void 0 : o.ref), R = W(t, x);
35
+ return I(() => {
36
+ const { width: d, height: a, top: C, left: $, right: b, bottom: w } = h.current;
37
+ if (i || !t.current || !d || !a)
36
38
  return;
37
- const C = e === "left" ? `left: ${g}` : `right: ${x}`;
38
- t.current.dataset.motionPopId = s;
39
- const o = document.createElement("style");
40
- h && (o.nonce = h);
41
- const p = r ?? document.head;
42
- return p.appendChild(o), o.sheet && o.sheet.insertRule(`
43
- [data-motion-pop-id="${s}"] {
39
+ const P = e === "left" ? `left: ${$}` : `right: ${b}`, z = n === "bottom" ? `bottom: ${w}` : `top: ${C}`;
40
+ t.current.dataset.motionPopId = r;
41
+ const s = document.createElement("style");
42
+ m && (s.nonce = m);
43
+ const f = p ?? document.head;
44
+ return f.appendChild(s), s.sheet && s.sheet.insertRule(`
45
+ [data-motion-pop-id="${r}"] {
44
46
  position: absolute !important;
45
- width: ${c}px !important;
46
- height: ${m}px !important;
47
- ${C}px !important;
48
- top: ${u}px !important;
47
+ width: ${d}px !important;
48
+ height: ${a}px !important;
49
+ ${P}px !important;
50
+ ${z}px !important;
49
51
  }
50
52
  `), () => {
51
- p.contains(o) && p.removeChild(o);
53
+ f.contains(s) && f.removeChild(s);
52
54
  };
53
- }, [i]), R(M, { isPresent: i, childRef: t, sizeRef: f, children: a.cloneElement(n, { ref: l }) });
55
+ }, [i]), E(L, { isPresent: i, childRef: t, sizeRef: h, children: g.cloneElement(o, { ref: R }) });
54
56
  }
55
57
  export {
56
- U as PopChild
58
+ D as PopChild
57
59
  };
@@ -1,32 +1,32 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import * as v from "react";
3
- import { useId as M, useMemo as c } from "react";
4
- import { PresenceContext as w } from "../../context/PresenceContext.js";
5
- import { useConstant as x } from "../../utils/use-constant.js";
6
- import { PopChild as R } from "./PopChild.js";
7
- const _ = ({ children: f, initial: i, isPresent: r, onExitComplete: t, custom: m, presenceAffectsLayout: p, mode: l, anchorX: d, root: h }) => {
8
- const e = x(g), C = M();
9
- let u = !0, s = c(() => (u = !1, {
10
- id: C,
2
+ import * as M from "react";
3
+ import { useId as w, useMemo as c } from "react";
4
+ import { PresenceContext as x } from "../../context/PresenceContext.js";
5
+ import { useConstant as R } from "../../utils/use-constant.js";
6
+ import { PopChild as g } from "./PopChild.js";
7
+ const _ = ({ children: f, initial: i, isPresent: r, onExitComplete: o, custom: m, presenceAffectsLayout: p, mode: l, anchorX: d, anchorY: h, root: C }) => {
8
+ const e = R(j), v = w();
9
+ let u = !0, n = c(() => (u = !1, {
10
+ id: v,
11
11
  initial: i,
12
12
  isPresent: r,
13
13
  custom: m,
14
- onExitComplete: (o) => {
15
- e.set(o, !0);
16
- for (const n of e.values())
17
- if (!n)
14
+ onExitComplete: (t) => {
15
+ e.set(t, !0);
16
+ for (const s of e.values())
17
+ if (!s)
18
18
  return;
19
- t && t();
19
+ o && o();
20
20
  },
21
- register: (o) => (e.set(o, !1), () => e.delete(o))
22
- }), [r, e, t]);
23
- return p && u && (s = { ...s }), c(() => {
24
- e.forEach((o, n) => e.set(n, !1));
25
- }, [r]), v.useEffect(() => {
26
- !r && !e.size && t && t();
27
- }, [r]), l === "popLayout" && (f = a(R, { isPresent: r, anchorX: d, root: h, children: f })), a(w.Provider, { value: s, children: f });
21
+ register: (t) => (e.set(t, !1), () => e.delete(t))
22
+ }), [r, e, o]);
23
+ return p && u && (n = { ...n }), c(() => {
24
+ e.forEach((t, s) => e.set(s, !1));
25
+ }, [r]), M.useEffect(() => {
26
+ !r && !e.size && o && o();
27
+ }, [r]), l === "popLayout" && (f = a(g, { isPresent: r, anchorX: d, anchorY: h, root: C, children: f })), a(x.Provider, { value: n, children: f });
28
28
  };
29
- function g() {
29
+ function j() {
30
30
  return /* @__PURE__ */ new Map();
31
31
  }
32
32
  export {
@@ -1,45 +1,47 @@
1
- import { jsx as E, Fragment as N } from "react/jsx-runtime";
2
- import { useMemo as F, useRef as w, useState as k, useContext as G } from "react";
1
+ import { jsx as k, Fragment as Y } from "react/jsx-runtime";
2
+ import { useMemo as F, useRef as p, useState as v, useContext as G } from "react";
3
3
  import { LayoutGroupContext as O } from "../../context/LayoutGroupContext.js";
4
4
  import { useConstant as R } from "../../utils/use-constant.js";
5
- import { useIsomorphicLayoutEffect as S } from "../../utils/use-isomorphic-effect.js";
6
- import { PresenceChild as V } from "./PresenceChild.js";
7
- import { usePresence as X } from "./use-presence.js";
8
- import { onlyElements as v, getChildKey as c } from "./utils.js";
9
- const T = ({ children: h, custom: A, initial: L = !0, onExitComplete: p, presenceAffectsLayout: b = !0, mode: u = "sync", propagate: l = !1, anchorX: j = "left", root: D }) => {
10
- const [C, f] = X(l), n = F(() => v(h), [h]), o = l && !C ? [] : n.map(c), y = w(!0), x = w(n), r = R(() => /* @__PURE__ */ new Map()), [I, K] = k(n), [i, P] = k(n);
11
- S(() => {
12
- y.current = !1, x.current = n;
13
- for (let t = 0; t < i.length; t++) {
14
- const e = c(i[t]);
15
- o.includes(e) ? r.delete(e) : r.get(e) !== !0 && r.set(e, !1);
5
+ import { useIsomorphicLayoutEffect as V } from "../../utils/use-isomorphic-effect.js";
6
+ import { PresenceChild as X } from "./PresenceChild.js";
7
+ import { usePresence as _ } from "./use-presence.js";
8
+ import { onlyElements as A, getChildKey as c } from "./utils.js";
9
+ const W = ({ children: C, custom: L, initial: b = !0, onExitComplete: y, presenceAffectsLayout: j = !0, mode: u = "sync", propagate: l = !1, anchorX: D = "left", anchorY: I = "top", root: K }) => {
10
+ const [x, f] = _(l), n = F(() => A(C), [C]), o = l && !x ? [] : n.map(c), g = p(!0), P = p(n), i = R(() => /* @__PURE__ */ new Map()), d = p(/* @__PURE__ */ new Set()), [M, N] = v(n), [r, w] = v(n);
11
+ V(() => {
12
+ g.current = !1, P.current = n;
13
+ for (let t = 0; t < r.length; t++) {
14
+ const e = c(r[t]);
15
+ o.includes(e) ? (i.delete(e), d.current.delete(e)) : i.get(e) !== !0 && i.set(e, !1);
16
16
  }
17
- }, [i, o.length, o.join("-")]);
18
- const d = [];
19
- if (n !== I) {
17
+ }, [r, o.length, o.join("-")]);
18
+ const m = [];
19
+ if (n !== M) {
20
20
  let t = [...n];
21
- for (let e = 0; e < i.length; e++) {
22
- const s = i[e], a = c(s);
23
- o.includes(a) || (t.splice(e, 0, s), d.push(s));
21
+ for (let e = 0; e < r.length; e++) {
22
+ const s = r[e], h = c(s);
23
+ o.includes(h) || (t.splice(e, 0, s), m.push(s));
24
24
  }
25
- return u === "wait" && d.length && (t = d), P(v(t)), K(n), null;
25
+ return u === "wait" && m.length && (t = m), w(A(t)), N(n), null;
26
26
  }
27
- process.env.NODE_ENV !== "production" && u === "wait" && i.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
28
- const { forceRender: m } = G(O);
29
- return E(N, { children: i.map((t) => {
30
- const e = c(t), s = l && !C ? !1 : n === i || o.includes(e), a = () => {
31
- if (r.has(e))
32
- r.set(e, !0);
27
+ process.env.NODE_ENV !== "production" && u === "wait" && r.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
28
+ const { forceRender: a } = G(O);
29
+ return k(Y, { children: r.map((t) => {
30
+ const e = c(t), s = l && !x ? !1 : n === r || o.includes(e), h = () => {
31
+ if (d.current.has(e))
32
+ return;
33
+ if (d.current.add(e), i.has(e))
34
+ i.set(e, !0);
33
35
  else
34
36
  return;
35
- let g = !0;
36
- r.forEach((M) => {
37
- M || (g = !1);
38
- }), g && (m == null || m(), P(x.current), l && (f == null || f()), p && p());
37
+ let E = !0;
38
+ i.forEach((S) => {
39
+ S || (E = !1);
40
+ }), E && (a == null || a(), w(P.current), l && (f == null || f()), y && y());
39
41
  };
40
- return E(V, { isPresent: s, initial: !y.current || L ? void 0 : !1, custom: A, presenceAffectsLayout: b, mode: u, root: D, onExitComplete: s ? void 0 : a, anchorX: j, children: t }, e);
42
+ return k(X, { isPresent: s, initial: !g.current || b ? void 0 : !1, custom: L, presenceAffectsLayout: j, mode: u, root: K, onExitComplete: s ? void 0 : h, anchorX: D, anchorY: I, children: t }, e);
41
43
  }) });
42
44
  };
43
45
  export {
44
- T as AnimatePresence
46
+ W as AnimatePresence
45
47
  };
@@ -1,38 +1,46 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as x, useRef as g, useEffect as h } from "react";
3
- import { ReorderContext as y } from "../../context/ReorderContext.js";
4
- import { motion as C } from "../../render/components/motion/proxy.js";
5
- import { useConstant as G } from "../../utils/use-constant.js";
6
- import { checkReorder as O } from "./utils/check-reorder.js";
7
- import { invariant as w } from "../../../../../motion-utils/dist/es/errors.js";
8
- function I({ children: e, as: u = "ul", axis: f = "y", onReorder: p, values: c, ...s }, a) {
9
- const l = G(() => C[u]), r = [], m = g(!1);
10
- w(!!c, "Reorder.Group must be provided a values prop", "reorder-values");
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as w, useRef as a, useEffect as G } from "react";
3
+ import { ReorderContext as O } from "../../context/ReorderContext.js";
4
+ import { motion as x } from "../../render/components/motion/proxy.js";
5
+ import { useConstant as I } from "../../utils/use-constant.js";
6
+ import { checkReorder as S } from "./utils/check-reorder.js";
7
+ import { invariant as b } from "../../../../../motion-utils/dist/es/errors.js";
8
+ function j({ children: e, as: c = "ul", axis: f = "y", onReorder: v, values: d, ...m }, t) {
9
+ const y = I(() => x[c]), o = [], s = a(!1), p = a(null);
10
+ b(!!d, "Reorder.Group must be provided a values prop", "reorder-values");
11
11
  const R = {
12
12
  axis: f,
13
- registerItem: (o, t) => {
14
- const n = r.findIndex((i) => o === i.value);
15
- n !== -1 ? r[n].layout = t[f] : r.push({ value: o, layout: t[f] }), r.sort(j);
13
+ groupRef: p,
14
+ registerItem: (r, n) => {
15
+ const u = o.findIndex((i) => r === i.value);
16
+ u !== -1 ? o[u].layout = n[f] : o.push({ value: r, layout: n[f] }), o.sort(A);
16
17
  },
17
- updateOrder: (o, t, n) => {
18
- if (m.current)
18
+ updateOrder: (r, n, u) => {
19
+ if (s.current)
19
20
  return;
20
- const i = O(r, o, t, n);
21
- r !== i && (m.current = !0, p(i.map(b).filter((v) => c.indexOf(v) !== -1)));
21
+ const i = S(o, r, n, u);
22
+ o !== i && (s.current = !0, v(i.map(k).filter((C) => d.indexOf(C) !== -1)));
22
23
  }
23
24
  };
24
- return h(() => {
25
- m.current = !1;
26
- }), d(l, { ...s, ref: a, ignoreStrict: !0, children: d(y.Provider, { value: R, children: e }) });
25
+ G(() => {
26
+ s.current = !1;
27
+ });
28
+ const g = (r) => {
29
+ p.current = r, typeof t == "function" ? t(r) : t && (t.current = r);
30
+ }, h = {
31
+ overflowAnchor: "none",
32
+ ...m.style
33
+ };
34
+ return l(y, { ...m, style: h, ref: g, ignoreStrict: !0, children: l(O.Provider, { value: R, children: e }) });
27
35
  }
28
- const q = /* @__PURE__ */ x(I);
29
- function b(e) {
36
+ const D = /* @__PURE__ */ w(j);
37
+ function k(e) {
30
38
  return e.value;
31
39
  }
32
- function j(e, u) {
33
- return e.layout.min - u.layout.min;
40
+ function A(e, c) {
41
+ return e.layout.min - c.layout.min;
34
42
  }
35
43
  export {
36
- q as ReorderGroup,
37
- I as ReorderGroupComponent
44
+ D as ReorderGroup,
45
+ j as ReorderGroupComponent
38
46
  };