@tiptap/vue-3 3.0.0 → 3.0.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.
Files changed (206) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +5 -1
  3. package/dist/index.cjs +577 -455
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +228 -0
  6. package/dist/index.d.ts +228 -0
  7. package/dist/index.js +541 -443
  8. package/dist/index.js.map +1 -1
  9. package/dist/menus/index.cjs +692 -0
  10. package/dist/menus/index.cjs.map +1 -0
  11. package/dist/menus/index.d.cts +273 -0
  12. package/dist/menus/index.d.ts +273 -0
  13. package/dist/menus/index.js +684 -0
  14. package/dist/menus/index.js.map +1 -0
  15. package/package.json +28 -17
  16. package/src/Editor.ts +23 -17
  17. package/src/EditorContent.ts +14 -44
  18. package/src/VueMarkViewRenderer.ts +130 -0
  19. package/src/VueNodeViewRenderer.ts +99 -36
  20. package/src/VueRenderer.ts +27 -18
  21. package/src/index.ts +1 -2
  22. package/src/menus/BubbleMenu.ts +78 -0
  23. package/src/menus/FloatingMenu.ts +68 -0
  24. package/src/menus/index.ts +2 -0
  25. package/src/useEditor.ts +7 -1
  26. package/dist/index.umd.js +0 -495
  27. package/dist/index.umd.js.map +0 -1
  28. package/dist/packages/core/src/CommandManager.d.ts +0 -20
  29. package/dist/packages/core/src/Editor.d.ts +0 -161
  30. package/dist/packages/core/src/EventEmitter.d.ts +0 -11
  31. package/dist/packages/core/src/Extension.d.ts +0 -343
  32. package/dist/packages/core/src/ExtensionManager.d.ts +0 -55
  33. package/dist/packages/core/src/InputRule.d.ts +0 -42
  34. package/dist/packages/core/src/Mark.d.ts +0 -451
  35. package/dist/packages/core/src/Node.d.ts +0 -611
  36. package/dist/packages/core/src/NodePos.d.ts +0 -44
  37. package/dist/packages/core/src/NodeView.d.ts +0 -31
  38. package/dist/packages/core/src/PasteRule.d.ts +0 -50
  39. package/dist/packages/core/src/Tracker.d.ts +0 -11
  40. package/dist/packages/core/src/commands/blur.d.ts +0 -13
  41. package/dist/packages/core/src/commands/clearContent.d.ts +0 -14
  42. package/dist/packages/core/src/commands/clearNodes.d.ts +0 -13
  43. package/dist/packages/core/src/commands/command.d.ts +0 -18
  44. package/dist/packages/core/src/commands/createParagraphNear.d.ts +0 -13
  45. package/dist/packages/core/src/commands/cut.d.ts +0 -20
  46. package/dist/packages/core/src/commands/deleteCurrentNode.d.ts +0 -13
  47. package/dist/packages/core/src/commands/deleteNode.d.ts +0 -15
  48. package/dist/packages/core/src/commands/deleteRange.d.ts +0 -14
  49. package/dist/packages/core/src/commands/deleteSelection.d.ts +0 -13
  50. package/dist/packages/core/src/commands/enter.d.ts +0 -13
  51. package/dist/packages/core/src/commands/exitCode.d.ts +0 -13
  52. package/dist/packages/core/src/commands/extendMarkRange.d.ts +0 -25
  53. package/dist/packages/core/src/commands/first.d.ts +0 -14
  54. package/dist/packages/core/src/commands/focus.d.ts +0 -27
  55. package/dist/packages/core/src/commands/forEach.d.ts +0 -14
  56. package/dist/packages/core/src/commands/index.d.ts +0 -55
  57. package/dist/packages/core/src/commands/insertContent.d.ts +0 -34
  58. package/dist/packages/core/src/commands/insertContentAt.d.ts +0 -47
  59. package/dist/packages/core/src/commands/join.d.ts +0 -41
  60. package/dist/packages/core/src/commands/joinItemBackward.d.ts +0 -13
  61. package/dist/packages/core/src/commands/joinItemForward.d.ts +0 -13
  62. package/dist/packages/core/src/commands/joinTextblockBackward.d.ts +0 -12
  63. package/dist/packages/core/src/commands/joinTextblockForward.d.ts +0 -12
  64. package/dist/packages/core/src/commands/keyboardShortcut.d.ts +0 -14
  65. package/dist/packages/core/src/commands/lift.d.ts +0 -17
  66. package/dist/packages/core/src/commands/liftEmptyBlock.d.ts +0 -13
  67. package/dist/packages/core/src/commands/liftListItem.d.ts +0 -15
  68. package/dist/packages/core/src/commands/newlineInCode.d.ts +0 -13
  69. package/dist/packages/core/src/commands/resetAttributes.d.ts +0 -16
  70. package/dist/packages/core/src/commands/scrollIntoView.d.ts +0 -13
  71. package/dist/packages/core/src/commands/selectAll.d.ts +0 -13
  72. package/dist/packages/core/src/commands/selectNodeBackward.d.ts +0 -13
  73. package/dist/packages/core/src/commands/selectNodeForward.d.ts +0 -13
  74. package/dist/packages/core/src/commands/selectParentNode.d.ts +0 -13
  75. package/dist/packages/core/src/commands/selectTextblockEnd.d.ts +0 -13
  76. package/dist/packages/core/src/commands/selectTextblockStart.d.ts +0 -13
  77. package/dist/packages/core/src/commands/setContent.d.ts +0 -40
  78. package/dist/packages/core/src/commands/setMark.d.ts +0 -15
  79. package/dist/packages/core/src/commands/setMeta.d.ts +0 -15
  80. package/dist/packages/core/src/commands/setNode.d.ts +0 -16
  81. package/dist/packages/core/src/commands/setNodeSelection.d.ts +0 -14
  82. package/dist/packages/core/src/commands/setTextSelection.d.ts +0 -14
  83. package/dist/packages/core/src/commands/sinkListItem.d.ts +0 -15
  84. package/dist/packages/core/src/commands/splitBlock.d.ts +0 -17
  85. package/dist/packages/core/src/commands/splitListItem.d.ts +0 -15
  86. package/dist/packages/core/src/commands/toggleList.d.ts +0 -18
  87. package/dist/packages/core/src/commands/toggleMark.d.ts +0 -30
  88. package/dist/packages/core/src/commands/toggleNode.d.ts +0 -17
  89. package/dist/packages/core/src/commands/toggleWrap.d.ts +0 -16
  90. package/dist/packages/core/src/commands/undoInputRule.d.ts +0 -13
  91. package/dist/packages/core/src/commands/unsetAllMarks.d.ts +0 -13
  92. package/dist/packages/core/src/commands/unsetMark.d.ts +0 -25
  93. package/dist/packages/core/src/commands/updateAttributes.d.ts +0 -24
  94. package/dist/packages/core/src/commands/wrapIn.d.ts +0 -16
  95. package/dist/packages/core/src/commands/wrapInList.d.ts +0 -16
  96. package/dist/packages/core/src/extensions/clipboardTextSerializer.d.ts +0 -5
  97. package/dist/packages/core/src/extensions/commands.d.ts +0 -3
  98. package/dist/packages/core/src/extensions/editable.d.ts +0 -2
  99. package/dist/packages/core/src/extensions/focusEvents.d.ts +0 -2
  100. package/dist/packages/core/src/extensions/index.d.ts +0 -6
  101. package/dist/packages/core/src/extensions/keymap.d.ts +0 -2
  102. package/dist/packages/core/src/extensions/tabindex.d.ts +0 -2
  103. package/dist/packages/core/src/helpers/combineTransactionSteps.d.ts +0 -10
  104. package/dist/packages/core/src/helpers/createChainableState.d.ts +0 -10
  105. package/dist/packages/core/src/helpers/createDocument.d.ts +0 -12
  106. package/dist/packages/core/src/helpers/createNodeFromContent.d.ts +0 -15
  107. package/dist/packages/core/src/helpers/defaultBlockAt.d.ts +0 -7
  108. package/dist/packages/core/src/helpers/findChildren.d.ts +0 -9
  109. package/dist/packages/core/src/helpers/findChildrenInRange.d.ts +0 -10
  110. package/dist/packages/core/src/helpers/findParentNode.d.ts +0 -16
  111. package/dist/packages/core/src/helpers/findParentNodeClosestToPos.d.ts +0 -17
  112. package/dist/packages/core/src/helpers/generateHTML.d.ts +0 -8
  113. package/dist/packages/core/src/helpers/generateJSON.d.ts +0 -8
  114. package/dist/packages/core/src/helpers/generateText.d.ts +0 -12
  115. package/dist/packages/core/src/helpers/getAttributes.d.ts +0 -9
  116. package/dist/packages/core/src/helpers/getAttributesFromExtensions.d.ts +0 -6
  117. package/dist/packages/core/src/helpers/getChangedRanges.d.ts +0 -11
  118. package/dist/packages/core/src/helpers/getDebugJSON.d.ts +0 -8
  119. package/dist/packages/core/src/helpers/getExtensionField.d.ts +0 -9
  120. package/dist/packages/core/src/helpers/getHTMLFromFragment.d.ts +0 -2
  121. package/dist/packages/core/src/helpers/getMarkAttributes.d.ts +0 -3
  122. package/dist/packages/core/src/helpers/getMarkRange.d.ts +0 -3
  123. package/dist/packages/core/src/helpers/getMarkType.d.ts +0 -2
  124. package/dist/packages/core/src/helpers/getMarksBetween.d.ts +0 -3
  125. package/dist/packages/core/src/helpers/getNodeAtPosition.d.ts +0 -11
  126. package/dist/packages/core/src/helpers/getNodeAttributes.d.ts +0 -3
  127. package/dist/packages/core/src/helpers/getNodeType.d.ts +0 -2
  128. package/dist/packages/core/src/helpers/getRenderedAttributes.d.ts +0 -3
  129. package/dist/packages/core/src/helpers/getSchema.d.ts +0 -4
  130. package/dist/packages/core/src/helpers/getSchemaByResolvedExtensions.d.ts +0 -10
  131. package/dist/packages/core/src/helpers/getSchemaTypeByName.d.ts +0 -8
  132. package/dist/packages/core/src/helpers/getSchemaTypeNameByName.d.ts +0 -8
  133. package/dist/packages/core/src/helpers/getSplittedAttributes.d.ts +0 -9
  134. package/dist/packages/core/src/helpers/getText.d.ts +0 -15
  135. package/dist/packages/core/src/helpers/getTextBetween.d.ts +0 -14
  136. package/dist/packages/core/src/helpers/getTextContentFromNodes.d.ts +0 -8
  137. package/dist/packages/core/src/helpers/getTextSerializersFromSchema.d.ts +0 -8
  138. package/dist/packages/core/src/helpers/index.d.ts +0 -50
  139. package/dist/packages/core/src/helpers/injectExtensionAttributesToParseRule.d.ts +0 -9
  140. package/dist/packages/core/src/helpers/isActive.d.ts +0 -2
  141. package/dist/packages/core/src/helpers/isAtEndOfNode.d.ts +0 -2
  142. package/dist/packages/core/src/helpers/isAtStartOfNode.d.ts +0 -2
  143. package/dist/packages/core/src/helpers/isExtensionRulesEnabled.d.ts +0 -2
  144. package/dist/packages/core/src/helpers/isList.d.ts +0 -2
  145. package/dist/packages/core/src/helpers/isMarkActive.d.ts +0 -3
  146. package/dist/packages/core/src/helpers/isNodeActive.d.ts +0 -3
  147. package/dist/packages/core/src/helpers/isNodeEmpty.d.ts +0 -2
  148. package/dist/packages/core/src/helpers/isNodeSelection.d.ts +0 -2
  149. package/dist/packages/core/src/helpers/isTextSelection.d.ts +0 -2
  150. package/dist/packages/core/src/helpers/posToDOMRect.d.ts +0 -2
  151. package/dist/packages/core/src/helpers/resolveFocusPosition.d.ts +0 -4
  152. package/dist/packages/core/src/helpers/selectionToInsertionEnd.d.ts +0 -2
  153. package/dist/packages/core/src/helpers/splitExtensions.d.ts +0 -9
  154. package/dist/packages/core/src/index.d.ts +0 -24
  155. package/dist/packages/core/src/inputRules/index.d.ts +0 -5
  156. package/dist/packages/core/src/inputRules/markInputRule.d.ts +0 -13
  157. package/dist/packages/core/src/inputRules/nodeInputRule.d.ts +0 -23
  158. package/dist/packages/core/src/inputRules/textInputRule.d.ts +0 -10
  159. package/dist/packages/core/src/inputRules/textblockTypeInputRule.d.ts +0 -15
  160. package/dist/packages/core/src/inputRules/wrappingInputRule.d.ts +0 -28
  161. package/dist/packages/core/src/pasteRules/index.d.ts +0 -3
  162. package/dist/packages/core/src/pasteRules/markPasteRule.d.ts +0 -13
  163. package/dist/packages/core/src/pasteRules/nodePasteRule.d.ts +0 -13
  164. package/dist/packages/core/src/pasteRules/textPasteRule.d.ts +0 -10
  165. package/dist/packages/core/src/style.d.ts +0 -1
  166. package/dist/packages/core/src/types.d.ts +0 -255
  167. package/dist/packages/core/src/utilities/callOrReturn.d.ts +0 -9
  168. package/dist/packages/core/src/utilities/createStyleTag.d.ts +0 -1
  169. package/dist/packages/core/src/utilities/deleteProps.d.ts +0 -6
  170. package/dist/packages/core/src/utilities/elementFromString.d.ts +0 -1
  171. package/dist/packages/core/src/utilities/escapeForRegEx.d.ts +0 -1
  172. package/dist/packages/core/src/utilities/findDuplicates.d.ts +0 -1
  173. package/dist/packages/core/src/utilities/fromString.d.ts +0 -1
  174. package/dist/packages/core/src/utilities/index.d.ts +0 -20
  175. package/dist/packages/core/src/utilities/isAndroid.d.ts +0 -1
  176. package/dist/packages/core/src/utilities/isEmptyObject.d.ts +0 -1
  177. package/dist/packages/core/src/utilities/isFunction.d.ts +0 -1
  178. package/dist/packages/core/src/utilities/isMacOS.d.ts +0 -1
  179. package/dist/packages/core/src/utilities/isNumber.d.ts +0 -1
  180. package/dist/packages/core/src/utilities/isPlainObject.d.ts +0 -1
  181. package/dist/packages/core/src/utilities/isRegExp.d.ts +0 -1
  182. package/dist/packages/core/src/utilities/isString.d.ts +0 -1
  183. package/dist/packages/core/src/utilities/isiOS.d.ts +0 -1
  184. package/dist/packages/core/src/utilities/mergeAttributes.d.ts +0 -1
  185. package/dist/packages/core/src/utilities/mergeDeep.d.ts +0 -1
  186. package/dist/packages/core/src/utilities/minMax.d.ts +0 -1
  187. package/dist/packages/core/src/utilities/objectIncludes.d.ts +0 -8
  188. package/dist/packages/core/src/utilities/removeDuplicates.d.ts +0 -8
  189. package/dist/packages/extension-bubble-menu/src/bubble-menu-plugin.d.ts +0 -76
  190. package/dist/packages/extension-bubble-menu/src/bubble-menu.d.ts +0 -15
  191. package/dist/packages/extension-bubble-menu/src/index.d.ts +0 -4
  192. package/dist/packages/extension-floating-menu/src/floating-menu-plugin.d.ts +0 -66
  193. package/dist/packages/extension-floating-menu/src/floating-menu.d.ts +0 -15
  194. package/dist/packages/extension-floating-menu/src/index.d.ts +0 -4
  195. package/dist/packages/vue-3/src/BubbleMenu.d.ts +0 -59
  196. package/dist/packages/vue-3/src/Editor.d.ts +0 -23
  197. package/dist/packages/vue-3/src/EditorContent.d.ts +0 -17
  198. package/dist/packages/vue-3/src/FloatingMenu.d.ts +0 -48
  199. package/dist/packages/vue-3/src/NodeViewContent.d.ts +0 -13
  200. package/dist/packages/vue-3/src/NodeViewWrapper.d.ts +0 -13
  201. package/dist/packages/vue-3/src/VueNodeViewRenderer.d.ts +0 -48
  202. package/dist/packages/vue-3/src/VueRenderer.d.ts +0 -36
  203. package/dist/packages/vue-3/src/index.d.ts +0 -10
  204. package/dist/packages/vue-3/src/useEditor.d.ts +0 -3
  205. package/src/BubbleMenu.ts +0 -71
  206. package/src/FloatingMenu.ts +0 -66
