@handlewithcare/react-prosemirror 3.1.0-tiptap.40 → 3.1.0-tiptap.42
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/README.md +2 -2
- package/dist/cjs/ReactEditorView.js +71 -75
- package/dist/cjs/StaticEditorView.js +19 -22
- package/dist/cjs/browser.js +1 -3
- package/dist/cjs/commands/reorderSiblings.js +9 -13
- package/dist/cjs/components/ChildNodeViews.js +68 -71
- package/dist/cjs/components/CursorWrapper.js +26 -17
- package/dist/cjs/components/LayoutGroup.js +12 -16
- package/dist/cjs/components/NativeWidgetView.js +15 -19
- package/dist/cjs/components/OutputSpec.js +9 -13
- package/dist/cjs/components/ProseMirror.js +37 -27
- package/dist/cjs/components/ProseMirrorDoc.js +25 -18
- package/dist/cjs/components/SeparatorHackView.js +20 -21
- package/dist/cjs/components/TextNodeView.js +22 -20
- package/dist/cjs/components/TrailingHackView.js +13 -17
- package/dist/cjs/components/WidgetView.js +14 -18
- package/dist/cjs/components/marks/DefaultMarkView.js +27 -15
- package/dist/cjs/components/marks/MarkView.js +32 -23
- package/dist/cjs/components/marks/MarkViewConstructorView.js +38 -22
- package/dist/cjs/components/marks/ReactMarkView.js +27 -16
- package/dist/cjs/components/nodes/DefaultNodeView.js +27 -15
- package/dist/cjs/components/nodes/DocNodeView.js +12 -16
- package/dist/cjs/components/nodes/NodeView.js +33 -26
- package/dist/cjs/components/nodes/NodeViewConstructorView.js +45 -29
- package/dist/cjs/components/nodes/ReactNodeView.js +39 -27
- package/dist/cjs/constants.js +6 -10
- package/dist/cjs/contexts/ChildDescriptionsContext.js +1 -3
- package/dist/cjs/contexts/EditorContext.js +1 -3
- package/dist/cjs/contexts/EditorStateContext.js +1 -3
- package/dist/cjs/contexts/IgnoreMutationContext.js +1 -3
- package/dist/cjs/contexts/LayoutGroupContext.js +1 -3
- package/dist/cjs/contexts/NodeViewContext.js +1 -3
- package/dist/cjs/contexts/SelectNodeContext.js +1 -3
- package/dist/cjs/contexts/StopEventContext.js +1 -3
- package/dist/cjs/decorations/ReactWidgetType.js +13 -19
- package/dist/cjs/decorations/computeDocDeco.js +3 -5
- package/dist/cjs/decorations/iterDeco.js +17 -19
- package/dist/cjs/decorations/viewDecorations.js +12 -15
- package/dist/cjs/dom.js +13 -34
- package/dist/cjs/findDOMNode.js +5 -9
- package/dist/cjs/hooks/useClientLayoutEffect.js +1 -3
- package/dist/cjs/hooks/useComponentEventListeners.js +6 -7
- package/dist/cjs/hooks/useEditor.js +30 -28
- package/dist/cjs/hooks/useEditorEffect.js +7 -9
- package/dist/cjs/hooks/useEditorEventCallback.js +7 -9
- package/dist/cjs/hooks/useEditorEventListener.js +6 -8
- package/dist/cjs/hooks/useEditorState.js +3 -5
- package/dist/cjs/hooks/useEffectEvent.js +1 -3
- package/dist/cjs/hooks/useForceUpdate.js +1 -3
- package/dist/cjs/hooks/useIgnoreMutation.js +7 -9
- package/dist/cjs/hooks/useIsEditorStatic.js +5 -5
- package/dist/cjs/hooks/useIsNodeSelected.js +3 -5
- package/dist/cjs/hooks/useLayoutGroupEffect.js +5 -7
- package/dist/cjs/hooks/useMarkViewDescription.js +25 -24
- package/dist/cjs/hooks/useNodePos.js +5 -7
- package/dist/cjs/hooks/useNodeViewDescription.js +41 -28
- package/dist/cjs/hooks/useReactKeys.js +5 -7
- package/dist/cjs/hooks/useSelectNode.js +8 -10
- package/dist/cjs/hooks/useStopEvent.js +7 -9
- package/dist/cjs/index.js +34 -66
- package/dist/cjs/plugins/beforeInputPlugin.js +23 -20
- package/dist/cjs/plugins/componentEventListeners.js +6 -8
- package/dist/cjs/plugins/componentEventListenersPlugin.js +6 -8
- package/dist/cjs/plugins/reactKeys.js +10 -15
- package/dist/cjs/props.js +19 -23
- package/dist/cjs/refs.js +1 -3
- package/dist/cjs/testing/editorViewTestHelpers.js +47 -40
- package/dist/cjs/testing/setupProseMirrorView.js +4 -7
- package/dist/cjs/tiptap/ReactProseMirrorNodeView.js +6 -10
- package/dist/cjs/tiptap/TiptapEditor.js +14 -15
- package/dist/cjs/tiptap/TiptapEditorContent.js +28 -18
- package/dist/cjs/tiptap/TiptapEditorView.js +34 -23
- package/dist/cjs/tiptap/contexts/TiptapEditorContext.js +1 -3
- package/dist/cjs/tiptap/extensions/ReactProseMirror.js +6 -8
- package/dist/cjs/tiptap/extensions/ReactProseMirrorCommands.js +3 -5
- package/dist/cjs/tiptap/extensions/commands/updateAttributes.js +2 -4
- package/dist/cjs/tiptap/hooks/useIsInReactProseMirror.js +3 -5
- package/dist/cjs/tiptap/hooks/useTiptapEditor.js +14 -12
- package/dist/cjs/tiptap/hooks/useTiptapEditorEffect.js +10 -12
- package/dist/cjs/tiptap/hooks/useTiptapEditorEventCallback.js +4 -6
- package/dist/cjs/tiptap/index.js +18 -36
- package/dist/cjs/tiptap/tiptapNodeView.js +62 -48
- package/dist/cjs/viewdesc.js +95 -119
- package/dist/esm/ReactEditorView.js +67 -69
- package/dist/esm/StaticEditorView.js +18 -19
- package/dist/esm/commands/reorderSiblings.js +5 -5
- package/dist/esm/components/ChildNodeViews.js +36 -33
- package/dist/esm/components/CursorWrapper.js +18 -5
- package/dist/esm/components/LayoutGroup.js +1 -1
- package/dist/esm/components/NativeWidgetView.js +2 -2
- package/dist/esm/components/OutputSpec.js +1 -1
- package/dist/esm/components/ProseMirror.js +17 -3
- package/dist/esm/components/ProseMirrorDoc.js +19 -6
- package/dist/esm/components/SeparatorHackView.js +8 -5
- package/dist/esm/components/TextNodeView.js +10 -6
- package/dist/esm/components/TrailingHackView.js +2 -2
- package/dist/esm/components/WidgetView.js +3 -3
- package/dist/esm/components/marks/DefaultMarkView.js +22 -6
- package/dist/esm/components/marks/MarkView.js +24 -11
- package/dist/esm/components/marks/MarkViewConstructorView.js +27 -7
- package/dist/esm/components/marks/ReactMarkView.js +18 -3
- package/dist/esm/components/nodes/DefaultNodeView.js +22 -6
- package/dist/esm/components/nodes/DocNodeView.js +2 -2
- package/dist/esm/components/nodes/NodeView.js +24 -11
- package/dist/esm/components/nodes/NodeViewConstructorView.js +31 -11
- package/dist/esm/components/nodes/ReactNodeView.js +22 -6
- package/dist/esm/decorations/ReactWidgetType.js +8 -10
- package/dist/esm/decorations/iterDeco.js +13 -13
- package/dist/esm/decorations/viewDecorations.js +6 -7
- package/dist/esm/dom.js +2 -1
- package/dist/esm/findDOMNode.js +1 -1
- package/dist/esm/hooks/useComponentEventListeners.js +3 -2
- package/dist/esm/hooks/useEditor.js +9 -5
- package/dist/esm/hooks/useEditorEffect.js +1 -1
- package/dist/esm/hooks/useEditorEventCallback.js +1 -1
- package/dist/esm/hooks/useEditorEventListener.js +1 -1
- package/dist/esm/hooks/useIsEditorStatic.js +3 -1
- package/dist/esm/hooks/useMarkViewDescription.js +10 -7
- package/dist/esm/hooks/useNodeViewDescription.js +22 -7
- package/dist/esm/hooks/useReactKeys.js +1 -1
- package/dist/esm/plugins/beforeInputPlugin.js +17 -12
- package/dist/esm/plugins/reactKeys.js +4 -3
- package/dist/esm/props.js +15 -15
- package/dist/esm/testing/editorViewTestHelpers.js +31 -20
- package/dist/esm/testing/setupProseMirrorView.js +2 -1
- package/dist/esm/tiptap/ReactProseMirrorNodeView.js +5 -7
- package/dist/esm/tiptap/TiptapEditor.js +10 -9
- package/dist/esm/tiptap/TiptapEditorContent.js +18 -4
- package/dist/esm/tiptap/TiptapEditorView.js +23 -8
- package/dist/esm/tiptap/extensions/ReactProseMirror.js +1 -1
- package/dist/esm/tiptap/extensions/commands/updateAttributes.js +1 -1
- package/dist/esm/tiptap/hooks/useTiptapEditor.js +8 -4
- package/dist/esm/tiptap/hooks/useTiptapEditorEffect.js +4 -4
- package/dist/esm/tiptap/hooks/useTiptapEditorEventCallback.js +1 -1
- package/dist/esm/tiptap/tiptapNodeView.js +38 -20
- package/dist/esm/viewdesc.js +72 -74
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/ReactEditorView.d.ts +2 -2
- package/dist/types/StaticEditorView.d.ts +2 -1
- package/dist/types/props.d.ts +26 -26
- package/dist/types/viewdesc.d.ts +2 -0
- package/package.json +10 -6
|
@@ -4,12 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "DefaultNodeView", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return DefaultNodeView;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>DefaultNodeView
|
|
10
8
|
});
|
|
11
|
-
const _react = /*#__PURE__*/
|
|
12
|
-
const
|
|
9
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
10
|
+
const _outputSpecJs = require("../OutputSpec.js");
|
|
11
|
+
function _extends() {
|
|
12
|
+
_extends = Object.assign || function(target) {
|
|
13
|
+
for(var i = 1; i < arguments.length; i++){
|
|
14
|
+
var source = arguments[i];
|
|
15
|
+
for(var key in source){
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
+
target[key] = source[key];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return target;
|
|
22
|
+
};
|
|
23
|
+
return _extends.apply(this, arguments);
|
|
24
|
+
}
|
|
13
25
|
function _getRequireWildcardCache(nodeInterop) {
|
|
14
26
|
if (typeof WeakMap !== "function") return null;
|
|
15
27
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -18,7 +30,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
18
30
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
19
31
|
})(nodeInterop);
|
|
20
32
|
}
|
|
21
|
-
function
|
|
33
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
22
34
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
23
35
|
return obj;
|
|
24
36
|
}
|
|
@@ -31,9 +43,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
31
43
|
if (cache && cache.has(obj)) {
|
|
32
44
|
return cache.get(obj);
|
|
33
45
|
}
|
|
34
|
-
var newObj = {
|
|
35
|
-
__proto__: null
|
|
36
|
-
};
|
|
46
|
+
var newObj = {};
|
|
37
47
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
38
48
|
for(var key in obj){
|
|
39
49
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -52,17 +62,19 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
52
62
|
return newObj;
|
|
53
63
|
}
|
|
54
64
|
const DefaultNodeView = /*#__PURE__*/ (0, _react.forwardRef)(function DefaultNodeView(param, ref) {
|
|
55
|
-
let { nodeProps: { node, contentDOMRef
|
|
56
|
-
const spec = (0, _react.useMemo)(()=>
|
|
65
|
+
let { nodeProps: { node , contentDOMRef } , children , ...props } = param;
|
|
66
|
+
const spec = (0, _react.useMemo)(()=>{
|
|
67
|
+
var _spec, ref;
|
|
68
|
+
return (ref = (_spec = node.type.spec).toDOM) === null || ref === void 0 ? void 0 : ref.call(_spec, node);
|
|
69
|
+
}, [
|
|
57
70
|
node
|
|
58
71
|
]);
|
|
59
72
|
if (!spec) {
|
|
60
|
-
throw new Error(
|
|
73
|
+
throw new Error("Node spec for ".concat(node.type.name, " is missing toDOM"));
|
|
61
74
|
}
|
|
62
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
63
|
-
...props,
|
|
75
|
+
return /*#__PURE__*/ _react.default.createElement(_outputSpecJs.OutputSpec, _extends({}, props, {
|
|
64
76
|
outputSpec: spec,
|
|
65
77
|
ref: ref,
|
|
66
78
|
contentDOMRef: contentDOMRef
|
|
67
|
-
}, children);
|
|
79
|
+
}), children);
|
|
68
80
|
});
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "DocNodeView", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return DocNodeView;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>DocNodeView
|
|
10
8
|
});
|
|
11
|
-
const _react = /*#__PURE__*/
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
9
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
10
|
+
const _childDescriptionsContextJs = require("../../contexts/ChildDescriptionsContext.js");
|
|
11
|
+
const _useNodeViewDescriptionJs = require("../../hooks/useNodeViewDescription.js");
|
|
12
|
+
const _childNodeViewsJs = require("../ChildNodeViews.js");
|
|
15
13
|
function _getRequireWildcardCache(nodeInterop) {
|
|
16
14
|
if (typeof WeakMap !== "function") return null;
|
|
17
15
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -20,7 +18,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
20
18
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
21
19
|
})(nodeInterop);
|
|
22
20
|
}
|
|
23
|
-
function
|
|
21
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
24
22
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
25
23
|
return obj;
|
|
26
24
|
}
|
|
@@ -33,9 +31,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
33
31
|
if (cache && cache.has(obj)) {
|
|
34
32
|
return cache.get(obj);
|
|
35
33
|
}
|
|
36
|
-
var newObj = {
|
|
37
|
-
__proto__: null
|
|
38
|
-
};
|
|
34
|
+
var newObj = {};
|
|
39
35
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
40
36
|
for(var key in obj){
|
|
41
37
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -54,7 +50,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
54
50
|
return newObj;
|
|
55
51
|
}
|
|
56
52
|
const DocNodeView = /*#__PURE__*/ (0, _react.memo)(/*#__PURE__*/ (0, _react.forwardRef)(function DocNodeView(param, ref) {
|
|
57
|
-
let { as, node, getPos, decorations, innerDecorations, setMount, ...elementProps } = param;
|
|
53
|
+
let { as , node , getPos , decorations , innerDecorations , setMount , ...elementProps } = param;
|
|
58
54
|
const innerRef = (0, _react.useRef)(null);
|
|
59
55
|
(0, _react.useImperativeHandle)(ref, ()=>innerRef.current);
|
|
60
56
|
(0, _react.useImperativeHandle)(setMount, ()=>innerRef.current);
|
|
@@ -70,7 +66,7 @@ const DocNodeView = /*#__PURE__*/ (0, _react.memo)(/*#__PURE__*/ (0, _react.forw
|
|
|
70
66
|
decorations,
|
|
71
67
|
innerDecorations
|
|
72
68
|
]);
|
|
73
|
-
const { childContextValue
|
|
69
|
+
const { childContextValue } = (0, _useNodeViewDescriptionJs.useNodeViewDescription)(()=>innerRef.current, ()=>innerRef.current, ()=>{
|
|
74
70
|
const dom = innerRef.current;
|
|
75
71
|
return {
|
|
76
72
|
dom,
|
|
@@ -80,9 +76,9 @@ const DocNodeView = /*#__PURE__*/ (0, _react.memo)(/*#__PURE__*/ (0, _react.forw
|
|
|
80
76
|
}
|
|
81
77
|
};
|
|
82
78
|
}, nodeProps);
|
|
83
|
-
const children = /*#__PURE__*/ _react.default.createElement(
|
|
79
|
+
const children = /*#__PURE__*/ _react.default.createElement(_childDescriptionsContextJs.ChildDescriptionsContext.Provider, {
|
|
84
80
|
value: childContextValue
|
|
85
|
-
}, /*#__PURE__*/ _react.default.createElement(
|
|
81
|
+
}, /*#__PURE__*/ _react.default.createElement(_childNodeViewsJs.ChildNodeViews, {
|
|
86
82
|
getPos: getPos,
|
|
87
83
|
node: node,
|
|
88
84
|
innerDecorations: innerDecorations
|
|
@@ -93,5 +89,5 @@ const DocNodeView = /*#__PURE__*/ (0, _react.memo)(/*#__PURE__*/ (0, _react.forw
|
|
|
93
89
|
ref: innerRef
|
|
94
90
|
};
|
|
95
91
|
const element = as ? /*#__PURE__*/ (0, _react.createElement)(as, props, children) : /*#__PURE__*/ (0, _react.createElement)("div", props, children);
|
|
96
|
-
return nodeProps.decorations.reduce(
|
|
92
|
+
return nodeProps.decorations.reduce(_childNodeViewsJs.wrapInDeco, element);
|
|
97
93
|
}));
|
|
@@ -9,18 +9,28 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
NodeView: function() {
|
|
16
|
-
return NodeView;
|
|
17
|
-
}
|
|
12
|
+
NodeView: ()=>NodeView,
|
|
13
|
+
GetPosContext: ()=>GetPosContext
|
|
18
14
|
});
|
|
19
|
-
const _react = /*#__PURE__*/
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
15
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
16
|
+
const _nodeViewContextJs = require("../../contexts/NodeViewContext.js");
|
|
17
|
+
const _defaultNodeViewJs = require("./DefaultNodeView.js");
|
|
18
|
+
const _nodeViewConstructorViewJs = require("./NodeViewConstructorView.js");
|
|
19
|
+
const _reactNodeViewJs = require("./ReactNodeView.js");
|
|
20
|
+
function _extends() {
|
|
21
|
+
_extends = Object.assign || function(target) {
|
|
22
|
+
for(var i = 1; i < arguments.length; i++){
|
|
23
|
+
var source = arguments[i];
|
|
24
|
+
for(var key in source){
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
26
|
+
target[key] = source[key];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
return _extends.apply(this, arguments);
|
|
33
|
+
}
|
|
24
34
|
function _getRequireWildcardCache(nodeInterop) {
|
|
25
35
|
if (typeof WeakMap !== "function") return null;
|
|
26
36
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -29,7 +39,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
29
39
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
30
40
|
})(nodeInterop);
|
|
31
41
|
}
|
|
32
|
-
function
|
|
42
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
33
43
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
34
44
|
return obj;
|
|
35
45
|
}
|
|
@@ -42,9 +52,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
42
52
|
if (cache && cache.has(obj)) {
|
|
43
53
|
return cache.get(obj);
|
|
44
54
|
}
|
|
45
|
-
var newObj = {
|
|
46
|
-
__proto__: null
|
|
47
|
-
};
|
|
55
|
+
var newObj = {};
|
|
48
56
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
49
57
|
for(var key in obj){
|
|
50
58
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -63,8 +71,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
63
71
|
return newObj;
|
|
64
72
|
}
|
|
65
73
|
const NodeView = /*#__PURE__*/ (0, _react.memo)(function NodeView(props) {
|
|
66
|
-
const { components, constructors
|
|
67
|
-
|
|
74
|
+
const { components , constructors } = (0, _react.useContext)(_nodeViewContextJs.NodeViewContext);
|
|
75
|
+
var _name;
|
|
76
|
+
const component = (_name = components[props.node.type.name]) !== null && _name !== void 0 ? _name : _defaultNodeViewJs.DefaultNodeView;
|
|
68
77
|
const constructor = constructors[props.node.type.name];
|
|
69
78
|
// Construct a wrapper component so that the node view remounts when either
|
|
70
79
|
// its component or constructor changes. A React node view would remount if
|
|
@@ -73,17 +82,15 @@ const NodeView = /*#__PURE__*/ (0, _react.memo)(function NodeView(props) {
|
|
|
73
82
|
const Component = (0, _react.useMemo)(()=>{
|
|
74
83
|
if (constructor) {
|
|
75
84
|
return function NodeView(props) {
|
|
76
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
77
|
-
constructor: constructor
|
|
78
|
-
|
|
79
|
-
});
|
|
85
|
+
return /*#__PURE__*/ _react.default.createElement(_nodeViewConstructorViewJs.NodeViewConstructorView, _extends({
|
|
86
|
+
constructor: constructor
|
|
87
|
+
}, props));
|
|
80
88
|
};
|
|
81
89
|
} else {
|
|
82
90
|
return function NodeView(props) {
|
|
83
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
84
|
-
component: component
|
|
85
|
-
|
|
86
|
-
});
|
|
91
|
+
return /*#__PURE__*/ _react.default.createElement(_reactNodeViewJs.ReactNodeView, _extends({
|
|
92
|
+
component: component
|
|
93
|
+
}, props));
|
|
87
94
|
};
|
|
88
95
|
}
|
|
89
96
|
}, [
|
|
@@ -92,6 +99,6 @@ const NodeView = /*#__PURE__*/ (0, _react.memo)(function NodeView(props) {
|
|
|
92
99
|
]);
|
|
93
100
|
return /*#__PURE__*/ _react.default.createElement(GetPosContext.Provider, {
|
|
94
101
|
value: props.getPos
|
|
95
|
-
}, /*#__PURE__*/ _react.default.createElement(Component, props));
|
|
102
|
+
}, /*#__PURE__*/ _react.default.createElement(Component, _extends({}, props)));
|
|
96
103
|
});
|
|
97
104
|
const GetPosContext = /*#__PURE__*/ (0, _react.createContext)(null);
|
|
@@ -4,17 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "NodeViewConstructorView", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return NodeViewConstructorView;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>NodeViewConstructorView
|
|
10
8
|
});
|
|
11
|
-
const
|
|
12
|
-
const _react = /*#__PURE__*/
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
9
|
+
const _prosemirrorModel = require("prosemirror-model");
|
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _reactDom = require("react-dom");
|
|
12
|
+
const _childDescriptionsContextJs = require("../../contexts/ChildDescriptionsContext.js");
|
|
13
|
+
const _useForceUpdateJs = require("../../hooks/useForceUpdate.js");
|
|
14
|
+
const _useNodeViewDescriptionJs = require("../../hooks/useNodeViewDescription.js");
|
|
15
|
+
const _childNodeViewsJs = require("../ChildNodeViews.js");
|
|
16
|
+
function _extends() {
|
|
17
|
+
_extends = Object.assign || function(target) {
|
|
18
|
+
for(var i = 1; i < arguments.length; i++){
|
|
19
|
+
var source = arguments[i];
|
|
20
|
+
for(var key in source){
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
22
|
+
target[key] = source[key];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return target;
|
|
27
|
+
};
|
|
28
|
+
return _extends.apply(this, arguments);
|
|
29
|
+
}
|
|
18
30
|
function _getRequireWildcardCache(nodeInterop) {
|
|
19
31
|
if (typeof WeakMap !== "function") return null;
|
|
20
32
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -23,7 +35,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
23
35
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
24
36
|
})(nodeInterop);
|
|
25
37
|
}
|
|
26
|
-
function
|
|
38
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
27
39
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
28
40
|
return obj;
|
|
29
41
|
}
|
|
@@ -36,9 +48,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
36
48
|
if (cache && cache.has(obj)) {
|
|
37
49
|
return cache.get(obj);
|
|
38
50
|
}
|
|
39
|
-
var newObj = {
|
|
40
|
-
__proto__: null
|
|
41
|
-
};
|
|
51
|
+
var newObj = {};
|
|
42
52
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
53
|
for(var key in obj){
|
|
44
54
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -57,10 +67,10 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
57
67
|
return newObj;
|
|
58
68
|
}
|
|
59
69
|
const NodeViewConstructorView = /*#__PURE__*/ (0, _react.memo)(function NodeViewConstructorView(param) {
|
|
60
|
-
let { constructor, node, getPos, innerDeco, outerDeco
|
|
70
|
+
let { constructor , node , getPos , innerDeco , outerDeco } = param;
|
|
61
71
|
const ref = (0, _react.useRef)(null);
|
|
62
72
|
const innerRef = (0, _react.useRef)(null);
|
|
63
|
-
const forceUpdate = (0,
|
|
73
|
+
const forceUpdate = (0, _useForceUpdateJs.useForceUpdate)();
|
|
64
74
|
const nodeProps = (0, _react.useMemo)(()=>({
|
|
65
75
|
node,
|
|
66
76
|
getPos,
|
|
@@ -81,22 +91,28 @@ const NodeViewConstructorView = /*#__PURE__*/ (0, _react.memo)(function NodeView
|
|
|
81
91
|
}
|
|
82
92
|
const nodeView = constructor(...args);
|
|
83
93
|
if (!nodeView || !nodeView.dom) {
|
|
84
|
-
|
|
94
|
+
var _spec, ref;
|
|
95
|
+
const spec = (ref = (_spec = node.type.spec).toDOM) === null || ref === void 0 ? void 0 : ref.call(_spec, node);
|
|
85
96
|
if (!spec) {
|
|
86
|
-
throw new Error(
|
|
97
|
+
throw new Error("Node spec for ".concat(node.type.name, " is missing toDOM"));
|
|
87
98
|
}
|
|
88
|
-
return
|
|
99
|
+
return _prosemirrorModel.DOMSerializer.renderSpec(document, spec, null);
|
|
89
100
|
}
|
|
90
101
|
return nodeView;
|
|
91
102
|
};
|
|
92
|
-
|
|
103
|
+
var ref1;
|
|
104
|
+
const { childContextValue , contentDOM } = (0, _useNodeViewDescriptionJs.useNodeViewDescription)(()=>ref.current, (source)=>{
|
|
105
|
+
return (ref1 = source === null || source === void 0 ? void 0 : source.contentDOM) !== null && ref1 !== void 0 ? ref1 : null;
|
|
106
|
+
}, function() {
|
|
93
107
|
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
94
108
|
args[_key] = arguments[_key];
|
|
95
109
|
}
|
|
110
|
+
var ref1, ref2, ref3, ref4, ref5;
|
|
96
111
|
const nodeView = createNodeView(...args);
|
|
97
112
|
const contentDOM = nodeView.contentDOM;
|
|
98
113
|
const nodeDOM = nodeView.dom;
|
|
99
|
-
|
|
114
|
+
var _current;
|
|
115
|
+
const wrapperDOM = (_current = innerRef.current) !== null && _current !== void 0 ? _current : ref.current;
|
|
100
116
|
wrapperDOM.appendChild(nodeDOM);
|
|
101
117
|
if (!contentDOM && nodeDOM instanceof HTMLElement && nodeDOM.tagName !== "BR") {
|
|
102
118
|
if (!nodeDOM.hasAttribute("contenteditable")) {
|
|
@@ -121,25 +137,25 @@ const NodeViewConstructorView = /*#__PURE__*/ (0, _react.memo)(function NodeView
|
|
|
121
137
|
dom: nodeView.dom,
|
|
122
138
|
contentDOM: nodeView.contentDOM,
|
|
123
139
|
multiType: nodeView.multiType,
|
|
124
|
-
update: nodeView.update
|
|
125
|
-
selectNode: nodeView.selectNode
|
|
126
|
-
deselectNode: nodeView.deselectNode
|
|
127
|
-
stopEvent: nodeView.stopEvent
|
|
128
|
-
ignoreMutation: nodeView.ignoreMutation
|
|
140
|
+
update: (ref1 = nodeView.update) === null || ref1 === void 0 ? void 0 : ref1.bind(nodeView),
|
|
141
|
+
selectNode: (ref2 = nodeView.selectNode) === null || ref2 === void 0 ? void 0 : ref2.bind(nodeView),
|
|
142
|
+
deselectNode: (ref3 = nodeView.deselectNode) === null || ref3 === void 0 ? void 0 : ref3.bind(nodeView),
|
|
143
|
+
stopEvent: (ref4 = nodeView.stopEvent) === null || ref4 === void 0 ? void 0 : ref4.bind(nodeView),
|
|
144
|
+
ignoreMutation: (ref5 = nodeView.ignoreMutation) === null || ref5 === void 0 ? void 0 : ref5.bind(nodeView)
|
|
129
145
|
};
|
|
130
146
|
}, nodeProps);
|
|
131
147
|
const Component = node.isInline ? "span" : "div";
|
|
132
148
|
const props = {
|
|
133
149
|
ref: innerRef
|
|
134
150
|
};
|
|
135
|
-
const children = !node.isLeaf && contentDOM ? /*#__PURE__*/ (0,
|
|
151
|
+
const children = !node.isLeaf && contentDOM ? /*#__PURE__*/ (0, _reactDom.createPortal)(/*#__PURE__*/ _react.default.createElement(_childDescriptionsContextJs.ChildDescriptionsContext.Provider, {
|
|
136
152
|
value: childContextValue
|
|
137
|
-
}, /*#__PURE__*/ _react.default.createElement(
|
|
153
|
+
}, /*#__PURE__*/ _react.default.createElement(_childNodeViewsJs.ChildNodeViews, {
|
|
138
154
|
getPos: getPos,
|
|
139
155
|
node: node,
|
|
140
156
|
innerDecorations: innerDeco
|
|
141
157
|
})), contentDOM) : null;
|
|
142
|
-
return /*#__PURE__*/ (0, _react.cloneElement)(outerDeco.reduce(
|
|
158
|
+
return /*#__PURE__*/ (0, _react.cloneElement)(outerDeco.reduce(_childNodeViewsJs.wrapInDeco, /*#__PURE__*/ _react.default.createElement(Component, _extends({}, props), children)), {
|
|
143
159
|
ref
|
|
144
160
|
});
|
|
145
161
|
});
|
|
@@ -4,18 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "ReactNodeView", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return ReactNodeView;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>ReactNodeView
|
|
10
8
|
});
|
|
11
|
-
const _react = /*#__PURE__*/
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
9
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
10
|
+
const _childDescriptionsContextJs = require("../../contexts/ChildDescriptionsContext.js");
|
|
11
|
+
const _ignoreMutationContextJs = require("../../contexts/IgnoreMutationContext.js");
|
|
12
|
+
const _selectNodeContextJs = require("../../contexts/SelectNodeContext.js");
|
|
13
|
+
const _stopEventContextJs = require("../../contexts/StopEventContext.js");
|
|
14
|
+
const _useForceUpdateJs = require("../../hooks/useForceUpdate.js");
|
|
15
|
+
const _useNodeViewDescriptionJs = require("../../hooks/useNodeViewDescription.js");
|
|
16
|
+
const _childNodeViewsJs = require("../ChildNodeViews.js");
|
|
17
|
+
function _extends() {
|
|
18
|
+
_extends = Object.assign || function(target) {
|
|
19
|
+
for(var i = 1; i < arguments.length; i++){
|
|
20
|
+
var source = arguments[i];
|
|
21
|
+
for(var key in source){
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
23
|
+
target[key] = source[key];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
29
|
+
return _extends.apply(this, arguments);
|
|
30
|
+
}
|
|
19
31
|
function _getRequireWildcardCache(nodeInterop) {
|
|
20
32
|
if (typeof WeakMap !== "function") return null;
|
|
21
33
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -24,7 +36,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
24
36
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
25
37
|
})(nodeInterop);
|
|
26
38
|
}
|
|
27
|
-
function
|
|
39
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
28
40
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
29
41
|
return obj;
|
|
30
42
|
}
|
|
@@ -37,9 +49,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
37
49
|
if (cache && cache.has(obj)) {
|
|
38
50
|
return cache.get(obj);
|
|
39
51
|
}
|
|
40
|
-
var newObj = {
|
|
41
|
-
__proto__: null
|
|
42
|
-
};
|
|
52
|
+
var newObj = {};
|
|
43
53
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
44
54
|
for(var key in obj){
|
|
45
55
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -58,10 +68,11 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
58
68
|
return newObj;
|
|
59
69
|
}
|
|
60
70
|
const ReactNodeView = /*#__PURE__*/ (0, _react.memo)(function ReactNodeView(param) {
|
|
61
|
-
let { component: Component, outerDeco, getPos, node, innerDeco
|
|
71
|
+
let { component: Component , outerDeco , getPos , node , innerDeco } = param;
|
|
72
|
+
var ref, ref1;
|
|
62
73
|
const [hasCustomSelectNode, setHasCustomSelectNode] = (0, _react.useState)(false);
|
|
63
74
|
const [selected, setSelected] = (0, _react.useState)(false);
|
|
64
|
-
const forceUpdate = (0,
|
|
75
|
+
const forceUpdate = (0, _useForceUpdateJs.useForceUpdate)();
|
|
65
76
|
const domRef = (0, _react.useRef)(null);
|
|
66
77
|
const nodeDOMRef = (0, _react.useRef)(null);
|
|
67
78
|
const contentDOMRef = (0, _react.useRef)(null);
|
|
@@ -105,10 +116,11 @@ const ReactNodeView = /*#__PURE__*/ (0, _react.memo)(function ReactNodeView(para
|
|
|
105
116
|
node,
|
|
106
117
|
outerDeco
|
|
107
118
|
]);
|
|
108
|
-
const { childContextValue, refUpdated
|
|
119
|
+
const { childContextValue , refUpdated } = (0, _useNodeViewDescriptionJs.useNodeViewDescription)(()=>domRef.current, ()=>contentDOMRef.current, ()=>{
|
|
109
120
|
setSelected(false);
|
|
121
|
+
var _current;
|
|
110
122
|
return {
|
|
111
|
-
dom: nodeDOMRef.current
|
|
123
|
+
dom: (_current = nodeDOMRef.current) !== null && _current !== void 0 ? _current : domRef.current,
|
|
112
124
|
update () {
|
|
113
125
|
return true;
|
|
114
126
|
},
|
|
@@ -184,33 +196,33 @@ const ReactNodeView = /*#__PURE__*/ (0, _react.memo)(function ReactNodeView(para
|
|
|
184
196
|
]);
|
|
185
197
|
const props = {
|
|
186
198
|
nodeProps,
|
|
187
|
-
...!contentDOMRef.current && !nodeProps.node.isText && nodeDOMRef.current
|
|
199
|
+
...!contentDOMRef.current && !nodeProps.node.isText && ((ref = nodeDOMRef.current) === null || ref === void 0 ? void 0 : ref.nodeName) !== "BR" ? {
|
|
188
200
|
contentEditable: false,
|
|
189
201
|
suppressContentEditableWarning: true
|
|
190
202
|
} : null,
|
|
191
203
|
...!hasCustomSelectNode && selected ? {
|
|
192
204
|
className: "ProseMirror-selectednode"
|
|
193
205
|
} : null,
|
|
194
|
-
...!hasCustomSelectNode && selected || !contentDOMRef.current && !nodeProps.node.isText && domRef.current
|
|
206
|
+
...!hasCustomSelectNode && selected || !contentDOMRef.current && !nodeProps.node.isText && ((ref1 = domRef.current) === null || ref1 === void 0 ? void 0 : ref1.nodeName) !== "BR" && node.type.spec.draggable ? {
|
|
195
207
|
draggable: true
|
|
196
208
|
} : null,
|
|
197
209
|
ref: setNodeDOM
|
|
198
210
|
};
|
|
199
|
-
const children = !node.isLeaf ? /*#__PURE__*/ _react.default.createElement(
|
|
211
|
+
const children = !node.isLeaf ? /*#__PURE__*/ _react.default.createElement(_childNodeViewsJs.ChildNodeViews, {
|
|
200
212
|
getPos: getPos,
|
|
201
213
|
node: node,
|
|
202
214
|
innerDecorations: innerDeco
|
|
203
215
|
}) : null;
|
|
204
|
-
const element = /*#__PURE__*/ (0, _react.cloneElement)(outerDeco.reduce(
|
|
216
|
+
const element = /*#__PURE__*/ (0, _react.cloneElement)(outerDeco.reduce(_childNodeViewsJs.wrapInDeco, /*#__PURE__*/ _react.default.createElement(Component, _extends({}, props), children)), {
|
|
205
217
|
ref: setDOM
|
|
206
218
|
});
|
|
207
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
219
|
+
return /*#__PURE__*/ _react.default.createElement(_selectNodeContextJs.SelectNodeContext.Provider, {
|
|
208
220
|
value: setSelectNode
|
|
209
|
-
}, /*#__PURE__*/ _react.default.createElement(
|
|
221
|
+
}, /*#__PURE__*/ _react.default.createElement(_stopEventContextJs.StopEventContext.Provider, {
|
|
210
222
|
value: setStopEvent
|
|
211
|
-
}, /*#__PURE__*/ _react.default.createElement(
|
|
223
|
+
}, /*#__PURE__*/ _react.default.createElement(_ignoreMutationContextJs.IgnoreMutationContext.Provider, {
|
|
212
224
|
value: setIgnoreMutation
|
|
213
|
-
}, /*#__PURE__*/ _react.default.createElement(
|
|
225
|
+
}, /*#__PURE__*/ _react.default.createElement(_childDescriptionsContextJs.ChildDescriptionsContext.Provider, {
|
|
214
226
|
value: childContextValue
|
|
215
227
|
}, element))));
|
|
216
228
|
});
|
package/dist/cjs/constants.js
CHANGED
|
@@ -9,16 +9,12 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
EMPTY_SCHEMA:
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
EMPTY_STATE: function() {
|
|
16
|
-
return EMPTY_STATE;
|
|
17
|
-
}
|
|
12
|
+
EMPTY_SCHEMA: ()=>EMPTY_SCHEMA,
|
|
13
|
+
EMPTY_STATE: ()=>EMPTY_STATE
|
|
18
14
|
});
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const EMPTY_SCHEMA = new
|
|
15
|
+
const _prosemirrorModel = require("prosemirror-model");
|
|
16
|
+
const _prosemirrorState = require("prosemirror-state");
|
|
17
|
+
const EMPTY_SCHEMA = new _prosemirrorModel.Schema({
|
|
22
18
|
nodes: {
|
|
23
19
|
doc: {
|
|
24
20
|
content: "text*"
|
|
@@ -28,6 +24,6 @@ const EMPTY_SCHEMA = new _prosemirrormodel.Schema({
|
|
|
28
24
|
}
|
|
29
25
|
}
|
|
30
26
|
});
|
|
31
|
-
const EMPTY_STATE =
|
|
27
|
+
const EMPTY_STATE = _prosemirrorState.EditorState.create({
|
|
32
28
|
schema: EMPTY_SCHEMA
|
|
33
29
|
});
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "ChildDescriptionsContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return ChildDescriptionsContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>ChildDescriptionsContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const ChildDescriptionsContext = (0, _react.createContext)({
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "EditorContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return EditorContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>EditorContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const EditorContext = (0, _react.createContext)(null);
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "EditorStateContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return EditorStateContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>EditorStateContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const EditorStateContext = (0, _react.createContext)(null);
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "IgnoreMutationContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return IgnoreMutationContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>IgnoreMutationContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const IgnoreMutationContext = (0, _react.createContext)(null);
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "LayoutGroupContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return LayoutGroupContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>LayoutGroupContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const LayoutGroupContext = /*#__PURE__*/ (0, _react.createContext)(null);
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "NodeViewContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return NodeViewContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>NodeViewContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const NodeViewContext = (0, _react.createContext)(null);
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "SelectNodeContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return SelectNodeContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>SelectNodeContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const SelectNodeContext = (0, _react.createContext)(null);
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "StopEventContext", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get:
|
|
8
|
-
return StopEventContext;
|
|
9
|
-
}
|
|
7
|
+
get: ()=>StopEventContext
|
|
10
8
|
});
|
|
11
9
|
const _react = require("react");
|
|
12
10
|
const StopEventContext = (0, _react.createContext)(null);
|