@handlewithcare/react-prosemirror 3.1.0-tiptap.36 → 3.1.0-tiptap.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/tiptap/tiptapNodeView.js +10 -9
- package/dist/esm/tiptap/tiptapNodeView.js +10 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/props.d.ts +26 -26
- package/dist/types/tiptap/tiptapNodeView.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/components/CustomNodeView.js +0 -132
- package/dist/cjs/components/DefaultNodeView.js +0 -67
- package/dist/cjs/components/DocNodeView.js +0 -96
- package/dist/cjs/components/MarkView.js +0 -119
- package/dist/cjs/components/NodeView.js +0 -86
- package/dist/cjs/components/NodeViewComponentProps.js +0 -4
- package/dist/cjs/components/ReactNodeView.js +0 -174
- package/dist/cjs/components/marks/CustomMarkView.js +0 -110
- package/dist/cjs/components/marks/OldMarkView.js +0 -120
- package/dist/cjs/components/nodes/CustomNodeView.js +0 -135
- package/dist/cjs/contexts/ChildDescriptorsContext.js +0 -19
- package/dist/cjs/hooks/useNodeViewDescriptor.js +0 -156
- package/dist/cjs/tiptap/TiptapNodeView.js +0 -26
- package/dist/esm/components/CustomNodeView.js +0 -81
- package/dist/esm/components/DefaultNodeView.js +0 -16
- package/dist/esm/components/DocNodeView.js +0 -45
- package/dist/esm/components/MarkView.js +0 -68
- package/dist/esm/components/NodeView.js +0 -35
- package/dist/esm/components/NodeViewComponentProps.js +0 -1
- package/dist/esm/components/ReactNodeView.js +0 -123
- package/dist/esm/components/marks/CustomMarkView.js +0 -59
- package/dist/esm/components/marks/OldMarkView.js +0 -69
- package/dist/esm/components/nodes/CustomNodeView.js +0 -84
- package/dist/esm/contexts/ChildDescriptorsContext.js +0 -9
- package/dist/esm/hooks/useNodeViewDescriptor.js +0 -146
- package/dist/esm/tiptap/TiptapNodeView.js +0 -22
- package/dist/types/components/CustomNodeView.d.ts +0 -12
- package/dist/types/components/DefaultNodeView.d.ts +0 -3
- package/dist/types/components/DocNodeView.d.ts +0 -12
- package/dist/types/components/MarkView.d.ts +0 -9
- package/dist/types/components/NodeView.d.ts +0 -11
- package/dist/types/components/NodeViewComponentProps.d.ts +0 -12
- package/dist/types/components/ReactNodeView.d.ts +0 -13
- package/dist/types/components/marks/CustomMarkView.d.ts +0 -12
- package/dist/types/components/marks/OldMarkView.d.ts +0 -10
- package/dist/types/components/nodes/CustomNodeView.d.ts +0 -12
- package/dist/types/contexts/ChildDescriptorsContext.d.ts +0 -6
- package/dist/types/hooks/useNodeViewDescriptor.d.ts +0 -20
- package/dist/types/tiptap/TiptapNodeView.d.ts +0 -15
|
@@ -87,15 +87,6 @@ function tiptapNodeView(param) {
|
|
|
87
87
|
node
|
|
88
88
|
]);
|
|
89
89
|
(0, _useStopEvent.useStopEvent)(function(_, event) {
|
|
90
|
-
if (stopEvent) {
|
|
91
|
-
return stopEvent.call({
|
|
92
|
-
name: extension.name,
|
|
93
|
-
editor,
|
|
94
|
-
type: node.type
|
|
95
|
-
}, {
|
|
96
|
-
event
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
90
|
if (!editor || !(this.dom instanceof HTMLElement)) return false;
|
|
100
91
|
const nodeView = new _ReactProseMirrorNodeView.ReactProseMirrorNodeView(WrappedComponent, {
|
|
101
92
|
extension,
|
|
@@ -107,6 +98,16 @@ function tiptapNodeView(param) {
|
|
|
107
98
|
node,
|
|
108
99
|
view: editor.view
|
|
109
100
|
}, this.dom, this.contentDOM);
|
|
101
|
+
if (stopEvent) {
|
|
102
|
+
return stopEvent.call({
|
|
103
|
+
name: extension.name,
|
|
104
|
+
editor,
|
|
105
|
+
type: node.type
|
|
106
|
+
}, {
|
|
107
|
+
event,
|
|
108
|
+
defaultStopEvent: nodeView.stopEvent.bind(nodeView)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
110
111
|
nodeView.isDragging = isDraggingRef.current;
|
|
111
112
|
const result = nodeView.stopEvent(event) ?? false;
|
|
112
113
|
isDraggingRef.current = nodeView.isDragging;
|
|
@@ -55,15 +55,6 @@ import { useTiptapEditorEventCallback } from "./hooks/useTiptapEditorEventCallba
|
|
|
55
55
|
node
|
|
56
56
|
]);
|
|
57
57
|
useStopEvent(function(_, event) {
|
|
58
|
-
if (stopEvent) {
|
|
59
|
-
return stopEvent.call({
|
|
60
|
-
name: extension.name,
|
|
61
|
-
editor,
|
|
62
|
-
type: node.type
|
|
63
|
-
}, {
|
|
64
|
-
event
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
58
|
if (!editor || !(this.dom instanceof HTMLElement)) return false;
|
|
68
59
|
const nodeView = new ReactProseMirrorNodeView(WrappedComponent, {
|
|
69
60
|
extension,
|
|
@@ -75,6 +66,16 @@ import { useTiptapEditorEventCallback } from "./hooks/useTiptapEditorEventCallba
|
|
|
75
66
|
node,
|
|
76
67
|
view: editor.view
|
|
77
68
|
}, this.dom, this.contentDOM);
|
|
69
|
+
if (stopEvent) {
|
|
70
|
+
return stopEvent.call({
|
|
71
|
+
name: extension.name,
|
|
72
|
+
editor,
|
|
73
|
+
type: node.type
|
|
74
|
+
}, {
|
|
75
|
+
event,
|
|
76
|
+
defaultStopEvent: nodeView.stopEvent.bind(nodeView)
|
|
77
|
+
});
|
|
78
|
+
}
|
|
78
79
|
nodeView.isDragging = isDraggingRef.current;
|
|
79
80
|
const result = nodeView.stopEvent(event) ?? false;
|
|
80
81
|
isDraggingRef.current = nodeView.isDragging;
|