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