@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.
- package/dist/components/Button/Button.js +19 -19
- package/dist/components/Button/ButtonLoader.d.ts +7 -0
- package/dist/components/Button/ButtonLoader.d.ts.map +1 -0
- package/dist/components/Button/ButtonLoader.js +40 -0
- package/dist/components/Button/buttonVariants.d.ts.map +1 -1
- package/dist/components/Button/buttonVariants.js +0 -1
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.d.ts +1 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +39 -28
- package/dist/components/ReorderableTable/ReorderableTable.js +1 -1
- package/dist/components/SwipeButton/SwipeButton.js +1 -1
- package/dist/components/TextEditor/EditorToolbar.d.ts +18 -0
- package/dist/components/TextEditor/EditorToolbar.d.ts.map +1 -0
- package/dist/components/TextEditor/EditorToolbar.js +175 -0
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts +52 -0
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts.map +1 -0
- package/dist/components/TextEditor/LinkBubbleMenu.js +97 -0
- package/dist/components/TextEditor/TextEditor.d.ts +134 -0
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -0
- package/dist/components/TextEditor/TextEditor.js +240 -0
- package/dist/components/TextEditor/TextEditor.stories.d.ts +51 -0
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarButton.d.ts +38 -0
- package/dist/components/TextEditor/ToolbarButton.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarButton.js +68 -0
- package/dist/components/TextEditor/ToolbarSeparator.d.ts +22 -0
- package/dist/components/TextEditor/ToolbarSeparator.d.ts.map +1 -0
- package/dist/components/TextEditor/ToolbarSeparator.js +23 -0
- package/dist/components/TextEditor/index.d.ts +4 -0
- package/dist/components/TextEditor/index.d.ts.map +1 -0
- package/dist/components/TextEditor/useLinkEditor.d.ts +37 -0
- package/dist/components/TextEditor/useLinkEditor.d.ts.map +1 -0
- package/dist/components/TextEditor/useLinkEditor.js +32 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +140 -132
- package/dist/muza-ui.css +1 -1
- package/dist/node_modules/@popperjs/core/lib/createPopper.js +122 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/contains.js +18 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +23 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +37 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +32 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +17 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +13 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +35 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +18 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +10 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +21 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +12 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +20 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +8 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +16 -0
- package/dist/node_modules/@popperjs/core/lib/enums.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +47 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/arrow.js +37 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +99 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +26 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +74 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +44 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +19 -0
- package/dist/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +54 -0
- package/dist/node_modules/@popperjs/core/lib/popper.js +27 -0
- package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +27 -0
- package/dist/node_modules/@popperjs/core/lib/utils/computeOffsets.js +54 -0
- package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +13 -0
- package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +33 -0
- package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +8 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getAltAxis.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +14 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +12 -0
- package/dist/node_modules/@popperjs/core/lib/utils/getVariation.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/math.js +6 -0
- package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +15 -0
- package/dist/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +7 -0
- package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +31 -0
- package/dist/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +11 -0
- package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +9 -0
- package/dist/node_modules/@popperjs/core/lib/utils/within.js +12 -0
- package/dist/node_modules/@tiptap/core/dist/index.js +2857 -0
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +45 -0
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +76 -0
- package/dist/node_modules/@tiptap/extension-bubble-menu/dist/index.js +129 -0
- package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +55 -0
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +136 -0
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +10 -0
- package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +21 -0
- package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +25 -0
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +56 -0
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +55 -0
- package/dist/node_modules/@tiptap/extension-history/dist/index.js +36 -0
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -0
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +75 -0
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +272 -0
- package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +34 -0
- package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +73 -0
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +34 -0
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +53 -0
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +64 -0
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +9 -0
- package/dist/node_modules/@tiptap/react/dist/index.js +709 -0
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +30 -0
- package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
- package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +34 -26
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +30 -25
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
- package/dist/node_modules/linkifyjs/dist/linkify.js +707 -0
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
- package/dist/node_modules/orderedmap/dist/index.js +103 -0
- package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
- package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
- package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
- package/dist/node_modules/prosemirror-model/dist/index.js +2733 -0
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
- package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
- package/dist/node_modules/prosemirror-transform/dist/index.js +1520 -0
- package/dist/node_modules/prosemirror-view/dist/index.js +3794 -0
- package/dist/node_modules/rope-sequence/dist/index.js +100 -0
- package/dist/node_modules/tippy.js/dist/tippy.esm.js +813 -0
- package/dist/node_modules/w3c-keyname/index.js +93 -0
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +18 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +18 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +18 -0
- package/dist/translations/types.d.ts +22 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/package.json +17 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
- /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
|
|
2
|
-
import { resolveElements as
|
|
3
|
-
function s(r, e,
|
|
4
|
-
return typeof r == "string" &&
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { isMotionValue as
|
|
8
|
-
import { invariant as
|
|
9
|
-
function
|
|
10
|
-
return
|
|
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(
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
u.has(
|
|
24
|
-
const p = u.get(
|
|
25
|
-
"delay" in
|
|
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
|
|
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",
|
|
17
|
-
function Ke(e, { defaultTransition: n = {}, ...
|
|
18
|
-
const
|
|
19
|
-
let
|
|
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,
|
|
23
|
+
v.set(s, l);
|
|
24
24
|
continue;
|
|
25
25
|
} else if (!Array.isArray(s)) {
|
|
26
|
-
v.set(s.name, F(
|
|
26
|
+
v.set(s.name, F(l, s.at, I, v));
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
|
-
let [
|
|
30
|
-
o.at !== void 0 && (
|
|
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,
|
|
33
|
-
const t =
|
|
34
|
-
let { ease:
|
|
35
|
-
const w = typeof
|
|
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
|
|
37
|
+
let T = 100;
|
|
38
38
|
if (G === 2 && le(t)) {
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const D = t[1] - t[0];
|
|
40
|
+
T = Math.abs(D);
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
48
|
-
const N =
|
|
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),
|
|
52
|
-
se(
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
for (let
|
|
57
|
-
t.push(...
|
|
58
|
-
for (let E = 0; E <
|
|
59
|
-
c.push(
|
|
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,
|
|
64
|
+
W(c, S);
|
|
62
65
|
}
|
|
63
|
-
const q = N +
|
|
64
|
-
U(m, t,
|
|
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(
|
|
67
|
-
const a =
|
|
68
|
-
y(i, o,
|
|
69
|
+
if (Z(p)) {
|
|
70
|
+
const a = _(p, K);
|
|
71
|
+
y(i, o, z("default", a));
|
|
69
72
|
} else {
|
|
70
|
-
const a = J(
|
|
71
|
-
for (let m = 0; 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
|
|
76
|
+
const h = a[m], b = _(h, K);
|
|
74
77
|
for (const t in i)
|
|
75
|
-
y(i[t],
|
|
78
|
+
y(i[t], me(o, t), z(t, b), m, d);
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
|
-
|
|
81
|
+
I = l, l += r;
|
|
79
82
|
}
|
|
80
|
-
return
|
|
81
|
-
for (const
|
|
82
|
-
const i = g[
|
|
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
|
|
86
|
-
const { at:
|
|
87
|
-
o.push(
|
|
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[
|
|
95
|
-
|
|
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
|
-
...
|
|
104
|
+
...B
|
|
100
105
|
};
|
|
101
106
|
}
|
|
102
107
|
}), M;
|
|
103
108
|
}
|
|
104
|
-
function
|
|
109
|
+
function _(e, n) {
|
|
105
110
|
return !n.has(e) && n.set(e, {}), n.get(e);
|
|
106
111
|
}
|
|
107
|
-
function
|
|
112
|
+
function z(e, n) {
|
|
108
113
|
return n[e] || (n[e] = []), n[e];
|
|
109
114
|
}
|
|
110
|
-
function
|
|
115
|
+
function fe(e) {
|
|
111
116
|
return Array.isArray(e) ? e : [e];
|
|
112
117
|
}
|
|
113
|
-
function
|
|
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
|
|
124
|
+
const ue = (e) => typeof e == "number", le = (e) => e.every(ue);
|
|
120
125
|
export {
|
|
121
126
|
Ke as createAnimationsFromSequence,
|
|
122
|
-
|
|
127
|
+
me as getValueTransition
|
|
123
128
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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 =
|
|
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
|
|
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
|
|
2
|
-
import * as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { MotionConfigContext as
|
|
5
|
-
import { useComposedRefs as
|
|
6
|
-
import { isHTMLElement as
|
|
7
|
-
class
|
|
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
|
|
12
|
-
t.height = e.offsetHeight || 0, t.width = e.offsetWidth || 0, t.top = e.offsetTop, t.left = e.offsetLeft, t.right =
|
|
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
|
|
26
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
38
|
-
t.current.dataset.motionPopId =
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
[data-motion-pop-id="${
|
|
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: ${
|
|
46
|
-
height: ${
|
|
47
|
-
${
|
|
48
|
-
|
|
47
|
+
width: ${d}px !important;
|
|
48
|
+
height: ${a}px !important;
|
|
49
|
+
${P}px !important;
|
|
50
|
+
${z}px !important;
|
|
49
51
|
}
|
|
50
52
|
`), () => {
|
|
51
|
-
|
|
53
|
+
f.contains(s) && f.removeChild(s);
|
|
52
54
|
};
|
|
53
|
-
}, [i]),
|
|
55
|
+
}, [i]), E(L, { isPresent: i, childRef: t, sizeRef: h, children: g.cloneElement(o, { ref: R }) });
|
|
54
56
|
}
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
D as PopChild
|
|
57
59
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { PresenceContext as
|
|
5
|
-
import { useConstant as
|
|
6
|
-
import { PopChild as
|
|
7
|
-
const _ = ({ children: f, initial: i, isPresent: r, onExitComplete:
|
|
8
|
-
const e =
|
|
9
|
-
let u = !0,
|
|
10
|
-
id:
|
|
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: (
|
|
15
|
-
e.set(
|
|
16
|
-
for (const
|
|
17
|
-
if (!
|
|
14
|
+
onExitComplete: (t) => {
|
|
15
|
+
e.set(t, !0);
|
|
16
|
+
for (const s of e.values())
|
|
17
|
+
if (!s)
|
|
18
18
|
return;
|
|
19
|
-
|
|
19
|
+
o && o();
|
|
20
20
|
},
|
|
21
|
-
register: (
|
|
22
|
-
}), [r, e,
|
|
23
|
-
return p && u && (
|
|
24
|
-
e.forEach((
|
|
25
|
-
}, [r]),
|
|
26
|
-
!r && !e.size &&
|
|
27
|
-
}, [r]), l === "popLayout" && (f = a(
|
|
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
|
|
29
|
+
function j() {
|
|
30
30
|
return /* @__PURE__ */ new Map();
|
|
31
31
|
}
|
|
32
32
|
export {
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as F, useRef as
|
|
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
|
|
6
|
-
import { PresenceChild as
|
|
7
|
-
import { usePresence as
|
|
8
|
-
import { onlyElements as
|
|
9
|
-
const
|
|
10
|
-
const [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
for (let t = 0; t <
|
|
14
|
-
const e = c(
|
|
15
|
-
o.includes(e) ?
|
|
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
|
-
}, [
|
|
18
|
-
const
|
|
19
|
-
if (n !==
|
|
17
|
+
}, [r, o.length, o.join("-")]);
|
|
18
|
+
const m = [];
|
|
19
|
+
if (n !== M) {
|
|
20
20
|
let t = [...n];
|
|
21
|
-
for (let e = 0; e <
|
|
22
|
-
const s =
|
|
23
|
-
o.includes(
|
|
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" &&
|
|
25
|
+
return u === "wait" && m.length && (t = m), w(A(t)), N(n), null;
|
|
26
26
|
}
|
|
27
|
-
process.env.NODE_ENV !== "production" && u === "wait" &&
|
|
28
|
-
const { forceRender:
|
|
29
|
-
return
|
|
30
|
-
const e = c(t), s = l && !
|
|
31
|
-
if (
|
|
32
|
-
|
|
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
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}),
|
|
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
|
|
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
|
-
|
|
46
|
+
W as AnimatePresence
|
|
45
47
|
};
|
|
@@ -1,38 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { ReorderContext as
|
|
4
|
-
import { motion as
|
|
5
|
-
import { useConstant as
|
|
6
|
-
import { checkReorder as
|
|
7
|
-
import { invariant as
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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: (
|
|
18
|
-
if (
|
|
18
|
+
updateOrder: (r, n, u) => {
|
|
19
|
+
if (s.current)
|
|
19
20
|
return;
|
|
20
|
-
const i =
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
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
|
|
29
|
-
function
|
|
36
|
+
const D = /* @__PURE__ */ w(j);
|
|
37
|
+
function k(e) {
|
|
30
38
|
return e.value;
|
|
31
39
|
}
|
|
32
|
-
function
|
|
33
|
-
return e.layout.min -
|
|
40
|
+
function A(e, c) {
|
|
41
|
+
return e.layout.min - c.layout.min;
|
|
34
42
|
}
|
|
35
43
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
D as ReorderGroup,
|
|
45
|
+
j as ReorderGroupComponent
|
|
38
46
|
};
|