@stesura/react-prosemirror 3.2.11-stesura.1
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/LICENSE.txt +21 -0
- package/README.md +939 -0
- package/dist/cjs/AbstractEditorView.js +4 -0
- package/dist/cjs/ReactEditorView.js +194 -0
- package/dist/cjs/StaticEditorView.js +89 -0
- package/dist/cjs/browser.js +53 -0
- package/dist/cjs/commands/reorderSiblings.js +72 -0
- package/dist/cjs/components/ChildNodeViews.js +418 -0
- package/dist/cjs/components/CursorWrapper.js +84 -0
- package/dist/cjs/components/EditorStateSelectorsProvider.js +90 -0
- package/dist/cjs/components/LayoutGroup.js +112 -0
- package/dist/cjs/components/NativeWidgetView.js +108 -0
- package/dist/cjs/components/OutputSpec.js +121 -0
- package/dist/cjs/components/ProseMirror.js +146 -0
- package/dist/cjs/components/ProseMirrorDoc.js +74 -0
- package/dist/cjs/components/SeparatorHackView.js +99 -0
- package/dist/cjs/components/TextNodeView.js +113 -0
- package/dist/cjs/components/TrailingHackView.js +87 -0
- package/dist/cjs/components/WidgetView.js +94 -0
- package/dist/cjs/components/WidgetViewComponentProps.js +4 -0
- package/dist/cjs/components/marks/DefaultMarkView.js +70 -0
- package/dist/cjs/components/marks/MarkView.js +85 -0
- package/dist/cjs/components/marks/MarkViewComponentProps.js +4 -0
- package/dist/cjs/components/marks/MarkViewConstructorView.js +116 -0
- package/dist/cjs/components/marks/ReactMarkView.js +109 -0
- package/dist/cjs/components/nodes/DefaultNodeView.js +68 -0
- package/dist/cjs/components/nodes/DocNodeView.js +97 -0
- package/dist/cjs/components/nodes/NodeView.js +129 -0
- package/dist/cjs/components/nodes/NodeViewComponentProps.js +4 -0
- package/dist/cjs/components/nodes/NodeViewConstructorView.js +145 -0
- package/dist/cjs/components/nodes/ReactNodeView.js +189 -0
- package/dist/cjs/constants.js +33 -0
- package/dist/cjs/contexts/ChildDescriptionsContext.js +19 -0
- package/dist/cjs/contexts/EditorContext.js +12 -0
- package/dist/cjs/contexts/EditorStateContext.js +12 -0
- package/dist/cjs/contexts/EditorStateStoreContext.js +45 -0
- package/dist/cjs/contexts/IgnoreMutationContext.js +12 -0
- package/dist/cjs/contexts/LayoutGroupContext.js +12 -0
- package/dist/cjs/contexts/NodeViewContext.js +12 -0
- package/dist/cjs/contexts/RenderStoreContext.js +54 -0
- package/dist/cjs/contexts/SelectNodeContext.js +12 -0
- package/dist/cjs/contexts/StopEventContext.js +12 -0
- package/dist/cjs/decorations/ReactWidgetType.js +58 -0
- package/dist/cjs/decorations/computeDocDeco.js +44 -0
- package/dist/cjs/decorations/internalTypes.js +4 -0
- package/dist/cjs/decorations/iterDeco.js +91 -0
- package/dist/cjs/decorations/viewDecorations.js +155 -0
- package/dist/cjs/dom.js +147 -0
- package/dist/cjs/findDOMNode.js +46 -0
- package/dist/cjs/hooks/useClientLayoutEffect.js +19 -0
- package/dist/cjs/hooks/useComponentEventListeners.js +72 -0
- package/dist/cjs/hooks/useEditor.js +130 -0
- package/dist/cjs/hooks/useEditorEffect.js +39 -0
- package/dist/cjs/hooks/useEditorEventCallback.js +38 -0
- package/dist/cjs/hooks/useEditorEventListener.js +34 -0
- package/dist/cjs/hooks/useEditorState.js +18 -0
- package/dist/cjs/hooks/useEditorStateSelector.js +17 -0
- package/dist/cjs/hooks/useEffectEvent.js +34 -0
- package/dist/cjs/hooks/useForceUpdate.js +15 -0
- package/dist/cjs/hooks/useIgnoreMutation.js +24 -0
- package/dist/cjs/hooks/useIsComposingIn.js +25 -0
- package/dist/cjs/hooks/useIsEditorStatic.js +15 -0
- package/dist/cjs/hooks/useIsNodeSelected.js +21 -0
- package/dist/cjs/hooks/useLayoutGroupEffect.js +20 -0
- package/dist/cjs/hooks/useMarkViewDescription.js +134 -0
- package/dist/cjs/hooks/useNodePos.js +18 -0
- package/dist/cjs/hooks/useNodeViewDescription.js +154 -0
- package/dist/cjs/hooks/useReactKeys.js +17 -0
- package/dist/cjs/hooks/useSelectNode.js +30 -0
- package/dist/cjs/hooks/useSetDom.js +57 -0
- package/dist/cjs/hooks/useStopEvent.js +24 -0
- package/dist/cjs/index.js +85 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/plugins/beforeInputPlugin.js +356 -0
- package/dist/cjs/plugins/reactKeys.js +121 -0
- package/dist/cjs/props.js +283 -0
- package/dist/cjs/refs.js +28 -0
- package/dist/cjs/testing/editorViewTestHelpers.js +109 -0
- package/dist/cjs/testing/setupProseMirrorView.js +94 -0
- package/dist/cjs/tiptap/ReactProseMirrorNodeView.js +26 -0
- package/dist/cjs/tiptap/TiptapEditor.js +34 -0
- package/dist/cjs/tiptap/TiptapEditorContent.js +143 -0
- package/dist/cjs/tiptap/TiptapEditorView.js +130 -0
- package/dist/cjs/tiptap/contexts/TiptapEditorContext.js +12 -0
- package/dist/cjs/tiptap/extensions/ReactProseMirror.js +40 -0
- package/dist/cjs/tiptap/extensions/ReactProseMirrorCommands.js +21 -0
- package/dist/cjs/tiptap/extensions/commands/updateAttributes.js +104 -0
- package/dist/cjs/tiptap/hooks/useEditor.js +318 -0
- package/dist/cjs/tiptap/hooks/useIsInReactProseMirror.js +15 -0
- package/dist/cjs/tiptap/hooks/useTiptapEditor.js +35 -0
- package/dist/cjs/tiptap/hooks/useTiptapEditorEffect.js +35 -0
- package/dist/cjs/tiptap/hooks/useTiptapEditorEventCallback.js +35 -0
- package/dist/cjs/tiptap/index.js +48 -0
- package/dist/cjs/tiptap/tiptapNodeView.js +245 -0
- package/dist/cjs/viewdesc.js +862 -0
- package/dist/esm/AbstractEditorView.js +1 -0
- package/dist/esm/ReactEditorView.js +194 -0
- package/dist/esm/StaticEditorView.js +79 -0
- package/dist/esm/browser.js +43 -0
- package/dist/esm/commands/reorderSiblings.js +63 -0
- package/dist/esm/components/ChildNodeViews.js +359 -0
- package/dist/esm/components/CursorWrapper.js +33 -0
- package/dist/esm/components/EditorStateSelectorsProvider.js +31 -0
- package/dist/esm/components/LayoutGroup.js +67 -0
- package/dist/esm/components/NativeWidgetView.js +57 -0
- package/dist/esm/components/OutputSpec.js +71 -0
- package/dist/esm/components/ProseMirror.js +95 -0
- package/dist/esm/components/ProseMirrorDoc.js +15 -0
- package/dist/esm/components/SeparatorHackView.js +48 -0
- package/dist/esm/components/TextNodeView.js +103 -0
- package/dist/esm/components/TrailingHackView.js +36 -0
- package/dist/esm/components/WidgetView.js +43 -0
- package/dist/esm/components/WidgetViewComponentProps.js +1 -0
- package/dist/esm/components/marks/DefaultMarkView.js +19 -0
- package/dist/esm/components/marks/MarkView.js +34 -0
- package/dist/esm/components/marks/MarkViewComponentProps.js +1 -0
- package/dist/esm/components/marks/MarkViewConstructorView.js +65 -0
- package/dist/esm/components/marks/ReactMarkView.js +58 -0
- package/dist/esm/components/nodes/DefaultNodeView.js +17 -0
- package/dist/esm/components/nodes/DocNodeView.js +46 -0
- package/dist/esm/components/nodes/NodeView.js +67 -0
- package/dist/esm/components/nodes/NodeViewComponentProps.js +1 -0
- package/dist/esm/components/nodes/NodeViewConstructorView.js +94 -0
- package/dist/esm/components/nodes/ReactNodeView.js +138 -0
- package/dist/esm/constants.js +15 -0
- package/dist/esm/contexts/ChildDescriptionsContext.js +9 -0
- package/dist/esm/contexts/EditorContext.js +7 -0
- package/dist/esm/contexts/EditorStateContext.js +2 -0
- package/dist/esm/contexts/EditorStateStoreContext.js +27 -0
- package/dist/esm/contexts/IgnoreMutationContext.js +2 -0
- package/dist/esm/contexts/LayoutGroupContext.js +2 -0
- package/dist/esm/contexts/NodeViewContext.js +2 -0
- package/dist/esm/contexts/RenderStoreContext.js +33 -0
- package/dist/esm/contexts/SelectNodeContext.js +2 -0
- package/dist/esm/contexts/StopEventContext.js +2 -0
- package/dist/esm/decorations/ReactWidgetType.js +40 -0
- package/dist/esm/decorations/computeDocDeco.js +44 -0
- package/dist/esm/decorations/internalTypes.js +1 -0
- package/dist/esm/decorations/iterDeco.js +85 -0
- package/dist/esm/decorations/viewDecorations.js +155 -0
- package/dist/esm/dom.js +110 -0
- package/dist/esm/findDOMNode.js +31 -0
- package/dist/esm/hooks/useClientLayoutEffect.js +9 -0
- package/dist/esm/hooks/useComponentEventListeners.js +87 -0
- package/dist/esm/hooks/useEditor.js +128 -0
- package/dist/esm/hooks/useEditorEffect.js +46 -0
- package/dist/esm/hooks/useEditorEventCallback.js +38 -0
- package/dist/esm/hooks/useEditorEventListener.js +28 -0
- package/dist/esm/hooks/useEditorState.js +10 -0
- package/dist/esm/hooks/useEditorStateSelector.js +14 -0
- package/dist/esm/hooks/useEffectEvent.js +24 -0
- package/dist/esm/hooks/useForceUpdate.js +8 -0
- package/dist/esm/hooks/useIgnoreMutation.js +14 -0
- package/dist/esm/hooks/useIsComposingIn.js +17 -0
- package/dist/esm/hooks/useIsEditorStatic.js +8 -0
- package/dist/esm/hooks/useIsNodeSelected.js +11 -0
- package/dist/esm/hooks/useLayoutGroupEffect.js +10 -0
- package/dist/esm/hooks/useMarkViewDescription.js +124 -0
- package/dist/esm/hooks/useNodePos.js +15 -0
- package/dist/esm/hooks/useNodeViewDescription.js +144 -0
- package/dist/esm/hooks/useReactKeys.js +7 -0
- package/dist/esm/hooks/useSelectNode.js +20 -0
- package/dist/esm/hooks/useSetDom.js +47 -0
- package/dist/esm/hooks/useStopEvent.js +14 -0
- package/dist/esm/index.js +19 -0
- package/dist/esm/plugins/beforeInputPlugin.js +346 -0
- package/dist/esm/plugins/reactKeys.js +106 -0
- package/dist/esm/props.js +267 -0
- package/dist/esm/refs.js +18 -0
- package/dist/esm/testing/editorViewTestHelpers.js +86 -0
- package/dist/esm/testing/setupProseMirrorView.js +76 -0
- package/dist/esm/tiptap/ReactProseMirrorNodeView.js +22 -0
- package/dist/esm/tiptap/TiptapEditor.js +24 -0
- package/dist/esm/tiptap/TiptapEditorContent.js +99 -0
- package/dist/esm/tiptap/TiptapEditorView.js +76 -0
- package/dist/esm/tiptap/contexts/TiptapEditorContext.js +2 -0
- package/dist/esm/tiptap/extensions/ReactProseMirror.js +30 -0
- package/dist/esm/tiptap/extensions/ReactProseMirrorCommands.js +11 -0
- package/dist/esm/tiptap/extensions/commands/updateAttributes.js +96 -0
- package/dist/esm/tiptap/hooks/useEditor.js +308 -0
- package/dist/esm/tiptap/hooks/useIsInReactProseMirror.js +9 -0
- package/dist/esm/tiptap/hooks/useTiptapEditor.js +31 -0
- package/dist/esm/tiptap/hooks/useTiptapEditorEffect.js +42 -0
- package/dist/esm/tiptap/hooks/useTiptapEditorEventCallback.js +35 -0
- package/dist/esm/tiptap/index.js +9 -0
- package/dist/esm/tiptap/tiptapNodeView.js +211 -0
- package/dist/esm/viewdesc.js +844 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/AbstractEditorView.d.ts +28 -0
- package/dist/types/ReactEditorView.d.ts +102 -0
- package/dist/types/StaticEditorView.d.ts +26 -0
- package/dist/types/__tests__/viewdesc.test.d.ts +1 -0
- package/dist/types/browser.d.ts +15 -0
- package/dist/types/commands/__tests__/reorderSiblings.test.d.ts +1 -0
- package/dist/types/commands/reorderSiblings.d.ts +14 -0
- package/dist/types/components/ChildNodeViews.d.ts +9 -0
- package/dist/types/components/CursorWrapper.d.ts +3 -0
- package/dist/types/components/EditorStateSelectorsProvider.d.ts +10 -0
- package/dist/types/components/LayoutGroup.d.ts +12 -0
- package/dist/types/components/NativeWidgetView.d.ts +8 -0
- package/dist/types/components/OutputSpec.d.ts +10 -0
- package/dist/types/components/ProseMirror.d.ts +14 -0
- package/dist/types/components/ProseMirrorDoc.d.ts +16 -0
- package/dist/types/components/SeparatorHackView.d.ts +6 -0
- package/dist/types/components/TextNodeView.d.ts +27 -0
- package/dist/types/components/TrailingHackView.d.ts +6 -0
- package/dist/types/components/WidgetView.d.ts +8 -0
- package/dist/types/components/WidgetViewComponentProps.d.ts +7 -0
- package/dist/types/components/__tests__/ProseMirror.composition.test.d.ts +17 -0
- package/dist/types/components/__tests__/ProseMirror.domchange.test.d.ts +1 -0
- package/dist/types/components/__tests__/ProseMirror.draw-decoration.test.d.ts +1 -0
- package/dist/types/components/__tests__/ProseMirror.draw.test.d.ts +1 -0
- package/dist/types/components/__tests__/ProseMirror.memory-leak.test.d.ts +6 -0
- package/dist/types/components/__tests__/ProseMirror.mobile.test.d.ts +1 -0
- package/dist/types/components/__tests__/ProseMirror.node-view.test.d.ts +1 -0
- package/dist/types/components/__tests__/ProseMirror.selection.test.d.ts +1 -0
- package/dist/types/components/__tests__/ProseMirror.test.d.ts +1 -0
- package/dist/types/components/__tests__/stableContexts.test.d.ts +10 -0
- package/dist/types/components/marks/DefaultMarkView.d.ts +3 -0
- package/dist/types/components/marks/MarkView.d.ts +10 -0
- package/dist/types/components/marks/MarkViewComponentProps.d.ts +11 -0
- package/dist/types/components/marks/MarkViewConstructorView.d.ts +12 -0
- package/dist/types/components/marks/ReactMarkView.d.ts +12 -0
- package/dist/types/components/nodes/DefaultNodeView.d.ts +3 -0
- package/dist/types/components/nodes/DocNodeView.d.ts +12 -0
- package/dist/types/components/nodes/NodeView.d.ts +14 -0
- package/dist/types/components/nodes/NodeViewComponentProps.d.ts +13 -0
- package/dist/types/components/nodes/NodeViewConstructorView.d.ts +12 -0
- package/dist/types/components/nodes/ReactNodeView.d.ts +13 -0
- package/dist/types/constants.d.ts +4 -0
- package/dist/types/contexts/ChildDescriptionsContext.d.ts +7 -0
- package/dist/types/contexts/EditorContext.d.ts +18 -0
- package/dist/types/contexts/EditorStateContext.d.ts +2 -0
- package/dist/types/contexts/EditorStateStoreContext.d.ts +9 -0
- package/dist/types/contexts/IgnoreMutationContext.d.ts +5 -0
- package/dist/types/contexts/LayoutGroupContext.d.ts +5 -0
- package/dist/types/contexts/NodeViewContext.d.ts +9 -0
- package/dist/types/contexts/RenderStoreContext.d.ts +24 -0
- package/dist/types/contexts/SelectNodeContext.d.ts +5 -0
- package/dist/types/contexts/StopEventContext.d.ts +5 -0
- package/dist/types/contexts/__tests__/DeferredLayoutEffects.test.d.ts +1 -0
- package/dist/types/decorations/ReactWidgetType.d.ts +40 -0
- package/dist/types/decorations/computeDocDeco.d.ts +14 -0
- package/dist/types/decorations/internalTypes.d.ts +20 -0
- package/dist/types/decorations/iterDeco.d.ts +3 -0
- package/dist/types/decorations/viewDecorations.d.ts +14 -0
- package/dist/types/dom.d.ts +22 -0
- package/dist/types/findDOMNode.d.ts +3 -0
- package/dist/types/hooks/__tests__/useEditorEffect.test.d.ts +1 -0
- package/dist/types/hooks/useClientLayoutEffect.d.ts +2 -0
- package/dist/types/hooks/useComponentEventListeners.d.ts +34 -0
- package/dist/types/hooks/useEditor.d.ts +37 -0
- package/dist/types/hooks/useEditorEffect.d.ts +21 -0
- package/dist/types/hooks/useEditorEventCallback.d.ts +13 -0
- package/dist/types/hooks/useEditorEventListener.d.ts +8 -0
- package/dist/types/hooks/useEditorState.d.ts +5 -0
- package/dist/types/hooks/useEditorStateSelector.d.ts +10 -0
- package/dist/types/hooks/useEffectEvent.d.ts +1 -0
- package/dist/types/hooks/useForceUpdate.d.ts +5 -0
- package/dist/types/hooks/useIgnoreMutation.d.ts +2 -0
- package/dist/types/hooks/useIsComposingIn.d.ts +4 -0
- package/dist/types/hooks/useIsEditorStatic.d.ts +5 -0
- package/dist/types/hooks/useIsNodeSelected.d.ts +1 -0
- package/dist/types/hooks/useLayoutGroupEffect.d.ts +3 -0
- package/dist/types/hooks/useMarkViewDescription.d.ts +15 -0
- package/dist/types/hooks/useNodePos.d.ts +9 -0
- package/dist/types/hooks/useNodeViewDescription.d.ts +16 -0
- package/dist/types/hooks/useReactKeys.d.ts +2 -0
- package/dist/types/hooks/useSelectNode.d.ts +2 -0
- package/dist/types/hooks/useSetDom.d.ts +2 -0
- package/dist/types/hooks/useStopEvent.d.ts +2 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/plugins/__tests__/reactKeys.test.d.ts +1 -0
- package/dist/types/plugins/beforeInputPlugin.d.ts +2 -0
- package/dist/types/plugins/reactKeys.d.ts +23 -0
- package/dist/types/props.d.ts +1173 -0
- package/dist/types/refs.d.ts +2 -0
- package/dist/types/testing/editorViewTestHelpers.d.ts +24 -0
- package/dist/types/testing/setupProseMirrorView.d.ts +2 -0
- package/dist/types/tiptap/ReactProseMirrorNodeView.d.ts +15 -0
- package/dist/types/tiptap/TiptapEditor.d.ts +6 -0
- package/dist/types/tiptap/TiptapEditorContent.d.ts +28 -0
- package/dist/types/tiptap/TiptapEditorView.d.ts +16 -0
- package/dist/types/tiptap/contexts/TiptapEditorContext.d.ts +6 -0
- package/dist/types/tiptap/extensions/ReactProseMirror.d.ts +9 -0
- package/dist/types/tiptap/extensions/ReactProseMirrorCommands.d.ts +2 -0
- package/dist/types/tiptap/extensions/commands/updateAttributes.d.ts +24 -0
- package/dist/types/tiptap/hooks/useEditor.d.ts +38 -0
- package/dist/types/tiptap/hooks/useIsInReactProseMirror.d.ts +6 -0
- package/dist/types/tiptap/hooks/useTiptapEditor.d.ts +11 -0
- package/dist/types/tiptap/hooks/useTiptapEditorEffect.d.ts +21 -0
- package/dist/types/tiptap/hooks/useTiptapEditorEventCallback.d.ts +13 -0
- package/dist/types/tiptap/index.d.ts +9 -0
- package/dist/types/tiptap/tiptapNodeView.d.ts +50 -0
- package/dist/types/viewdesc.d.ts +179 -0
- package/package.json +167 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useIsEditorStatic", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useIsEditorStatic;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _EditorContext = require("../contexts/EditorContext.js");
|
|
13
|
+
function useIsEditorStatic() {
|
|
14
|
+
return (0, _react.useContext)(_EditorContext.EditorContext)?.isStatic ?? false;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useIsNodeSelected", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useIsNodeSelected;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _useSelectNode = require("./useSelectNode.js");
|
|
13
|
+
function useIsNodeSelected() {
|
|
14
|
+
const [isSelected, setIsSelected] = (0, _react.useState)(false);
|
|
15
|
+
(0, _useSelectNode.useSelectNode)(()=>{
|
|
16
|
+
setIsSelected(true);
|
|
17
|
+
}, ()=>{
|
|
18
|
+
setIsSelected(false);
|
|
19
|
+
});
|
|
20
|
+
return isSelected;
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* Copyright (c) The New York Times Company */ "use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useLayoutGroupEffect", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useLayoutGroupEffect;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _LayoutGroupContext = require("../contexts/LayoutGroupContext.js");
|
|
13
|
+
const _useClientLayoutEffect = require("./useClientLayoutEffect.js");
|
|
14
|
+
function useLayoutGroupEffect(effect, deps) {
|
|
15
|
+
const register = (0, _react.useContext)(_LayoutGroupContext.LayoutGroupContext);
|
|
16
|
+
// The rule for hooks wants to statically verify the deps,
|
|
17
|
+
// but the dependencies are up to the caller, not this implementation.
|
|
18
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
+
(0, _useClientLayoutEffect.useClientLayoutEffect)(()=>register(effect), deps);
|
|
20
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useMarkViewDescription", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useMarkViewDescription;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _ReactEditorView = require("../ReactEditorView.js");
|
|
13
|
+
const _ChildDescriptionsContext = require("../contexts/ChildDescriptionsContext.js");
|
|
14
|
+
const _EditorContext = require("../contexts/EditorContext.js");
|
|
15
|
+
const _viewdesc = require("../viewdesc.js");
|
|
16
|
+
const _useClientLayoutEffect = require("./useClientLayoutEffect.js");
|
|
17
|
+
const _useEffectEvent = require("./useEffectEvent.js");
|
|
18
|
+
function useMarkViewDescription(getDOM, getContentDOM, constructor, props) {
|
|
19
|
+
const mountedRef = (0, _react.useRef)(false);
|
|
20
|
+
const { view } = (0, _react.useContext)(_EditorContext.EditorContext);
|
|
21
|
+
const { parentRef, siblingsRef } = (0, _react.useContext)(_ChildDescriptionsContext.ChildDescriptionsContext);
|
|
22
|
+
const contentDOMRef = (0, _react.useRef)(null);
|
|
23
|
+
const viewDescRef = (0, _react.useRef)();
|
|
24
|
+
const childrenRef = (0, _react.useRef)([]);
|
|
25
|
+
const create = (0, _useEffectEvent.useEffectEvent)(()=>{
|
|
26
|
+
if (!(view instanceof _ReactEditorView.ReactEditorView)) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const dom = getDOM();
|
|
30
|
+
if (!dom) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const { mark, inline, getPos } = props;
|
|
34
|
+
const markView = constructor(mark, view, inline);
|
|
35
|
+
if (!markView) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const parent = parentRef.current;
|
|
39
|
+
const children = childrenRef.current;
|
|
40
|
+
const contentDOM = getContentDOM(markView);
|
|
41
|
+
const viewDesc = new _viewdesc.ReactMarkViewDesc(parent, children, getPos, mark, dom, contentDOM ?? markView.dom, markView);
|
|
42
|
+
// When create() runs after a destroy() (either here in a layout
|
|
43
|
+
// effect or in refUpdated), the inherited children still reference
|
|
44
|
+
// the just-destroyed desc. Re-parent them onto this fresh desc
|
|
45
|
+
// before any other code can observe the stale pointer.
|
|
46
|
+
for (const child of children){
|
|
47
|
+
child.parent = viewDesc;
|
|
48
|
+
}
|
|
49
|
+
contentDOMRef.current = contentDOM;
|
|
50
|
+
return viewDesc;
|
|
51
|
+
});
|
|
52
|
+
const update = (0, _useEffectEvent.useEffectEvent)(()=>{
|
|
53
|
+
if (!(view instanceof _ReactEditorView.ReactEditorView)) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
const viewDesc = viewDescRef.current;
|
|
57
|
+
if (!viewDesc) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
const dom = getDOM();
|
|
61
|
+
if (!dom || dom !== viewDesc.dom) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
const contentDOM = getContentDOM(viewDesc);
|
|
65
|
+
if (contentDOM !== (viewDesc.contentDOM ?? dom)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
const { mark } = props;
|
|
69
|
+
return viewDesc.matchesMark(mark);
|
|
70
|
+
});
|
|
71
|
+
const destroy = (0, _useEffectEvent.useEffectEvent)(()=>{
|
|
72
|
+
const viewDesc = viewDescRef.current;
|
|
73
|
+
if (!viewDesc) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
viewDescRef.current = undefined;
|
|
77
|
+
viewDesc.destroy();
|
|
78
|
+
const siblings = siblingsRef.current;
|
|
79
|
+
if (siblings.includes(viewDesc)) {
|
|
80
|
+
const index = siblings.indexOf(viewDesc);
|
|
81
|
+
siblings.splice(index, 1);
|
|
82
|
+
}
|
|
83
|
+
contentDOMRef.current = null;
|
|
84
|
+
});
|
|
85
|
+
(0, _useClientLayoutEffect.useClientLayoutEffect)(()=>{
|
|
86
|
+
mountedRef.current = true;
|
|
87
|
+
viewDescRef.current = create();
|
|
88
|
+
return ()=>{
|
|
89
|
+
mountedRef.current = false;
|
|
90
|
+
destroy();
|
|
91
|
+
};
|
|
92
|
+
}, [
|
|
93
|
+
create,
|
|
94
|
+
destroy
|
|
95
|
+
]);
|
|
96
|
+
const refUpdated = (0, _react.useCallback)(()=>{
|
|
97
|
+
if (!mountedRef.current) return;
|
|
98
|
+
if (!update()) {
|
|
99
|
+
destroy();
|
|
100
|
+
viewDescRef.current = create();
|
|
101
|
+
}
|
|
102
|
+
}, [
|
|
103
|
+
create,
|
|
104
|
+
destroy,
|
|
105
|
+
update
|
|
106
|
+
]);
|
|
107
|
+
(0, _useClientLayoutEffect.useClientLayoutEffect)(()=>{
|
|
108
|
+
if (!update()) {
|
|
109
|
+
destroy();
|
|
110
|
+
viewDescRef.current = create();
|
|
111
|
+
}
|
|
112
|
+
const viewDesc = viewDescRef.current;
|
|
113
|
+
if (!viewDesc) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const parent = parentRef.current;
|
|
117
|
+
const siblings = siblingsRef.current;
|
|
118
|
+
const children = childrenRef.current;
|
|
119
|
+
viewDesc.parent = parent;
|
|
120
|
+
(0, _viewdesc.placeViewDesc)(siblings, viewDesc);
|
|
121
|
+
for (const child of children){
|
|
122
|
+
child.parent = viewDesc;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
const childContextValue = (0, _react.useMemo)(()=>({
|
|
126
|
+
parentRef: viewDescRef,
|
|
127
|
+
siblingsRef: childrenRef
|
|
128
|
+
}), []);
|
|
129
|
+
return {
|
|
130
|
+
childContextValue,
|
|
131
|
+
contentDOM: contentDOMRef.current ?? viewDescRef.current?.dom,
|
|
132
|
+
refUpdated
|
|
133
|
+
};
|
|
134
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useNodePos", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useNodePos;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _NodeView = require("../components/nodes/NodeView.js");
|
|
13
|
+
const _useEditorState = require("./useEditorState.js");
|
|
14
|
+
function useNodePos() {
|
|
15
|
+
(0, _useEditorState.useEditorState)();
|
|
16
|
+
const getPos = (0, _react.useContext)(_NodeView.GetPosContext);
|
|
17
|
+
return getPos();
|
|
18
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useNodeViewDescription", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useNodeViewDescription;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _ReactEditorView = require("../ReactEditorView.js");
|
|
13
|
+
const _ChildDescriptionsContext = require("../contexts/ChildDescriptionsContext.js");
|
|
14
|
+
const _EditorContext = require("../contexts/EditorContext.js");
|
|
15
|
+
const _viewdesc = require("../viewdesc.js");
|
|
16
|
+
const _useClientLayoutEffect = require("./useClientLayoutEffect.js");
|
|
17
|
+
const _useEffectEvent = require("./useEffectEvent.js");
|
|
18
|
+
function useNodeViewDescription(getDOM, getContentDOM, constructor, props) {
|
|
19
|
+
const mountedRef = (0, _react.useRef)(false);
|
|
20
|
+
const { view } = (0, _react.useContext)(_EditorContext.EditorContext);
|
|
21
|
+
const { parentRef, siblingsRef } = (0, _react.useContext)(_ChildDescriptionsContext.ChildDescriptionsContext);
|
|
22
|
+
const contentDOMRef = (0, _react.useRef)(null);
|
|
23
|
+
const viewDescRef = (0, _react.useRef)();
|
|
24
|
+
const childrenRef = (0, _react.useRef)([]);
|
|
25
|
+
const create = (0, _useEffectEvent.useEffectEvent)(()=>{
|
|
26
|
+
if (!(view instanceof _ReactEditorView.ReactEditorView)) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const dom = getDOM();
|
|
30
|
+
if (!dom) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const { node, getPos, decorations, innerDecorations } = props;
|
|
34
|
+
const nodeView = constructor(node, view, getPos, decorations, innerDecorations);
|
|
35
|
+
if (!nodeView) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const parent = parentRef.current;
|
|
39
|
+
const children = childrenRef.current;
|
|
40
|
+
const contentDOM = getContentDOM(nodeView);
|
|
41
|
+
const nodeDOM = nodeView.dom;
|
|
42
|
+
const viewDesc = new _viewdesc.ReactNodeViewDesc(parent, children, getPos, node, decorations, innerDecorations, dom, contentDOM, nodeDOM, nodeView);
|
|
43
|
+
for (const child of children){
|
|
44
|
+
child.parent = viewDesc;
|
|
45
|
+
}
|
|
46
|
+
(0, _viewdesc.placeViewDesc)(siblingsRef.current, viewDesc);
|
|
47
|
+
contentDOMRef.current = getContentDOM(nodeView);
|
|
48
|
+
return viewDesc;
|
|
49
|
+
});
|
|
50
|
+
const update = (0, _useEffectEvent.useEffectEvent)(()=>{
|
|
51
|
+
if (!(view instanceof _ReactEditorView.ReactEditorView)) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
const viewDesc = viewDescRef.current;
|
|
55
|
+
if (!viewDesc) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const dom = getDOM();
|
|
59
|
+
if (!dom || dom !== viewDesc.dom) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
const contentDOM = getContentDOM(viewDesc);
|
|
63
|
+
if (contentDOM !== viewDesc.contentDOM) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (!dom.contains(viewDesc.nodeDOM)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const { node, decorations, innerDecorations } = props;
|
|
70
|
+
return viewDesc.matchesNode(node, decorations, innerDecorations) || viewDesc.update(node, decorations, innerDecorations, view);
|
|
71
|
+
});
|
|
72
|
+
const destroy = (0, _useEffectEvent.useEffectEvent)(()=>{
|
|
73
|
+
const viewDesc = viewDescRef.current;
|
|
74
|
+
if (!viewDesc) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
viewDescRef.current = undefined;
|
|
78
|
+
viewDesc.destroy();
|
|
79
|
+
const siblings = siblingsRef.current;
|
|
80
|
+
if (siblings.includes(viewDesc)) {
|
|
81
|
+
const index = siblings.indexOf(viewDesc);
|
|
82
|
+
siblings.splice(index, 1);
|
|
83
|
+
}
|
|
84
|
+
contentDOMRef.current = null;
|
|
85
|
+
});
|
|
86
|
+
(0, _useClientLayoutEffect.useClientLayoutEffect)(()=>{
|
|
87
|
+
mountedRef.current = true;
|
|
88
|
+
viewDescRef.current = create();
|
|
89
|
+
return ()=>{
|
|
90
|
+
mountedRef.current = false;
|
|
91
|
+
destroy();
|
|
92
|
+
};
|
|
93
|
+
}, [
|
|
94
|
+
create,
|
|
95
|
+
destroy
|
|
96
|
+
]);
|
|
97
|
+
const refUpdated = (0, _react.useCallback)(()=>{
|
|
98
|
+
if (!mountedRef.current) return;
|
|
99
|
+
if (!update()) {
|
|
100
|
+
destroy();
|
|
101
|
+
viewDescRef.current = create();
|
|
102
|
+
}
|
|
103
|
+
}, [
|
|
104
|
+
create,
|
|
105
|
+
destroy,
|
|
106
|
+
update
|
|
107
|
+
]);
|
|
108
|
+
(0, _useClientLayoutEffect.useClientLayoutEffect)(()=>{
|
|
109
|
+
if (!update()) {
|
|
110
|
+
destroy();
|
|
111
|
+
viewDescRef.current = create();
|
|
112
|
+
}
|
|
113
|
+
const viewDesc = viewDescRef.current;
|
|
114
|
+
if (!viewDesc) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (view.dom === viewDesc.dom && view instanceof _ReactEditorView.ReactEditorView) {
|
|
118
|
+
view.docView = viewDesc;
|
|
119
|
+
}
|
|
120
|
+
const parent = parentRef.current;
|
|
121
|
+
const siblings = siblingsRef.current;
|
|
122
|
+
const children = childrenRef.current;
|
|
123
|
+
viewDesc.parent = parent;
|
|
124
|
+
// In strict/concurrent mode, a node can sometimes re-render
|
|
125
|
+
// entirely on its own, without even its parent re-rendering.
|
|
126
|
+
// In this case, we will have added our view descriptions to
|
|
127
|
+
// our parent's children, but our parent has no opportunity
|
|
128
|
+
// to sort its children, because it never renders. So
|
|
129
|
+
// we always place ourselves among our siblings, too.
|
|
130
|
+
(0, _viewdesc.placeViewDesc)(siblings, viewDesc);
|
|
131
|
+
// If a child updates, usually it will re-render and sort
|
|
132
|
+
// our children for us. But it's possible to reorder
|
|
133
|
+
// child nodes without changing their keys or node
|
|
134
|
+
// instances, in which case our children _won't_
|
|
135
|
+
// rerender. As a fallback, we do one last pass through
|
|
136
|
+
// our own child view descriptions and make sure
|
|
137
|
+
// they're ordered. This should be a cheap no-op in most cases.
|
|
138
|
+
children.sort(_viewdesc.sortViewDescs);
|
|
139
|
+
for (const child of children){
|
|
140
|
+
child.parent = viewDesc;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
const childContextValue = (0, _react.useMemo)(()=>({
|
|
144
|
+
parentRef: viewDescRef,
|
|
145
|
+
siblingsRef: childrenRef
|
|
146
|
+
}), []);
|
|
147
|
+
const isMounted = (0, _react.useCallback)(()=>mountedRef.current, []);
|
|
148
|
+
return {
|
|
149
|
+
childContextValue,
|
|
150
|
+
contentDOM: contentDOMRef.current,
|
|
151
|
+
refUpdated,
|
|
152
|
+
isMounted
|
|
153
|
+
};
|
|
154
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useReactKeys", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useReactKeys;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _EditorContext = require("../contexts/EditorContext.js");
|
|
13
|
+
const _reactKeys = require("../plugins/reactKeys.js");
|
|
14
|
+
function useReactKeys() {
|
|
15
|
+
const { view } = (0, _react.useContext)(_EditorContext.EditorContext);
|
|
16
|
+
return _reactKeys.reactKeysPluginKey.getState(view.state);
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useSelectNode", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useSelectNode;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _SelectNodeContext = require("../contexts/SelectNodeContext.js");
|
|
13
|
+
const _useEditorEffect = require("./useEditorEffect.js");
|
|
14
|
+
const _useEditorEventCallback = require("./useEditorEventCallback.js");
|
|
15
|
+
function noop() {
|
|
16
|
+
// empty
|
|
17
|
+
}
|
|
18
|
+
function useSelectNode(selectNode) {
|
|
19
|
+
let deselectNode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : noop;
|
|
20
|
+
const register = (0, _react.useContext)(_SelectNodeContext.SelectNodeContext);
|
|
21
|
+
const selectNodeMemo = (0, _useEditorEventCallback.useEditorEventCallback)(selectNode);
|
|
22
|
+
const deselectNodeMemo = (0, _useEditorEventCallback.useEditorEventCallback)(deselectNode);
|
|
23
|
+
return (0, _useEditorEffect.useEditorEffect)(()=>{
|
|
24
|
+
return register(selectNodeMemo, deselectNodeMemo);
|
|
25
|
+
}, [
|
|
26
|
+
register,
|
|
27
|
+
selectNodeMemo,
|
|
28
|
+
deselectNodeMemo
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useSetDom", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useSetDom;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
function useSetDom(domRef, refUpdated, isMounted, forceUpdate) {
|
|
13
|
+
const pendingRef = (0, _react.useRef)(false);
|
|
14
|
+
return (0, _react.useCallback)((el)=>{
|
|
15
|
+
if (el !== null) {
|
|
16
|
+
pendingRef.current = false;
|
|
17
|
+
const changed = domRef.current !== el;
|
|
18
|
+
domRef.current = el;
|
|
19
|
+
if (changed) forceUpdate?.();
|
|
20
|
+
refUpdated();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (pendingRef.current) return;
|
|
24
|
+
pendingRef.current = true;
|
|
25
|
+
// React calls old ref callbacks with
|
|
26
|
+
// null before synchronously calling
|
|
27
|
+
// new ref callbacks with the existing
|
|
28
|
+
// element ref. We don't have any
|
|
29
|
+
// way to distinguish a call with null
|
|
30
|
+
// because the downstream callback is
|
|
31
|
+
// unstable and being replaced during render
|
|
32
|
+
// from a call with null because the referenced
|
|
33
|
+
// element has been unmounted.
|
|
34
|
+
//
|
|
35
|
+
// Since the ref callback calls are synchronous,
|
|
36
|
+
// we can queue a microtask and check
|
|
37
|
+
// whether the ref is still null at
|
|
38
|
+
// the end of this event loop task. If it
|
|
39
|
+
// is, we actually unmounted. If it's not,
|
|
40
|
+
// we already handled it in the synchronous
|
|
41
|
+
// branch above, so we just bail.
|
|
42
|
+
queueMicrotask(()=>{
|
|
43
|
+
if (!pendingRef.current) return;
|
|
44
|
+
pendingRef.current = false;
|
|
45
|
+
if (domRef.current !== null) {
|
|
46
|
+
domRef.current = null;
|
|
47
|
+
if (isMounted?.()) forceUpdate?.();
|
|
48
|
+
}
|
|
49
|
+
refUpdated();
|
|
50
|
+
});
|
|
51
|
+
}, [
|
|
52
|
+
domRef,
|
|
53
|
+
forceUpdate,
|
|
54
|
+
isMounted,
|
|
55
|
+
refUpdated
|
|
56
|
+
]);
|
|
57
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useStopEvent", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useStopEvent;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
const _StopEventContext = require("../contexts/StopEventContext.js");
|
|
13
|
+
const _useEditorEffect = require("./useEditorEffect.js");
|
|
14
|
+
const _useEditorEventCallback = require("./useEditorEventCallback.js");
|
|
15
|
+
function useStopEvent(stopEvent) {
|
|
16
|
+
const register = (0, _react.useContext)(_StopEventContext.StopEventContext);
|
|
17
|
+
const stopEventMemo = (0, _useEditorEventCallback.useEditorEventCallback)(stopEvent);
|
|
18
|
+
(0, _useEditorEffect.useEditorEffect)(()=>{
|
|
19
|
+
return register(stopEventMemo);
|
|
20
|
+
}, [
|
|
21
|
+
register,
|
|
22
|
+
stopEventMemo
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* Copyright (c) The New York Times Company */ "use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
ProseMirror: function() {
|
|
14
|
+
return _ProseMirror.ProseMirror;
|
|
15
|
+
},
|
|
16
|
+
ProseMirrorDoc: function() {
|
|
17
|
+
return _ProseMirrorDoc.ProseMirrorDoc;
|
|
18
|
+
},
|
|
19
|
+
reactKeys: function() {
|
|
20
|
+
return _reactKeys.reactKeys;
|
|
21
|
+
},
|
|
22
|
+
reorderSiblings: function() {
|
|
23
|
+
return _reorderSiblings.reorderSiblings;
|
|
24
|
+
},
|
|
25
|
+
useEditorEffect: function() {
|
|
26
|
+
return _useEditorEffect.useEditorEffect;
|
|
27
|
+
},
|
|
28
|
+
useEditorEventCallback: function() {
|
|
29
|
+
return _useEditorEventCallback.useEditorEventCallback;
|
|
30
|
+
},
|
|
31
|
+
useEditorEventListener: function() {
|
|
32
|
+
return _useEditorEventListener.useEditorEventListener;
|
|
33
|
+
},
|
|
34
|
+
useEditorState: function() {
|
|
35
|
+
return _useEditorState.useEditorState;
|
|
36
|
+
},
|
|
37
|
+
useEditorStateSelector: function() {
|
|
38
|
+
return _useEditorStateSelector.useEditorStateSelector;
|
|
39
|
+
},
|
|
40
|
+
useIgnoreMutation: function() {
|
|
41
|
+
return _useIgnoreMutation.useIgnoreMutation;
|
|
42
|
+
},
|
|
43
|
+
useIsComposingIn: function() {
|
|
44
|
+
return _useIsComposingIn.useIsComposingIn;
|
|
45
|
+
},
|
|
46
|
+
useIsEditorStatic: function() {
|
|
47
|
+
return _useIsEditorStatic.useIsEditorStatic;
|
|
48
|
+
},
|
|
49
|
+
useIsNodeSelected: function() {
|
|
50
|
+
return _useIsNodeSelected.useIsNodeSelected;
|
|
51
|
+
},
|
|
52
|
+
useMergedDOMRefs: function() {
|
|
53
|
+
return _refs.useMergedDOMRefs;
|
|
54
|
+
},
|
|
55
|
+
useNodePos: function() {
|
|
56
|
+
return _useNodePos.useNodePos;
|
|
57
|
+
},
|
|
58
|
+
useSelectNode: function() {
|
|
59
|
+
return _useSelectNode.useSelectNode;
|
|
60
|
+
},
|
|
61
|
+
useStopEvent: function() {
|
|
62
|
+
return _useStopEvent.useStopEvent;
|
|
63
|
+
},
|
|
64
|
+
widget: function() {
|
|
65
|
+
return _ReactWidgetType.widget;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const _ProseMirror = require("./components/ProseMirror.js");
|
|
69
|
+
const _ProseMirrorDoc = require("./components/ProseMirrorDoc.js");
|
|
70
|
+
const _reorderSiblings = require("./commands/reorderSiblings.js");
|
|
71
|
+
const _useIsComposingIn = require("./hooks/useIsComposingIn.js");
|
|
72
|
+
const _useEditorEffect = require("./hooks/useEditorEffect.js");
|
|
73
|
+
const _useEditorEventCallback = require("./hooks/useEditorEventCallback.js");
|
|
74
|
+
const _useEditorEventListener = require("./hooks/useEditorEventListener.js");
|
|
75
|
+
const _useEditorState = require("./hooks/useEditorState.js");
|
|
76
|
+
const _useNodePos = require("./hooks/useNodePos.js");
|
|
77
|
+
const _useEditorStateSelector = require("./hooks/useEditorStateSelector.js");
|
|
78
|
+
const _useStopEvent = require("./hooks/useStopEvent.js");
|
|
79
|
+
const _useSelectNode = require("./hooks/useSelectNode.js");
|
|
80
|
+
const _useIgnoreMutation = require("./hooks/useIgnoreMutation.js");
|
|
81
|
+
const _useIsEditorStatic = require("./hooks/useIsEditorStatic.js");
|
|
82
|
+
const _useIsNodeSelected = require("./hooks/useIsNodeSelected.js");
|
|
83
|
+
const _reactKeys = require("./plugins/reactKeys.js");
|
|
84
|
+
const _ReactWidgetType = require("./decorations/ReactWidgetType.js");
|
|
85
|
+
const _refs = require("./refs.js");
|