package/dist/index.js CHANGED
@@ -1,478 +1,576 @@
1
- import { BubbleMenuPlugin } from '@tiptap/extension-bubble-menu';
2
- import { defineComponent, ref, onMounted, onBeforeUnmount, h, markRaw, customRef, getCurrentInstance, watchEffect, nextTick, unref, shallowRef, reactive, render, provide } from 'vue';
3
- import { Editor as Editor$1, NodeView } from '@tiptap/core';
4
- export * from '@tiptap/core';
5
- import { FloatingMenuPlugin } from '@tiptap/extension-floating-menu';
6
-
7
- const BubbleMenu = defineComponent({
8
- name: 'BubbleMenu',
9
- props: {
10
- pluginKey: {
11
- type: [String, Object],
12
- default: 'bubbleMenu',
13
- },
14
- editor: {
15
- type: Object,
16
- required: true,
17
- },
18
- updateDelay: {
19
- type: Number,
20
- default: undefined,
21
- },
22
- tippyOptions: {
23
- type: Object,
24
- default: () => ({}),
25
- },
26
- shouldShow: {
27
- type: Function,
28
- default: null,
29
- },
30
- },
31
- setup(props, { slots }) {
32
- const root = ref(null);
33
- onMounted(() => {
34
- const { updateDelay, editor, pluginKey, shouldShow, tippyOptions, } = props;
35
- editor.registerPlugin(BubbleMenuPlugin({
36
- updateDelay,
37
- editor,
38
- element: root.value,
39
- pluginKey,
40
- shouldShow,
41
- tippyOptions,
42
- }));
43
- });
44
- onBeforeUnmount(() => {
45
- const { pluginKey, editor } = props;
46
- editor.unregisterPlugin(pluginKey);
47
- });
48
- return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
49
- },
50
- });
51
-
1
+ // src/Editor.ts
2
+ import { Editor as CoreEditor } from "@tiptap/core";
3
+ import { customRef, markRaw } from "vue";
52
4
  function useDebouncedRef(value) {
53
- return customRef((track, trigger) => {
54
- return {
55
- get() {
56
- track();
57
- return value;
58
- },
59
- set(newValue) {
60
- // update state
61
- value = newValue;
62
- // update view as soon as possible
63
- requestAnimationFrame(() => {
64
- requestAnimationFrame(() => {
65
- trigger();
66
- });
67
- });
68
- },
69
- };
70
- });
71
- }
72
- class Editor extends Editor$1 {
73
- constructor(options = {}) {
74
- super(options);
75
- this.contentComponent = null;
76
- this.appContext = null;
77
- this.reactiveState = useDebouncedRef(this.view.state);
78
- this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);
79
- this.on('beforeTransaction', ({ nextState }) => {
80
- this.reactiveState.value = nextState;
81
- this.reactiveExtensionStorage.value = this.extensionStorage;
5
+ return customRef((track, trigger) => {
6
+ return {
7
+ get() {
8
+ track();
9
+ return value;
10
+ },
11
+ set(newValue) {
12
+ value = newValue;
13
+ requestAnimationFrame(() => {
14
+ requestAnimationFrame(() => {
15
+ trigger();
16
+ });
82
17
  });
83
- return markRaw(this); // eslint-disable-line
84
- }
85
- get state() {
86
- return this.reactiveState ? this.reactiveState.value : this.view.state;
87
- }
88
- get storage() {
89
- return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;
90
- }
91
- /**
92
- * Register a ProseMirror plugin.
93
- */
94
- registerPlugin(plugin, handlePlugins) {
95
- super.registerPlugin(plugin, handlePlugins);
96
- this.reactiveState.value = this.view.state;
18
+ }
19
+ };
20
+ });
21
+ }
22
+ var Editor = class extends CoreEditor {
23
+ constructor(options = {}) {
24
+ super(options);
25
+ this.contentComponent = null;
26
+ this.appContext = null;
27
+ this.reactiveState = useDebouncedRef(this.view.state);
28
+ this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);
29
+ this.on("beforeTransaction", ({ nextState }) => {
30
+ this.reactiveState.value = nextState;
31
+ this.reactiveExtensionStorage.value = this.extensionStorage;
32
+ });
33
+ return markRaw(this);
34
+ }
35
+ get state() {
36
+ return this.reactiveState ? this.reactiveState.value : this.view.state;
37
+ }
38
+ get storage() {
39
+ return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;
40
+ }
41
+ /**
42
+ * Register a ProseMirror plugin.
43
+ */
44
+ registerPlugin(plugin, handlePlugins) {
45
+ const nextState = super.registerPlugin(plugin, handlePlugins);
46
+ if (this.reactiveState) {
47
+ this.reactiveState.value = nextState;
97
48
  }
98
- /**
99
- * Unregister a ProseMirror plugin.
100
- */
101
- unregisterPlugin(nameOrPluginKey) {
102
- super.unregisterPlugin(nameOrPluginKey);
103
- this.reactiveState.value = this.view.state;
49
+ return nextState;
50
+ }
51
+ /**
52
+ * Unregister a ProseMirror plugin.
53
+ */
54
+ unregisterPlugin(nameOrPluginKey) {
55
+ const nextState = super.unregisterPlugin(nameOrPluginKey);
56
+ if (this.reactiveState && nextState) {
57
+ this.reactiveState.value = nextState;
104
58
  }
105
- }
106
-
107
- const EditorContent = defineComponent({
108
- name: 'EditorContent',
109
- props: {
110
- editor: {
111
- default: null,
112
- type: Object,
113
- },
114
- },
115
- setup(props) {
116
- const rootEl = ref();
117
- const instance = getCurrentInstance();
118
- watchEffect(() => {
119
- const editor = props.editor;
120
- if (editor && editor.options.element && rootEl.value) {
121
- nextTick(() => {
122
- if (!rootEl.value || !editor.options.element.firstChild) {
123
- return;
124
- }
125
- const element = unref(rootEl.value);
126
- rootEl.value.append(...editor.options.element.childNodes);
127
- // @ts-ignore
128
- editor.contentComponent = instance.ctx._;
129
- if (instance) {
130
- editor.appContext = {
131
- ...instance.appContext,
132
- provides: {
133
- // @ts-ignore
134
- ...instance.provides,
135
- ...instance.appContext.provides,
136
- },
137
- };
138
- }
139
- editor.setOptions({
140
- element,
141
- });
142
- editor.createNodeViews();
143
- });
144
- }
145
- });
146
- onBeforeUnmount(() => {
147
- const editor = props.editor;
148
- if (!editor) {
149
- return;
150
- }
151
- // destroy nodeviews before vue removes dom element
152
- if (!editor.isDestroyed) {
153
- editor.view.setProps({
154
- nodeViews: {},
155
- });
156
- }
157
- editor.contentComponent = null;
158
- editor.appContext = null;
159
- if (!editor.options.element.firstChild) {
160
- return;
161
- }
162
- const newElement = document.createElement('div');
163
- newElement.append(...editor.options.element.childNodes);
164
- editor.setOptions({
165
- element: newElement,
166
- });
167
- });
168
- return { rootEl };
169
- },
170
- render() {
171
- return h('div', {
172
- ref: (el) => { this.rootEl = el; },
173
- });
174
- },
175
- });
59
+ return nextState;
60
+ }
61
+ };
176
62
 
177
- const FloatingMenu = defineComponent({
178
- name: 'FloatingMenu',
179
- props: {
180
- pluginKey: {
181
- // TODO: TypeScript breaks :(
182
- // type: [String, Object as PropType<Exclude<FloatingMenuPluginProps['pluginKey'], string>>],
183
- type: null,
184
- default: 'floatingMenu',
185
- },
186
- editor: {
187
- type: Object,
188
- required: true,
189
- },
190
- tippyOptions: {
191
- type: Object,
192
- default: () => ({}),
193
- },
194
- shouldShow: {
195
- type: Function,
196
- default: null,
197
- },
198
- },
199
- setup(props, { slots }) {
200
- const root = ref(null);
201
- onMounted(() => {
202
- const { pluginKey, editor, tippyOptions, shouldShow, } = props;
203
- editor.registerPlugin(FloatingMenuPlugin({
204
- pluginKey,
205
- editor,
206
- element: root.value,
207
- tippyOptions,
208
- shouldShow,
209
- }));
210
- });
211
- onBeforeUnmount(() => {
212
- const { pluginKey, editor } = props;
213
- editor.unregisterPlugin(pluginKey);
63
+ // src/EditorContent.ts
64
+ import { defineComponent, getCurrentInstance, h, nextTick, onBeforeUnmount, ref, unref, watchEffect } from "vue";
65
+ var EditorContent = defineComponent({
66
+ name: "EditorContent",
67
+ props: {
68
+ editor: {
69
+ default: null,
70
+ type: Object
71
+ }
72
+ },
73
+ setup(props) {
74
+ const rootEl = ref();
75
+ const instance = getCurrentInstance();
76
+ watchEffect(() => {
77
+ const editor = props.editor;
78
+ if (editor && editor.options.element && rootEl.value) {
79
+ nextTick(() => {
80
+ var _a;
81
+ if (!rootEl.value || !((_a = editor.options.element) == null ? void 0 : _a.firstChild)) {
82
+ return;
83
+ }
84
+ const element = unref(rootEl.value);
85
+ rootEl.value.append(...editor.options.element.childNodes);
86
+ editor.contentComponent = instance.ctx._;
87
+ if (instance) {
88
+ editor.appContext = {
89
+ ...instance.appContext,
90
+ // Vue internally uses prototype chain to forward/shadow injects across the entire component chain
91
+ // so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext
92
+ // @ts-expect-error forward instance's 'provides' into appContext
93
+ provides: instance.provides
94
+ };
95
+ }
96
+ editor.setOptions({
97
+ element
98
+ });
99
+ editor.createNodeViews();
214
100
  });
215
- return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
216
- },
101
+ }
102
+ });
103
+ onBeforeUnmount(() => {
104
+ const editor = props.editor;
105
+ if (!editor) {
106
+ return;
107
+ }
108
+ editor.contentComponent = null;
109
+ editor.appContext = null;
110
+ });
111
+ return { rootEl };
112
+ },
113
+ render() {
114
+ return h("div", {
115
+ ref: (el) => {
116
+ this.rootEl = el;
117
+ }
118
+ });
119
+ }
217
120
  });
218
121
 
219
- const NodeViewContent = defineComponent({
220
- name: 'NodeViewContent',
221
- props: {
222
- as: {
223
- type: String,
224
- default: 'div',
225
- },
226
- },
227
- render() {
228
- return h(this.as, {
229
- style: {
230
- whiteSpace: 'pre-wrap',
231
- },
232
- 'data-node-view-content': '',
233
- });
234
- },
122
+ // src/NodeViewContent.ts
123
+ import { defineComponent as defineComponent2, h as h2 } from "vue";
124
+ var NodeViewContent = defineComponent2({
125
+ name: "NodeViewContent",
126
+ props: {
127
+ as: {
128
+ type: String,
129
+ default: "div"
130
+ }
131
+ },
132
+ render() {
133
+ return h2(this.as, {
134
+ style: {
135
+ whiteSpace: "pre-wrap"
136
+ },
137
+ "data-node-view-content": ""
138
+ });
139
+ }
235
140
  });
236
141
 
237
- const NodeViewWrapper = defineComponent({
238
- name: 'NodeViewWrapper',
239
- props: {
240
- as: {
241
- type: String,
242
- default: 'div',
142
+ // src/NodeViewWrapper.ts
143
+ import { defineComponent as defineComponent3, h as h3 } from "vue";
144
+ var NodeViewWrapper = defineComponent3({
145
+ name: "NodeViewWrapper",
146
+ props: {
147
+ as: {
148
+ type: String,
149
+ default: "div"
150
+ }
151
+ },
152
+ inject: ["onDragStart", "decorationClasses"],
153
+ render() {
154
+ var _a, _b;
155
+ return h3(
156
+ this.as,
157
+ {
158
+ // @ts-ignore
159
+ class: this.decorationClasses,
160
+ style: {
161
+ whiteSpace: "normal"
243
162
  },
244
- },
245
- inject: ['onDragStart', 'decorationClasses'],
246
- render() {
247
- var _a, _b;
248
- return h(this.as, {
249
- // @ts-ignore
250
- class: this.decorationClasses,
251
- style: {
252
- whiteSpace: 'normal',
253
- },
254
- 'data-node-view-wrapper': '',
255
- // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)
256
- onDragstart: this.onDragStart,
257
- }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));
258
- },
163
+ "data-node-view-wrapper": "",
164
+ // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)
165
+ onDragstart: this.onDragStart
166
+ },
167
+ (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)
168
+ );
169
+ }
259
170
  });
260
171
 
261
- const useEditor = (options = {}) => {
262
- const editor = shallowRef();
263
- onMounted(() => {
264
- editor.value = new Editor(options);
265
- });
266
- onBeforeUnmount(() => {
267
- var _a;
268
- (_a = editor.value) === null || _a === void 0 ? void 0 : _a.destroy();
269
- });
270
- return editor;
172
+ // src/useEditor.ts
173
+ import { onBeforeUnmount as onBeforeUnmount2, onMounted, shallowRef } from "vue";
174
+ var useEditor = (options = {}) => {
175
+ const editor = shallowRef();
176
+ onMounted(() => {
177
+ editor.value = new Editor(options);
178
+ });
179
+ onBeforeUnmount2(() => {
180
+ var _a, _b, _c;
181
+ const nodes = (_a = editor.value) == null ? void 0 : _a.options.element;
182
+ const newEl = nodes == null ? void 0 : nodes.cloneNode(true);
183
+ (_b = nodes == null ? void 0 : nodes.parentNode) == null ? void 0 : _b.replaceChild(newEl, nodes);
184
+ (_c = editor.value) == null ? void 0 : _c.destroy();
185
+ });
186
+ return editor;
271
187
  };
272
188
 
273
- /**
274
- * This class is used to render Vue components inside the editor.
275
- */
276
- class VueRenderer {
277
- constructor(component, { props = {}, editor }) {
278
- this.id = Math.floor(Math.random() * 0xFFFFFFFF).toString();
279
- this.editor = editor;
280
- this.component = markRaw(component);
281
- this.el = document.createElement('div');
282
- this.props = reactive(props);
283
- this.renderedComponent = this.renderComponent();
189
+ // src/VueMarkViewRenderer.ts
190
+ import { MarkView } from "@tiptap/core";
191
+ import { defineComponent as defineComponent4, h as h5, toRaw } from "vue";
192
+
193
+ // src/VueRenderer.ts
194
+ import { h as h4, markRaw as markRaw2, reactive, render } from "vue";
195
+ var VueRenderer = class {
196
+ constructor(component, { props = {}, editor }) {
197
+ this.editor = editor;
198
+ this.component = markRaw2(component);
199
+ this.el = document.createElement("div");
200
+ this.props = reactive(props);
201
+ this.renderedComponent = this.renderComponent();
202
+ }
203
+ get element() {
204
+ return this.renderedComponent.el;
205
+ }
206
+ get ref() {
207
+ var _a, _b, _c, _d;
208
+ if ((_b = (_a = this.renderedComponent.vNode) == null ? void 0 : _a.component) == null ? void 0 : _b.exposed) {
209
+ return this.renderedComponent.vNode.component.exposed;
284
210
  }
285
- get element() {
286
- return this.renderedComponent.el;
211
+ return (_d = (_c = this.renderedComponent.vNode) == null ? void 0 : _c.component) == null ? void 0 : _d.proxy;
212
+ }
213
+ renderComponent() {
214
+ let vNode = h4(this.component, this.props);
215
+ if (this.editor.appContext) {
216
+ vNode.appContext = this.editor.appContext;
287
217
  }
288
- renderComponent() {
289
- let vNode = h(this.component, this.props);
290
- if (typeof document !== 'undefined' && this.el) {
291
- render(vNode, this.el);
292
- }
293
- const destroy = () => {
294
- if (this.el) {
295
- render(null, this.el);
296
- }
297
- this.el = null;
298
- vNode = null;
299
- };
300
- return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };
218
+ if (typeof document !== "undefined" && this.el) {
219
+ render(vNode, this.el);
301
220
  }
302
- updateProps(props = {}) {
303
- Object
304
- .entries(props)
305
- .forEach(([key, value]) => {
306
- this.props[key] = value;
307
- });
308
- this.renderComponent();
221
+ const destroy = () => {
222
+ if (this.el) {
223
+ render(null, this.el);
224
+ }
225
+ this.el = null;
226
+ vNode = null;
227
+ };
228
+ return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };
229
+ }
230
+ updateProps(props = {}) {
231
+ Object.entries(props).forEach(([key, value]) => {
232
+ this.props[key] = value;
233
+ });
234
+ this.renderComponent();
235
+ }
236
+ destroy() {
237
+ this.renderedComponent.destroy();
238
+ }
239
+ };
240
+
241
+ // src/VueMarkViewRenderer.ts
242
+ var markViewProps = {
243
+ editor: {
244
+ type: Object,
245
+ required: true
246
+ },
247
+ mark: {
248
+ type: Object,
249
+ required: true
250
+ },
251
+ extension: {
252
+ type: Object,
253
+ required: true
254
+ },
255
+ inline: {
256
+ type: Boolean,
257
+ required: true
258
+ },
259
+ view: {
260
+ type: Object,
261
+ required: true
262
+ },
263
+ updateAttributes: {
264
+ type: Function,
265
+ required: true
266
+ },
267
+ HTMLAttributes: {
268
+ type: Object,
269
+ required: true
270
+ }
271
+ };
272
+ var MarkViewContent = defineComponent4({
273
+ name: "MarkViewContent",
274
+ props: {
275
+ as: {
276
+ type: String,
277
+ default: "span"
309
278
  }
310
- destroy() {
311
- this.renderedComponent.destroy();
279
+ },
280
+ render() {
281
+ return h5(this.as, {
282
+ style: {
283
+ whiteSpace: "inherit"
284
+ },
285
+ "data-mark-view-content": ""
286
+ });
287
+ }
288
+ });
289
+ var VueMarkView = class extends MarkView {
290
+ constructor(component, props, options) {
291
+ super(component, props, options);
292
+ const componentProps = { ...props, updateAttributes: this.updateAttributes.bind(this) };
293
+ const extendedComponent = defineComponent4({
294
+ extends: { ...component },
295
+ props: Object.keys(componentProps),
296
+ template: this.component.template,
297
+ setup: (reactiveProps) => {
298
+ var _a;
299
+ return (_a = component.setup) == null ? void 0 : _a.call(component, reactiveProps, {
300
+ expose: () => void 0
301
+ });
302
+ },
303
+ // Add support for scoped styles
304
+ __scopeId: component.__scopeId,
305
+ __cssModules: component.__cssModules,
306
+ __name: component.__name,
307
+ __file: component.__file
308
+ });
309
+ this.renderer = new VueRenderer(extendedComponent, {
310
+ editor: this.editor,
311
+ props: componentProps
312
+ });
313
+ }
314
+ get dom() {
315
+ return this.renderer.element;
316
+ }
317
+ get contentDOM() {
318
+ return this.dom.querySelector("[data-mark-view-content]");
319
+ }
320
+ updateAttributes(attrs) {
321
+ const unproxiedMark = toRaw(this.mark);
322
+ super.updateAttributes(attrs, unproxiedMark);
323
+ }
324
+ destroy() {
325
+ this.renderer.destroy();
326
+ }
327
+ };
328
+ function VueMarkViewRenderer(component, options = {}) {
329
+ return (props) => {
330
+ if (!props.editor.contentComponent) {
331
+ return {};
312
332
  }
333
+ return new VueMarkView(component, props, options);
334
+ };
313
335
  }
314
336
 
315
- const nodeViewProps = {
316
- editor: {
317
- type: Object,
318
- required: true,
319
- },
320
- node: {
321
- type: Object,
322
- required: true,
323
- },
324
- decorations: {
325
- type: Object,
326
- required: true,
327
- },
328
- selected: {
329
- type: Boolean,
330
- required: true,
331
- },
332
- extension: {
333
- type: Object,
334
- required: true,
335
- },
336
- getPos: {
337
- type: Function,
338
- required: true,
339
- },
340
- updateAttributes: {
341
- type: Function,
342
- required: true,
343
- },
344
- deleteNode: {
345
- type: Function,
346
- required: true,
347
- },
337
+ // src/VueNodeViewRenderer.ts
338
+ import { NodeView } from "@tiptap/core";
339
+ import { defineComponent as defineComponent5, provide, ref as ref2 } from "vue";
340
+ var nodeViewProps = {
341
+ editor: {
342
+ type: Object,
343
+ required: true
344
+ },
345
+ node: {
346
+ type: Object,
347
+ required: true
348
+ },
349
+ decorations: {
350
+ type: Object,
351
+ required: true
352
+ },
353
+ selected: {
354
+ type: Boolean,
355
+ required: true
356
+ },
357
+ extension: {
358
+ type: Object,
359
+ required: true
360
+ },
361
+ getPos: {
362
+ type: Function,
363
+ required: true
364
+ },
365
+ updateAttributes: {
366
+ type: Function,
367
+ required: true
368
+ },
369
+ deleteNode: {
370
+ type: Function,
371
+ required: true
372
+ },
373
+ view: {
374
+ type: Object,
375
+ required: true
376
+ },
377
+ innerDecorations: {
378
+ type: Object,
379
+ required: true
380
+ },
381
+ HTMLAttributes: {
382
+ type: Object,
383
+ required: true
384
+ }
348
385
  };
349
- class VueNodeView extends NodeView {
350
- mount() {
351
- const props = {
352
- editor: this.editor,
353
- node: this.node,
354
- decorations: this.decorations,
355
- selected: false,
356
- extension: this.extension,
357
- getPos: () => this.getPos(),
358
- updateAttributes: (attributes = {}) => this.updateAttributes(attributes),
359
- deleteNode: () => this.deleteNode(),
360
- };
361
- const onDragStart = this.onDragStart.bind(this);
362
- this.decorationClasses = ref(this.getDecorationClasses());
363
- const extendedComponent = defineComponent({
364
- extends: { ...this.component },
365
- props: Object.keys(props),
366
- template: this.component.template,
367
- setup: reactiveProps => {
368
- var _a, _b;
369
- provide('onDragStart', onDragStart);
370
- provide('decorationClasses', this.decorationClasses);
371
- return (_b = (_a = this.component).setup) === null || _b === void 0 ? void 0 : _b.call(_a, reactiveProps, {
372
- expose: () => undefined,
373
- });
374
- },
375
- // add support for scoped styles
376
- // @ts-ignore
377
- // eslint-disable-next-line
378
- __scopeId: this.component.__scopeId,
379
- // add support for CSS Modules
380
- // @ts-ignore
381
- // eslint-disable-next-line
382
- __cssModules: this.component.__cssModules,
383
- // add support for vue devtools
384
- // @ts-ignore
385
- // eslint-disable-next-line
386
- __name: this.component.__name,
387
- // @ts-ignore
388
- // eslint-disable-next-line
389
- __file: this.component.__file,
390
- });
391
- this.renderer = new VueRenderer(extendedComponent, {
392
- editor: this.editor,
393
- props,
386
+ var VueNodeView = class extends NodeView {
387
+ mount() {
388
+ const props = {
389
+ editor: this.editor,
390
+ node: this.node,
391
+ decorations: this.decorations,
392
+ innerDecorations: this.innerDecorations,
393
+ view: this.view,
394
+ selected: false,
395
+ extension: this.extension,
396
+ HTMLAttributes: this.HTMLAttributes,
397
+ getPos: () => this.getPos(),
398
+ updateAttributes: (attributes = {}) => this.updateAttributes(attributes),
399
+ deleteNode: () => this.deleteNode()
400
+ };
401
+ const onDragStart = this.onDragStart.bind(this);
402
+ this.decorationClasses = ref2(this.getDecorationClasses());
403
+ const extendedComponent = defineComponent5({
404
+ extends: { ...this.component },
405
+ props: Object.keys(props),
406
+ template: this.component.template,
407
+ setup: (reactiveProps) => {
408
+ var _a, _b;
409
+ provide("onDragStart", onDragStart);
410
+ provide("decorationClasses", this.decorationClasses);
411
+ return (_b = (_a = this.component).setup) == null ? void 0 : _b.call(_a, reactiveProps, {
412
+ expose: () => void 0
394
413
  });
414
+ },
415
+ // add support for scoped styles
416
+ // @ts-ignore
417
+ // eslint-disable-next-line
418
+ __scopeId: this.component.__scopeId,
419
+ // add support for CSS Modules
420
+ // @ts-ignore
421
+ // eslint-disable-next-line
422
+ __cssModules: this.component.__cssModules,
423
+ // add support for vue devtools
424
+ // @ts-ignore
425
+ // eslint-disable-next-line
426
+ __name: this.component.__name,
427
+ // @ts-ignore
428
+ // eslint-disable-next-line
429
+ __file: this.component.__file
430
+ });
431
+ this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);
432
+ this.editor.on("selectionUpdate", this.handleSelectionUpdate);
433
+ this.renderer = new VueRenderer(extendedComponent, {
434
+ editor: this.editor,
435
+ props
436
+ });
437
+ }
438
+ /**
439
+ * Return the DOM element.
440
+ * This is the element that will be used to display the node view.
441
+ */
442
+ get dom() {
443
+ if (!this.renderer.element || !this.renderer.element.hasAttribute("data-node-view-wrapper")) {
444
+ throw Error("Please use the NodeViewWrapper component for your node view.");
395
445
  }
396
- get dom() {
397
- if (!this.renderer.element || !this.renderer.element.hasAttribute('data-node-view-wrapper')) {
398
- throw Error('Please use the NodeViewWrapper component for your node view.');
399
- }
400
- return this.renderer.element;
446
+ return this.renderer.element;
447
+ }
448
+ /**
449
+ * Return the content DOM element.
450
+ * This is the element that will be used to display the rich-text content of the node.
451
+ */
452
+ get contentDOM() {
453
+ if (this.node.isLeaf) {
454
+ return null;
401
455
  }
402
- get contentDOM() {
403
- if (this.node.isLeaf) {
404
- return null;
405
- }
406
- const contentElement = this.dom.querySelector('[data-node-view-content]');
407
- return (contentElement || this.dom);
456
+ return this.dom.querySelector("[data-node-view-content]");
457
+ }
458
+ /**
459
+ * On editor selection update, check if the node is selected.
460
+ * If it is, call `selectNode`, otherwise call `deselectNode`.
461
+ */
462
+ handleSelectionUpdate() {
463
+ const { from, to } = this.editor.state.selection;
464
+ const pos = this.getPos();
465
+ if (typeof pos !== "number") {
466
+ return;
408
467
  }
409
- update(node, decorations) {
410
- const updateProps = (props) => {
411
- this.decorationClasses.value = this.getDecorationClasses();
412
- this.renderer.updateProps(props);
413
- };
414
- if (typeof this.options.update === 'function') {
415
- const oldNode = this.node;
416
- const oldDecorations = this.decorations;
417
- this.node = node;
418
- this.decorations = decorations;
419
- return this.options.update({
420
- oldNode,
421
- oldDecorations,
422
- newNode: node,
423
- newDecorations: decorations,
424
- updateProps: () => updateProps({ node, decorations }),
425
- });
426
- }
427
- if (node.type !== this.node.type) {
428
- return false;
429
- }
430
- if (node === this.node && this.decorations === decorations) {
431
- return true;
432
- }
433
- this.node = node;
434
- this.decorations = decorations;
435
- updateProps({ node, decorations });
436
- return true;
468
+ if (from <= pos && to >= pos + this.node.nodeSize) {
469
+ if (this.renderer.props.selected) {
470
+ return;
471
+ }
472
+ this.selectNode();
473
+ } else {
474
+ if (!this.renderer.props.selected) {
475
+ return;
476
+ }
477
+ this.deselectNode();
437
478
  }
438
- selectNode() {
439
- this.renderer.updateProps({
440
- selected: true,
441
- });
442
- if (this.renderer.element) {
443
- this.renderer.element.classList.add('ProseMirror-selectednode');
444
- }
479
+ }
480
+ /**
481
+ * On update, update the React component.
482
+ * To prevent unnecessary updates, the `update` option can be used.
483
+ */
484
+ update(node, decorations, innerDecorations) {
485
+ const rerenderComponent = (props) => {
486
+ this.decorationClasses.value = this.getDecorationClasses();
487
+ this.renderer.updateProps(props);
488
+ };
489
+ if (typeof this.options.update === "function") {
490
+ const oldNode = this.node;
491
+ const oldDecorations = this.decorations;
492
+ const oldInnerDecorations = this.innerDecorations;
493
+ this.node = node;
494
+ this.decorations = decorations;
495
+ this.innerDecorations = innerDecorations;
496
+ return this.options.update({
497
+ oldNode,
498
+ oldDecorations,
499
+ newNode: node,
500
+ newDecorations: decorations,
501
+ oldInnerDecorations,
502
+ innerDecorations,
503
+ updateProps: () => rerenderComponent({ node, decorations, innerDecorations })
504
+ });
445
505
  }
446
- deselectNode() {
447
- this.renderer.updateProps({
448
- selected: false,
449
- });
450
- if (this.renderer.element) {
451
- this.renderer.element.classList.remove('ProseMirror-selectednode');
452
- }
506
+ if (node.type !== this.node.type) {
507
+ return false;
453
508
  }
454
- getDecorationClasses() {
455
- return (this.decorations
456
- // @ts-ignore
457
- .map(item => item.type.attrs.class)
458
- .flat()
459
- .join(' '));
509
+ if (node === this.node && this.decorations === decorations && this.innerDecorations === innerDecorations) {
510
+ return true;
460
511
  }
461
- destroy() {
462
- this.renderer.destroy();
512
+ this.node = node;
513
+ this.decorations = decorations;
514
+ this.innerDecorations = innerDecorations;
515
+ rerenderComponent({ node, decorations, innerDecorations });
516
+ return true;
517
+ }
518
+ /**
519
+ * Select the node.
520
+ * Add the `selected` prop and the `ProseMirror-selectednode` class.
521
+ */
522
+ selectNode() {
523
+ this.renderer.updateProps({
524
+ selected: true
525
+ });
526
+ if (this.renderer.element) {
527
+ this.renderer.element.classList.add("ProseMirror-selectednode");
463
528
  }
464
- }
529
+ }
530
+ /**
531
+ * Deselect the node.
532
+ * Remove the `selected` prop and the `ProseMirror-selectednode` class.
533
+ */
534
+ deselectNode() {
535
+ this.renderer.updateProps({
536
+ selected: false
537
+ });
538
+ if (this.renderer.element) {
539
+ this.renderer.element.classList.remove("ProseMirror-selectednode");
540
+ }
541
+ }
542
+ getDecorationClasses() {
543
+ return this.decorations.map((item) => item.type.attrs.class).flat().join(" ");
544
+ }
545
+ destroy() {
546
+ this.renderer.destroy();
547
+ this.editor.off("selectionUpdate", this.handleSelectionUpdate);
548
+ }
549
+ };
465
550
  function VueNodeViewRenderer(component, options) {
466
- return (props) => {
467
- // try to get the parent component
468
- // this is important for vue devtools to show the component hierarchy correctly
469
- // maybe it’s `undefined` because <editor-content> isn’t rendered yet
470
- if (!props.editor.contentComponent) {
471
- return {};
472
- }
473
- return new VueNodeView(component, props, options);
474
- };
551
+ return (props) => {
552
+ if (!props.editor.contentComponent) {
553
+ return {};
554
+ }
555
+ const normalizedComponent = typeof component === "function" && "__vccOpts" in component ? component.__vccOpts : component;
556
+ return new VueNodeView(normalizedComponent, props, options);
557
+ };
475
558
  }
476
559
 
477
- export { BubbleMenu, Editor, EditorContent, FloatingMenu, NodeViewContent, NodeViewWrapper, VueNodeViewRenderer, VueRenderer, nodeViewProps, useEditor };
478
- //# sourceMappingURL=index.js.map
560
+ // src/index.ts
561
+ export * from "@tiptap/core";
562
+ export {
563
+ Editor,
564
+ EditorContent,
565
+ MarkViewContent,
566
+ NodeViewContent,
567
+ NodeViewWrapper,
568
+ VueMarkView,
569
+ VueMarkViewRenderer,
570
+ VueNodeViewRenderer,
571
+ VueRenderer,
572
+ markViewProps,
573
+ nodeViewProps,
574
+ useEditor
575
+ };
576
+ //# sourceMappingURL=index.js.map