@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,709 @@
|
|
|
1
|
+
import { BubbleMenuPlugin as te } from "../../extension-bubble-menu/dist/index.js";
|
|
2
|
+
import S, { useRef as ne, useState as z, useDebugValue as J, useEffect as G, forwardRef as re, useLayoutEffect as oe, useContext as Q, createContext as X } from "react";
|
|
3
|
+
import ie from "react-dom";
|
|
4
|
+
import { Editor as se } from "../../core/dist/index.js";
|
|
5
|
+
import { CommandManager as Be, Extension as je, InputRule as Pe, Mark as Fe, Node as Ue, NodePos as We, PasteRule as ze, callOrReturn as Ge, canInsertNode as Ke, combineTransactionSteps as He, createChainableState as qe, createDocument as $e, createNodeFromContent as ke, createStyleTag as Ye, defaultBlockAt as Je, deleteProps as Qe, elementFromString as Xe, findChildrenInRange as Ze, findDuplicates as et, findParentNode as tt, findParentNodeClosestToPos as nt, fromString as rt, getAttributes as ot, getAttributesFromExtensions as it, getChangedRanges as st, getExtensionField as ut, getHTMLFromFragment as at, getMarkAttributes as ct, getMarkRange as lt, getMarkType as dt, getMarksBetween as ft, getNodeAttributes as ht, getNodeType as pt, getRenderedAttributes as vt, getSchemaByResolvedExtensions as St, getSchemaTypeByName as mt, getSchemaTypeNameByName as Et, getSplittedAttributes as _t, getText as gt, getTextBetween as yt, getTextContentFromNodes as Ot, getTextSerializersFromSchema as bt, injectExtensionAttributesToParseRule as Rt, inputRulesPlugin as Ct, isActive as Dt, isEmptyObject as wt, isExtensionRulesEnabled as Tt, isFunction as xt, isList as At, isMacOS as Nt, isMarkActive as Lt, isNodeActive as Mt, isNodeEmpty as It, isNodeSelection as Vt, isNumber as Bt, isPlainObject as jt, isRegExp as Pt, isSafari as Ft, isTextSelection as Ut, isiOS as Wt, markInputRule as zt, markPasteRule as Gt, mergeAttributes as Kt, mergeDeep as Ht, minMax as qt, nodeInputRule as $t, objectIncludes as kt, pasteRulesPlugin as Yt, posToDOMRect as Jt, removeDuplicates as Qt, resolveFocusPosition as Xt, selectionToInsertionEnd as Zt, splitExtensions as en, textblockTypeInputRule as tn, wrappingInputRule as nn } from "../../core/dist/index.js";
|
|
6
|
+
function ue(o) {
|
|
7
|
+
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
8
|
+
}
|
|
9
|
+
var F = { exports: {} }, V = {};
|
|
10
|
+
/**
|
|
11
|
+
* @license React
|
|
12
|
+
* use-sync-external-store-shim.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/
|
|
19
|
+
var H;
|
|
20
|
+
function ae() {
|
|
21
|
+
if (H) return V;
|
|
22
|
+
H = 1;
|
|
23
|
+
var o = S;
|
|
24
|
+
function e(s, l) {
|
|
25
|
+
return s === l && (s !== 0 || 1 / s === 1 / l) || s !== s && l !== l;
|
|
26
|
+
}
|
|
27
|
+
var t = typeof Object.is == "function" ? Object.is : e, r = o.useState, n = o.useEffect, i = o.useLayoutEffect, m = o.useDebugValue;
|
|
28
|
+
function R(s, l) {
|
|
29
|
+
var f = l(), p = r({ inst: { value: f, getSnapshot: l } }), h = p[0].inst, v = p[1];
|
|
30
|
+
return i(function() {
|
|
31
|
+
h.value = f, h.getSnapshot = l, O(h) && v({ inst: h });
|
|
32
|
+
}, [s, f, l]), n(function() {
|
|
33
|
+
return O(h) && v({ inst: h }), s(function() {
|
|
34
|
+
O(h) && v({ inst: h });
|
|
35
|
+
});
|
|
36
|
+
}, [s]), m(f), f;
|
|
37
|
+
}
|
|
38
|
+
function O(s) {
|
|
39
|
+
var l = s.getSnapshot;
|
|
40
|
+
s = s.value;
|
|
41
|
+
try {
|
|
42
|
+
var f = l();
|
|
43
|
+
return !t(s, f);
|
|
44
|
+
} catch {
|
|
45
|
+
return !0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function g(s, l) {
|
|
49
|
+
return l();
|
|
50
|
+
}
|
|
51
|
+
var c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? g : R;
|
|
52
|
+
return V.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : c, V;
|
|
53
|
+
}
|
|
54
|
+
var B = {};
|
|
55
|
+
/**
|
|
56
|
+
* @license React
|
|
57
|
+
* use-sync-external-store-shim.development.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/
|
|
64
|
+
var q;
|
|
65
|
+
function ce() {
|
|
66
|
+
return q || (q = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
67
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
68
|
+
var o = S, e = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
69
|
+
function t(d) {
|
|
70
|
+
{
|
|
71
|
+
for (var u = arguments.length, _ = new Array(u > 1 ? u - 1 : 0), a = 1; a < u; a++)
|
|
72
|
+
_[a - 1] = arguments[a];
|
|
73
|
+
r("error", d, _);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function r(d, u, _) {
|
|
77
|
+
{
|
|
78
|
+
var a = e.ReactDebugCurrentFrame, E = a.getStackAddendum();
|
|
79
|
+
E !== "" && (u += "%s", _ = _.concat([E]));
|
|
80
|
+
var b = _.map(function(y) {
|
|
81
|
+
return String(y);
|
|
82
|
+
});
|
|
83
|
+
b.unshift("Warning: " + u), Function.prototype.apply.call(console[d], console, b);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function n(d, u) {
|
|
87
|
+
return d === u && (d !== 0 || 1 / d === 1 / u) || d !== d && u !== u;
|
|
88
|
+
}
|
|
89
|
+
var i = typeof Object.is == "function" ? Object.is : n, m = o.useState, R = o.useEffect, O = o.useLayoutEffect, g = o.useDebugValue, c = !1, s = !1;
|
|
90
|
+
function l(d, u, _) {
|
|
91
|
+
c || o.startTransition !== void 0 && (c = !0, t("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
92
|
+
var a = u();
|
|
93
|
+
if (!s) {
|
|
94
|
+
var E = u();
|
|
95
|
+
i(a, E) || (t("The result of getSnapshot should be cached to avoid an infinite loop"), s = !0);
|
|
96
|
+
}
|
|
97
|
+
var b = m({
|
|
98
|
+
inst: {
|
|
99
|
+
value: a,
|
|
100
|
+
getSnapshot: u
|
|
101
|
+
}
|
|
102
|
+
}), y = b[0].inst, w = b[1];
|
|
103
|
+
return O(function() {
|
|
104
|
+
y.value = a, y.getSnapshot = u, f(y) && w({
|
|
105
|
+
inst: y
|
|
106
|
+
});
|
|
107
|
+
}, [d, a, u]), R(function() {
|
|
108
|
+
f(y) && w({
|
|
109
|
+
inst: y
|
|
110
|
+
});
|
|
111
|
+
var A = function() {
|
|
112
|
+
f(y) && w({
|
|
113
|
+
inst: y
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
return d(A);
|
|
117
|
+
}, [d]), g(a), a;
|
|
118
|
+
}
|
|
119
|
+
function f(d) {
|
|
120
|
+
var u = d.getSnapshot, _ = d.value;
|
|
121
|
+
try {
|
|
122
|
+
var a = u();
|
|
123
|
+
return !i(_, a);
|
|
124
|
+
} catch {
|
|
125
|
+
return !0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function p(d, u, _) {
|
|
129
|
+
return u();
|
|
130
|
+
}
|
|
131
|
+
var h = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", v = !h, C = v ? p : l, D = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : C;
|
|
132
|
+
B.useSyncExternalStore = D, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
133
|
+
})()), B;
|
|
134
|
+
}
|
|
135
|
+
process.env.NODE_ENV === "production" ? F.exports = ae() : F.exports = ce();
|
|
136
|
+
var x = F.exports;
|
|
137
|
+
const le = (...o) => (e) => {
|
|
138
|
+
o.forEach((t) => {
|
|
139
|
+
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
140
|
+
});
|
|
141
|
+
}, de = ({ contentComponent: o }) => {
|
|
142
|
+
const e = x.useSyncExternalStore(o.subscribe, o.getSnapshot, o.getServerSnapshot);
|
|
143
|
+
return S.createElement(S.Fragment, null, Object.values(e));
|
|
144
|
+
};
|
|
145
|
+
function fe() {
|
|
146
|
+
const o = /* @__PURE__ */ new Set();
|
|
147
|
+
let e = {};
|
|
148
|
+
return {
|
|
149
|
+
/**
|
|
150
|
+
* Subscribe to the editor instance's changes.
|
|
151
|
+
*/
|
|
152
|
+
subscribe(t) {
|
|
153
|
+
return o.add(t), () => {
|
|
154
|
+
o.delete(t);
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
getSnapshot() {
|
|
158
|
+
return e;
|
|
159
|
+
},
|
|
160
|
+
getServerSnapshot() {
|
|
161
|
+
return e;
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* Adds a new NodeView Renderer to the editor.
|
|
165
|
+
*/
|
|
166
|
+
setRenderer(t, r) {
|
|
167
|
+
e = {
|
|
168
|
+
...e,
|
|
169
|
+
[t]: ie.createPortal(r.reactElement, r.element, t)
|
|
170
|
+
}, o.forEach((n) => n());
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* Removes a NodeView Renderer from the editor.
|
|
174
|
+
*/
|
|
175
|
+
removeRenderer(t) {
|
|
176
|
+
const r = { ...e };
|
|
177
|
+
delete r[t], e = r, o.forEach((n) => n());
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
class he extends S.Component {
|
|
182
|
+
constructor(e) {
|
|
183
|
+
var t;
|
|
184
|
+
super(e), this.editorContentRef = S.createRef(), this.initialized = !1, this.state = {
|
|
185
|
+
hasContentComponentInitialized: !!(!((t = e.editor) === null || t === void 0) && t.contentComponent)
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
componentDidMount() {
|
|
189
|
+
this.init();
|
|
190
|
+
}
|
|
191
|
+
componentDidUpdate() {
|
|
192
|
+
this.init();
|
|
193
|
+
}
|
|
194
|
+
init() {
|
|
195
|
+
const e = this.props.editor;
|
|
196
|
+
if (e && !e.isDestroyed && e.options.element) {
|
|
197
|
+
if (e.contentComponent)
|
|
198
|
+
return;
|
|
199
|
+
const t = this.editorContentRef.current;
|
|
200
|
+
t.append(...e.options.element.childNodes), e.setOptions({
|
|
201
|
+
element: t
|
|
202
|
+
}), e.contentComponent = fe(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = e.contentComponent.subscribe(() => {
|
|
203
|
+
this.setState((r) => r.hasContentComponentInitialized ? r : {
|
|
204
|
+
hasContentComponentInitialized: !0
|
|
205
|
+
}), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent();
|
|
206
|
+
})), e.createNodeViews(), this.initialized = !0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
componentWillUnmount() {
|
|
210
|
+
const e = this.props.editor;
|
|
211
|
+
if (!e || (this.initialized = !1, e.isDestroyed || e.view.setProps({
|
|
212
|
+
nodeViews: {}
|
|
213
|
+
}), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent(), e.contentComponent = null, !e.options.element.firstChild))
|
|
214
|
+
return;
|
|
215
|
+
const t = document.createElement("div");
|
|
216
|
+
t.append(...e.options.element.childNodes), e.setOptions({
|
|
217
|
+
element: t
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
render() {
|
|
221
|
+
const { editor: e, innerRef: t, ...r } = this.props;
|
|
222
|
+
return S.createElement(
|
|
223
|
+
S.Fragment,
|
|
224
|
+
null,
|
|
225
|
+
S.createElement("div", { ref: le(t, this.editorContentRef), ...r }),
|
|
226
|
+
(e == null ? void 0 : e.contentComponent) && S.createElement(de, { contentComponent: e.contentComponent })
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const pe = re((o, e) => {
|
|
231
|
+
const t = S.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [o.editor]);
|
|
232
|
+
return S.createElement(he, {
|
|
233
|
+
key: t,
|
|
234
|
+
innerRef: e,
|
|
235
|
+
...o
|
|
236
|
+
});
|
|
237
|
+
}), Ne = S.memo(pe);
|
|
238
|
+
var ve = function o(e, t) {
|
|
239
|
+
if (e === t) return !0;
|
|
240
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
241
|
+
if (e.constructor !== t.constructor) return !1;
|
|
242
|
+
var r, n, i;
|
|
243
|
+
if (Array.isArray(e)) {
|
|
244
|
+
if (r = e.length, r != t.length) return !1;
|
|
245
|
+
for (n = r; n-- !== 0; )
|
|
246
|
+
if (!o(e[n], t[n])) return !1;
|
|
247
|
+
return !0;
|
|
248
|
+
}
|
|
249
|
+
if (e instanceof Map && t instanceof Map) {
|
|
250
|
+
if (e.size !== t.size) return !1;
|
|
251
|
+
for (n of e.entries())
|
|
252
|
+
if (!t.has(n[0])) return !1;
|
|
253
|
+
for (n of e.entries())
|
|
254
|
+
if (!o(n[1], t.get(n[0]))) return !1;
|
|
255
|
+
return !0;
|
|
256
|
+
}
|
|
257
|
+
if (e instanceof Set && t instanceof Set) {
|
|
258
|
+
if (e.size !== t.size) return !1;
|
|
259
|
+
for (n of e.entries())
|
|
260
|
+
if (!t.has(n[0])) return !1;
|
|
261
|
+
return !0;
|
|
262
|
+
}
|
|
263
|
+
if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
264
|
+
if (r = e.length, r != t.length) return !1;
|
|
265
|
+
for (n = r; n-- !== 0; )
|
|
266
|
+
if (e[n] !== t[n]) return !1;
|
|
267
|
+
return !0;
|
|
268
|
+
}
|
|
269
|
+
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
270
|
+
if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
|
|
271
|
+
if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
|
|
272
|
+
if (i = Object.keys(e), r = i.length, r !== Object.keys(t).length) return !1;
|
|
273
|
+
for (n = r; n-- !== 0; )
|
|
274
|
+
if (!Object.prototype.hasOwnProperty.call(t, i[n])) return !1;
|
|
275
|
+
for (n = r; n-- !== 0; ) {
|
|
276
|
+
var m = i[n];
|
|
277
|
+
if (!(m === "_owner" && e.$$typeof) && !o(e[m], t[m]))
|
|
278
|
+
return !1;
|
|
279
|
+
}
|
|
280
|
+
return !0;
|
|
281
|
+
}
|
|
282
|
+
return e !== e && t !== t;
|
|
283
|
+
}, Se = /* @__PURE__ */ ue(ve), U = { exports: {} }, j = {};
|
|
284
|
+
/**
|
|
285
|
+
* @license React
|
|
286
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
287
|
+
*
|
|
288
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
289
|
+
*
|
|
290
|
+
* This source code is licensed under the MIT license found in the
|
|
291
|
+
* LICENSE file in the root directory of this source tree.
|
|
292
|
+
*/
|
|
293
|
+
var $;
|
|
294
|
+
function me() {
|
|
295
|
+
if ($) return j;
|
|
296
|
+
$ = 1;
|
|
297
|
+
var o = S, e = x;
|
|
298
|
+
function t(g, c) {
|
|
299
|
+
return g === c && (g !== 0 || 1 / g === 1 / c) || g !== g && c !== c;
|
|
300
|
+
}
|
|
301
|
+
var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, i = o.useRef, m = o.useEffect, R = o.useMemo, O = o.useDebugValue;
|
|
302
|
+
return j.useSyncExternalStoreWithSelector = function(g, c, s, l, f) {
|
|
303
|
+
var p = i(null);
|
|
304
|
+
if (p.current === null) {
|
|
305
|
+
var h = { hasValue: !1, value: null };
|
|
306
|
+
p.current = h;
|
|
307
|
+
} else h = p.current;
|
|
308
|
+
p = R(function() {
|
|
309
|
+
function C(a) {
|
|
310
|
+
if (!D) {
|
|
311
|
+
if (D = !0, d = a, a = l(a), f !== void 0 && h.hasValue) {
|
|
312
|
+
var E = h.value;
|
|
313
|
+
if (f(E, a)) return u = E;
|
|
314
|
+
}
|
|
315
|
+
return u = a;
|
|
316
|
+
}
|
|
317
|
+
if (E = u, r(d, a)) return E;
|
|
318
|
+
var b = l(a);
|
|
319
|
+
return f !== void 0 && f(E, b) ? E : (d = a, u = b);
|
|
320
|
+
}
|
|
321
|
+
var D = !1, d, u, _ = s === void 0 ? null : s;
|
|
322
|
+
return [function() {
|
|
323
|
+
return C(c());
|
|
324
|
+
}, _ === null ? void 0 : function() {
|
|
325
|
+
return C(_());
|
|
326
|
+
}];
|
|
327
|
+
}, [c, s, l, f]);
|
|
328
|
+
var v = n(g, p[0], p[1]);
|
|
329
|
+
return m(function() {
|
|
330
|
+
h.hasValue = !0, h.value = v;
|
|
331
|
+
}, [v]), O(v), v;
|
|
332
|
+
}, j;
|
|
333
|
+
}
|
|
334
|
+
var P = {};
|
|
335
|
+
/**
|
|
336
|
+
* @license React
|
|
337
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
338
|
+
*
|
|
339
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
340
|
+
*
|
|
341
|
+
* This source code is licensed under the MIT license found in the
|
|
342
|
+
* LICENSE file in the root directory of this source tree.
|
|
343
|
+
*/
|
|
344
|
+
var k;
|
|
345
|
+
function Ee() {
|
|
346
|
+
return k || (k = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
347
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
348
|
+
var o = S, e = x;
|
|
349
|
+
function t(c, s) {
|
|
350
|
+
return c === s && (c !== 0 || 1 / c === 1 / s) || c !== c && s !== s;
|
|
351
|
+
}
|
|
352
|
+
var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, i = o.useRef, m = o.useEffect, R = o.useMemo, O = o.useDebugValue;
|
|
353
|
+
function g(c, s, l, f, p) {
|
|
354
|
+
var h = i(null), v;
|
|
355
|
+
h.current === null ? (v = {
|
|
356
|
+
hasValue: !1,
|
|
357
|
+
value: null
|
|
358
|
+
}, h.current = v) : v = h.current;
|
|
359
|
+
var C = R(function() {
|
|
360
|
+
var _ = !1, a, E, b = function(T) {
|
|
361
|
+
if (!_) {
|
|
362
|
+
_ = !0, a = T;
|
|
363
|
+
var N = f(T);
|
|
364
|
+
if (p !== void 0 && v.hasValue) {
|
|
365
|
+
var L = v.value;
|
|
366
|
+
if (p(L, N))
|
|
367
|
+
return E = L, L;
|
|
368
|
+
}
|
|
369
|
+
return E = N, N;
|
|
370
|
+
}
|
|
371
|
+
var ee = a, M = E;
|
|
372
|
+
if (r(ee, T))
|
|
373
|
+
return M;
|
|
374
|
+
var I = f(T);
|
|
375
|
+
return p !== void 0 && p(M, I) ? M : (a = T, E = I, I);
|
|
376
|
+
}, y = l === void 0 ? null : l, w = function() {
|
|
377
|
+
return b(s());
|
|
378
|
+
}, A = y === null ? void 0 : function() {
|
|
379
|
+
return b(y());
|
|
380
|
+
};
|
|
381
|
+
return [w, A];
|
|
382
|
+
}, [s, l, f, p]), D = C[0], d = C[1], u = n(c, D, d);
|
|
383
|
+
return m(function() {
|
|
384
|
+
v.hasValue = !0, v.value = u;
|
|
385
|
+
}, [u]), O(u), u;
|
|
386
|
+
}
|
|
387
|
+
P.useSyncExternalStoreWithSelector = g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
388
|
+
})()), P;
|
|
389
|
+
}
|
|
390
|
+
process.env.NODE_ENV === "production" ? U.exports = me() : U.exports = Ee();
|
|
391
|
+
var _e = U.exports;
|
|
392
|
+
const ge = typeof window < "u" ? oe : G;
|
|
393
|
+
class ye {
|
|
394
|
+
constructor(e) {
|
|
395
|
+
this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = e, this.lastSnapshot = { editor: e, transactionNumber: 0 }, this.getSnapshot = this.getSnapshot.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.watch = this.watch.bind(this), this.subscribe = this.subscribe.bind(this);
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Get the current editor instance.
|
|
399
|
+
*/
|
|
400
|
+
getSnapshot() {
|
|
401
|
+
return this.transactionNumber === this.lastTransactionNumber ? this.lastSnapshot : (this.lastTransactionNumber = this.transactionNumber, this.lastSnapshot = { editor: this.editor, transactionNumber: this.transactionNumber }, this.lastSnapshot);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Always disable the editor on the server-side.
|
|
405
|
+
*/
|
|
406
|
+
getServerSnapshot() {
|
|
407
|
+
return { editor: null, transactionNumber: 0 };
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Subscribe to the editor instance's changes.
|
|
411
|
+
*/
|
|
412
|
+
subscribe(e) {
|
|
413
|
+
return this.subscribers.add(e), () => {
|
|
414
|
+
this.subscribers.delete(e);
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Watch the editor instance for changes.
|
|
419
|
+
*/
|
|
420
|
+
watch(e) {
|
|
421
|
+
if (this.editor = e, this.editor) {
|
|
422
|
+
const t = () => {
|
|
423
|
+
this.transactionNumber += 1, this.subscribers.forEach((n) => n());
|
|
424
|
+
}, r = this.editor;
|
|
425
|
+
return r.on("transaction", t), () => {
|
|
426
|
+
r.off("transaction", t);
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function Oe(o) {
|
|
432
|
+
var e;
|
|
433
|
+
const [t] = z(() => new ye(o.editor)), r = _e.useSyncExternalStoreWithSelector(t.subscribe, t.getSnapshot, t.getServerSnapshot, o.selector, (e = o.equalityFn) !== null && e !== void 0 ? e : Se);
|
|
434
|
+
return ge(() => t.watch(o.editor), [o.editor, t]), J(r), r;
|
|
435
|
+
}
|
|
436
|
+
const Y = process.env.NODE_ENV !== "production", W = typeof window > "u", be = W || !!(typeof window < "u" && window.next);
|
|
437
|
+
class K {
|
|
438
|
+
constructor(e) {
|
|
439
|
+
this.editor = null, this.subscriptions = /* @__PURE__ */ new Set(), this.isComponentMounted = !1, this.previousDeps = null, this.instanceId = "", this.options = e, this.subscriptions = /* @__PURE__ */ new Set(), this.setEditor(this.getInitialEditor()), this.scheduleDestroy(), this.getEditor = this.getEditor.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.subscribe = this.subscribe.bind(this), this.refreshEditorInstance = this.refreshEditorInstance.bind(this), this.scheduleDestroy = this.scheduleDestroy.bind(this), this.onRender = this.onRender.bind(this), this.createEditor = this.createEditor.bind(this);
|
|
440
|
+
}
|
|
441
|
+
setEditor(e) {
|
|
442
|
+
this.editor = e, this.instanceId = Math.random().toString(36).slice(2, 9), this.subscriptions.forEach((t) => t());
|
|
443
|
+
}
|
|
444
|
+
getInitialEditor() {
|
|
445
|
+
if (this.options.current.immediatelyRender === void 0)
|
|
446
|
+
return W || be ? (Y && console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."), null) : this.createEditor();
|
|
447
|
+
if (this.options.current.immediatelyRender && W && Y)
|
|
448
|
+
throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");
|
|
449
|
+
return this.options.current.immediatelyRender ? this.createEditor() : null;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Create a new editor instance. And attach event listeners.
|
|
453
|
+
*/
|
|
454
|
+
createEditor() {
|
|
455
|
+
const e = {
|
|
456
|
+
...this.options.current,
|
|
457
|
+
// Always call the most recent version of the callback function by default
|
|
458
|
+
onBeforeCreate: (...r) => {
|
|
459
|
+
var n, i;
|
|
460
|
+
return (i = (n = this.options.current).onBeforeCreate) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
461
|
+
},
|
|
462
|
+
onBlur: (...r) => {
|
|
463
|
+
var n, i;
|
|
464
|
+
return (i = (n = this.options.current).onBlur) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
465
|
+
},
|
|
466
|
+
onCreate: (...r) => {
|
|
467
|
+
var n, i;
|
|
468
|
+
return (i = (n = this.options.current).onCreate) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
469
|
+
},
|
|
470
|
+
onDestroy: (...r) => {
|
|
471
|
+
var n, i;
|
|
472
|
+
return (i = (n = this.options.current).onDestroy) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
473
|
+
},
|
|
474
|
+
onFocus: (...r) => {
|
|
475
|
+
var n, i;
|
|
476
|
+
return (i = (n = this.options.current).onFocus) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
477
|
+
},
|
|
478
|
+
onSelectionUpdate: (...r) => {
|
|
479
|
+
var n, i;
|
|
480
|
+
return (i = (n = this.options.current).onSelectionUpdate) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
481
|
+
},
|
|
482
|
+
onTransaction: (...r) => {
|
|
483
|
+
var n, i;
|
|
484
|
+
return (i = (n = this.options.current).onTransaction) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
485
|
+
},
|
|
486
|
+
onUpdate: (...r) => {
|
|
487
|
+
var n, i;
|
|
488
|
+
return (i = (n = this.options.current).onUpdate) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
489
|
+
},
|
|
490
|
+
onContentError: (...r) => {
|
|
491
|
+
var n, i;
|
|
492
|
+
return (i = (n = this.options.current).onContentError) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
493
|
+
},
|
|
494
|
+
onDrop: (...r) => {
|
|
495
|
+
var n, i;
|
|
496
|
+
return (i = (n = this.options.current).onDrop) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
497
|
+
},
|
|
498
|
+
onPaste: (...r) => {
|
|
499
|
+
var n, i;
|
|
500
|
+
return (i = (n = this.options.current).onPaste) === null || i === void 0 ? void 0 : i.call(n, ...r);
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
return new se(e);
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Get the current editor instance.
|
|
507
|
+
*/
|
|
508
|
+
getEditor() {
|
|
509
|
+
return this.editor;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Always disable the editor on the server-side.
|
|
513
|
+
*/
|
|
514
|
+
getServerSnapshot() {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Subscribe to the editor instance's changes.
|
|
519
|
+
*/
|
|
520
|
+
subscribe(e) {
|
|
521
|
+
return this.subscriptions.add(e), () => {
|
|
522
|
+
this.subscriptions.delete(e);
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
static compareOptions(e, t) {
|
|
526
|
+
return Object.keys(e).every((r) => ["onCreate", "onBeforeCreate", "onDestroy", "onUpdate", "onTransaction", "onFocus", "onBlur", "onSelectionUpdate", "onContentError", "onDrop", "onPaste"].includes(r) ? !0 : r === "extensions" && e.extensions && t.extensions ? e.extensions.length !== t.extensions.length ? !1 : e.extensions.every((n, i) => {
|
|
527
|
+
var m;
|
|
528
|
+
return n === ((m = t.extensions) === null || m === void 0 ? void 0 : m[i]);
|
|
529
|
+
}) : e[r] === t[r]);
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* On each render, we will create, update, or destroy the editor instance.
|
|
533
|
+
* @param deps The dependencies to watch for changes
|
|
534
|
+
* @returns A cleanup function
|
|
535
|
+
*/
|
|
536
|
+
onRender(e) {
|
|
537
|
+
return () => (this.isComponentMounted = !0, clearTimeout(this.scheduledDestructionTimeout), this.editor && !this.editor.isDestroyed && e.length === 0 ? K.compareOptions(this.options.current, this.editor.options) || this.editor.setOptions({
|
|
538
|
+
...this.options.current,
|
|
539
|
+
editable: this.editor.isEditable
|
|
540
|
+
}) : this.refreshEditorInstance(e), () => {
|
|
541
|
+
this.isComponentMounted = !1, this.scheduleDestroy();
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Recreate the editor instance if the dependencies have changed.
|
|
546
|
+
*/
|
|
547
|
+
refreshEditorInstance(e) {
|
|
548
|
+
if (this.editor && !this.editor.isDestroyed) {
|
|
549
|
+
if (this.previousDeps === null) {
|
|
550
|
+
this.previousDeps = e;
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
if (this.previousDeps.length === e.length && this.previousDeps.every((r, n) => r === e[n]))
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
this.editor && !this.editor.isDestroyed && this.editor.destroy(), this.setEditor(this.createEditor()), this.previousDeps = e;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Schedule the destruction of the editor instance.
|
|
560
|
+
* This will only destroy the editor if it was not mounted on the next tick.
|
|
561
|
+
* This is to avoid destroying the editor instance when it's actually still mounted.
|
|
562
|
+
*/
|
|
563
|
+
scheduleDestroy() {
|
|
564
|
+
const e = this.instanceId, t = this.editor;
|
|
565
|
+
this.scheduledDestructionTimeout = setTimeout(() => {
|
|
566
|
+
if (this.isComponentMounted && this.instanceId === e) {
|
|
567
|
+
t && t.setOptions(this.options.current);
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
t && !t.isDestroyed && (t.destroy(), this.instanceId === e && this.setEditor(null));
|
|
571
|
+
}, 1);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
function Le(o = {}, e = []) {
|
|
575
|
+
const t = ne(o);
|
|
576
|
+
t.current = o;
|
|
577
|
+
const [r] = z(() => new K(t)), n = x.useSyncExternalStore(r.subscribe, r.getEditor, r.getServerSnapshot);
|
|
578
|
+
return J(n), G(r.onRender(e)), Oe({
|
|
579
|
+
editor: n,
|
|
580
|
+
selector: ({ transactionNumber: i }) => o.shouldRerenderOnTransaction === !1 ? null : o.immediatelyRender && i === 0 ? 0 : i + 1
|
|
581
|
+
}), n;
|
|
582
|
+
}
|
|
583
|
+
const Z = X({
|
|
584
|
+
editor: null
|
|
585
|
+
});
|
|
586
|
+
Z.Consumer;
|
|
587
|
+
const Re = () => Q(Z), Me = (o) => {
|
|
588
|
+
const [e, t] = z(null), { editor: r } = Re();
|
|
589
|
+
return G(() => {
|
|
590
|
+
var n;
|
|
591
|
+
if (!e || !((n = o.editor) === null || n === void 0) && n.isDestroyed || r != null && r.isDestroyed)
|
|
592
|
+
return;
|
|
593
|
+
const { pluginKey: i = "bubbleMenu", editor: m, tippyOptions: R = {}, updateDelay: O, shouldShow: g = null } = o, c = m || r;
|
|
594
|
+
if (!c) {
|
|
595
|
+
console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
const s = te({
|
|
599
|
+
updateDelay: O,
|
|
600
|
+
editor: c,
|
|
601
|
+
element: e,
|
|
602
|
+
pluginKey: i,
|
|
603
|
+
shouldShow: g,
|
|
604
|
+
tippyOptions: R
|
|
605
|
+
});
|
|
606
|
+
return c.registerPlugin(s), () => {
|
|
607
|
+
c.unregisterPlugin(i);
|
|
608
|
+
};
|
|
609
|
+
}, [o.editor, r, e]), S.createElement("div", { ref: t, className: o.className, style: { visibility: "hidden" } }, o.children);
|
|
610
|
+
}, Ce = X({
|
|
611
|
+
onDragStart: void 0
|
|
612
|
+
}), De = () => Q(Ce);
|
|
613
|
+
S.forwardRef((o, e) => {
|
|
614
|
+
const { onDragStart: t } = De(), r = o.as || "div";
|
|
615
|
+
return (
|
|
616
|
+
// @ts-ignore
|
|
617
|
+
S.createElement(r, { ...o, ref: e, "data-node-view-wrapper": "", onDragStart: t, style: {
|
|
618
|
+
whiteSpace: "normal",
|
|
619
|
+
...o.style
|
|
620
|
+
} })
|
|
621
|
+
);
|
|
622
|
+
});
|
|
623
|
+
export {
|
|
624
|
+
Me as BubbleMenu,
|
|
625
|
+
Be as CommandManager,
|
|
626
|
+
se as Editor,
|
|
627
|
+
Ne as EditorContent,
|
|
628
|
+
Z as EditorContext,
|
|
629
|
+
je as Extension,
|
|
630
|
+
Pe as InputRule,
|
|
631
|
+
Fe as Mark,
|
|
632
|
+
Ue as Node,
|
|
633
|
+
We as NodePos,
|
|
634
|
+
ze as PasteRule,
|
|
635
|
+
he as PureEditorContent,
|
|
636
|
+
Ce as ReactNodeViewContext,
|
|
637
|
+
Ge as callOrReturn,
|
|
638
|
+
Ke as canInsertNode,
|
|
639
|
+
He as combineTransactionSteps,
|
|
640
|
+
qe as createChainableState,
|
|
641
|
+
$e as createDocument,
|
|
642
|
+
ke as createNodeFromContent,
|
|
643
|
+
Ye as createStyleTag,
|
|
644
|
+
Je as defaultBlockAt,
|
|
645
|
+
Qe as deleteProps,
|
|
646
|
+
Xe as elementFromString,
|
|
647
|
+
Ze as findChildrenInRange,
|
|
648
|
+
et as findDuplicates,
|
|
649
|
+
tt as findParentNode,
|
|
650
|
+
nt as findParentNodeClosestToPos,
|
|
651
|
+
rt as fromString,
|
|
652
|
+
ot as getAttributes,
|
|
653
|
+
it as getAttributesFromExtensions,
|
|
654
|
+
st as getChangedRanges,
|
|
655
|
+
ut as getExtensionField,
|
|
656
|
+
at as getHTMLFromFragment,
|
|
657
|
+
ct as getMarkAttributes,
|
|
658
|
+
lt as getMarkRange,
|
|
659
|
+
dt as getMarkType,
|
|
660
|
+
ft as getMarksBetween,
|
|
661
|
+
ht as getNodeAttributes,
|
|
662
|
+
pt as getNodeType,
|
|
663
|
+
vt as getRenderedAttributes,
|
|
664
|
+
St as getSchemaByResolvedExtensions,
|
|
665
|
+
mt as getSchemaTypeByName,
|
|
666
|
+
Et as getSchemaTypeNameByName,
|
|
667
|
+
_t as getSplittedAttributes,
|
|
668
|
+
gt as getText,
|
|
669
|
+
yt as getTextBetween,
|
|
670
|
+
Ot as getTextContentFromNodes,
|
|
671
|
+
bt as getTextSerializersFromSchema,
|
|
672
|
+
Rt as injectExtensionAttributesToParseRule,
|
|
673
|
+
Ct as inputRulesPlugin,
|
|
674
|
+
Dt as isActive,
|
|
675
|
+
wt as isEmptyObject,
|
|
676
|
+
Tt as isExtensionRulesEnabled,
|
|
677
|
+
xt as isFunction,
|
|
678
|
+
At as isList,
|
|
679
|
+
Nt as isMacOS,
|
|
680
|
+
Lt as isMarkActive,
|
|
681
|
+
Mt as isNodeActive,
|
|
682
|
+
It as isNodeEmpty,
|
|
683
|
+
Vt as isNodeSelection,
|
|
684
|
+
Bt as isNumber,
|
|
685
|
+
jt as isPlainObject,
|
|
686
|
+
Pt as isRegExp,
|
|
687
|
+
Ft as isSafari,
|
|
688
|
+
Ut as isTextSelection,
|
|
689
|
+
Wt as isiOS,
|
|
690
|
+
zt as markInputRule,
|
|
691
|
+
Gt as markPasteRule,
|
|
692
|
+
Kt as mergeAttributes,
|
|
693
|
+
Ht as mergeDeep,
|
|
694
|
+
qt as minMax,
|
|
695
|
+
$t as nodeInputRule,
|
|
696
|
+
kt as objectIncludes,
|
|
697
|
+
Yt as pasteRulesPlugin,
|
|
698
|
+
Jt as posToDOMRect,
|
|
699
|
+
Qt as removeDuplicates,
|
|
700
|
+
Xt as resolveFocusPosition,
|
|
701
|
+
Zt as selectionToInsertionEnd,
|
|
702
|
+
en as splitExtensions,
|
|
703
|
+
tn as textblockTypeInputRule,
|
|
704
|
+
Re as useCurrentEditor,
|
|
705
|
+
Le as useEditor,
|
|
706
|
+
Oe as useEditorState,
|
|
707
|
+
De as useReactNodeView,
|
|
708
|
+
nn as wrappingInputRule
|
|
709
|
+
};
|