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