@tiptap/vue-3 2.11.7 → 3.0.0-beta.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.md +21 -0
- package/README.md +5 -1
- package/dist/index.cjs +562 -528
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +219 -0
- package/dist/index.d.ts +218 -10
- package/dist/index.js +526 -516
- package/dist/index.js.map +1 -1
- package/dist/menus/index.cjs +613 -0
- package/dist/menus/index.cjs.map +1 -0
- package/dist/menus/index.d.cts +257 -0
- package/dist/menus/index.d.ts +257 -0
- package/dist/menus/index.js +605 -0
- package/dist/menus/index.js.map +1 -0
- package/package.json +27 -16
- package/src/Editor.ts +6 -11
- package/src/EditorContent.ts +10 -20
- package/src/VueMarkViewRenderer.ts +114 -0
- package/src/VueNodeViewRenderer.ts +19 -30
- package/src/VueRenderer.ts +10 -11
- package/src/index.ts +1 -2
- package/src/menus/BubbleMenu.ts +78 -0
- package/src/menus/FloatingMenu.ts +68 -0
- package/src/menus/index.ts +2 -0
- package/src/useEditor.ts +1 -1
- package/dist/BubbleMenu.d.ts +0 -61
- package/dist/BubbleMenu.d.ts.map +0 -1
- package/dist/Editor.d.ts +0 -24
- package/dist/Editor.d.ts.map +0 -1
- package/dist/EditorContent.d.ts +0 -18
- package/dist/EditorContent.d.ts.map +0 -1
- package/dist/FloatingMenu.d.ts +0 -49
- package/dist/FloatingMenu.d.ts.map +0 -1
- package/dist/NodeViewContent.d.ts +0 -14
- package/dist/NodeViewContent.d.ts.map +0 -1
- package/dist/NodeViewWrapper.d.ts +0 -14
- package/dist/NodeViewWrapper.d.ts.map +0 -1
- package/dist/VueNodeViewRenderer.d.ts +0 -63
- package/dist/VueNodeViewRenderer.d.ts.map +0 -1
- package/dist/VueRenderer.d.ts +0 -37
- package/dist/VueRenderer.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.umd.js +0 -570
- package/dist/index.umd.js.map +0 -1
- package/dist/useEditor.d.ts +0 -4
- package/dist/useEditor.d.ts.map +0 -1
- package/src/BubbleMenu.ts +0 -71
- package/src/FloatingMenu.ts +0 -66
package/dist/index.cjs
CHANGED
|
@@ -1,569 +1,603 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
7
20
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
tippyOptions: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default: () => ({}),
|
|
26
|
-
},
|
|
27
|
-
shouldShow: {
|
|
28
|
-
type: Function,
|
|
29
|
-
default: null,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
setup(props, { slots }) {
|
|
33
|
-
const root = vue.ref(null);
|
|
34
|
-
vue.onMounted(() => {
|
|
35
|
-
const { updateDelay, editor, pluginKey, shouldShow, tippyOptions, } = props;
|
|
36
|
-
editor.registerPlugin(extensionBubbleMenu.BubbleMenuPlugin({
|
|
37
|
-
updateDelay,
|
|
38
|
-
editor,
|
|
39
|
-
element: root.value,
|
|
40
|
-
pluginKey,
|
|
41
|
-
shouldShow,
|
|
42
|
-
tippyOptions,
|
|
43
|
-
}));
|
|
44
|
-
});
|
|
45
|
-
vue.onBeforeUnmount(() => {
|
|
46
|
-
const { pluginKey, editor } = props;
|
|
47
|
-
editor.unregisterPlugin(pluginKey);
|
|
48
|
-
});
|
|
49
|
-
return () => { var _a; return vue.h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
|
|
50
|
-
},
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
Editor: () => Editor,
|
|
25
|
+
EditorContent: () => EditorContent,
|
|
26
|
+
MarkViewContent: () => MarkViewContent,
|
|
27
|
+
NodeViewContent: () => NodeViewContent,
|
|
28
|
+
NodeViewWrapper: () => NodeViewWrapper,
|
|
29
|
+
VueMarkView: () => VueMarkView,
|
|
30
|
+
VueMarkViewRenderer: () => VueMarkViewRenderer,
|
|
31
|
+
VueNodeViewRenderer: () => VueNodeViewRenderer,
|
|
32
|
+
VueRenderer: () => VueRenderer,
|
|
33
|
+
markViewProps: () => markViewProps,
|
|
34
|
+
nodeViewProps: () => nodeViewProps,
|
|
35
|
+
useEditor: () => useEditor
|
|
51
36
|
});
|
|
37
|
+
module.exports = __toCommonJS(index_exports);
|
|
52
38
|
|
|
53
|
-
|
|
39
|
+
// src/Editor.ts
|
|
40
|
+
var import_core = require("@tiptap/core");
|
|
41
|
+
var import_vue = require("vue");
|
|
54
42
|
function useDebouncedRef(value) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
trigger();
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
class Editor extends core.Editor {
|
|
75
|
-
constructor(options = {}) {
|
|
76
|
-
super(options);
|
|
77
|
-
this.contentComponent = null;
|
|
78
|
-
this.appContext = null;
|
|
79
|
-
this.reactiveState = useDebouncedRef(this.view.state);
|
|
80
|
-
this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);
|
|
81
|
-
this.on('beforeTransaction', ({ nextState }) => {
|
|
82
|
-
this.reactiveState.value = nextState;
|
|
83
|
-
this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
43
|
+
return (0, import_vue.customRef)((track, trigger) => {
|
|
44
|
+
return {
|
|
45
|
+
get() {
|
|
46
|
+
track();
|
|
47
|
+
return value;
|
|
48
|
+
},
|
|
49
|
+
set(newValue) {
|
|
50
|
+
value = newValue;
|
|
51
|
+
requestAnimationFrame(() => {
|
|
52
|
+
requestAnimationFrame(() => {
|
|
53
|
+
trigger();
|
|
54
|
+
});
|
|
84
55
|
});
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
var Editor = class extends import_core.Editor {
|
|
61
|
+
constructor(options = {}) {
|
|
62
|
+
super(options);
|
|
63
|
+
this.contentComponent = null;
|
|
64
|
+
this.appContext = null;
|
|
65
|
+
this.reactiveState = useDebouncedRef(this.view.state);
|
|
66
|
+
this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);
|
|
67
|
+
this.on("beforeTransaction", ({ nextState }) => {
|
|
68
|
+
this.reactiveState.value = nextState;
|
|
69
|
+
this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
70
|
+
});
|
|
71
|
+
return (0, import_vue.markRaw)(this);
|
|
72
|
+
}
|
|
73
|
+
get state() {
|
|
74
|
+
return this.reactiveState ? this.reactiveState.value : this.view.state;
|
|
75
|
+
}
|
|
76
|
+
get storage() {
|
|
77
|
+
return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Register a ProseMirror plugin.
|
|
81
|
+
*/
|
|
82
|
+
registerPlugin(plugin, handlePlugins) {
|
|
83
|
+
const nextState = super.registerPlugin(plugin, handlePlugins);
|
|
84
|
+
if (this.reactiveState) {
|
|
85
|
+
this.reactiveState.value = nextState;
|
|
102
86
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
87
|
+
return nextState;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Unregister a ProseMirror plugin.
|
|
91
|
+
*/
|
|
92
|
+
unregisterPlugin(nameOrPluginKey) {
|
|
93
|
+
const nextState = super.unregisterPlugin(nameOrPluginKey);
|
|
94
|
+
if (this.reactiveState && nextState) {
|
|
95
|
+
this.reactiveState.value = nextState;
|
|
112
96
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
name: 'EditorContent',
|
|
117
|
-
props: {
|
|
118
|
-
editor: {
|
|
119
|
-
default: null,
|
|
120
|
-
type: Object,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
setup(props) {
|
|
124
|
-
const rootEl = vue.ref();
|
|
125
|
-
const instance = vue.getCurrentInstance();
|
|
126
|
-
vue.watchEffect(() => {
|
|
127
|
-
const editor = props.editor;
|
|
128
|
-
if (editor && editor.options.element && rootEl.value) {
|
|
129
|
-
vue.nextTick(() => {
|
|
130
|
-
if (!rootEl.value || !editor.options.element.firstChild) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
const element = vue.unref(rootEl.value);
|
|
134
|
-
rootEl.value.append(...editor.options.element.childNodes);
|
|
135
|
-
// @ts-ignore
|
|
136
|
-
editor.contentComponent = instance.ctx._;
|
|
137
|
-
if (instance) {
|
|
138
|
-
editor.appContext = {
|
|
139
|
-
...instance.appContext,
|
|
140
|
-
// Vue internally uses prototype chain to forward/shadow injects across the entire component chain
|
|
141
|
-
// so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext
|
|
142
|
-
// @ts-expect-error forward instance's 'provides' into appContext
|
|
143
|
-
provides: instance.provides,
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
editor.setOptions({
|
|
147
|
-
element,
|
|
148
|
-
});
|
|
149
|
-
editor.createNodeViews();
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
vue.onBeforeUnmount(() => {
|
|
154
|
-
const editor = props.editor;
|
|
155
|
-
if (!editor) {
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
editor.contentComponent = null;
|
|
159
|
-
editor.appContext = null;
|
|
160
|
-
});
|
|
161
|
-
return { rootEl };
|
|
162
|
-
},
|
|
163
|
-
render() {
|
|
164
|
-
return vue.h('div', {
|
|
165
|
-
ref: (el) => { this.rootEl = el; },
|
|
166
|
-
});
|
|
167
|
-
},
|
|
168
|
-
});
|
|
97
|
+
return nextState;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
169
100
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
101
|
+
// src/EditorContent.ts
|
|
102
|
+
var import_vue2 = require("vue");
|
|
103
|
+
var EditorContent = (0, import_vue2.defineComponent)({
|
|
104
|
+
name: "EditorContent",
|
|
105
|
+
props: {
|
|
106
|
+
editor: {
|
|
107
|
+
default: null,
|
|
108
|
+
type: Object
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
setup(props) {
|
|
112
|
+
const rootEl = (0, import_vue2.ref)();
|
|
113
|
+
const instance = (0, import_vue2.getCurrentInstance)();
|
|
114
|
+
(0, import_vue2.watchEffect)(() => {
|
|
115
|
+
const editor = props.editor;
|
|
116
|
+
if (editor && editor.options.element && rootEl.value) {
|
|
117
|
+
(0, import_vue2.nextTick)(() => {
|
|
118
|
+
var _a;
|
|
119
|
+
if (!rootEl.value || !((_a = editor.options.element) == null ? void 0 : _a.firstChild)) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const element = (0, import_vue2.unref)(rootEl.value);
|
|
123
|
+
rootEl.value.append(...editor.options.element.childNodes);
|
|
124
|
+
editor.contentComponent = instance.ctx._;
|
|
125
|
+
if (instance) {
|
|
126
|
+
editor.appContext = {
|
|
127
|
+
...instance.appContext,
|
|
128
|
+
// Vue internally uses prototype chain to forward/shadow injects across the entire component chain
|
|
129
|
+
// so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext
|
|
130
|
+
// @ts-expect-error forward instance's 'provides' into appContext
|
|
131
|
+
provides: instance.provides
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
editor.setOptions({
|
|
135
|
+
element
|
|
136
|
+
});
|
|
137
|
+
editor.createNodeViews();
|
|
207
138
|
});
|
|
208
|
-
|
|
209
|
-
}
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
(0, import_vue2.onBeforeUnmount)(() => {
|
|
142
|
+
const editor = props.editor;
|
|
143
|
+
if (!editor) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
editor.contentComponent = null;
|
|
147
|
+
editor.appContext = null;
|
|
148
|
+
});
|
|
149
|
+
return { rootEl };
|
|
150
|
+
},
|
|
151
|
+
render() {
|
|
152
|
+
return (0, import_vue2.h)("div", {
|
|
153
|
+
ref: (el) => {
|
|
154
|
+
this.rootEl = el;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
210
158
|
});
|
|
211
159
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
160
|
+
// src/NodeViewContent.ts
|
|
161
|
+
var import_vue3 = require("vue");
|
|
162
|
+
var NodeViewContent = (0, import_vue3.defineComponent)({
|
|
163
|
+
name: "NodeViewContent",
|
|
164
|
+
props: {
|
|
165
|
+
as: {
|
|
166
|
+
type: String,
|
|
167
|
+
default: "div"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
render() {
|
|
171
|
+
return (0, import_vue3.h)(this.as, {
|
|
172
|
+
style: {
|
|
173
|
+
whiteSpace: "pre-wrap"
|
|
174
|
+
},
|
|
175
|
+
"data-node-view-content": ""
|
|
176
|
+
});
|
|
177
|
+
}
|
|
228
178
|
});
|
|
229
179
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
180
|
+
// src/NodeViewWrapper.ts
|
|
181
|
+
var import_vue4 = require("vue");
|
|
182
|
+
var NodeViewWrapper = (0, import_vue4.defineComponent)({
|
|
183
|
+
name: "NodeViewWrapper",
|
|
184
|
+
props: {
|
|
185
|
+
as: {
|
|
186
|
+
type: String,
|
|
187
|
+
default: "div"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
inject: ["onDragStart", "decorationClasses"],
|
|
191
|
+
render() {
|
|
192
|
+
var _a, _b;
|
|
193
|
+
return (0, import_vue4.h)(
|
|
194
|
+
this.as,
|
|
195
|
+
{
|
|
196
|
+
// @ts-ignore
|
|
197
|
+
class: this.decorationClasses,
|
|
198
|
+
style: {
|
|
199
|
+
whiteSpace: "normal"
|
|
236
200
|
},
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
style: {
|
|
245
|
-
whiteSpace: 'normal',
|
|
246
|
-
},
|
|
247
|
-
'data-node-view-wrapper': '',
|
|
248
|
-
// @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)
|
|
249
|
-
onDragstart: this.onDragStart,
|
|
250
|
-
}, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
251
|
-
},
|
|
201
|
+
"data-node-view-wrapper": "",
|
|
202
|
+
// @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)
|
|
203
|
+
onDragstart: this.onDragStart
|
|
204
|
+
},
|
|
205
|
+
(_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
|
|
206
|
+
);
|
|
207
|
+
}
|
|
252
208
|
});
|
|
253
209
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
210
|
+
// src/useEditor.ts
|
|
211
|
+
var import_vue5 = require("vue");
|
|
212
|
+
var useEditor = (options = {}) => {
|
|
213
|
+
const editor = (0, import_vue5.shallowRef)();
|
|
214
|
+
(0, import_vue5.onMounted)(() => {
|
|
215
|
+
editor.value = new Editor(options);
|
|
216
|
+
});
|
|
217
|
+
(0, import_vue5.onBeforeUnmount)(() => {
|
|
218
|
+
var _a, _b, _c;
|
|
219
|
+
const nodes = (_a = editor.value) == null ? void 0 : _a.options.element;
|
|
220
|
+
const newEl = nodes == null ? void 0 : nodes.cloneNode(true);
|
|
221
|
+
(_b = nodes == null ? void 0 : nodes.parentNode) == null ? void 0 : _b.replaceChild(newEl, nodes);
|
|
222
|
+
(_c = editor.value) == null ? void 0 : _c.destroy();
|
|
223
|
+
});
|
|
224
|
+
return editor;
|
|
268
225
|
};
|
|
269
226
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
227
|
+
// src/VueMarkViewRenderer.ts
|
|
228
|
+
var import_core2 = require("@tiptap/core");
|
|
229
|
+
var import_vue7 = require("vue");
|
|
230
|
+
|
|
231
|
+
// src/VueRenderer.ts
|
|
232
|
+
var import_vue6 = require("vue");
|
|
233
|
+
var VueRenderer = class {
|
|
234
|
+
constructor(component, { props = {}, editor }) {
|
|
235
|
+
this.editor = editor;
|
|
236
|
+
this.component = (0, import_vue6.markRaw)(component);
|
|
237
|
+
this.el = document.createElement("div");
|
|
238
|
+
this.props = (0, import_vue6.reactive)(props);
|
|
239
|
+
this.renderedComponent = this.renderComponent();
|
|
240
|
+
}
|
|
241
|
+
get element() {
|
|
242
|
+
return this.renderedComponent.el;
|
|
243
|
+
}
|
|
244
|
+
get ref() {
|
|
245
|
+
var _a, _b, _c, _d;
|
|
246
|
+
if ((_b = (_a = this.renderedComponent.vNode) == null ? void 0 : _a.component) == null ? void 0 : _b.exposed) {
|
|
247
|
+
return this.renderedComponent.vNode.component.exposed;
|
|
280
248
|
}
|
|
281
|
-
|
|
282
|
-
|
|
249
|
+
return (_d = (_c = this.renderedComponent.vNode) == null ? void 0 : _c.component) == null ? void 0 : _d.proxy;
|
|
250
|
+
}
|
|
251
|
+
renderComponent() {
|
|
252
|
+
let vNode = (0, import_vue6.h)(this.component, this.props);
|
|
253
|
+
if (this.editor.appContext) {
|
|
254
|
+
vNode.appContext = this.editor.appContext;
|
|
283
255
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
// Composition API
|
|
287
|
-
if ((_b = (_a = this.renderedComponent.vNode) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.exposed) {
|
|
288
|
-
return this.renderedComponent.vNode.component.exposed;
|
|
289
|
-
}
|
|
290
|
-
// Option API
|
|
291
|
-
return (_d = (_c = this.renderedComponent.vNode) === null || _c === void 0 ? void 0 : _c.component) === null || _d === void 0 ? void 0 : _d.proxy;
|
|
256
|
+
if (typeof document !== "undefined" && this.el) {
|
|
257
|
+
(0, import_vue6.render)(vNode, this.el);
|
|
292
258
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
259
|
+
const destroy = () => {
|
|
260
|
+
if (this.el) {
|
|
261
|
+
(0, import_vue6.render)(null, this.el);
|
|
262
|
+
}
|
|
263
|
+
this.el = null;
|
|
264
|
+
vNode = null;
|
|
265
|
+
};
|
|
266
|
+
return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };
|
|
267
|
+
}
|
|
268
|
+
updateProps(props = {}) {
|
|
269
|
+
Object.entries(props).forEach(([key, value]) => {
|
|
270
|
+
this.props[key] = value;
|
|
271
|
+
});
|
|
272
|
+
this.renderComponent();
|
|
273
|
+
}
|
|
274
|
+
destroy() {
|
|
275
|
+
this.renderedComponent.destroy();
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
// src/VueMarkViewRenderer.ts
|
|
280
|
+
var markViewProps = {
|
|
281
|
+
editor: {
|
|
282
|
+
type: Object,
|
|
283
|
+
required: true
|
|
284
|
+
},
|
|
285
|
+
mark: {
|
|
286
|
+
type: Object,
|
|
287
|
+
required: true
|
|
288
|
+
},
|
|
289
|
+
extension: {
|
|
290
|
+
type: Object,
|
|
291
|
+
required: true
|
|
292
|
+
},
|
|
293
|
+
inline: {
|
|
294
|
+
type: Boolean,
|
|
295
|
+
required: true
|
|
296
|
+
},
|
|
297
|
+
view: {
|
|
298
|
+
type: Object,
|
|
299
|
+
required: true
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
var MarkViewContent = (0, import_vue7.defineComponent)({
|
|
303
|
+
name: "MarkViewContent",
|
|
304
|
+
props: {
|
|
305
|
+
as: {
|
|
306
|
+
type: String,
|
|
307
|
+
default: "span"
|
|
309
308
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
309
|
+
},
|
|
310
|
+
render() {
|
|
311
|
+
return (0, import_vue7.h)(this.as, {
|
|
312
|
+
style: {
|
|
313
|
+
whiteSpace: "inherit"
|
|
314
|
+
},
|
|
315
|
+
"data-mark-view-content": ""
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
var VueMarkView = class extends import_core2.MarkView {
|
|
320
|
+
constructor(component, props, options) {
|
|
321
|
+
super(component, props, options);
|
|
322
|
+
const extendedComponent = (0, import_vue7.defineComponent)({
|
|
323
|
+
extends: { ...component },
|
|
324
|
+
props: Object.keys(props),
|
|
325
|
+
template: this.component.template,
|
|
326
|
+
setup: (reactiveProps) => {
|
|
327
|
+
var _a;
|
|
328
|
+
return (_a = component.setup) == null ? void 0 : _a.call(component, reactiveProps, {
|
|
329
|
+
expose: () => void 0
|
|
313
330
|
});
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
331
|
+
},
|
|
332
|
+
// Add support for scoped styles
|
|
333
|
+
__scopeId: component.__scopeId,
|
|
334
|
+
__cssModules: component.__cssModules,
|
|
335
|
+
__name: component.__name,
|
|
336
|
+
__file: component.__file
|
|
337
|
+
});
|
|
338
|
+
this.renderer = new VueRenderer(extendedComponent, {
|
|
339
|
+
editor: this.editor,
|
|
340
|
+
props
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
get dom() {
|
|
344
|
+
return this.renderer.element;
|
|
345
|
+
}
|
|
346
|
+
get contentDOM() {
|
|
347
|
+
return this.dom.querySelector("[data-mark-view-content]");
|
|
348
|
+
}
|
|
349
|
+
destroy() {
|
|
350
|
+
this.renderer.destroy();
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
function VueMarkViewRenderer(component, options = {}) {
|
|
354
|
+
return (props) => {
|
|
355
|
+
if (!props.editor.contentComponent) {
|
|
356
|
+
return {};
|
|
318
357
|
}
|
|
358
|
+
return new VueMarkView(component, props, options);
|
|
359
|
+
};
|
|
319
360
|
}
|
|
320
361
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
362
|
+
// src/VueNodeViewRenderer.ts
|
|
363
|
+
var import_core3 = require("@tiptap/core");
|
|
364
|
+
var import_vue8 = require("vue");
|
|
365
|
+
var nodeViewProps = {
|
|
366
|
+
editor: {
|
|
367
|
+
type: Object,
|
|
368
|
+
required: true
|
|
369
|
+
},
|
|
370
|
+
node: {
|
|
371
|
+
type: Object,
|
|
372
|
+
required: true
|
|
373
|
+
},
|
|
374
|
+
decorations: {
|
|
375
|
+
type: Object,
|
|
376
|
+
required: true
|
|
377
|
+
},
|
|
378
|
+
selected: {
|
|
379
|
+
type: Boolean,
|
|
380
|
+
required: true
|
|
381
|
+
},
|
|
382
|
+
extension: {
|
|
383
|
+
type: Object,
|
|
384
|
+
required: true
|
|
385
|
+
},
|
|
386
|
+
getPos: {
|
|
387
|
+
type: Function,
|
|
388
|
+
required: true
|
|
389
|
+
},
|
|
390
|
+
updateAttributes: {
|
|
391
|
+
type: Function,
|
|
392
|
+
required: true
|
|
393
|
+
},
|
|
394
|
+
deleteNode: {
|
|
395
|
+
type: Function,
|
|
396
|
+
required: true
|
|
397
|
+
},
|
|
398
|
+
view: {
|
|
399
|
+
type: Object,
|
|
400
|
+
required: true
|
|
401
|
+
},
|
|
402
|
+
innerDecorations: {
|
|
403
|
+
type: Object,
|
|
404
|
+
required: true
|
|
405
|
+
},
|
|
406
|
+
HTMLAttributes: {
|
|
407
|
+
type: Object,
|
|
408
|
+
required: true
|
|
409
|
+
}
|
|
367
410
|
};
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
});
|
|
396
|
-
},
|
|
397
|
-
// add support for scoped styles
|
|
398
|
-
// @ts-ignore
|
|
399
|
-
// eslint-disable-next-line
|
|
400
|
-
__scopeId: this.component.__scopeId,
|
|
401
|
-
// add support for CSS Modules
|
|
402
|
-
// @ts-ignore
|
|
403
|
-
// eslint-disable-next-line
|
|
404
|
-
__cssModules: this.component.__cssModules,
|
|
405
|
-
// add support for vue devtools
|
|
406
|
-
// @ts-ignore
|
|
407
|
-
// eslint-disable-next-line
|
|
408
|
-
__name: this.component.__name,
|
|
409
|
-
// @ts-ignore
|
|
410
|
-
// eslint-disable-next-line
|
|
411
|
-
__file: this.component.__file,
|
|
412
|
-
});
|
|
413
|
-
this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);
|
|
414
|
-
this.editor.on('selectionUpdate', this.handleSelectionUpdate);
|
|
415
|
-
this.renderer = new VueRenderer(extendedComponent, {
|
|
416
|
-
editor: this.editor,
|
|
417
|
-
props,
|
|
411
|
+
var VueNodeView = class extends import_core3.NodeView {
|
|
412
|
+
mount() {
|
|
413
|
+
const props = {
|
|
414
|
+
editor: this.editor,
|
|
415
|
+
node: this.node,
|
|
416
|
+
decorations: this.decorations,
|
|
417
|
+
innerDecorations: this.innerDecorations,
|
|
418
|
+
view: this.view,
|
|
419
|
+
selected: false,
|
|
420
|
+
extension: this.extension,
|
|
421
|
+
HTMLAttributes: this.HTMLAttributes,
|
|
422
|
+
getPos: () => this.getPos(),
|
|
423
|
+
updateAttributes: (attributes = {}) => this.updateAttributes(attributes),
|
|
424
|
+
deleteNode: () => this.deleteNode()
|
|
425
|
+
};
|
|
426
|
+
const onDragStart = this.onDragStart.bind(this);
|
|
427
|
+
this.decorationClasses = (0, import_vue8.ref)(this.getDecorationClasses());
|
|
428
|
+
const extendedComponent = (0, import_vue8.defineComponent)({
|
|
429
|
+
extends: { ...this.component },
|
|
430
|
+
props: Object.keys(props),
|
|
431
|
+
template: this.component.template,
|
|
432
|
+
setup: (reactiveProps) => {
|
|
433
|
+
var _a, _b;
|
|
434
|
+
(0, import_vue8.provide)("onDragStart", onDragStart);
|
|
435
|
+
(0, import_vue8.provide)("decorationClasses", this.decorationClasses);
|
|
436
|
+
return (_b = (_a = this.component).setup) == null ? void 0 : _b.call(_a, reactiveProps, {
|
|
437
|
+
expose: () => void 0
|
|
418
438
|
});
|
|
439
|
+
},
|
|
440
|
+
// add support for scoped styles
|
|
441
|
+
// @ts-ignore
|
|
442
|
+
// eslint-disable-next-line
|
|
443
|
+
__scopeId: this.component.__scopeId,
|
|
444
|
+
// add support for CSS Modules
|
|
445
|
+
// @ts-ignore
|
|
446
|
+
// eslint-disable-next-line
|
|
447
|
+
__cssModules: this.component.__cssModules,
|
|
448
|
+
// add support for vue devtools
|
|
449
|
+
// @ts-ignore
|
|
450
|
+
// eslint-disable-next-line
|
|
451
|
+
__name: this.component.__name,
|
|
452
|
+
// @ts-ignore
|
|
453
|
+
// eslint-disable-next-line
|
|
454
|
+
__file: this.component.__file
|
|
455
|
+
});
|
|
456
|
+
this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);
|
|
457
|
+
this.editor.on("selectionUpdate", this.handleSelectionUpdate);
|
|
458
|
+
this.renderer = new VueRenderer(extendedComponent, {
|
|
459
|
+
editor: this.editor,
|
|
460
|
+
props
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Return the DOM element.
|
|
465
|
+
* This is the element that will be used to display the node view.
|
|
466
|
+
*/
|
|
467
|
+
get dom() {
|
|
468
|
+
if (!this.renderer.element || !this.renderer.element.hasAttribute("data-node-view-wrapper")) {
|
|
469
|
+
throw Error("Please use the NodeViewWrapper component for your node view.");
|
|
419
470
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
471
|
+
return this.renderer.element;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Return the content DOM element.
|
|
475
|
+
* This is the element that will be used to display the rich-text content of the node.
|
|
476
|
+
*/
|
|
477
|
+
get contentDOM() {
|
|
478
|
+
if (this.node.isLeaf) {
|
|
479
|
+
return null;
|
|
429
480
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
481
|
+
return this.dom.querySelector("[data-node-view-content]");
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* On editor selection update, check if the node is selected.
|
|
485
|
+
* If it is, call `selectNode`, otherwise call `deselectNode`.
|
|
486
|
+
*/
|
|
487
|
+
handleSelectionUpdate() {
|
|
488
|
+
const { from, to } = this.editor.state.selection;
|
|
489
|
+
const pos = this.getPos();
|
|
490
|
+
if (typeof pos !== "number") {
|
|
491
|
+
return;
|
|
439
492
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
if (from <= pos && to >= pos + this.node.nodeSize) {
|
|
451
|
-
if (this.renderer.props.selected) {
|
|
452
|
-
return;
|
|
453
|
-
}
|
|
454
|
-
this.selectNode();
|
|
455
|
-
}
|
|
456
|
-
else {
|
|
457
|
-
if (!this.renderer.props.selected) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
this.deselectNode();
|
|
461
|
-
}
|
|
493
|
+
if (from <= pos && to >= pos + this.node.nodeSize) {
|
|
494
|
+
if (this.renderer.props.selected) {
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
this.selectNode();
|
|
498
|
+
} else {
|
|
499
|
+
if (!this.renderer.props.selected) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
this.deselectNode();
|
|
462
503
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
if (node.type !== this.node.type) {
|
|
490
|
-
return false;
|
|
491
|
-
}
|
|
492
|
-
if (node === this.node && this.decorations === decorations && this.innerDecorations === innerDecorations) {
|
|
493
|
-
return true;
|
|
494
|
-
}
|
|
495
|
-
this.node = node;
|
|
496
|
-
this.decorations = decorations;
|
|
497
|
-
this.innerDecorations = innerDecorations;
|
|
498
|
-
rerenderComponent({ node, decorations, innerDecorations });
|
|
499
|
-
return true;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* On update, update the React component.
|
|
507
|
+
* To prevent unnecessary updates, the `update` option can be used.
|
|
508
|
+
*/
|
|
509
|
+
update(node, decorations, innerDecorations) {
|
|
510
|
+
const rerenderComponent = (props) => {
|
|
511
|
+
this.decorationClasses.value = this.getDecorationClasses();
|
|
512
|
+
this.renderer.updateProps(props);
|
|
513
|
+
};
|
|
514
|
+
if (typeof this.options.update === "function") {
|
|
515
|
+
const oldNode = this.node;
|
|
516
|
+
const oldDecorations = this.decorations;
|
|
517
|
+
const oldInnerDecorations = this.innerDecorations;
|
|
518
|
+
this.node = node;
|
|
519
|
+
this.decorations = decorations;
|
|
520
|
+
this.innerDecorations = innerDecorations;
|
|
521
|
+
return this.options.update({
|
|
522
|
+
oldNode,
|
|
523
|
+
oldDecorations,
|
|
524
|
+
newNode: node,
|
|
525
|
+
newDecorations: decorations,
|
|
526
|
+
oldInnerDecorations,
|
|
527
|
+
innerDecorations,
|
|
528
|
+
updateProps: () => rerenderComponent({ node, decorations, innerDecorations })
|
|
529
|
+
});
|
|
500
530
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
* Add the `selected` prop and the `ProseMirror-selectednode` class.
|
|
504
|
-
*/
|
|
505
|
-
selectNode() {
|
|
506
|
-
this.renderer.updateProps({
|
|
507
|
-
selected: true,
|
|
508
|
-
});
|
|
509
|
-
if (this.renderer.element) {
|
|
510
|
-
this.renderer.element.classList.add('ProseMirror-selectednode');
|
|
511
|
-
}
|
|
531
|
+
if (node.type !== this.node.type) {
|
|
532
|
+
return false;
|
|
512
533
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
* Remove the `selected` prop and the `ProseMirror-selectednode` class.
|
|
516
|
-
*/
|
|
517
|
-
deselectNode() {
|
|
518
|
-
this.renderer.updateProps({
|
|
519
|
-
selected: false,
|
|
520
|
-
});
|
|
521
|
-
if (this.renderer.element) {
|
|
522
|
-
this.renderer.element.classList.remove('ProseMirror-selectednode');
|
|
523
|
-
}
|
|
534
|
+
if (node === this.node && this.decorations === decorations && this.innerDecorations === innerDecorations) {
|
|
535
|
+
return true;
|
|
524
536
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
537
|
+
this.node = node;
|
|
538
|
+
this.decorations = decorations;
|
|
539
|
+
this.innerDecorations = innerDecorations;
|
|
540
|
+
rerenderComponent({ node, decorations, innerDecorations });
|
|
541
|
+
return true;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Select the node.
|
|
545
|
+
* Add the `selected` prop and the `ProseMirror-selectednode` class.
|
|
546
|
+
*/
|
|
547
|
+
selectNode() {
|
|
548
|
+
this.renderer.updateProps({
|
|
549
|
+
selected: true
|
|
550
|
+
});
|
|
551
|
+
if (this.renderer.element) {
|
|
552
|
+
this.renderer.element.classList.add("ProseMirror-selectednode");
|
|
531
553
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Deselect the node.
|
|
557
|
+
* Remove the `selected` prop and the `ProseMirror-selectednode` class.
|
|
558
|
+
*/
|
|
559
|
+
deselectNode() {
|
|
560
|
+
this.renderer.updateProps({
|
|
561
|
+
selected: false
|
|
562
|
+
});
|
|
563
|
+
if (this.renderer.element) {
|
|
564
|
+
this.renderer.element.classList.remove("ProseMirror-selectednode");
|
|
535
565
|
}
|
|
536
|
-
}
|
|
566
|
+
}
|
|
567
|
+
getDecorationClasses() {
|
|
568
|
+
return this.decorations.map((item) => item.type.attrs.class).flat().join(" ");
|
|
569
|
+
}
|
|
570
|
+
destroy() {
|
|
571
|
+
this.renderer.destroy();
|
|
572
|
+
this.editor.off("selectionUpdate", this.handleSelectionUpdate);
|
|
573
|
+
}
|
|
574
|
+
};
|
|
537
575
|
function VueNodeViewRenderer(component, options) {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
// check for class-component and normalize if neccessary
|
|
546
|
-
const normalizedComponent = typeof component === 'function' && '__vccOpts' in component
|
|
547
|
-
? component.__vccOpts
|
|
548
|
-
: component;
|
|
549
|
-
return new VueNodeView(normalizedComponent, props, options);
|
|
550
|
-
};
|
|
576
|
+
return (props) => {
|
|
577
|
+
if (!props.editor.contentComponent) {
|
|
578
|
+
return {};
|
|
579
|
+
}
|
|
580
|
+
const normalizedComponent = typeof component === "function" && "__vccOpts" in component ? component.__vccOpts : component;
|
|
581
|
+
return new VueNodeView(normalizedComponent, props, options);
|
|
582
|
+
};
|
|
551
583
|
}
|
|
552
584
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
exports
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
585
|
+
// src/index.ts
|
|
586
|
+
__reExport(index_exports, require("@tiptap/core"), module.exports);
|
|
587
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
588
|
+
0 && (module.exports = {
|
|
589
|
+
Editor,
|
|
590
|
+
EditorContent,
|
|
591
|
+
MarkViewContent,
|
|
592
|
+
NodeViewContent,
|
|
593
|
+
NodeViewWrapper,
|
|
594
|
+
VueMarkView,
|
|
595
|
+
VueMarkViewRenderer,
|
|
596
|
+
VueNodeViewRenderer,
|
|
597
|
+
VueRenderer,
|
|
598
|
+
markViewProps,
|
|
599
|
+
nodeViewProps,
|
|
600
|
+
useEditor,
|
|
601
|
+
...require("@tiptap/core")
|
|
568
602
|
});
|
|
569
|
-
//# sourceMappingURL=index.cjs.map
|
|
603
|
+
//# sourceMappingURL=index.cjs.map
|