@instincthub/react-ui 0.1.36 → 0.1.38
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/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/createPopper.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/createPopper.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/contains.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/contains.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindow.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/enums.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/enums.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/applyStyles.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/arrow.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/arrow.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/computeStyles.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/eventListeners.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/flip.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/flip.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/hide.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/hide.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/offset.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/offset.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/popper.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/popper.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/computeOffsets.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/computeOffsets.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/debounce.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/debounce.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/detectOverflow.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/detectOverflow.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/expandToHashMap.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getAltAxis.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getAltAxis.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getBasePlacement.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getVariation.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/getVariation.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/math.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/math.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/mergeByName.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/mergeByName.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/orderModifiers.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/orderModifiers.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/rectToClientRect.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/userAgent.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/userAgent.js.map +1 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/within.js +2 -0
- package/dist/node_modules/.pnpm/@popperjs_core@2.11.8/node_modules/@popperjs/core/lib/utils/within.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@tiptap_extension-bubble-menu@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-bubble-menu/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-bubble-menu@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-bubble-menu/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-color@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_extension_3361c5fd95bc28ff82624b8eb98b2834/node_modules/@tiptap/extension-color/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-color@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_extension_3361c5fd95bc28ff82624b8eb98b2834/node_modules/@tiptap/extension-color/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-floating-menu@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-floating-menu/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-floating-menu@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-floating-menu/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-focus@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-focus/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-focus@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-focus/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-text-align@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-text-align/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-text-align@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-text-align/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-text-style@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-text-style/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-text-style@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-text-style/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-typography@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-typography/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-typography@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-typography/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-underline@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-underline/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-underline@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-youtube@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-youtube/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_extension-youtube@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-youtube/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@tiptap_react@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1_react-dom_3687a02a33de69fe477ccd0d970063c0/node_modules/@tiptap/react/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@tiptap_react@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1_react-dom_3687a02a33de69fe477ccd0d970063c0/node_modules/@tiptap/react/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@tiptap_suggestion@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/suggestion/dist/index.js +2 -0
- package/dist/node_modules/.pnpm/@tiptap_suggestion@2.27.2_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/suggestion/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/bold.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/bold.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-xml.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code-xml.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/code.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/columns-3.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/columns-3.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/external-link.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/external-link.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/grip-vertical.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/grip-vertical.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-2.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-2.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-3.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/heading-3.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/highlighter.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/highlighter.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/image.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/image.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/italic.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/italic.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/link.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/link.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-checks.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-checks.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-ordered.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list-ordered.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/list.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/merge.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/merge.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/message-square-quote.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/message-square-quote.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/minus.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/minus.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/plus.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/quote.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/quote.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/rows-3.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/rows-3.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/split.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/split.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/strikethrough.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/strikethrough.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/table.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/table.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash-2.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/trash-2.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/underline.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/underline.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/unlink.js +2 -2
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/unlink.js.map +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/youtube.js +1 -1
- package/dist/node_modules/.pnpm/lucide-react@0.525.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/youtube.js.map +1 -1
- package/dist/node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js +7 -0
- package/dist/node_modules/.pnpm/tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js.map +1 -0
- package/dist/src/assets/css/modals.css +189 -0
- package/dist/src/assets/css/ui/content-viewer.css +273 -58
- package/dist/src/assets/css/ui/ihub-text-editor.css +883 -0
- package/dist/src/assets/css/ui/ui-index.css +1 -0
- package/dist/src/components/forms/FilterObjects.js +1 -1
- package/dist/src/components/lib/modals/modals.js +1 -1
- package/dist/src/components/lib/modals/modals.js.map +1 -1
- package/dist/src/components/ui/ComponentLists.js +1 -1
- package/dist/src/components/ui/editor/ihub-editor/IHubTextEditor.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/IHubTextEditor.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/BubbleToolbar.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/BubbleToolbar.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/EditorFooter.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/EditorFooter.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/FloatingAddButton.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/FloatingAddButton.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/LinkPopover.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/LinkPopover.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/SlashCommandMenu.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/SlashCommandMenu.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/components/TableToolbar.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/components/TableToolbar.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/constants.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/constants.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/EmbedExtension.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/EmbedExtension.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/ImageWithCaption.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/ImageWithCaption.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/PullQuoteExtension.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/PullQuoteExtension.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/SlashCommandExtension.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/extensions/SlashCommandExtension.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useIHubEditor.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useIHubEditor.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useImageUpload.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useImageUpload.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useMediaEmbed.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useMediaEmbed.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useSlashCommands.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/hooks/useSlashCommands.js.map +1 -0
- package/dist/src/components/ui/editor/ihub-editor/types.js +2 -0
- package/dist/src/components/ui/editor/ihub-editor/types.js.map +1 -0
- package/dist/src/components/ui/viewer/ContentViewer.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/types/components/lib/modals/modals.d.ts +134 -0
- package/dist/src/types/components/ui/editor/ihub-editor/IHubTextEditor.d.ts +2 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/BubbleToolbar.d.ts +6 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/DragHandle.d.ts +5 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/EditorFooter.d.ts +8 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/EmbedBlock.d.ts +6 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/FloatingAddButton.d.ts +7 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/ImageBlock.d.ts +12 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/LinkPopover.d.ts +7 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/PullQuote.d.ts +6 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/SlashCommandMenu.d.ts +9 -0
- package/dist/src/types/components/ui/editor/ihub-editor/components/TableToolbar.d.ts +6 -0
- package/dist/src/types/components/ui/editor/ihub-editor/constants.d.ts +3 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/EmbedExtension.d.ts +13 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/ImageWithCaption.d.ts +14 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/PullQuoteExtension.d.ts +11 -0
- package/dist/src/types/components/ui/editor/ihub-editor/extensions/SlashCommandExtension.d.ts +3 -0
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useIHubEditor.d.ts +16 -0
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useImageUpload.d.ts +11 -0
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useMediaEmbed.d.ts +7 -0
- package/dist/src/types/components/ui/editor/ihub-editor/hooks/useSlashCommands.d.ts +10 -0
- package/dist/src/types/components/ui/editor/ihub-editor/index.d.ts +2 -0
- package/dist/src/types/components/ui/editor/ihub-editor/types.d.ts +48 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +13 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Extension as e,isTextSelection as t,isNodeSelection as i,posToDOMRect as s}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";import{Plugin as o,PluginKey as n}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js";import r from"../../../../../tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js";class d{constructor({editor:e,element:o,view:n,tippyOptions:r={},updateDelay:d=250,shouldShow:l}){this.preventHide=!1,this.shouldShow=({view:e,state:i,from:s,to:o})=>{const{doc:n,selection:r}=i,{empty:d}=r,l=!n.textBetween(s,o).length&&t(i.selection),p=this.element.contains(document.activeElement);return!(!e.hasFocus()&&!p||d||l||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||(null==e?void 0:e.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.handleDebouncedUpdate=(e,t)=>{const i=!(null==t?void 0:t.selection.eq(e.state.selection)),s=!(null==t?void 0:t.doc.eq(e.state.doc));(i||s)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(e,i,s,t)},this.updateDelay))},this.updateHandler=(e,t,o,n)=>{var r,d,l;const{state:p,composing:a}=e,{selection:h}=p;if(a||!t&&!o)return;this.createTooltip();const{ranges:u}=h,c=Math.min(...u.map(e=>e.$from.pos)),m=Math.max(...u.map(e=>e.$to.pos));(null===(r=this.shouldShow)||void 0===r?void 0:r.call(this,{editor:this.editor,element:this.element,view:e,state:p,oldState:n,from:c,to:m}))?(null===(d=this.tippy)||void 0===d||d.setProps({getReferenceClientRect:(null===(l=this.tippyOptions)||void 0===l?void 0:l.getReferenceClientRect)||(()=>{if(i(p.selection)){let t=e.nodeDOM(c);if(t){const e=t.dataset.nodeViewWrapper?t:t.querySelector("[data-node-view-wrapper]");if(e&&(t=e.firstChild),t)return t.getBoundingClientRect()}}return s(e,c,m)})}),this.show()):this.hide()},this.editor=e,this.element=o,this.view=n,this.updateDelay=d,l&&(this.shouldShow=l),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.element.tabIndex=0,!this.tippy&&t&&(this.tippy=r(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:i}=e,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s)return void this.handleDebouncedUpdate(e,t);const o=!(null==t?void 0:t.selection.eq(e.state.selection)),n=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,o,n,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const l=e=>new o({key:"string"==typeof e.pluginKey?new n(e.pluginKey):e.pluginKey,view:t=>new d({view:t,...e})});e.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[l({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});export{l as BubbleMenuPlugin,d as BubbleMenuView};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-bubble-menu@2.27.1_@tiptap+core@2.27.1_@tiptap+pm@2.27.1__@tiptap+pm@2.27.1/node_modules/@tiptap/extension-bubble-menu/dist/index.js"],"sourcesContent":["import { isTextSelection, isNodeSelection, posToDOMRect, Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\nimport tippy from 'tippy.js';\n\nclass BubbleMenuView {\n constructor({ editor, element, view, tippyOptions = {}, updateDelay = 250, shouldShow, }) {\n this.preventHide = false;\n this.shouldShow = ({ view, state, from, to, }) => {\n const { doc, selection } = state;\n const { empty } = selection;\n // Sometime check for `empty` is not enough.\n // Doubleclick an empty paragraph returns a node size of 2.\n // So we check also for an empty text size.\n const isEmptyTextBlock = !doc.textBetween(from, to).length && isTextSelection(state.selection);\n // When clicking on a element inside the bubble menu the editor \"blur\" event\n // is called and the bubble menu item is focussed. In this case we should\n // consider the menu as part of the editor and keep showing the menu\n const isChildOfMenu = this.element.contains(document.activeElement);\n const hasEditorFocus = view.hasFocus() || isChildOfMenu;\n if (!hasEditorFocus || empty || isEmptyTextBlock || !this.editor.isEditable) {\n return false;\n }\n return true;\n };\n this.mousedownHandler = () => {\n this.preventHide = true;\n };\n this.dragstartHandler = () => {\n this.hide();\n };\n this.focusHandler = () => {\n // we use `setTimeout` to make sure `selection` is already updated\n setTimeout(() => this.update(this.editor.view));\n };\n this.blurHandler = ({ event }) => {\n var _a;\n if (this.preventHide) {\n this.preventHide = false;\n return;\n }\n if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) === null || _a === void 0 ? void 0 : _a.contains(event.relatedTarget))) {\n return;\n }\n if ((event === null || event === void 0 ? void 0 : event.relatedTarget) === this.editor.view.dom) {\n return;\n }\n this.hide();\n };\n this.tippyBlurHandler = (event) => {\n this.blurHandler({ event });\n };\n this.handleDebouncedUpdate = (view, oldState) => {\n const selectionChanged = !(oldState === null || oldState === void 0 ? void 0 : oldState.selection.eq(view.state.selection));\n const docChanged = !(oldState === null || oldState === void 0 ? void 0 : oldState.doc.eq(view.state.doc));\n if (!selectionChanged && !docChanged) {\n return;\n }\n if (this.updateDebounceTimer) {\n clearTimeout(this.updateDebounceTimer);\n }\n this.updateDebounceTimer = window.setTimeout(() => {\n this.updateHandler(view, selectionChanged, docChanged, oldState);\n }, this.updateDelay);\n };\n this.updateHandler = (view, selectionChanged, docChanged, oldState) => {\n var _a, _b, _c;\n const { state, composing } = view;\n const { selection } = state;\n const isSame = !selectionChanged && !docChanged;\n if (composing || isSame) {\n return;\n }\n this.createTooltip();\n // support for CellSelections\n const { ranges } = selection;\n const from = Math.min(...ranges.map(range => range.$from.pos));\n const to = Math.max(...ranges.map(range => range.$to.pos));\n const shouldShow = (_a = this.shouldShow) === null || _a === void 0 ? void 0 : _a.call(this, {\n editor: this.editor,\n element: this.element,\n view,\n state,\n oldState,\n from,\n to,\n });\n if (!shouldShow) {\n this.hide();\n return;\n }\n (_b = this.tippy) === null || _b === void 0 ? void 0 : _b.setProps({\n getReferenceClientRect: ((_c = this.tippyOptions) === null || _c === void 0 ? void 0 : _c.getReferenceClientRect)\n || (() => {\n if (isNodeSelection(state.selection)) {\n let node = view.nodeDOM(from);\n if (node) {\n const nodeViewWrapper = node.dataset.nodeViewWrapper ? node : node.querySelector('[data-node-view-wrapper]');\n if (nodeViewWrapper) {\n node = nodeViewWrapper.firstChild;\n }\n if (node) {\n return node.getBoundingClientRect();\n }\n }\n }\n return posToDOMRect(view, from, to);\n }),\n });\n this.show();\n };\n this.editor = editor;\n this.element = element;\n this.view = view;\n this.updateDelay = updateDelay;\n if (shouldShow) {\n this.shouldShow = shouldShow;\n }\n this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.view.dom.addEventListener('dragstart', this.dragstartHandler);\n this.editor.on('focus', this.focusHandler);\n this.editor.on('blur', this.blurHandler);\n this.tippyOptions = tippyOptions;\n // Detaches menu content from its current parent\n this.element.remove();\n this.element.style.visibility = 'visible';\n }\n createTooltip() {\n const { element: editorElement } = this.editor.options;\n const editorIsAttached = !!editorElement.parentElement;\n this.element.tabIndex = 0;\n if (this.tippy || !editorIsAttached) {\n return;\n }\n this.tippy = tippy(editorElement, {\n duration: 0,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'top',\n hideOnClick: 'toggle',\n ...this.tippyOptions,\n });\n // maybe we have to hide tippy on its own blur event as well\n if (this.tippy.popper.firstChild) {\n this.tippy.popper.firstChild.addEventListener('blur', this.tippyBlurHandler);\n }\n }\n update(view, oldState) {\n const { state } = view;\n const hasValidSelection = state.selection.from !== state.selection.to;\n if (this.updateDelay > 0 && hasValidSelection) {\n this.handleDebouncedUpdate(view, oldState);\n return;\n }\n const selectionChanged = !(oldState === null || oldState === void 0 ? void 0 : oldState.selection.eq(view.state.selection));\n const docChanged = !(oldState === null || oldState === void 0 ? void 0 : oldState.doc.eq(view.state.doc));\n this.updateHandler(view, selectionChanged, docChanged, oldState);\n }\n show() {\n var _a;\n (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.show();\n }\n hide() {\n var _a;\n (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.hide();\n }\n destroy() {\n var _a, _b;\n if ((_a = this.tippy) === null || _a === void 0 ? void 0 : _a.popper.firstChild) {\n this.tippy.popper.firstChild.removeEventListener('blur', this.tippyBlurHandler);\n }\n (_b = this.tippy) === null || _b === void 0 ? void 0 : _b.destroy();\n this.element.removeEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.view.dom.removeEventListener('dragstart', this.dragstartHandler);\n this.editor.off('focus', this.focusHandler);\n this.editor.off('blur', this.blurHandler);\n }\n}\nconst BubbleMenuPlugin = (options) => {\n return new Plugin({\n key: typeof options.pluginKey === 'string' ? new PluginKey(options.pluginKey) : options.pluginKey,\n view: view => new BubbleMenuView({ view, ...options }),\n });\n};\n\n/**\n * This extension allows you to create a bubble menu.\n * @see https://tiptap.dev/api/extensions/bubble-menu\n */\nconst BubbleMenu = Extension.create({\n name: 'bubbleMenu',\n addOptions() {\n return {\n element: null,\n tippyOptions: {},\n pluginKey: 'bubbleMenu',\n updateDelay: undefined,\n shouldShow: null,\n };\n },\n addProseMirrorPlugins() {\n if (!this.options.element) {\n return [];\n }\n return [\n BubbleMenuPlugin({\n pluginKey: this.options.pluginKey,\n editor: this.editor,\n element: this.options.element,\n tippyOptions: this.options.tippyOptions,\n updateDelay: this.options.updateDelay,\n shouldShow: this.options.shouldShow,\n }),\n ];\n },\n});\n\nexport { BubbleMenu, BubbleMenuPlugin, BubbleMenuView, BubbleMenu as default };\n//# sourceMappingURL=index.js.map\n"],"names":["BubbleMenuView","constructor","editor","element","view","tippyOptions","updateDelay","shouldShow","this","preventHide","state","from","to","doc","selection","empty","isEmptyTextBlock","textBetween","length","isTextSelection","isChildOfMenu","contains","document","activeElement","hasFocus","isEditable","mousedownHandler","dragstartHandler","hide","focusHandler","setTimeout","update","blurHandler","event","_a","relatedTarget","parentNode","dom","tippyBlurHandler","handleDebouncedUpdate","oldState","selectionChanged","eq","docChanged","updateDebounceTimer","clearTimeout","window","updateHandler","_b","_c","composing","createTooltip","ranges","Math","min","map","range","$from","pos","max","$to","call","tippy","setProps","getReferenceClientRect","isNodeSelection","node","nodeDOM","nodeViewWrapper","dataset","querySelector","firstChild","getBoundingClientRect","posToDOMRect","show","addEventListener","capture","on","remove","style","visibility","editorElement","options","editorIsAttached","parentElement","tabIndex","duration","content","interactive","trigger","placement","hideOnClick","popper","hasValidSelection","destroy","removeEventListener","off","BubbleMenuPlugin","Plugin","key","pluginKey","PluginKey","Extension","create","name","addOptions","undefined","addProseMirrorPlugins"],"mappings":"sYAIA,MAAMA,EACF,WAAAC,EAAYC,OAAEA,EAAMC,QAAEA,EAAOC,KAAEA,EAAIC,aAAEA,EAAe,CAAA,EAAEC,YAAEA,EAAc,IAAGC,WAAEA,IACvEC,KAAKC,aAAc,EACnBD,KAAKD,WAAa,EAAGH,OAAMM,QAAOC,OAAMC,SACpC,MAAMC,IAAEA,EAAGC,UAAEA,GAAcJ,GACrBK,MAAEA,GAAUD,EAIZE,GAAoBH,EAAII,YAAYN,EAAMC,GAAIM,QAAUC,EAAgBT,EAAMI,WAI9EM,EAAgBZ,KAAKL,QAAQkB,SAASC,SAASC,eAErD,SADuBnB,EAAKoB,aAAcJ,GACnBL,GAASC,IAAqBR,KAAKN,OAAOuB,aAKrEjB,KAAKkB,iBAAmB,KACpBlB,KAAKC,aAAc,GAEvBD,KAAKmB,iBAAmB,KACpBnB,KAAKoB,QAETpB,KAAKqB,aAAe,KAEhBC,WAAW,IAAMtB,KAAKuB,OAAOvB,KAAKN,OAAOE,QAE7CI,KAAKwB,YAAc,EAAGC,YAClB,IAAIC,EACA1B,KAAKC,YACLD,KAAKC,aAAc,GAGlBwB,aAAqC,EAASA,EAAME,iBAAsD,QAAlCD,EAAK1B,KAAKL,QAAQiC,kBAA+B,IAAPF,OAAgB,EAASA,EAAGb,SAASY,EAAME,kBAG7JF,aAAqC,EAASA,EAAME,iBAAmB3B,KAAKN,OAAOE,KAAKiC,KAG7F7B,KAAKoB,QAETpB,KAAK8B,iBAAoBL,IACrBzB,KAAKwB,YAAY,CAAEC,WAEvBzB,KAAK+B,sBAAwB,CAACnC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AK0E,QAAQ5E,YAC1BC,WAAYC,KAAK0E,QAAQ3E,cATtB,EAYd"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../../../../../@tiptap_extension-text-style@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1_/node_modules/@tiptap/extension-text-style/dist/index.js";import{Extension as t}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";const e=t.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return null===(e=t.style.color)||void 0===e?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands:()=>({setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})});export{e as Color,e as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-color@2.27.2_@tiptap+core@2.27.1_@tiptap+pm@2.27.1__@tiptap+extension_3361c5fd95bc28ff82624b8eb98b2834/node_modules/@tiptap/extension-color/dist/index.js"],"sourcesContent":["import '@tiptap/extension-text-style';\nimport { Extension } from '@tiptap/core';\n\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/color\n */\nconst Color = Extension.create({\n name: 'color',\n addOptions() {\n return {\n types: ['textStyle'],\n };\n },\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n color: {\n default: null,\n parseHTML: element => { var _a; return (_a = element.style.color) === null || _a === void 0 ? void 0 : _a.replace(/['\"]+/g, ''); },\n renderHTML: attributes => {\n if (!attributes.color) {\n return {};\n }\n return {\n style: `color: ${attributes.color}`,\n };\n },\n },\n },\n },\n ];\n },\n addCommands() {\n return {\n setColor: color => ({ chain }) => {\n return chain()\n .setMark('textStyle', { color })\n .run();\n },\n unsetColor: () => ({ chain }) => {\n return chain()\n .setMark('textStyle', { color: null })\n .removeEmptyTextStyle()\n .run();\n },\n };\n },\n});\n\nexport { Color, Color as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Color","Extension","create","name","addOptions","types","addGlobalAttributes","this","options","attributes","color","default","parseHTML","element","_a","style","replace","renderHTML","addCommands","setColor","chain","setMark","run","unsetColor","removeEmptyTextStyle"],"mappings":"mRAOK,MAACA,EAAQC,EAAUC,OAAO,CAC3BC,KAAM,QACNC,WAAU,KACC,CACHC,MAAO,CAAC,eAGhB,mBAAAC,GACI,MAAO,CACH,CACID,MAAOE,KAAKC,QAAQH,MACpBI,WAAY,CACRC,MAAO,CACHC,QAAS,KACTC,UAAWC,IAAa,IAAIC,EAAI,OAAsC,QAA9BA,EAAKD,EAAQE,MAAML,aAA0B,IAAPI,OAAgB,EAASA,EAAGE,QAAQ,SAAU,KAC5HC,WAAYR,GACHA,EAAWC,MAGT,CACHK,MAAO,UAAUN,EAAWC,SAHrB,MAUlC,EACDQ,YAAW,KACA,CACHC,SAAUT,GAAS,EAAGU,WACXA,IACFC,QAAQ,YAAa,CAAEX,UACvBY,MAETC,WAAY,IAAM,EAAGH,WACVA,IACFC,QAAQ,YAAa,CAAEX,MAAO,OAC9Bc,uBACAF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Extension as t,getText as e,getTextSerializersFromSchema as i,posToDOMRect as s}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";import{Plugin as o,PluginKey as n}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js";import r from"../../../../../tippy.js@6.3.7/node_modules/tippy.js/dist/tippy.esm.js";class p{getTextContent(t){return e(t,{textSerializers:i(this.editor.schema)})}constructor({editor:t,element:e,view:i,tippyOptions:s={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:t,state:e})=>{const{selection:i}=e,{$anchor:s,empty:o}=i,n=1===s.depth,r=s.parent.isTextblock&&!s.parent.type.spec.code&&!s.parent.textContent&&0===s.parent.childCount&&!this.getTextContent(s.parent);return!!(t.hasFocus()&&o&&n&&r&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var e;this.preventHide?this.preventHide=!1:(null==t?void 0:t.relatedTarget)&&(null===(e=this.element.parentNode)||void 0===e?void 0:e.contains(t.relatedTarget))||(null==t?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.editor=t,this.element=e,this.view=i,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,e=!!t.parentElement;this.element.tabIndex=0,!this.tippy&&e&&(this.tippy=r(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){var i,o,n;const{state:r}=t,{doc:p,selection:l}=r,{from:d,to:h}=l;if(e&&e.doc.eq(p)&&e.selection.eq(l))return;this.createTooltip();(null===(i=this.shouldShow)||void 0===i?void 0:i.call(this,{editor:this.editor,view:t,state:r,oldState:e}))?(null===(o=this.tippy)||void 0===o||o.setProps({getReferenceClientRect:(null===(n=this.tippyOptions)||void 0===n?void 0:n.getReferenceClientRect)||(()=>s(t,d,h))}),this.show()):this.hide()}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;(null===(t=this.tippy)||void 0===t?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const l=t=>new o({key:"string"==typeof t.pluginKey?new n(t.pluginKey):t.pluginKey,view:e=>new p({view:e,...t})});t.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[l({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});export{l as FloatingMenuPlugin,p as FloatingMenuView};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-floating-menu@2.27.1_@tiptap+core@2.27.1_@tiptap+pm@2.27.1__@tiptap+pm@2.27.1/node_modules/@tiptap/extension-floating-menu/dist/index.js"],"sourcesContent":["import { getText, getTextSerializersFromSchema, posToDOMRect, Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\nimport tippy from 'tippy.js';\n\nclass FloatingMenuView {\n getTextContent(node) {\n return getText(node, { textSerializers: getTextSerializersFromSchema(this.editor.schema) });\n }\n constructor({ editor, element, view, tippyOptions = {}, shouldShow, }) {\n this.preventHide = false;\n this.shouldShow = ({ view, state }) => {\n const { selection } = state;\n const { $anchor, empty } = selection;\n const isRootDepth = $anchor.depth === 1;\n const isEmptyTextBlock = $anchor.parent.isTextblock && !$anchor.parent.type.spec.code && !$anchor.parent.textContent && $anchor.parent.childCount === 0 && !this.getTextContent($anchor.parent);\n if (!view.hasFocus()\n || !empty\n || !isRootDepth\n || !isEmptyTextBlock\n || !this.editor.isEditable) {\n return false;\n }\n return true;\n };\n this.mousedownHandler = () => {\n this.preventHide = true;\n };\n this.focusHandler = () => {\n // we use `setTimeout` to make sure `selection` is already updated\n setTimeout(() => this.update(this.editor.view));\n };\n this.blurHandler = ({ event }) => {\n var _a;\n if (this.preventHide) {\n this.preventHide = false;\n return;\n }\n if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) === null || _a === void 0 ? void 0 : _a.contains(event.relatedTarget))) {\n return;\n }\n if ((event === null || event === void 0 ? void 0 : event.relatedTarget) === this.editor.view.dom) {\n return;\n }\n this.hide();\n };\n this.tippyBlurHandler = (event) => {\n this.blurHandler({ event });\n };\n this.editor = editor;\n this.element = element;\n this.view = view;\n if (shouldShow) {\n this.shouldShow = shouldShow;\n }\n this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.editor.on('focus', this.focusHandler);\n this.editor.on('blur', this.blurHandler);\n this.tippyOptions = tippyOptions;\n // Detaches menu content from its current parent\n this.element.remove();\n this.element.style.visibility = 'visible';\n }\n createTooltip() {\n const { element: editorElement } = this.editor.options;\n const editorIsAttached = !!editorElement.parentElement;\n this.element.tabIndex = 0;\n if (this.tippy || !editorIsAttached) {\n return;\n }\n this.tippy = tippy(editorElement, {\n duration: 0,\n getReferenceClientRect: null,\n content: this.element,\n interactive: true,\n trigger: 'manual',\n placement: 'right',\n hideOnClick: 'toggle',\n ...this.tippyOptions,\n });\n // maybe we have to hide tippy on its own blur event as well\n if (this.tippy.popper.firstChild) {\n this.tippy.popper.firstChild.addEventListener('blur', this.tippyBlurHandler);\n }\n }\n update(view, oldState) {\n var _a, _b, _c;\n const { state } = view;\n const { doc, selection } = state;\n const { from, to } = selection;\n const isSame = oldState && oldState.doc.eq(doc) && oldState.selection.eq(selection);\n if (isSame) {\n return;\n }\n this.createTooltip();\n const shouldShow = (_a = this.shouldShow) === null || _a === void 0 ? void 0 : _a.call(this, {\n editor: this.editor,\n view,\n state,\n oldState,\n });\n if (!shouldShow) {\n this.hide();\n return;\n }\n (_b = this.tippy) === null || _b === void 0 ? void 0 : _b.setProps({\n getReferenceClientRect: ((_c = this.tippyOptions) === null || _c === void 0 ? void 0 : _c.getReferenceClientRect) || (() => posToDOMRect(view, from, to)),\n });\n this.show();\n }\n show() {\n var _a;\n (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.show();\n }\n hide() {\n var _a;\n (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.hide();\n }\n destroy() {\n var _a, _b;\n if ((_a = this.tippy) === null || _a === void 0 ? void 0 : _a.popper.firstChild) {\n this.tippy.popper.firstChild.removeEventListener('blur', this.tippyBlurHandler);\n }\n (_b = this.tippy) === null || _b === void 0 ? void 0 : _b.destroy();\n this.element.removeEventListener('mousedown', this.mousedownHandler, { capture: true });\n this.editor.off('focus', this.focusHandler);\n this.editor.off('blur', this.blurHandler);\n }\n}\nconst FloatingMenuPlugin = (options) => {\n return new Plugin({\n key: typeof options.pluginKey === 'string' ? new PluginKey(options.pluginKey) : options.pluginKey,\n view: view => new FloatingMenuView({ view, ...options }),\n });\n};\n\n/**\n * This extension allows you to create a floating menu.\n * @see https://tiptap.dev/api/extensions/floating-menu\n */\nconst FloatingMenu = Extension.create({\n name: 'floatingMenu',\n addOptions() {\n return {\n element: null,\n tippyOptions: {},\n pluginKey: 'floatingMenu',\n shouldShow: null,\n };\n },\n addProseMirrorPlugins() {\n if (!this.options.element) {\n return [];\n }\n return [\n FloatingMenuPlugin({\n pluginKey: this.options.pluginKey,\n editor: this.editor,\n element: this.options.element,\n tippyOptions: this.options.tippyOptions,\n shouldShow: this.options.shouldShow,\n }),\n ];\n },\n});\n\nexport { FloatingMenu, FloatingMenuPlugin, FloatingMenuView, FloatingMenu as default };\n//# sourceMappingURL=index.js.map\n"],"names":["FloatingMenuView","getTextContent","node","getText","textSerializers","getTextSerializersFromSchema","this","editor","schema","constructor","element","view","tippyOptions","shouldShow","preventHide","state","selection","$anchor","empty","isRootDepth","depth","isEmptyTextBlock","parent","isTextblock","type","spec","code","textContent","childCount","hasFocus","isEditable","mousedownHandler","focusHandler","setTimeout","update","blurHandler","event","_a","relatedTarget","parentNode","contains","dom","hide","tippyBlurHandler","addEventListener","capture","on","remove","style","visibility","createTooltip","editorElement","options","editorIsAttached","parentElement","tabIndex","tippy","duration","getReferenceClientRect","content","interactive","trigger","placement","hideOnClick","popper","firstChild","oldState","_b","_c","doc","from","to","eq","call","setProps","posToDOMRect","show","destroy","removeEventListener","off","FloatingMenuPlugin","Plugin","key","pluginKey","PluginKey","Extension","create","name","addOptions","addProseMirrorPlugins"],"mappings":"2YAIA,MAAMA,EACF,cAAAC,CAAeC,GACX,OAAOC,EAAQD,EAAM,CAAEE,gBAAiBC,EAA6BC,KAAKC,OAAOC,SACpF,CACD,WAAAC,EAAYF,OAAEA,EAAMG,QAAEA,EAAOC,KAAEA,EAAIC,aAAEA,EAAe,CAAA,EAAEC,WAAEA,IACpDP,KAAKQ,aAAc,EACnBR,KAAKO,WAAa,EAAGF,OAAMI,YACvB,MAAMC,UAAEA,GAAcD,GAChBE,QAAEA,EAAOC,MAAEA,GAAUF,EACrBG,EAAgC,IAAlBF,EAAQG,MACtBC,EAAmBJ,EAAQK,OAAOC,cAAgBN,EAAQK,OAAOE,KAAKC,KAAKC,OAAST,EAAQK,OAAOK,aAA6C,IAA9BV,EAAQK,OAAOM,aAAqBtB,KAAKL,eAAegB,EAAQK,QACxL,SAAKX,EAAKkB,YACFX,GACAC,GACAE,GACAf,KAAKC,OAAOuB,aAKxBxB,KAAKyB,iBAAmB,KACpBzB,KAAKQ,aAAc,GAEvBR,KAAK0B,aAAe,KAEhBC,WAAW,IAAM3B,KAAK4B,OAAO5B,KAAKC,OAAOI,QAE7CL,KAAK6B,YAAc,EAAGC,YAClB,IAAIC,EACA/B,KAAKQ,YACLR,KAAKQ,aAAc,GAGlBsB,aAAqC,EAASA,EAAME,iBAAsD,QAAlCD,EAAK/B,KAAKI,QAAQ6B,kBAA+B,IAAPF,OAAgB,EAASA,EAAGG,SAASJ,EAAME,kBAG7JF,aAA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B,UACxB5E,OAAQD,KAAKC,OACbG,QAASJ,KAAK8C,QAAQ1C,QACtBE,aAAcN,KAAK8C,QAAQxC,aAC3BC,WAAYP,KAAK8C,QAAQvC,cARtB,EAWd"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Extension as e}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";import{Plugin as s,PluginKey as o}from"../../../../../prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.js";import{DecorationSet as t,Decoration as r}from"../../../../../prosemirror-view@1.41.3/node_modules/prosemirror-view/dist/index.js";const i=e.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new s({key:new o("focus"),props:{decorations:({doc:e,selection:s})=>{const{isEditable:o,isFocused:i}=this.editor,{anchor:d}=s,n=[];if(!o||!i)return t.create(e,[]);let p=0;"deepest"===this.options.mode&&e.descendants((e,s)=>{if(e.isText)return;if(!(d>=s&&d<=s+e.nodeSize-1))return!1;p+=1});let a=0;return e.descendants((e,s)=>{if(e.isText)return!1;if(!(d>=s&&d<=s+e.nodeSize-1))return!1;a+=1;if("deepest"===this.options.mode&&p-a>0||"shallowest"===this.options.mode&&a>1)return"deepest"===this.options.mode;n.push(r.node(s,s+e.nodeSize,{class:this.options.className}))}),t.create(e,n)}}})]}});export{i as FocusClasses,i as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-focus@2.27.2_@tiptap+core@2.27.1_@tiptap+pm@2.27.1__@tiptap+pm@2.27.1/node_modules/@tiptap/extension-focus/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\nimport { Plugin, PluginKey } from '@tiptap/pm/state';\nimport { DecorationSet, Decoration } from '@tiptap/pm/view';\n\n/**\n * This extension allows you to add a class to the focused node.\n * @see https://www.tiptap.dev/api/extensions/focus\n */\nconst FocusClasses = Extension.create({\n name: 'focus',\n addOptions() {\n return {\n className: 'has-focus',\n mode: 'all',\n };\n },\n addProseMirrorPlugins() {\n return [\n new Plugin({\n key: new PluginKey('focus'),\n props: {\n decorations: ({ doc, selection }) => {\n const { isEditable, isFocused } = this.editor;\n const { anchor } = selection;\n const decorations = [];\n if (!isEditable || !isFocused) {\n return DecorationSet.create(doc, []);\n }\n // Maximum Levels\n let maxLevels = 0;\n if (this.options.mode === 'deepest') {\n doc.descendants((node, pos) => {\n if (node.isText) {\n return;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n maxLevels += 1;\n });\n }\n // Loop through current\n let currentLevel = 0;\n doc.descendants((node, pos) => {\n if (node.isText) {\n return false;\n }\n const isCurrent = anchor >= pos && anchor <= pos + node.nodeSize - 1;\n if (!isCurrent) {\n return false;\n }\n currentLevel += 1;\n const outOfScope = (this.options.mode === 'deepest' && maxLevels - currentLevel > 0)\n || (this.options.mode === 'shallowest' && currentLevel > 1);\n if (outOfScope) {\n return this.options.mode === 'deepest';\n }\n decorations.push(Decoration.node(pos, pos + node.nodeSize, {\n class: this.options.className,\n }));\n });\n return DecorationSet.create(doc, decorations);\n },\n },\n }),\n ];\n },\n});\n\nexport { FocusClasses, FocusClasses as default };\n//# sourceMappingURL=index.js.map\n"],"names":["FocusClasses","Extension","create","name","addOptions","className","mode","addProseMirrorPlugins","Plugin","key","PluginKey","props","decorations","doc","selection","isEditable","isFocused","this","editor","anchor","DecorationSet","maxLevels","options","descendants","node","pos","isText","nodeSize","currentLevel","push","Decoration","class"],"mappings":"wXAQK,MAACA,EAAeC,EAAUC,OAAO,CAClCC,KAAM,QACNC,WAAU,KACC,CACHC,UAAW,YACXC,KAAM,QAGd,qBAAAC,GACI,MAAO,CACH,IAAIC,EAAO,CACPC,IAAK,IAAIC,EAAU,SACnBC,MAAO,CACHC,YAAa,EAAGC,MAAKC,gBACjB,MAAMC,WAAEA,EAAUC,UAAEA,GAAcC,KAAKC,QACjCC,OAAEA,GAAWL,EACbF,EAAc,GACpB,IAAKG,IAAeC,EAChB,OAAOI,EAAclB,OAAOW,EAAK,IAGrC,IAAIQ,EAAY,EACU,YAAtBJ,KAAKK,QAAQhB,MACbO,EAAIU,YAAY,CAACC,EAAMC,KACnB,GAAID,EAAKE,OACL,OAGJ,KADkBP,GAAUM,GAAON,GAAUM,EAAMD,EAAKG,SAAW,GAE/D,OAAO,EAEXN,GAAa,IAIrB,IAAIO,EAAe,EAmBnB,OAlBAf,EAAIU,YAAY,CAACC,EAAMC,KACnB,GAAID,EAAKE,OACL,OAAO,EAGX,KADkBP,GAAUM,GAAON,GAAUM,EAAMD,EAAKG,SAAW,GAE/D,OAAO,EAEXC,GAAgB,EAGhB,GAF0C,YAAtBX,KAAKK,QAAQhB,MAAsBe,EAAYO,EAAe,GACpD,eAAtBX,KAAKK,QAAQhB,MAAyBsB,EAAe,EAEzD,MAA6B,YAAtBX,KAAKK,QAAQhB,KAExBM,EAAYiB,KAAKC,EAAWN,KAAKC,EAAKA,EAAMD,EAAKG,SAAU,CACvDI,MAAOd,KAAKK,QAAQjB,eAGrBe,EAAclB,OAAOW,EAAKD,OAKpD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Extension as t}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";const e=t.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:null}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>!!this.options.alignments.includes(t)&&this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).every(t=>t),unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(t=>t),toggleTextAlign:t=>({editor:e,commands:i})=>!!this.options.alignments.includes(t)&&(e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});export{e as TextAlign,e as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-text-align@2.27.2_@tiptap+core@2.27.1_@tiptap+pm@2.27.1_/node_modules/@tiptap/extension-text-align/dist/index.js"],"sourcesContent":["import { Extension } from '@tiptap/core';\n\n/**\n * This extension allows you to align text.\n * @see https://www.tiptap.dev/api/extensions/text-align\n */\nconst TextAlign = Extension.create({\n name: 'textAlign',\n addOptions() {\n return {\n types: [],\n alignments: ['left', 'center', 'right', 'justify'],\n defaultAlignment: null,\n };\n },\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n textAlign: {\n default: this.options.defaultAlignment,\n parseHTML: element => {\n const alignment = element.style.textAlign;\n return this.options.alignments.includes(alignment) ? alignment : this.options.defaultAlignment;\n },\n renderHTML: attributes => {\n if (!attributes.textAlign) {\n return {};\n }\n return { style: `text-align: ${attributes.textAlign}` };\n },\n },\n },\n },\n ];\n },\n addCommands() {\n return {\n setTextAlign: (alignment) => ({ commands }) => {\n if (!this.options.alignments.includes(alignment)) {\n return false;\n }\n return this.options.types\n .map(type => commands.updateAttributes(type, { textAlign: alignment }))\n .every(response => response);\n },\n unsetTextAlign: () => ({ commands }) => {\n return this.options.types\n .map(type => commands.resetAttributes(type, 'textAlign'))\n .every(response => response);\n },\n toggleTextAlign: alignment => ({ editor, commands }) => {\n if (!this.options.alignments.includes(alignment)) {\n return false;\n }\n if (editor.isActive({ textAlign: alignment })) {\n return commands.unsetTextAlign();\n }\n return commands.setTextAlign(alignment);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-Shift-l': () => this.editor.commands.setTextAlign('left'),\n 'Mod-Shift-e': () => this.editor.commands.setTextAlign('center'),\n 'Mod-Shift-r': () => this.editor.commands.setTextAlign('right'),\n 'Mod-Shift-j': () => this.editor.commands.setTextAlign('justify'),\n };\n },\n});\n\nexport { TextAlign, TextAlign as default };\n//# sourceMappingURL=index.js.map\n"],"names":["TextAlign","Extension","create","name","addOptions","types","alignments","defaultAlignment","addGlobalAttributes","this","options","attributes","textAlign","default","parseHTML","element","alignment","style","includes","renderHTML","addCommands","setTextAlign","commands","map","type","updateAttributes","every","response","unsetTextAlign","resetAttributes","toggleTextAlign","editor","isActive","addKeyboardShortcuts"],"mappings":"yHAMK,MAACA,EAAYC,EAAUC,OAAO,CAC/BC,KAAM,YACNC,WAAU,KACC,CACHC,MAAO,GACPC,WAAY,CAAC,OAAQ,SAAU,QAAS,WACxCC,iBAAkB,OAG1B,mBAAAC,GACI,MAAO,CACH,CACIH,MAAOI,KAAKC,QAAQL,MACpBM,WAAY,CACRC,UAAW,CACPC,QAASJ,KAAKC,QAAQH,iBACtBO,UAAWC,IACP,MAAMC,EAAYD,EAAQE,MAAML,UAChC,OAAOH,KAAKC,QAAQJ,WAAWY,SAASF,GAAaA,EAAYP,KAAKC,QAAQH,kBAElFY,WAAYR,GACHA,EAAWC,UAGT,CAAEK,MAAO,eAAeN,EAAWC,aAF/B,MAQlC,EACD,WAAAQ,GACI,MAAO,CACHC,aAAeL,GAAc,EAAGM,gBACvBb,KAAKC,QAAQJ,WAAWY,SAASF,IAG/BP,KAAKC,QAAQL,MACfkB,IAAIC,GAAQF,EAASG,iBAAiBD,EAAM,CAAEZ,UAAWI,KACzDU,MAAMC,GAAYA,GAE3BC,eAAgB,IAAM,EAAGN,cACdb,KAAKC,QAAQL,MACfkB,IAAIC,GAAQF,EAASO,gBAAgBL,EAAM,cAC3CE,MAAMC,GAAYA,GAE3BG,gBAAiBd,GAAa,EAAGe,SAAQT,gBAChCb,KAAKC,QAAQJ,WAAWY,SAASF,KAGlCe,EAAOC,SAAS,CAAEpB,UAAWI,IACtBM,EAASM,iBAEbN,EAASD,aAAaL,IAGxC,EACD,oBAAAiB,GACI,MAAO,CACH,cAAe,IAAMxB,KAAKsB,OAAOT,SAASD,aAAa,QACvD,cAAe,IAAMZ,KAAKsB,OAAOT,SAASD,aAAa,UACvD,cAAe,IAAMZ,KAAKsB,OAAOT,SAASD,aAAa,SACvD,cAAe,IAAMZ,KAAKsB,OAAOT,SAASD,aAAa,WAE9D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Mark as t,mergeAttributes as e}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";const r=t.create({name:"textStyle",priority:101,addOptions:()=>({HTMLAttributes:{},mergeNestedSpanStyles:!1}),parseHTML(){return[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&(this.options.mergeNestedSpanStyles&&(t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(t=>{var e,r;const s=t.getAttribute("style"),o=null===(r=null===(e=t.parentElement)||void 0===e?void 0:e.closest("span"))||void 0===r?void 0:r.getAttribute("style");t.setAttribute("style",`${o};${s}`)})})(t),{})}]},renderHTML({HTMLAttributes:t}){return["span",e(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(e,r)=>{if(e.isTextblock)return!0;e.marks.filter(t=>t.type===this.type).some(t=>Object.values(t.attrs).some(t=>!!t))||t.removeMark(r,r+e.nodeSize,this.type)}),!0}}}});export{r as TextStyle,r as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-text-style@2.27.1_@tiptap+core@2.27.1_@tiptap+pm@2.27.1_/node_modules/@tiptap/extension-text-style/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes } from '@tiptap/core';\n\nconst mergeNestedSpanStyles = (element) => {\n if (!element.children.length) {\n return;\n }\n const childSpans = element.querySelectorAll('span');\n if (!childSpans) {\n return;\n }\n childSpans.forEach(childSpan => {\n var _a, _b;\n const childStyle = childSpan.getAttribute('style');\n const closestParentSpanStyleOfChild = (_b = (_a = childSpan.parentElement) === null || _a === void 0 ? void 0 : _a.closest('span')) === null || _b === void 0 ? void 0 : _b.getAttribute('style');\n childSpan.setAttribute('style', `${closestParentSpanStyleOfChild};${childStyle}`);\n });\n};\n/**\n * This extension allows you to create text styles. It is required by default\n * for the `textColor` and `backgroundColor` extensions.\n * @see https://www.tiptap.dev/api/marks/text-style\n */\nconst TextStyle = Mark.create({\n name: 'textStyle',\n priority: 101,\n addOptions() {\n return {\n HTMLAttributes: {},\n mergeNestedSpanStyles: false,\n };\n },\n parseHTML() {\n return [\n {\n tag: 'span',\n getAttrs: element => {\n const hasStyles = element.hasAttribute('style');\n if (!hasStyles) {\n return false;\n }\n if (this.options.mergeNestedSpanStyles) {\n mergeNestedSpanStyles(element);\n }\n return {};\n },\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n removeEmptyTextStyle: () => ({ tr }) => {\n const { selection } = tr;\n // Gather all of the nodes within the selection range.\n // We would need to go through each node individually\n // to check if it has any inline style attributes.\n // Otherwise, calling commands.unsetMark(this.name)\n // removes everything from all the nodes\n // within the selection range.\n tr.doc.nodesBetween(selection.from, selection.to, (node, pos) => {\n // Check if it's a paragraph element, if so, skip this node as we apply\n // the text style to inline text nodes only (span).\n if (node.isTextblock) {\n return true;\n }\n // Check if the node has no inline style attributes.\n // Filter out non-`textStyle` marks.\n if (!node.marks.filter(mark => mark.type === this.type).some(mark => Object.values(mark.attrs).some(value => !!value))) {\n // Proceed with the removal of the `textStyle` mark for this node only\n tr.removeMark(pos, pos + node.nodeSize, this.type);\n }\n });\n return true;\n },\n };\n },\n});\n\nexport { TextStyle, TextStyle as default };\n//# sourceMappingURL=index.js.map\n"],"names":["TextStyle","Mark","create","name","priority","addOptions","HTMLAttributes","mergeNestedSpanStyles","parseHTML","tag","getAttrs","element","hasAttribute","this","options","children","length","childSpans","querySelectorAll","forEach","childSpan","_a","_b","childStyle","getAttribute","closestParentSpanStyleOfChild","parentElement","closest","setAttribute","renderHTML","mergeAttributes","addCommands","removeEmptyTextStyle","tr","selection","doc","nodesBetween","from","to","node","pos","isTextblock","marks","filter","mark","type","some","Object","values","attrs","value","removeMark","nodeSize"],"mappings":"yIAEA,MAoBMA,EAAYC,EAAKC,OAAO,CAC1BC,KAAM,YACNC,SAAU,IACVC,WAAU,KACC,CACHC,eAAgB,CAAE,EAClBC,uBAAuB,IAG/B,SAAAC,GACI,MAAO,CACH,CACIC,IAAK,OACLC,SAAUC,KACYA,EAAQC,aAAa,WAInCC,KAAKC,QAAQP,uBAtCP,CAACI,IAC3B,IAAKA,EAAQI,SAASC,OAClB,OAEJ,MAAMC,EAAaN,EAAQO,iBAAiB,QACvCD,GAGLA,EAAWE,QAAQC,IACf,IAAIC,EAAIC,EACR,MAAMC,EAAaH,EAAUI,aAAa,SACpCC,EAAkI,QAAjGH,EAAwC,QAAlCD,EAAKD,EAAUM,qBAAkC,IAAPL,OAAgB,EAASA,EAAGM,QAAQ,eAA4B,IAAPL,OAAgB,EAASA,EAAGE,aAAa,SACzLJ,EAAUQ,aAAa,QAAS,GAAGH,KAAiCF,QA2BpDhB,CAAsBI,GAEnB,KAItB,EACD,UAAAkB,EAAWvB,eAAEA,IACT,MAAO,CAAC,OAAQwB,EAAgBjB,KAAKC,QAAQR,eAAgBA,GAAiB,EACjF,EACD,WAAAyB,GACI,MAAO,CACHC,qBAAsB,IAAM,EAAGC,SAC3B,MAAMC,UAAEA,GAAcD,EAoBtB,OAbAA,EAAGE,IAAIC,aAAaF,EAAUG,KAAMH,EAAUI,GAAI,CAACC,EAAMC,KAGrD,GAAID,EAAKE,YACL,OAAO,EAINF,EAAKG,MAAMC,OAAOC,GAAQA,EAAKC,OAAShC,KAAKgC,MAAMC,KAAKF,GAAQG,OAAOC,OAAOJ,EAAKK,OAAOH,KAAKI,KAAWA,KAE3GjB,EAAGkB,WAAWX,EAAKA,EAAMD,EAAKa,SAAUvC,KAAKgC,SAG9C,GAGlB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Extension as s,textInputRule as i}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";const o=s=>i({find:/--$/,replace:null!=s?s:"—"}),t=s=>i({find:/\.\.\.$/,replace:null!=s?s:"…"}),e=s=>i({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:null!=s?s:"“"}),p=s=>i({find:/"$/,replace:null!=s?s:"”"}),n=s=>i({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:null!=s?s:"‘"}),l=s=>i({find:/'$/,replace:null!=s?s:"’"}),r=s=>i({find:/<-$/,replace:null!=s?s:"←"}),u=s=>i({find:/->$/,replace:null!=s?s:"→"}),h=s=>i({find:/\(c\)$/,replace:null!=s?s:"©"}),a=s=>i({find:/\(tm\)$/,replace:null!=s?s:"™"}),c=s=>i({find:/\(sm\)$/,replace:null!=s?s:"℠"}),d=s=>i({find:/\(r\)$/,replace:null!=s?s:"®"}),f=s=>i({find:/(?:^|\s)(1\/2)\s$/,replace:null!=s?s:"½"}),m=s=>i({find:/\+\/-$/,replace:null!=s?s:"±"}),$=s=>i({find:/!=$/,replace:null!=s?s:"≠"}),Q=s=>i({find:/<<$/,replace:null!=s?s:"«"}),g=s=>i({find:/>>$/,replace:null!=s?s:"»"}),k=s=>i({find:/\d+\s?([*x])\s?\d+$/,replace:null!=s?s:"×"}),q=s=>i({find:/\^2$/,replace:null!=s?s:"²"}),w=s=>i({find:/\^3$/,replace:null!=s?s:"³"}),D=s=>i({find:/(?:^|\s)(1\/4)\s$/,replace:null!=s?s:"¼"}),T=s=>i({find:/(?:^|\s)(3\/4)\s$/,replace:null!=s?s:"¾"}),b=s.create({name:"typography",addOptions:()=>({closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}),addInputRules(){const s=[];return!1!==this.options.emDash&&s.push(o(this.options.emDash)),!1!==this.options.ellipsis&&s.push(t(this.options.ellipsis)),!1!==this.options.openDoubleQuote&&s.push(e(this.options.openDoubleQuote)),!1!==this.options.closeDoubleQuote&&s.push(p(this.options.closeDoubleQuote)),!1!==this.options.openSingleQuote&&s.push(n(this.options.openSingleQuote)),!1!==this.options.closeSingleQuote&&s.push(l(this.options.closeSingleQuote)),!1!==this.options.leftArrow&&s.push(r(this.options.leftArrow)),!1!==this.options.rightArrow&&s.push(u(this.options.rightArrow)),!1!==this.options.copyright&&s.push(h(this.options.copyright)),!1!==this.options.trademark&&s.push(a(this.options.trademark)),!1!==this.options.servicemark&&s.push(c(this.options.servicemark)),!1!==this.options.registeredTrademark&&s.push(d(this.options.registeredTrademark)),!1!==this.options.oneHalf&&s.push(f(this.options.oneHalf)),!1!==this.options.plusMinus&&s.push(m(this.options.plusMinus)),!1!==this.options.notEqual&&s.push($(this.options.notEqual)),!1!==this.options.laquo&&s.push(Q(this.options.laquo)),!1!==this.options.raquo&&s.push(g(this.options.raquo)),!1!==this.options.multiplication&&s.push(k(this.options.multiplication)),!1!==this.options.superscriptTwo&&s.push(q(this.options.superscriptTwo)),!1!==this.options.superscriptThree&&s.push(w(this.options.superscriptThree)),!1!==this.options.oneQuarter&&s.push(D(this.options.oneQuarter)),!1!==this.options.threeQuarters&&s.push(T(this.options.threeQuarters)),s}});export{b as Typography,p as closeDoubleQuote,l as closeSingleQuote,h as copyright,b as default,t as ellipsis,o as emDash,Q as laquo,r as leftArrow,k as multiplication,$ as notEqual,f as oneHalf,D as oneQuarter,e as openDoubleQuote,n as openSingleQuote,m as plusMinus,g as raquo,d as registeredTrademark,u as rightArrow,c as servicemark,w as superscriptThree,q as superscriptTwo,T as threeQuarters,a as trademark};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-typography@2.27.2_@tiptap+core@2.27.1_@tiptap+pm@2.27.1_/node_modules/@tiptap/extension-typography/dist/index.js"],"sourcesContent":["import { Extension, textInputRule } from '@tiptap/core';\n\nconst emDash = (override) => textInputRule({\n find: /--$/,\n replace: override !== null && override !== void 0 ? override : '—',\n});\nconst ellipsis = (override) => textInputRule({\n find: /\\.\\.\\.$/,\n replace: override !== null && override !== void 0 ? override : '…',\n});\nconst openDoubleQuote = (override) => textInputRule({\n find: /(?:^|[\\s{[(<'\"\\u2018\\u201C])(\")$/,\n replace: override !== null && override !== void 0 ? override : '“',\n});\nconst closeDoubleQuote = (override) => textInputRule({\n find: /\"$/,\n replace: override !== null && override !== void 0 ? override : '”',\n});\nconst openSingleQuote = (override) => textInputRule({\n find: /(?:^|[\\s{[(<'\"\\u2018\\u201C])(')$/,\n replace: override !== null && override !== void 0 ? override : '‘',\n});\nconst closeSingleQuote = (override) => textInputRule({\n find: /'$/,\n replace: override !== null && override !== void 0 ? override : '’',\n});\nconst leftArrow = (override) => textInputRule({\n find: /<-$/,\n replace: override !== null && override !== void 0 ? override : '←',\n});\nconst rightArrow = (override) => textInputRule({\n find: /->$/,\n replace: override !== null && override !== void 0 ? override : '→',\n});\nconst copyright = (override) => textInputRule({\n find: /\\(c\\)$/,\n replace: override !== null && override !== void 0 ? override : '©',\n});\nconst trademark = (override) => textInputRule({\n find: /\\(tm\\)$/,\n replace: override !== null && override !== void 0 ? override : '™',\n});\nconst servicemark = (override) => textInputRule({\n find: /\\(sm\\)$/,\n replace: override !== null && override !== void 0 ? override : '℠',\n});\nconst registeredTrademark = (override) => textInputRule({\n find: /\\(r\\)$/,\n replace: override !== null && override !== void 0 ? override : '®',\n});\nconst oneHalf = (override) => textInputRule({\n find: /(?:^|\\s)(1\\/2)\\s$/,\n replace: override !== null && override !== void 0 ? override : '½',\n});\nconst plusMinus = (override) => textInputRule({\n find: /\\+\\/-$/,\n replace: override !== null && override !== void 0 ? override : '±',\n});\nconst notEqual = (override) => textInputRule({\n find: /!=$/,\n replace: override !== null && override !== void 0 ? override : '≠',\n});\nconst laquo = (override) => textInputRule({\n find: /<<$/,\n replace: override !== null && override !== void 0 ? override : '«',\n});\nconst raquo = (override) => textInputRule({\n find: />>$/,\n replace: override !== null && override !== void 0 ? override : '»',\n});\nconst multiplication = (override) => textInputRule({\n find: /\\d+\\s?([*x])\\s?\\d+$/,\n replace: override !== null && override !== void 0 ? override : '×',\n});\nconst superscriptTwo = (override) => textInputRule({\n find: /\\^2$/,\n replace: override !== null && override !== void 0 ? override : '²',\n});\nconst superscriptThree = (override) => textInputRule({\n find: /\\^3$/,\n replace: override !== null && override !== void 0 ? override : '³',\n});\nconst oneQuarter = (override) => textInputRule({\n find: /(?:^|\\s)(1\\/4)\\s$/,\n replace: override !== null && override !== void 0 ? override : '¼',\n});\nconst threeQuarters = (override) => textInputRule({\n find: /(?:^|\\s)(3\\/4)\\s$/,\n replace: override !== null && override !== void 0 ? override : '¾',\n});\n/**\n * This extension allows you to add typography replacements for specific characters.\n * @see https://www.tiptap.dev/api/extensions/typography\n */\nconst Typography = Extension.create({\n name: 'typography',\n addOptions() {\n return {\n closeDoubleQuote: '”',\n closeSingleQuote: '’',\n copyright: '©',\n ellipsis: '…',\n emDash: '—',\n laquo: '«',\n leftArrow: '←',\n multiplication: '×',\n notEqual: '≠',\n oneHalf: '½',\n oneQuarter: '¼',\n openDoubleQuote: '“',\n openSingleQuote: '‘',\n plusMinus: '±',\n raquo: '»',\n registeredTrademark: '®',\n rightArrow: '→',\n servicemark: '℠',\n superscriptThree: '³',\n superscriptTwo: '²',\n threeQuarters: '¾',\n trademark: '™',\n };\n },\n addInputRules() {\n const rules = [];\n if (this.options.emDash !== false) {\n rules.push(emDash(this.options.emDash));\n }\n if (this.options.ellipsis !== false) {\n rules.push(ellipsis(this.options.ellipsis));\n }\n if (this.options.openDoubleQuote !== false) {\n rules.push(openDoubleQuote(this.options.openDoubleQuote));\n }\n if (this.options.closeDoubleQuote !== false) {\n rules.push(closeDoubleQuote(this.options.closeDoubleQuote));\n }\n if (this.options.openSingleQuote !== false) {\n rules.push(openSingleQuote(this.options.openSingleQuote));\n }\n if (this.options.closeSingleQuote !== false) {\n rules.push(closeSingleQuote(this.options.closeSingleQuote));\n }\n if (this.options.leftArrow !== false) {\n rules.push(leftArrow(this.options.leftArrow));\n }\n if (this.options.rightArrow !== false) {\n rules.push(rightArrow(this.options.rightArrow));\n }\n if (this.options.copyright !== false) {\n rules.push(copyright(this.options.copyright));\n }\n if (this.options.trademark !== false) {\n rules.push(trademark(this.options.trademark));\n }\n if (this.options.servicemark !== false) {\n rules.push(servicemark(this.options.servicemark));\n }\n if (this.options.registeredTrademark !== false) {\n rules.push(registeredTrademark(this.options.registeredTrademark));\n }\n if (this.options.oneHalf !== false) {\n rules.push(oneHalf(this.options.oneHalf));\n }\n if (this.options.plusMinus !== false) {\n rules.push(plusMinus(this.options.plusMinus));\n }\n if (this.options.notEqual !== false) {\n rules.push(notEqual(this.options.notEqual));\n }\n if (this.options.laquo !== false) {\n rules.push(laquo(this.options.laquo));\n }\n if (this.options.raquo !== false) {\n rules.push(raquo(this.options.raquo));\n }\n if (this.options.multiplication !== false) {\n rules.push(multiplication(this.options.multiplication));\n }\n if (this.options.superscriptTwo !== false) {\n rules.push(superscriptTwo(this.options.superscriptTwo));\n }\n if (this.options.superscriptThree !== false) {\n rules.push(superscriptThree(this.options.superscriptThree));\n }\n if (this.options.oneQuarter !== false) {\n rules.push(oneQuarter(this.options.oneQuarter));\n }\n if (this.options.threeQuarters !== false) {\n rules.push(threeQuarters(this.options.threeQuarters));\n }\n return rules;\n },\n});\n\nexport { Typography, closeDoubleQuote, closeSingleQuote, copyright, Typography as default, ellipsis, emDash, laquo, leftArrow, multiplication, notEqual, oneHalf, oneQuarter, openDoubleQuote, openSingleQuote, plusMinus, raquo, registeredTrademark, rightArrow, servicemark, superscriptThree, superscriptTwo, threeQuarters, trademark };\n//# sourceMappingURL=index.js.map\n"],"names":["emDash","override","textInputRule","find","replace","ellipsis","openDoubleQuote","closeDoubleQuote","openSingleQuote","closeSingleQuote","leftArrow","rightArrow","copyright","trademark","servicemark","registeredTrademark","oneHalf","plusMinus","notEqual","laquo","raquo","multiplication","superscriptTwo","superscriptThree","oneQuarter","threeQuarters","Typography","Extension","create","name","addOptions","addInputRules","rules","this","options","push"],"mappings":"4IAEK,MAACA,EAAUC,GAAaC,EAAc,CACvCC,KAAM,MACNC,QAASH,QAA2CA,EAAW,MAE7DI,EAAYJ,GAAaC,EAAc,CACzCC,KAAM,UACNC,QAASH,QAA2CA,EAAW,MAE7DK,EAAmBL,GAAaC,EAAc,CAChDC,KAAM,mCACNC,QAASH,QAA2CA,EAAW,MAE7DM,EAAoBN,GAAaC,EAAc,CACjDC,KAAM,KACNC,QAASH,QAA2CA,EAAW,MAE7DO,EAAmBP,GAAaC,EAAc,CAChDC,KAAM,mCACNC,QAASH,QAA2CA,EAAW,MAE7DQ,EAAoBR,GAAaC,EAAc,CACjDC,KAAM,KACNC,QAASH,QAA2CA,EAAW,MAE7DS,EAAaT,GAAaC,EAAc,CAC1CC,KAAM,MACNC,Q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BkB,KAAKC,QAAQlB,SACbgB,EAAMG,KAAKnB,EAAQiB,KAAKC,QAAQlB,WAEL,IAA3BiB,KAAKC,QAAQjB,WACbe,EAAMG,KAAKlB,EAAUgB,KAAKC,QAAQjB,aAER,IAA1BgB,KAAKC,QAAQhB,UACbc,EAAMG,KAAKjB,EAASe,KAAKC,QAAQhB,YAEV,IAAvBe,KAAKC,QAAQf,OACba,EAAMG,KAAKhB,EAAMc,KAAKC,QAAQf,SAEP,IAAvBc,KAAKC,QAAQd,OACbY,EAAMG,KAAKf,EAAMa,KAAKC,QAAQd,SAEE,IAAhCa,KAAKC,QAAQb,gBACbW,EAAMG,KAAKd,EAAeY,KAAKC,QAAQb,kBAEP,IAAhCY,KAAKC,QAAQZ,gBACbU,EAAMG,KAAKb,EAAeW,KAAKC,QAAQZ,kBAEL,IAAlCW,KAAKC,QAAQX,kBACbS,EAAMG,KAAKZ,EAAiBU,KAAKC,QAAQX,oBAEb,IAA5BU,KAAKC,QAAQV,YACbQ,EAAMG,KAAKX,EAAWS,KAAKC,QAAQV,cAEJ,IAA/BS,KAAKC,QAAQT,eACbO,EAAMG,KAAKV,EAAcQ,KAAKC,QAAQT,gBAEnCO,CACV"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Mark as e,mergeAttributes as t}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";const n=e.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",t(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});export{n as Underline,n as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-underline@2.27.2_@tiptap+core@2.27.1_@tiptap+pm@2.27.1_/node_modules/@tiptap/extension-underline/dist/index.js"],"sourcesContent":["import { Mark, mergeAttributes } from '@tiptap/core';\n\n/**\n * This extension allows you to create underline text.\n * @see https://www.tiptap.dev/api/marks/underline\n */\nconst Underline = Mark.create({\n name: 'underline',\n addOptions() {\n return {\n HTMLAttributes: {},\n };\n },\n parseHTML() {\n return [\n {\n tag: 'u',\n },\n {\n style: 'text-decoration',\n consuming: false,\n getAttrs: style => (style.includes('underline') ? {} : false),\n },\n ];\n },\n renderHTML({ HTMLAttributes }) {\n return ['u', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n addCommands() {\n return {\n setUnderline: () => ({ commands }) => {\n return commands.setMark(this.name);\n },\n toggleUnderline: () => ({ commands }) => {\n return commands.toggleMark(this.name);\n },\n unsetUnderline: () => ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n addKeyboardShortcuts() {\n return {\n 'Mod-u': () => this.editor.commands.toggleUnderline(),\n 'Mod-U': () => this.editor.commands.toggleUnderline(),\n };\n },\n});\n\nexport { Underline, Underline as default };\n//# sourceMappingURL=index.js.map\n"],"names":["Underline","Mark","create","name","addOptions","HTMLAttributes","parseHTML","tag","style","consuming","getAttrs","includes","renderHTML","mergeAttributes","this","options","addCommands","setUnderline","commands","setMark","toggleUnderline","toggleMark","unsetUnderline","unsetMark","addKeyboardShortcuts","editor"],"mappings":"yIAMK,MAACA,EAAYC,EAAKC,OAAO,CAC1BC,KAAM,YACNC,WAAU,KACC,CACHC,eAAgB,CAAE,IAG1BC,UAAS,IACE,CACH,CACIC,IAAK,KAET,CACIC,MAAO,kBACPC,WAAW,EACXC,SAAUF,KAAUA,EAAMG,SAAS,cAAe,CAAE,IAIhE,UAAAC,EAAWP,eAAEA,IACT,MAAO,CAAC,IAAKQ,EAAgBC,KAAKC,QAAQV,eAAgBA,GAAiB,EAC9E,EACD,WAAAW,GACI,MAAO,CACHC,aAAc,IAAM,EAAGC,cACZA,EAASC,QAAQL,KAAKX,MAEjCiB,gBAAiB,IAAM,EAAGF,cACfA,EAASG,WAAWP,KAAKX,MAEpCmB,eAAgB,IAAM,EAAGJ,cACdA,EAASK,UAAUT,KAAKX,MAG1C,EACD,oBAAAqB,GACI,MAAO,CACH,QAAS,IAAMV,KAAKW,OAAOP,SAASE,kBACpC,QAAS,IAAMN,KAAKW,OAAOP,SAASE,kBAE3C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Node as t,nodePasteRule as o,mergeAttributes as s}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";const e=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,i=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/g,a=t=>t.match(e),r=t.create({name:"youtube",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640,rel:1}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-youtube-video] iframe"}],addCommands(){return{setYoutubeVideo:t=>({commands:o})=>!!a(t.src)&&o.insertContent({type:this.name,attrs:t})}},addPasteRules(){return this.options.addPasteHandler?[o({find:i,type:this.type,getAttributes:t=>({src:t.input})})]:[]},renderHTML({HTMLAttributes:t}){const o=(t=>{var o;const{url:s,allowFullscreen:e,autoplay:i,ccLanguage:r,ccLoadPolicy:n,controls:l,disableKBcontrols:c,enableIFrameApi:p,endTime:d,interfaceLanguage:h,ivLoadPolicy:u,loop:m,modestBranding:g,nocookie:y,origin:b,playlist:P,progressBarColor:w,startAt:L,rel:v}=t;if(!a(s))return null;if(s.includes("/embed/"))return s;const f=new URL(s),{id:B,isPlaylist:A}=null!==(o=(t=>t.searchParams.has("v")?{id:t.searchParams.get("v")}:"youtu.be"===t.hostname||t.pathname.includes("shorts")||t.pathname.includes("live")?{id:t.pathname.split("/").pop()}:t.searchParams.has("list")?{id:t.searchParams.get("list"),isPlaylist:!0}:null)(f))&&void 0!==o?o:{};if(!B)return null;const F=new URL(`${((t,o)=>o?"https://www.youtube-nocookie.com/embed/videoseries?list=":t?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/")(y,A)}${B}`);return f.searchParams.has("t")&&F.searchParams.set("start",f.searchParams.get("t").replaceAll("s","")),!1===e&&F.searchParams.set("fs","0"),i&&F.searchParams.set("autoplay","1"),r&&F.searchParams.set("cc_lang_pref",r),n&&F.searchParams.set("cc_load_policy","1"),l||F.searchParams.set("controls","0"),c&&F.searchParams.set("disablekb","1"),p&&F.searchParams.set("enablejsapi","1"),d&&F.searchParams.set("end",d.toString()),h&&F.searchParams.set("hl",h),u&&F.searchParams.set("iv_load_policy",u.toString()),m&&F.searchParams.set("loop","1"),g&&F.searchParams.set("modestbranding","1"),b&&F.searchParams.set("origin",b),P&&F.searchParams.set("playlist",P),L&&F.searchParams.set("start",L.toString()),w&&F.searchParams.set("color",w),void 0!==v&&F.searchParams.set("rel",v.toString()),F.toString()})({url:t.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:t.start||0,rel:this.options.rel});return t.src=o,["div",{"data-youtube-video":""},["iframe",s(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,rel:this.options.rel},t)]]}});export{r as Youtube,r as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/.pnpm/@tiptap+extension-youtube@2.27.2_@tiptap+core@2.27.1_@tiptap+pm@2.27.1_/node_modules/@tiptap/extension-youtube/dist/index.js"],"sourcesContent":["import { Node, nodePasteRule, mergeAttributes } from '@tiptap/core';\n\nconst YOUTUBE_REGEX = /^((?:https?:)?\\/\\/)?((?:www|m|music)\\.)?((?:youtube\\.com|youtu\\.be|youtube-nocookie\\.com))(\\/(?:[\\w-]+\\?v=|embed\\/|v\\/)?)([\\w-]+)(\\S+)?$/;\nconst YOUTUBE_REGEX_GLOBAL = /^((?:https?:)?\\/\\/)?((?:www|m|music)\\.)?((?:youtube\\.com|youtu\\.be|youtube-nocookie\\.com))(\\/(?:[\\w-]+\\?v=|embed\\/|v\\/)?)([\\w-]+)(\\S+)?$/g;\nconst isValidYoutubeUrl = (url) => {\n return url.match(YOUTUBE_REGEX);\n};\nconst getYoutubeEmbedUrl = (nocookie, isPlaylist) => {\n if (isPlaylist) {\n return 'https://www.youtube-nocookie.com/embed/videoseries?list=';\n }\n return nocookie ? 'https://www.youtube-nocookie.com/embed/' : 'https://www.youtube.com/embed/';\n};\nconst getYoutubeVideoOrPlaylistId = (url) => {\n if (url.searchParams.has('v')) {\n return { id: url.searchParams.get('v') };\n }\n if (url.hostname === 'youtu.be'\n || url.pathname.includes('shorts')\n || url.pathname.includes('live')) {\n return { id: url.pathname.split('/').pop() };\n }\n if (url.searchParams.has('list')) {\n return { id: url.searchParams.get('list'), isPlaylist: true };\n }\n return null;\n};\nconst getEmbedUrlFromYoutubeUrl = (options) => {\n var _a;\n const { url, allowFullscreen, autoplay, ccLanguage, ccLoadPolicy, controls, disableKBcontrols, enableIFrameApi, endTime, interfaceLanguage, ivLoadPolicy, loop, modestBranding, nocookie, origin, playlist, progressBarColor, startAt, rel, } = options;\n if (!isValidYoutubeUrl(url)) {\n return null;\n }\n // if is already an embed url, return it\n if (url.includes('/embed/')) {\n return url;\n }\n const urlObject = new URL(url);\n const { id, isPlaylist } = (_a = getYoutubeVideoOrPlaylistId(urlObject)) !== null && _a !== void 0 ? _a : {};\n if (!id) {\n return null;\n }\n const embedUrl = new URL(`${getYoutubeEmbedUrl(nocookie, isPlaylist)}${id}`);\n if (urlObject.searchParams.has('t')) {\n embedUrl.searchParams.set('start', urlObject.searchParams.get('t').replaceAll('s', ''));\n }\n if (allowFullscreen === false) {\n embedUrl.searchParams.set('fs', '0');\n }\n if (autoplay) {\n embedUrl.searchParams.set('autoplay', '1');\n }\n if (ccLanguage) {\n embedUrl.searchParams.set('cc_lang_pref', ccLanguage);\n }\n if (ccLoadPolicy) {\n embedUrl.searchParams.set('cc_load_policy', '1');\n }\n if (!controls) {\n embedUrl.searchParams.set('controls', '0');\n }\n if (disableKBcontrols) {\n embedUrl.searchParams.set('disablekb', '1');\n }\n if (enableIFrameApi) {\n embedUrl.searchParams.set('enablejsapi', '1');\n }\n if (endTime) {\n embedUrl.searchParams.set('end', endTime.toString());\n }\n if (interfaceLanguage) {\n embedUrl.searchParams.set('hl', interfaceLanguage);\n }\n if (ivLoadPolicy) {\n embedUrl.searchParams.set('iv_load_policy', ivLoadPolicy.toString());\n }\n if (loop) {\n embedUrl.searchParams.set('loop', '1');\n }\n if (modestBranding) {\n embedUrl.searchParams.set('modestbranding', '1');\n }\n if (origin) {\n embedUrl.searchParams.set('origin', origin);\n }\n if (playlist) {\n embedUrl.searchParams.set('playlist', playlist);\n }\n if (startAt) {\n embedUrl.searchParams.set('start', startAt.toString());\n }\n if (progressBarColor) {\n embedUrl.searchParams.set('color', progressBarColor);\n }\n if (rel !== undefined) {\n embedUrl.searchParams.set('rel', rel.toString());\n }\n return embedUrl.toString();\n};\n\n/**\n * This extension adds support for youtube videos.\n * @see https://www.tiptap.dev/api/nodes/youtube\n */\nconst Youtube = Node.create({\n name: 'youtube',\n addOptions() {\n return {\n addPasteHandler: true,\n allowFullscreen: true,\n autoplay: false,\n ccLanguage: undefined,\n ccLoadPolicy: undefined,\n controls: true,\n disableKBcontrols: false,\n enableIFrameApi: false,\n endTime: 0,\n height: 480,\n interfaceLanguage: undefined,\n ivLoadPolicy: 0,\n loop: false,\n modestBranding: false,\n HTMLAttributes: {},\n inline: false,\n nocookie: false,\n origin: '',\n playlist: '',\n progressBarColor: undefined,\n width: 640,\n rel: 1,\n };\n },\n inline() {\n return this.options.inline;\n },\n group() {\n return this.options.inline ? 'inline' : 'block';\n },\n draggable: true,\n addAttributes() {\n return {\n src: {\n default: null,\n },\n start: {\n default: 0,\n },\n width: {\n default: this.options.width,\n },\n height: {\n default: this.options.height,\n },\n };\n },\n parseHTML() {\n return [\n {\n tag: 'div[data-youtube-video] iframe',\n },\n ];\n },\n addCommands() {\n return {\n setYoutubeVideo: (options) => ({ commands }) => {\n if (!isValidYoutubeUrl(options.src)) {\n return false;\n }\n return commands.insertContent({\n type: this.name,\n attrs: options,\n });\n },\n };\n },\n addPasteRules() {\n if (!this.options.addPasteHandler) {\n return [];\n }\n return [\n nodePasteRule({\n find: YOUTUBE_REGEX_GLOBAL,\n type: this.type,\n getAttributes: match => {\n return { src: match.input };\n },\n }),\n ];\n },\n renderHTML({ HTMLAttributes }) {\n const embedUrl = getEmbedUrlFromYoutubeUrl({\n url: HTMLAttributes.src,\n allowFullscreen: this.options.allowFullscreen,\n autoplay: this.options.autoplay,\n ccLanguage: this.options.ccLanguage,\n ccLoadPolicy: this.options.ccLoadPolicy,\n controls: this.options.controls,\n disableKBcontrols: this.options.disableKBcontrols,\n enableIFrameApi: this.options.enableIFrameApi,\n endTime: this.options.endTime,\n interfaceLanguage: this.options.interfaceLanguage,\n ivLoadPolicy: this.options.ivLoadPolicy,\n loop: this.options.loop,\n modestBranding: this.options.modestBranding,\n nocookie: this.options.nocookie,\n origin: this.options.origin,\n playlist: this.options.playlist,\n progressBarColor: this.options.progressBarColor,\n startAt: HTMLAttributes.start || 0,\n rel: this.options.rel,\n });\n HTMLAttributes.src = embedUrl;\n return [\n 'div',\n { 'data-youtube-video': '' },\n [\n 'iframe',\n mergeAttributes(this.options.HTMLAttributes, {\n width: this.options.width,\n height: this.options.height,\n allowfullscreen: this.options.allowFullscreen,\n autoplay: this.options.autoplay,\n ccLanguage: this.options.ccLanguage,\n ccLoadPolicy: this.options.ccLoadPolicy,\n disableKBcontrols: this.options.disableKBcontrols,\n enableIFrameApi: this.options.enableIFrameApi,\n endTime: this.options.endTime,\n interfaceLanguage: this.options.interfaceLanguage,\n ivLoadPolicy: this.options.ivLoadPolicy,\n loop: this.options.loop,\n modestBranding: this.options.modestBranding,\n origin: this.options.origin,\n playlist: this.options.playlist,\n progressBarColor: this.options.progressBarColor,\n rel: this.options.rel,\n }, HTMLAttributes),\n ],\n ];\n },\n});\n\nexport { Youtube, Youtube as default };\n//# sourceMappingURL=index.js.map\n"],"names":["YOUTUBE_REGEX","YOUTUBE_REGEX_GLOBAL","isValidYoutubeUrl","url","match","Youtube","Node","create","name","addOptions","addPasteHandler","allowFullscreen","autoplay","ccLanguage","undefined","ccLoadPolicy","controls","disableKBcontrols","enableIFrameApi","endTime","height","interfaceLanguage","ivLoadPolicy","loop","modestBranding","HTMLAttributes","inline","nocookie","origin","playlist","progressBarColor","width","rel","this","options","group","draggable","addAttributes","src","default","start","parseHTML","tag","addCommands","setYoutubeVideo","commands","insertContent","type","attrs","addPasteRules","nodePasteRule","find","getAttributes","input","renderHTML","embedUrl","_a","startAt","includes","urlObject","URL","id","isPlaylist","searchParams","has","get","hostname","pathname","split","pop","getYoutubeVideoOrPlaylistId","getYoutubeEmbedUrl","set","replaceAll","toString","getEmbedUrlFromYoutubeUrl","mergeAttributes","allowfullscreen"],"mappings":"4JAEA,MAAMA,EAAgB,2IAChBC,EAAuB,4IACvBC,EAAqBC,GAChBA,EAAIC,MAAMJ,GAmGfK,EAAUC,EAAKC,OAAO,CACxBC,KAAM,UACNC,WAAU,KACC,CACHC,iBAAiB,EACjBC,iBAAiB,EACjBC,UAAU,EACVC,gBAAYC,EACZC,kBAAcD,EACdE,UAAU,EACVC,mBAAmB,EACnBC,iBAAiB,EACjBC,QAAS,EACTC,OAAQ,IACRC,uBAAmBP,EACnBQ,aAAc,EACdC,MAAM,EACNC,gBAAgB,EAChBC,eAAgB,CAAE,EAClBC,QAAQ,EACRC,UAAU,EACVC,OAAQ,GACRC,SAAU,GACVC,sBAAkBhB,EAClBiB,MAAO,IACPC,IAAK,IAGb,MAAAN,GACI,OAAOO,KAAKC,QAAQR,MACvB,EACD,KAAAS,GACI,OAAOF,KAAKC,QAAQR,OAAS,SAAW,OAC3C,EACDU,WAAW,EACX,aAAAC,GACI,MAAO,CACHC,IAAK,CACDC,QAAS,MAEbC,MAAO,CACHD,QAAS,GAEbR,MAAO,CACHQ,QAAS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|
+
import{BubbleMenuPlugin as e}from"../../../../../@tiptap_extension-bubble-menu@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-bubble-menu/dist/index.js";import t,{forwardRef as n,useRef as r,useState as o,useDebugValue as i,useEffect as s,createContext as u,useContext as a,useLayoutEffect as c}from"react";import l from"react-dom";import{Editor as d}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";export{CommandManager,Editor,Extension,InputRule,Mark,Node,NodePos,PasteRule,callOrReturn,canInsertNode,combineTransactionSteps,createChainableState,createDocument,createNodeFromContent,createStyleTag,defaultBlockAt,deleteProps,elementFromString,escapeForRegEx,findChildrenInRange,findDuplicates,findParentNode,findParentNodeClosestToPos,fromString,getAttributes,getAttributesFromExtensions,getChangedRanges,getExtensionField,getHTMLFromFragment,getMarkAttributes,getMarkRange,getMarkType,getMarksBetween,getNodeAttributes,getNodeType,getRenderedAttributes,getSchemaByResolvedExtensions,getSchemaTypeByName,getSchemaTypeNameByName,getSplittedAttributes,getText,getTextBetween,getTextContentFromNodes,getTextSerializersFromSchema,injectExtensionAttributesToParseRule,inputRulesPlugin,isActive,isEmptyObject,isExtensionRulesEnabled,isFunction,isList,isMacOS,isMarkActive,isNodeActive,isNodeEmpty,isNodeSelection,isNumber,isPlainObject,isRegExp,isTextSelection,isiOS,markInputRule,markPasteRule,mergeAttributes,mergeDeep,minMax,nodeInputRule,nodePasteRule,objectIncludes,pasteRulesPlugin,posToDOMRect,removeDuplicates,resolveFocusPosition,selectionToInsertionEnd,splitExtensions,textInputRule,textblockTypeInputRule,wrappingInputRule}from"../../../../../@tiptap_core@2.27.1_@tiptap_pm@2.27.1/node_modules/@tiptap/core/dist/index.js";import{FloatingMenuPlugin as p}from"../../../../../@tiptap_extension-floating-menu@2.27.1_@tiptap_core@2.27.1_@tiptap_pm@2.27.1__@tiptap_pm@2.27.1/node_modules/@tiptap/extension-floating-menu/dist/index.js";function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f,v={exports:{}},m={};var S,_={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* use-sync-external-store-shim.development.js
|
|
@@ -7,7 +7,7 @@ import e,{forwardRef as t,useRef as n,useState as r,useDebugValue as o,useEffect
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/"production"===process.env.NODE_ENV?
|
|
10
|
+
*/"production"===process.env.NODE_ENV?v.exports=function(){if(f)return m;f=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),a=r({inst:{value:n,getSnapshot:t}}),c=a[0].inst,l=a[1];return i(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),o(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n};return m.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:a,m}():v.exports=(S||(S=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=t,n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];!function(e,t,r){var o=n.ReactDebugCurrentFrame.getStackAddendum();""!==o&&(t+="%s",r=r.concat([o]));var i=r.map(function(e){return String(e)});i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}("error",e,r)}var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=e.useState,s=e.useEffect,u=e.useLayoutEffect,a=e.useDebugValue,c=!1,l=!1;function d(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!o(n,r)}catch(e){return!0}}var p="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t,n){return t()}:function(t,n,p){c||void 0!==e.startTransition&&(c=!0,r("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."));var h=n();if(!l){var f=n();o(h,f)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}var v=i({inst:{value:h,getSnapshot:n}}),m=v[0].inst,S=v[1];return u(function(){m.value=h,m.getSnapshot=n,d(m)&&S({inst:m})},[t,h,n]),s(function(){return d(m)&&S({inst:m}),t(function(){d(m)&&S({inst:m})})},[t]),a(h),h},h=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:p;_.useSyncExternalStore=h,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),_);var g=v.exports;const b=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},E=({contentComponent:e})=>{const n=g.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return t.createElement(t.Fragment,null,Object.values(n))};class y extends t.Component{constructor(e){var n;super(e),this.editorContentRef=t.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:Boolean(null===(n=e.editor)||void 0===n?void 0:n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=function(){const e=new Set;let t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:l.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const e=this.props.editor;if(!e)return;if(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild)return;const t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){const{editor:e,innerRef:n,...r}=this.props;return t.createElement(t.Fragment,null,t.createElement("div",{ref:b(n,this.editorContentRef),...r}),(null==e?void 0:e.contentComponent)&&t.createElement(E,{contentComponent:e.contentComponent}))}}const O=n((e,n)=>{const r=t.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[e.editor]);return t.createElement(y,{key:r,innerRef:n,...e})}),C=t.memo(O);var R,D=h(function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var s=i[o];if(("_owner"!==s||!t.$$typeof)&&!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}),T={exports:{}},w={};var x,N={};
|
|
11
11
|
/**
|
|
12
12
|
* @license React
|
|
13
13
|
* use-sync-external-store-shim/with-selector.development.js
|
|
@@ -16,5 +16,5 @@ import e,{forwardRef as t,useRef as n,useState as r,useDebugValue as o,useEffect
|
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/"production"===process.env.NODE_ENV?T.exports=function(){if(
|
|
19
|
+
*/"production"===process.env.NODE_ENV?T.exports=function(){if(R)return w;R=1;var e=t,n=g,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,s=e.useEffect,u=e.useMemo,a=e.useDebugValue;return w.useSyncExternalStoreWithSelector=function(e,t,n,c,l){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=u(function(){function e(e){if(!s){if(s=!0,o=e,e=c(e),void 0!==l&&p.hasValue){var t=p.value;if(l(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==l&&l(t,n)?t:(o=e,i=n)}var o,i,s=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,c,l]);var h=o(e,d[0],d[1]);return s(function(){p.hasValue=!0,p.value=h},[h]),a(h),h},w}():T.exports=(x||(x=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=t,n=g,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,s=e.useEffect,u=e.useMemo,a=e.useDebugValue;N.useSyncExternalStoreWithSelector=function(e,t,n,c,l){var d,p=i(null);null===p.current?(d={hasValue:!1,value:null},p.current=d):d=p.current;var h=u(function(){var e,o,i=!1,s=function(t){if(!i){i=!0,e=t;var n=c(t);if(void 0!==l&&d.hasValue){var s=d.value;if(l(s,n))return o=s,s}return o=n,n}var u=o;if(r(e,t))return u;var a=c(t);return void 0!==l&&l(u,a)?u:(e=t,o=a,a)},u=void 0===n?null:n;return[function(){return s(t())},null===u?void 0:function(){return s(u())}]},[t,n,c,l]),f=h[0],v=h[1],m=o(e,f,v);return s(function(){d.hasValue=!0,d.value=m},[m]),a(m),m},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),N);var A=T.exports;const L="undefined"!=typeof window?c:s;class M{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=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)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}}function I(e){var t;const[n]=o(()=>new M(e.editor)),r=A.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!==(t=e.equalityFn)&&void 0!==t?t:D);return L(()=>n.watch(e.editor),[e.editor,n]),i(r),r}const V="production"!==process.env.NODE_ENV,B="undefined"==typeof window,j=B||Boolean("undefined"!=typeof window&&window.next);class P{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=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)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender)return B||j?(V&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&B&&V)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.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBeforeCreate)||void 0===n?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBlur)||void 0===n?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onCreate)||void 0===n?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDestroy)||void 0===n?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null===(n=(t=this.options.current).onFocus)||void 0===n?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onSelectionUpdate)||void 0===n?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null===(n=(t=this.options.current).onTransaction)||void 0===n?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onUpdate)||void 0===n?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null===(n=(t=this.options.current).onContentError)||void 0===n?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDrop)||void 0===n?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null===(n=(t=this.options.current).onPaste)||void 0===n?void 0:n.call(t,...e)}};return new d(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null===(r=t.extensions)||void 0===r?void 0:r[n])}):e[n]===t[n]))}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===e.length?P.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps)return void(this.previousDeps=e);if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{this.isComponentMounted&&this.instanceId===e?t&&t.setOptions(this.options.current):t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function F(e={},t=[]){const n=r(e);n.current=e;const[u]=o(()=>new P(n)),a=g.useSyncExternalStore(u.subscribe,u.getEditor,u.getServerSnapshot);return i(a),s(u.onRender(t)),I({editor:a,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),a}const k=u({editor:null});k.Consumer;const K=()=>a(k),H=n=>{const[r,i]=o(null),{editor:u}=K();return s(()=>{var t;if(!r)return;if((null===(t=n.editor)||void 0===t?void 0:t.isDestroyed)||(null==u?void 0:u.isDestroyed))return;const{pluginKey:o="bubbleMenu",editor:i,tippyOptions:s={},updateDelay:a,shouldShow:c=null}=n,l=i||u;if(!l)return void console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");const d=e({updateDelay:a,editor:l,element:r,pluginKey:o,shouldShow:c,tippyOptions:s});return l.registerPlugin(d),()=>{l.unregisterPlugin(o)}},[n.editor,u,r]),t.createElement("div",{ref:i,className:n.className,style:{visibility:"hidden"}},n.children)},z=e=>{const[n,r]=o(null),{editor:i}=K();return s(()=>{var t;if(!n)return;if((null===(t=e.editor)||void 0===t?void 0:t.isDestroyed)||(null==i?void 0:i.isDestroyed))return;const{pluginKey:r="floatingMenu",editor:o,tippyOptions:s={},shouldShow:u=null}=e,a=o||i;if(!a)return void console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");const c=p({pluginKey:r,editor:a,element:n,tippyOptions:s,shouldShow:u});return a.registerPlugin(c),()=>{a.unregisterPlugin(r)}},[e.editor,i,n]),t.createElement("div",{ref:r,className:e.className,style:{visibility:"hidden"}},e.children)},G=u({onDragStart:void 0}),U=()=>a(G);t.forwardRef((e,n)=>{const{onDragStart:r}=U(),o=e.as||"div";return t.createElement(o,{...e,ref:n,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})});export{H as BubbleMenu,C as EditorContent,k as EditorContext,z as FloatingMenu,y as PureEditorContent,G as ReactNodeViewContext,K as useCurrentEditor,F as useEditor,I as useEditorState,U as useReactNodeView};
|
|
20
20
|
//# sourceMappingURL=index.js.map
|