diff --git a/packages/vue/src/VueRenderer.ts b/packages/vue/src/VueNodeViewRenderer.ts similarity index 96% rename from packages/vue/src/VueRenderer.ts rename to packages/vue/src/VueNodeViewRenderer.ts index 4215b9c2..58f70772 100644 --- a/packages/vue/src/VueRenderer.ts +++ b/packages/vue/src/VueNodeViewRenderer.ts @@ -16,7 +16,7 @@ function getComponentFromElement(element: HTMLElement): Vue { return element.__vue__ } -interface VueRendererOptions { +interface VueNodeViewRendererOptions { stopEvent: ((event: Event) => boolean) | null, update: ((node: ProseMirrorNode, decorations: Decoration[]) => boolean) | null, } @@ -39,12 +39,12 @@ class VueNodeView implements NodeView { isDragging = false - options: VueRendererOptions = { + options: VueNodeViewRendererOptions = { stopEvent: null, update: null, } - constructor(component: Vue | VueConstructor, props: NodeViewRendererProps, options?: Partial) { + constructor(component: Vue | VueConstructor, props: NodeViewRendererProps, options?: Partial) { this.options = { ...this.options, ...options } this.editor = props.editor this.extension = props.extension @@ -314,7 +314,7 @@ class VueNodeView implements NodeView { } -export default function VueRenderer(component: Vue | VueConstructor, options?: Partial): NodeViewRenderer { +export default function VueNodeViewRenderer(component: Vue | VueConstructor, options?: Partial): NodeViewRenderer { return (props: NodeViewRendererProps) => { // try to get the parent component // this is important for vue devtools to show the component hierarchy correctly diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index d668e82c..9640f8c9 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -1,3 +1,3 @@ export * from '@tiptap/core' -export { default as VueRenderer } from './VueRenderer' +export { default as VueNodeViewRenderer } from './VueNodeViewRenderer' export { default as EditorContent } from './components/EditorContent'