@dialpad/dialtone 9.160.1 → 9.162.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tokens/doc.json +64267 -64267
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
- package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/datepicker.js +188 -159
- package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs +1 -1
- package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
- package/dist/vue3/lib/datepicker/utils.js +37 -37
- package/dist/vue3/lib/datepicker/utils.js.map +1 -1
- package/dist/vue3/lib/popover/popover.cjs +1 -1
- package/dist/vue3/lib/popover/popover.cjs.map +1 -1
- package/dist/vue3/lib/popover/popover.js +35 -35
- package/dist/vue3/lib/popover/popover.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +10 -10
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +2351 -830
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.cjs +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
- package/dist/vue3/node_modules/@tiptap/vue-3.js +233 -209
- package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
- package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts +8 -0
- package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +2 -0
- package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +2 -0
- package/dist/vue3/types/components/datepicker/utils.d.ts +1 -1
- package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/suggestion.d.ts +1 -6
- package/dist/vue3/types/components/rich_text_editor/extensions/channels/suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +1 -6
- package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/suggestion.d.ts +1 -6
- package/dist/vue3/types/components/rich_text_editor/extensions/mentions/suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts +1 -6
- package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/utils/suggestion_utils.d.ts +29 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/utils/suggestion_utils.d.ts.map +1 -0
- package/package.json +31 -37
- package/dist/vue3/types/components/rich_text_editor/extensions/tippy_plugins/hide_on_esc.d.ts +0 -12
- package/dist/vue3/types/components/rich_text_editor/extensions/tippy_plugins/hide_on_esc.d.ts.map +0 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +0 -768
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +0 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +0 -4072
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +0 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +0 -8005
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@tiptap/core"),o=require("vue");function c(e){return o.customRef((t,r)=>({get(){return t(),e},set(n){e=n,requestAnimationFrame(()=>{requestAnimationFrame(()=>{r()})})}}))}var l=class extends a.Editor{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=c(this.view.state),this.reactiveExtensionStorage=c(this.extensionStorage),this.on("beforeTransaction",({nextState:t})=>{this.reactiveState.value=t,this.reactiveExtensionStorage.value=this.extensionStorage}),o.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){const r=super.registerPlugin(e,t);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(e){const t=super.unregisterPlugin(e);return this.reactiveState&&t&&(this.reactiveState.value=t),t}},v=o.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=o.ref(),r=o.getCurrentInstance();return o.watchEffect(()=>{const n=e.editor;n&&n.options.element&&t.value&&o.nextTick(()=>{var i;if(!t.value||!((i=n.view.dom)!=null&&i.parentNode))return;const s=o.unref(t.value);t.value.append(...n.view.dom.parentNode.childNodes),n.contentComponent=r.ctx._,r&&(n.appContext={...r.appContext,provides:r.provides}),n.setOptions({element:s}),n.createNodeViews()})}),o.onBeforeUnmount(()=>{const n=e.editor;n&&(n.contentComponent=null,n.appContext=null)}),{rootEl:t}},render(){return o.h("div",{ref:e=>{this.rootEl=e}})}}),m=o.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return o.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),f=o.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var e,t;return o.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(t=(e=this.$slots).default)==null?void 0:t.call(e))}}),y=(e={})=>{const t=o.shallowRef();return o.onMounted(()=>{t.value=new l(e)}),o.onBeforeUnmount(()=>{var r,n,i,s;const d=(n=(r=t.value)==null?void 0:r.view.dom)==null?void 0:n.parentNode,h=d==null?void 0:d.cloneNode(!0);(i=d==null?void 0:d.parentNode)==null||i.replaceChild(h,d),(s=t.value)==null||s.destroy()}),t},u=class{constructor(e,{props:t={},editor:r}){this.destroyed=!1,this.editor=r,this.component=o.markRaw(e),this.el=document.createElement("div"),this.props=o.reactive(t),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,t,r,n;return(t=(e=this.renderedComponent.vNode)==null?void 0:e.component)!=null&&t.exposed?this.renderedComponent.vNode.component.exposed:(n=(r=this.renderedComponent.vNode)==null?void 0:r.component)==null?void 0:n.proxy}renderComponent(){if(this.destroyed)return this.renderedComponent;let e=o.h(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&o.render(e,this.el),{vNode:e,destroy:()=>{this.el&&o.render(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){this.destroyed||(Object.entries(e).forEach(([t,r])=>{this.props[t]=r}),this.renderComponent())}destroy(){this.destroyed||(this.destroyed=!0,this.renderedComponent.destroy())}},w={editor:{type:Object,required:!0},mark:{type:Object,required:!0},extension:{type:Object,required:!0},inline:{type:Boolean,required:!0},view:{type:Object,required:!0},updateAttributes:{type:Function,required:!0},HTMLAttributes:{type:Object,required:!0}},g=o.defineComponent({name:"MarkViewContent",props:{as:{type:String,default:"span"}},render(){return o.h(this.as,{style:{whiteSpace:"inherit"},"data-mark-view-content":""})}}),p=class extends a.MarkView{constructor(e,t,r){super(e,t,r);const n={...t,updateAttributes:this.updateAttributes.bind(this)},i=o.defineComponent({extends:{...e},props:Object.keys(n),template:this.component.template,setup:s=>{var d;return(d=e.setup)==null?void 0:d.call(e,s,{expose:()=>{}})},__scopeId:e.__scopeId,__cssModules:e.__cssModules,__name:e.__name,__file:e.__file});this.renderer=new u(i,{editor:this.editor,props:n})}get dom(){return this.renderer.element}get contentDOM(){return this.dom.querySelector("[data-mark-view-content]")}updateAttributes(e){const t=o.toRaw(this.mark);super.updateAttributes(e,t)}destroy(){this.renderer.destroy()}};function C(e,t={}){return r=>r.editor.contentComponent?new p(e,r,t):{}}var S={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}},_=class extends a.NodeView{constructor(){super(...arguments),this.cachedExtensionWithSyncedStorage=null}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(r,n,i){var s;return n==="storage"?(s=e.storage[t.name])!=null?s:{}:Reflect.get(r,n,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(n={})=>this.updateAttributes(n),deleteNode:()=>this.deleteNode()},t=this.onDragStart.bind(this);this.decorationClasses=o.ref(this.getDecorationClasses());const r=o.defineComponent({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:n=>{var i,s;return o.provide("onDragStart",t),o.provide("decorationClasses",this.decorationClasses),(s=(i=this.component).setup)==null?void 0:s.call(i,n,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new u(r,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:e,to:t}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&t>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,t,r){const n=i=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(i)};if(typeof this.options.update=="function"){const i=this.node,s=this.decorations,d=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:s,newNode:e,newDecorations:t,oldInnerDecorations:d,innerDecorations:r,updateProps:()=>n({node:e,decorations:t,innerDecorations:r,extension:this.extensionWithSyncedStorage})})}return e.type!==this.node.type?!1:(e===this.node&&this.decorations===t&&this.innerDecorations===r||(this.node=e,this.decorations=t,this.innerDecorations=r,n({node:e,decorations:t,innerDecorations:r,extension:this.extensionWithSyncedStorage})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.flatMap(e=>e.type.attrs.class).join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}};function x(e,t){return r=>{if(!r.editor.contentComponent)return{};const n=typeof e=="function"&&"__vccOpts"in e?e.__vccOpts:e;return new _(n,r,t)}}exports.Editor=l;exports.EditorContent=v;exports.MarkViewContent=g;exports.NodeViewContent=m;exports.NodeViewWrapper=f;exports.VueMarkView=p;exports.VueMarkViewRenderer=C;exports.VueNodeViewRenderer=x;exports.VueRenderer=u;exports.markViewProps=w;exports.nodeViewProps=S;exports.useEditor=y;Object.keys(a).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>a[e]})});
|
|
2
2
|
//# sourceMappingURL=vue-3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-3.cjs","sources":["../../../../../node_modules/.pnpm/@tiptap+vue-3@2.12.0_@tiptap+core@2.12.0_@tiptap+pm@2.12.0__@tiptap+pm@2.12.0_vue@3.5.27_typescript@5.9.3_/node_modules/@tiptap/vue-3/dist/index.js"],"sourcesContent":["import { BubbleMenuPlugin } from '@tiptap/extension-bubble-menu';\nimport { defineComponent, ref, onMounted, onBeforeUnmount, h, markRaw, customRef, getCurrentInstance, watchEffect, nextTick, unref, shallowRef, reactive, render, provide } from 'vue';\nimport { Editor as Editor$1, NodeView } from '@tiptap/core';\nexport * from '@tiptap/core';\nimport { FloatingMenuPlugin } from '@tiptap/extension-floating-menu';\n\nconst BubbleMenu = defineComponent({\n name: 'BubbleMenu',\n props: {\n pluginKey: {\n type: [String, Object],\n default: 'bubbleMenu',\n },\n editor: {\n type: Object,\n required: true,\n },\n updateDelay: {\n type: Number,\n default: undefined,\n },\n tippyOptions: {\n type: Object,\n default: () => ({}),\n },\n shouldShow: {\n type: Function,\n default: null,\n },\n },\n setup(props, { slots }) {\n const root = ref(null);\n onMounted(() => {\n const { updateDelay, editor, pluginKey, shouldShow, tippyOptions, } = props;\n editor.registerPlugin(BubbleMenuPlugin({\n updateDelay,\n editor,\n element: root.value,\n pluginKey,\n shouldShow,\n tippyOptions,\n }));\n });\n onBeforeUnmount(() => {\n const { pluginKey, editor } = props;\n editor.unregisterPlugin(pluginKey);\n });\n return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };\n },\n});\n\n/* eslint-disable react-hooks/rules-of-hooks */\nfunction useDebouncedRef(value) {\n return customRef((track, trigger) => {\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n // update state\n value = newValue;\n // update view as soon as possible\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n trigger();\n });\n });\n },\n };\n });\n}\nclass Editor extends Editor$1 {\n constructor(options = {}) {\n super(options);\n this.contentComponent = null;\n this.appContext = null;\n this.reactiveState = useDebouncedRef(this.view.state);\n this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);\n this.on('beforeTransaction', ({ nextState }) => {\n this.reactiveState.value = nextState;\n this.reactiveExtensionStorage.value = this.extensionStorage;\n });\n return markRaw(this); // eslint-disable-line\n }\n get state() {\n return this.reactiveState ? this.reactiveState.value : this.view.state;\n }\n get storage() {\n return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;\n }\n /**\n * Register a ProseMirror plugin.\n */\n registerPlugin(plugin, handlePlugins) {\n const nextState = super.registerPlugin(plugin, handlePlugins);\n if (this.reactiveState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n /**\n * Unregister a ProseMirror plugin.\n */\n unregisterPlugin(nameOrPluginKey) {\n const nextState = super.unregisterPlugin(nameOrPluginKey);\n if (this.reactiveState && nextState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n}\n\nconst EditorContent = defineComponent({\n name: 'EditorContent',\n props: {\n editor: {\n default: null,\n type: Object,\n },\n },\n setup(props) {\n const rootEl = ref();\n const instance = getCurrentInstance();\n watchEffect(() => {\n const editor = props.editor;\n if (editor && editor.options.element && rootEl.value) {\n nextTick(() => {\n if (!rootEl.value || !editor.options.element.firstChild) {\n return;\n }\n const element = unref(rootEl.value);\n rootEl.value.append(...editor.options.element.childNodes);\n // @ts-ignore\n editor.contentComponent = instance.ctx._;\n if (instance) {\n editor.appContext = {\n ...instance.appContext,\n // Vue internally uses prototype chain to forward/shadow injects across the entire component chain\n // so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext\n // @ts-expect-error forward instance's 'provides' into appContext\n provides: instance.provides,\n };\n }\n editor.setOptions({\n element,\n });\n editor.createNodeViews();\n });\n }\n });\n onBeforeUnmount(() => {\n const editor = props.editor;\n if (!editor) {\n return;\n }\n editor.contentComponent = null;\n editor.appContext = null;\n });\n return { rootEl };\n },\n render() {\n return h('div', {\n ref: (el) => { this.rootEl = el; },\n });\n },\n});\n\nconst FloatingMenu = defineComponent({\n name: 'FloatingMenu',\n props: {\n pluginKey: {\n // TODO: TypeScript breaks :(\n // type: [String, Object as PropType<Exclude<FloatingMenuPluginProps['pluginKey'], string>>],\n type: null,\n default: 'floatingMenu',\n },\n editor: {\n type: Object,\n required: true,\n },\n tippyOptions: {\n type: Object,\n default: () => ({}),\n },\n shouldShow: {\n type: Function,\n default: null,\n },\n },\n setup(props, { slots }) {\n const root = ref(null);\n onMounted(() => {\n const { pluginKey, editor, tippyOptions, shouldShow, } = props;\n editor.registerPlugin(FloatingMenuPlugin({\n pluginKey,\n editor,\n element: root.value,\n tippyOptions,\n shouldShow,\n }));\n });\n onBeforeUnmount(() => {\n const { pluginKey, editor } = props;\n editor.unregisterPlugin(pluginKey);\n });\n return () => { var _a; return h('div', { ref: root }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };\n },\n});\n\nconst NodeViewContent = defineComponent({\n name: 'NodeViewContent',\n props: {\n as: {\n type: String,\n default: 'div',\n },\n },\n render() {\n return h(this.as, {\n style: {\n whiteSpace: 'pre-wrap',\n },\n 'data-node-view-content': '',\n });\n },\n});\n\nconst NodeViewWrapper = defineComponent({\n name: 'NodeViewWrapper',\n props: {\n as: {\n type: String,\n default: 'div',\n },\n },\n inject: ['onDragStart', 'decorationClasses'],\n render() {\n var _a, _b;\n return h(this.as, {\n // @ts-ignore\n class: this.decorationClasses,\n style: {\n whiteSpace: 'normal',\n },\n 'data-node-view-wrapper': '',\n // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)\n onDragstart: this.onDragStart,\n }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));\n },\n});\n\nconst useEditor = (options = {}) => {\n const editor = shallowRef();\n onMounted(() => {\n editor.value = new Editor(options);\n });\n onBeforeUnmount(() => {\n var _a, _b, _c;\n // Cloning root node (and its children) to avoid content being lost by destroy\n const nodes = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.options.element;\n const newEl = nodes === null || nodes === void 0 ? void 0 : nodes.cloneNode(true);\n (_b = nodes === null || nodes === void 0 ? void 0 : nodes.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(newEl, nodes);\n (_c = editor.value) === null || _c === void 0 ? void 0 : _c.destroy();\n });\n return editor;\n};\n\n/**\n * This class is used to render Vue components inside the editor.\n */\nclass VueRenderer {\n constructor(component, { props = {}, editor }) {\n this.editor = editor;\n this.component = markRaw(component);\n this.el = document.createElement('div');\n this.props = reactive(props);\n this.renderedComponent = this.renderComponent();\n }\n get element() {\n return this.renderedComponent.el;\n }\n get ref() {\n var _a, _b, _c, _d;\n // Composition API\n if ((_b = (_a = this.renderedComponent.vNode) === null || _a === void 0 ? void 0 : _a.component) === null || _b === void 0 ? void 0 : _b.exposed) {\n return this.renderedComponent.vNode.component.exposed;\n }\n // Option API\n return (_d = (_c = this.renderedComponent.vNode) === null || _c === void 0 ? void 0 : _c.component) === null || _d === void 0 ? void 0 : _d.proxy;\n }\n renderComponent() {\n let vNode = h(this.component, this.props);\n if (this.editor.appContext) {\n vNode.appContext = this.editor.appContext;\n }\n if (typeof document !== 'undefined' && this.el) {\n render(vNode, this.el);\n }\n const destroy = () => {\n if (this.el) {\n render(null, this.el);\n }\n this.el = null;\n vNode = null;\n };\n return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };\n }\n updateProps(props = {}) {\n Object.entries(props).forEach(([key, value]) => {\n this.props[key] = value;\n });\n this.renderComponent();\n }\n destroy() {\n this.renderedComponent.destroy();\n }\n}\n\n/* eslint-disable no-underscore-dangle */\nconst nodeViewProps = {\n editor: {\n type: Object,\n required: true,\n },\n node: {\n type: Object,\n required: true,\n },\n decorations: {\n type: Object,\n required: true,\n },\n selected: {\n type: Boolean,\n required: true,\n },\n extension: {\n type: Object,\n required: true,\n },\n getPos: {\n type: Function,\n required: true,\n },\n updateAttributes: {\n type: Function,\n required: true,\n },\n deleteNode: {\n type: Function,\n required: true,\n },\n view: {\n type: Object,\n required: true,\n },\n innerDecorations: {\n type: Object,\n required: true,\n },\n HTMLAttributes: {\n type: Object,\n required: true,\n },\n};\nclass VueNodeView extends NodeView {\n mount() {\n const props = {\n editor: this.editor,\n node: this.node,\n decorations: this.decorations,\n innerDecorations: this.innerDecorations,\n view: this.view,\n selected: false,\n extension: this.extension,\n HTMLAttributes: this.HTMLAttributes,\n getPos: () => this.getPos(),\n updateAttributes: (attributes = {}) => this.updateAttributes(attributes),\n deleteNode: () => this.deleteNode(),\n };\n const onDragStart = this.onDragStart.bind(this);\n this.decorationClasses = ref(this.getDecorationClasses());\n const extendedComponent = defineComponent({\n extends: { ...this.component },\n props: Object.keys(props),\n template: this.component.template,\n setup: reactiveProps => {\n var _a, _b;\n provide('onDragStart', onDragStart);\n provide('decorationClasses', this.decorationClasses);\n return (_b = (_a = this.component).setup) === null || _b === void 0 ? void 0 : _b.call(_a, reactiveProps, {\n expose: () => undefined,\n });\n },\n // add support for scoped styles\n // @ts-ignore\n // eslint-disable-next-line\n __scopeId: this.component.__scopeId,\n // add support for CSS Modules\n // @ts-ignore\n // eslint-disable-next-line\n __cssModules: this.component.__cssModules,\n // add support for vue devtools\n // @ts-ignore\n // eslint-disable-next-line\n __name: this.component.__name,\n // @ts-ignore\n // eslint-disable-next-line\n __file: this.component.__file,\n });\n this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);\n this.editor.on('selectionUpdate', this.handleSelectionUpdate);\n this.renderer = new VueRenderer(extendedComponent, {\n editor: this.editor,\n props,\n });\n }\n /**\n * Return the DOM element.\n * This is the element that will be used to display the node view.\n */\n get dom() {\n if (!this.renderer.element || !this.renderer.element.hasAttribute('data-node-view-wrapper')) {\n throw Error('Please use the NodeViewWrapper component for your node view.');\n }\n return this.renderer.element;\n }\n /**\n * Return the content DOM element.\n * This is the element that will be used to display the rich-text content of the node.\n */\n get contentDOM() {\n if (this.node.isLeaf) {\n return null;\n }\n return this.dom.querySelector('[data-node-view-content]');\n }\n /**\n * On editor selection update, check if the node is selected.\n * If it is, call `selectNode`, otherwise call `deselectNode`.\n */\n handleSelectionUpdate() {\n const { from, to } = this.editor.state.selection;\n const pos = this.getPos();\n if (typeof pos !== 'number') {\n return;\n }\n if (from <= pos && to >= pos + this.node.nodeSize) {\n if (this.renderer.props.selected) {\n return;\n }\n this.selectNode();\n }\n else {\n if (!this.renderer.props.selected) {\n return;\n }\n this.deselectNode();\n }\n }\n /**\n * On update, update the React component.\n * To prevent unnecessary updates, the `update` option can be used.\n */\n update(node, decorations, innerDecorations) {\n const rerenderComponent = (props) => {\n this.decorationClasses.value = this.getDecorationClasses();\n this.renderer.updateProps(props);\n };\n if (typeof this.options.update === 'function') {\n const oldNode = this.node;\n const oldDecorations = this.decorations;\n const oldInnerDecorations = this.innerDecorations;\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n return this.options.update({\n oldNode,\n oldDecorations,\n newNode: node,\n newDecorations: decorations,\n oldInnerDecorations,\n innerDecorations,\n updateProps: () => rerenderComponent({ node, decorations, innerDecorations }),\n });\n }\n if (node.type !== this.node.type) {\n return false;\n }\n if (node === this.node && this.decorations === decorations && this.innerDecorations === innerDecorations) {\n return true;\n }\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n rerenderComponent({ node, decorations, innerDecorations });\n return true;\n }\n /**\n * Select the node.\n * Add the `selected` prop and the `ProseMirror-selectednode` class.\n */\n selectNode() {\n this.renderer.updateProps({\n selected: true,\n });\n if (this.renderer.element) {\n this.renderer.element.classList.add('ProseMirror-selectednode');\n }\n }\n /**\n * Deselect the node.\n * Remove the `selected` prop and the `ProseMirror-selectednode` class.\n */\n deselectNode() {\n this.renderer.updateProps({\n selected: false,\n });\n if (this.renderer.element) {\n this.renderer.element.classList.remove('ProseMirror-selectednode');\n }\n }\n getDecorationClasses() {\n return (this.decorations\n // @ts-ignore\n .map(item => item.type.attrs.class)\n .flat()\n .join(' '));\n }\n destroy() {\n this.renderer.destroy();\n this.editor.off('selectionUpdate', this.handleSelectionUpdate);\n }\n}\nfunction VueNodeViewRenderer(component, options) {\n return props => {\n // try to get the parent component\n // this is important for vue devtools to show the component hierarchy correctly\n // maybe it’s `undefined` because <editor-content> isn’t rendered yet\n if (!props.editor.contentComponent) {\n return {};\n }\n // check for class-component and normalize if neccessary\n const normalizedComponent = typeof component === 'function' && '__vccOpts' in component\n ? component.__vccOpts\n : component;\n return new VueNodeView(normalizedComponent, props, options);\n };\n}\n\nexport { BubbleMenu, Editor, EditorContent, FloatingMenu, NodeViewContent, NodeViewWrapper, VueNodeViewRenderer, VueRenderer, nodeViewProps, useEditor };\n//# sourceMappingURL=index.js.map\n"],"names":["BubbleMenu","defineComponent","props","slots","root","ref","onMounted","updateDelay","editor","pluginKey","shouldShow","tippyOptions","BubbleMenuPlugin","onBeforeUnmount","_a","h","useDebouncedRef","value","customRef","track","trigger","newValue","Editor","Editor$1","options","nextState","markRaw","plugin","handlePlugins","nameOrPluginKey","EditorContent","rootEl","instance","getCurrentInstance","watchEffect","nextTick","element","unref","el","FloatingMenu","FloatingMenuPlugin","NodeViewContent","NodeViewWrapper","_b","useEditor","shallowRef","_c","nodes","newEl","VueRenderer","component","reactive","_d","vNode","render","key","nodeViewProps","VueNodeView","NodeView","attributes","onDragStart","extendedComponent","reactiveProps","provide","from","to","pos","node","decorations","innerDecorations","rerenderComponent","oldNode","oldDecorations","oldInnerDecorations","item","VueNodeViewRenderer","normalizedComponent"],"mappings":"yNAMMA,EAAaC,EAAAA,gBAAgB,CAC/B,KAAM,aACN,MAAO,CACH,UAAW,CACP,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,YACrB,EACQ,OAAQ,CACJ,KAAM,OACN,SAAU,EACtB,EACQ,YAAa,CACT,KAAM,OACN,QAAS,MACrB,EACQ,aAAc,CACV,KAAM,OACN,QAAS,KAAO,CAAA,EAC5B,EACQ,WAAY,CACR,KAAM,SAC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,cAAgBC,GAAe,KAAK,mBAAqBC,IAGxF,KAAK,KAAOF,EACZ,KAAK,YAAcC,EACnB,KAAK,iBAAmBC,EACxBC,EAAkB,CAAE,KAAAH,EAAM,YAAAC,EAAa,iBAAAC,CAAgB,CAAE,GAClD,GACX,CAKA,YAAa,CACT,KAAK,SAAS,YAAY,CACtB,SAAU,EACtB,CAAS,EACG,KAAK,SAAS,SACd,KAAK,SAAS,QAAQ,UAAU,IAAI,0BAA0B,CAEtE,CAKA,cAAe,CACX,KAAK,SAAS,YAAY,CACtB,SAAU,EACtB,CAAS,EACG,KAAK,SAAS,SACd,KAAK,SAAS,QAAQ,UAAU,OAAO,0BAA0B,CAEzE,CACA,sBAAuB,CACnB,OAAQ,KAAK,YAER,IAAIK,GAAQA,EAAK,KAAK,MAAM,KAAK,EACjC,KAAI,EACJ,KAAK,GAAG,CACjB,CACA,SAAU,CACN,KAAK,SAAS,QAAO,EACrB,KAAK,OAAO,IAAI,kBAAmB,KAAK,qBAAqB,CACjE,CACJ,CACA,SAASC,EAAoBzB,EAAW1B,EAAS,CAC7C,OAAOtB,GAAS,CAIZ,GAAI,CAACA,EAAM,OAAO,iBACd,MAAO,CAAA,EAGX,MAAM0E,EAAsB,OAAO1B,GAAc,YAAc,cAAeA,EACxEA,EAAU,UACVA,EACN,OAAO,IAAIO,EAAYmB,EAAqB1E,EAAOsB,CAAO,CAC9D,CACJ","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"vue-3.cjs","sources":["../../../../../node_modules/.pnpm/@tiptap+vue-3@3.19.0_@floating-ui+dom@1.7.5_@tiptap+core@3.19.0_@tiptap+pm@3.19.0__@tiptap+pm_m3ct2sxz6dkvt5ftokppbab3l4/node_modules/@tiptap/vue-3/dist/index.js"],"sourcesContent":["// src/Editor.ts\nimport { Editor as CoreEditor } from \"@tiptap/core\";\nimport { customRef, markRaw } from \"vue\";\nfunction useDebouncedRef(value) {\n return customRef((track, trigger) => {\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n trigger();\n });\n });\n }\n };\n });\n}\nvar Editor = class extends CoreEditor {\n constructor(options = {}) {\n super(options);\n this.contentComponent = null;\n this.appContext = null;\n this.reactiveState = useDebouncedRef(this.view.state);\n this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);\n this.on(\"beforeTransaction\", ({ nextState }) => {\n this.reactiveState.value = nextState;\n this.reactiveExtensionStorage.value = this.extensionStorage;\n });\n return markRaw(this);\n }\n get state() {\n return this.reactiveState ? this.reactiveState.value : this.view.state;\n }\n get storage() {\n return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;\n }\n /**\n * Register a ProseMirror plugin.\n */\n registerPlugin(plugin, handlePlugins) {\n const nextState = super.registerPlugin(plugin, handlePlugins);\n if (this.reactiveState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n /**\n * Unregister a ProseMirror plugin.\n */\n unregisterPlugin(nameOrPluginKey) {\n const nextState = super.unregisterPlugin(nameOrPluginKey);\n if (this.reactiveState && nextState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n};\n\n// src/EditorContent.ts\nimport { defineComponent, getCurrentInstance, h, nextTick, onBeforeUnmount, ref, unref, watchEffect } from \"vue\";\nvar EditorContent = defineComponent({\n name: \"EditorContent\",\n props: {\n editor: {\n default: null,\n type: Object\n }\n },\n setup(props) {\n const rootEl = ref();\n const instance = getCurrentInstance();\n watchEffect(() => {\n const editor = props.editor;\n if (editor && editor.options.element && rootEl.value) {\n nextTick(() => {\n var _a;\n if (!rootEl.value || !((_a = editor.view.dom) == null ? void 0 : _a.parentNode)) {\n return;\n }\n const element = unref(rootEl.value);\n rootEl.value.append(...editor.view.dom.parentNode.childNodes);\n editor.contentComponent = instance.ctx._;\n if (instance) {\n editor.appContext = {\n ...instance.appContext,\n // Vue internally uses prototype chain to forward/shadow injects across the entire component chain\n // so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext\n // @ts-expect-error forward instance's 'provides' into appContext\n provides: instance.provides\n };\n }\n editor.setOptions({\n element\n });\n editor.createNodeViews();\n });\n }\n });\n onBeforeUnmount(() => {\n const editor = props.editor;\n if (!editor) {\n return;\n }\n editor.contentComponent = null;\n editor.appContext = null;\n });\n return { rootEl };\n },\n render() {\n return h(\"div\", {\n ref: (el) => {\n this.rootEl = el;\n }\n });\n }\n});\n\n// src/NodeViewContent.ts\nimport { defineComponent as defineComponent2, h as h2 } from \"vue\";\nvar NodeViewContent = defineComponent2({\n name: \"NodeViewContent\",\n props: {\n as: {\n type: String,\n default: \"div\"\n }\n },\n render() {\n return h2(this.as, {\n style: {\n whiteSpace: \"pre-wrap\"\n },\n \"data-node-view-content\": \"\"\n });\n }\n});\n\n// src/NodeViewWrapper.ts\nimport { defineComponent as defineComponent3, h as h3 } from \"vue\";\nvar NodeViewWrapper = defineComponent3({\n name: \"NodeViewWrapper\",\n props: {\n as: {\n type: String,\n default: \"div\"\n }\n },\n inject: [\"onDragStart\", \"decorationClasses\"],\n render() {\n var _a, _b;\n return h3(\n this.as,\n {\n // @ts-ignore\n class: this.decorationClasses,\n style: {\n whiteSpace: \"normal\"\n },\n \"data-node-view-wrapper\": \"\",\n // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)\n onDragstart: this.onDragStart\n },\n (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)\n );\n }\n});\n\n// src/useEditor.ts\nimport { onBeforeUnmount as onBeforeUnmount2, onMounted, shallowRef } from \"vue\";\nvar useEditor = (options = {}) => {\n const editor = shallowRef();\n onMounted(() => {\n editor.value = new Editor(options);\n });\n onBeforeUnmount2(() => {\n var _a, _b, _c, _d;\n const nodes = (_b = (_a = editor.value) == null ? void 0 : _a.view.dom) == null ? void 0 : _b.parentNode;\n const newEl = nodes == null ? void 0 : nodes.cloneNode(true);\n (_c = nodes == null ? void 0 : nodes.parentNode) == null ? void 0 : _c.replaceChild(newEl, nodes);\n (_d = editor.value) == null ? void 0 : _d.destroy();\n });\n return editor;\n};\n\n// src/VueMarkViewRenderer.ts\nimport { MarkView } from \"@tiptap/core\";\nimport { defineComponent as defineComponent4, h as h5, toRaw } from \"vue\";\n\n// src/VueRenderer.ts\nimport { h as h4, markRaw as markRaw2, reactive, render } from \"vue\";\nvar VueRenderer = class {\n constructor(component, { props = {}, editor }) {\n /**\n * Flag to track if the renderer has been destroyed, preventing queued or asynchronous renders from executing after teardown.\n */\n this.destroyed = false;\n this.editor = editor;\n this.component = markRaw2(component);\n this.el = document.createElement(\"div\");\n this.props = reactive(props);\n this.renderedComponent = this.renderComponent();\n }\n get element() {\n return this.renderedComponent.el;\n }\n get ref() {\n var _a, _b, _c, _d;\n if ((_b = (_a = this.renderedComponent.vNode) == null ? void 0 : _a.component) == null ? void 0 : _b.exposed) {\n return this.renderedComponent.vNode.component.exposed;\n }\n return (_d = (_c = this.renderedComponent.vNode) == null ? void 0 : _c.component) == null ? void 0 : _d.proxy;\n }\n renderComponent() {\n if (this.destroyed) {\n return this.renderedComponent;\n }\n let vNode = h4(this.component, this.props);\n if (this.editor.appContext) {\n vNode.appContext = this.editor.appContext;\n }\n if (typeof document !== \"undefined\" && this.el) {\n render(vNode, this.el);\n }\n const destroy = () => {\n if (this.el) {\n render(null, this.el);\n }\n this.el = null;\n vNode = null;\n };\n return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };\n }\n updateProps(props = {}) {\n if (this.destroyed) {\n return;\n }\n Object.entries(props).forEach(([key, value]) => {\n this.props[key] = value;\n });\n this.renderComponent();\n }\n destroy() {\n if (this.destroyed) {\n return;\n }\n this.destroyed = true;\n this.renderedComponent.destroy();\n }\n};\n\n// src/VueMarkViewRenderer.ts\nvar markViewProps = {\n editor: {\n type: Object,\n required: true\n },\n mark: {\n type: Object,\n required: true\n },\n extension: {\n type: Object,\n required: true\n },\n inline: {\n type: Boolean,\n required: true\n },\n view: {\n type: Object,\n required: true\n },\n updateAttributes: {\n type: Function,\n required: true\n },\n HTMLAttributes: {\n type: Object,\n required: true\n }\n};\nvar MarkViewContent = defineComponent4({\n name: \"MarkViewContent\",\n props: {\n as: {\n type: String,\n default: \"span\"\n }\n },\n render() {\n return h5(this.as, {\n style: {\n whiteSpace: \"inherit\"\n },\n \"data-mark-view-content\": \"\"\n });\n }\n});\nvar VueMarkView = class extends MarkView {\n constructor(component, props, options) {\n super(component, props, options);\n const componentProps = { ...props, updateAttributes: this.updateAttributes.bind(this) };\n const extendedComponent = defineComponent4({\n extends: { ...component },\n props: Object.keys(componentProps),\n template: this.component.template,\n setup: (reactiveProps) => {\n var _a;\n return (_a = component.setup) == null ? void 0 : _a.call(component, reactiveProps, {\n expose: () => void 0\n });\n },\n // Add support for scoped styles\n __scopeId: component.__scopeId,\n __cssModules: component.__cssModules,\n __name: component.__name,\n __file: component.__file\n });\n this.renderer = new VueRenderer(extendedComponent, {\n editor: this.editor,\n props: componentProps\n });\n }\n get dom() {\n return this.renderer.element;\n }\n get contentDOM() {\n return this.dom.querySelector(\"[data-mark-view-content]\");\n }\n updateAttributes(attrs) {\n const unproxiedMark = toRaw(this.mark);\n super.updateAttributes(attrs, unproxiedMark);\n }\n destroy() {\n this.renderer.destroy();\n }\n};\nfunction VueMarkViewRenderer(component, options = {}) {\n return (props) => {\n if (!props.editor.contentComponent) {\n return {};\n }\n return new VueMarkView(component, props, options);\n };\n}\n\n// src/VueNodeViewRenderer.ts\nimport { NodeView } from \"@tiptap/core\";\nimport { defineComponent as defineComponent5, provide, ref as ref2 } from \"vue\";\nvar nodeViewProps = {\n editor: {\n type: Object,\n required: true\n },\n node: {\n type: Object,\n required: true\n },\n decorations: {\n type: Object,\n required: true\n },\n selected: {\n type: Boolean,\n required: true\n },\n extension: {\n type: Object,\n required: true\n },\n getPos: {\n type: Function,\n required: true\n },\n updateAttributes: {\n type: Function,\n required: true\n },\n deleteNode: {\n type: Function,\n required: true\n },\n view: {\n type: Object,\n required: true\n },\n innerDecorations: {\n type: Object,\n required: true\n },\n HTMLAttributes: {\n type: Object,\n required: true\n }\n};\nvar VueNodeView = class extends NodeView {\n constructor() {\n super(...arguments);\n this.cachedExtensionWithSyncedStorage = null;\n }\n /**\n * Returns a proxy of the extension that redirects storage access to the editor's mutable storage.\n * This preserves the original prototype chain (instanceof checks, methods like configure/extend work).\n * Cached to avoid proxy creation on every update.\n */\n get extensionWithSyncedStorage() {\n if (!this.cachedExtensionWithSyncedStorage) {\n const editor = this.editor;\n const extension = this.extension;\n this.cachedExtensionWithSyncedStorage = new Proxy(extension, {\n get(target, prop, receiver) {\n var _a;\n if (prop === \"storage\") {\n return (_a = editor.storage[extension.name]) != null ? _a : {};\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n }\n return this.cachedExtensionWithSyncedStorage;\n }\n mount() {\n const props = {\n editor: this.editor,\n node: this.node,\n decorations: this.decorations,\n innerDecorations: this.innerDecorations,\n view: this.view,\n selected: false,\n extension: this.extensionWithSyncedStorage,\n HTMLAttributes: this.HTMLAttributes,\n getPos: () => this.getPos(),\n updateAttributes: (attributes = {}) => this.updateAttributes(attributes),\n deleteNode: () => this.deleteNode()\n };\n const onDragStart = this.onDragStart.bind(this);\n this.decorationClasses = ref2(this.getDecorationClasses());\n const extendedComponent = defineComponent5({\n extends: { ...this.component },\n props: Object.keys(props),\n template: this.component.template,\n setup: (reactiveProps) => {\n var _a, _b;\n provide(\"onDragStart\", onDragStart);\n provide(\"decorationClasses\", this.decorationClasses);\n return (_b = (_a = this.component).setup) == null ? void 0 : _b.call(_a, reactiveProps, {\n expose: () => void 0\n });\n },\n // add support for scoped styles\n // @ts-ignore\n // eslint-disable-next-line\n __scopeId: this.component.__scopeId,\n // add support for CSS Modules\n // @ts-ignore\n // eslint-disable-next-line\n __cssModules: this.component.__cssModules,\n // add support for vue devtools\n // @ts-ignore\n // eslint-disable-next-line\n __name: this.component.__name,\n // @ts-ignore\n // eslint-disable-next-line\n __file: this.component.__file\n });\n this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);\n this.editor.on(\"selectionUpdate\", this.handleSelectionUpdate);\n this.renderer = new VueRenderer(extendedComponent, {\n editor: this.editor,\n props\n });\n }\n /**\n * Return the DOM element.\n * This is the element that will be used to display the node view.\n */\n get dom() {\n if (!this.renderer.element || !this.renderer.element.hasAttribute(\"data-node-view-wrapper\")) {\n throw Error(\"Please use the NodeViewWrapper component for your node view.\");\n }\n return this.renderer.element;\n }\n /**\n * Return the content DOM element.\n * This is the element that will be used to display the rich-text content of the node.\n */\n get contentDOM() {\n if (this.node.isLeaf) {\n return null;\n }\n return this.dom.querySelector(\"[data-node-view-content]\");\n }\n /**\n * On editor selection update, check if the node is selected.\n * If it is, call `selectNode`, otherwise call `deselectNode`.\n */\n handleSelectionUpdate() {\n const { from, to } = this.editor.state.selection;\n const pos = this.getPos();\n if (typeof pos !== \"number\") {\n return;\n }\n if (from <= pos && to >= pos + this.node.nodeSize) {\n if (this.renderer.props.selected) {\n return;\n }\n this.selectNode();\n } else {\n if (!this.renderer.props.selected) {\n return;\n }\n this.deselectNode();\n }\n }\n /**\n * On update, update the React component.\n * To prevent unnecessary updates, the `update` option can be used.\n */\n update(node, decorations, innerDecorations) {\n const rerenderComponent = (props) => {\n this.decorationClasses.value = this.getDecorationClasses();\n this.renderer.updateProps(props);\n };\n if (typeof this.options.update === \"function\") {\n const oldNode = this.node;\n const oldDecorations = this.decorations;\n const oldInnerDecorations = this.innerDecorations;\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n return this.options.update({\n oldNode,\n oldDecorations,\n newNode: node,\n newDecorations: decorations,\n oldInnerDecorations,\n innerDecorations,\n updateProps: () => rerenderComponent({ node, decorations, innerDecorations, extension: this.extensionWithSyncedStorage })\n });\n }\n if (node.type !== this.node.type) {\n return false;\n }\n if (node === this.node && this.decorations === decorations && this.innerDecorations === innerDecorations) {\n return true;\n }\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n rerenderComponent({ node, decorations, innerDecorations, extension: this.extensionWithSyncedStorage });\n return true;\n }\n /**\n * Select the node.\n * Add the `selected` prop and the `ProseMirror-selectednode` class.\n */\n selectNode() {\n this.renderer.updateProps({\n selected: true\n });\n if (this.renderer.element) {\n this.renderer.element.classList.add(\"ProseMirror-selectednode\");\n }\n }\n /**\n * Deselect the node.\n * Remove the `selected` prop and the `ProseMirror-selectednode` class.\n */\n deselectNode() {\n this.renderer.updateProps({\n selected: false\n });\n if (this.renderer.element) {\n this.renderer.element.classList.remove(\"ProseMirror-selectednode\");\n }\n }\n getDecorationClasses() {\n return this.decorations.flatMap((item) => item.type.attrs.class).join(\" \");\n }\n destroy() {\n this.renderer.destroy();\n this.editor.off(\"selectionUpdate\", this.handleSelectionUpdate);\n }\n};\nfunction VueNodeViewRenderer(component, options) {\n return (props) => {\n if (!props.editor.contentComponent) {\n return {};\n }\n const normalizedComponent = typeof component === \"function\" && \"__vccOpts\" in component ? component.__vccOpts : component;\n return new VueNodeView(normalizedComponent, props, options);\n };\n}\n\n// src/index.ts\nexport * from \"@tiptap/core\";\nexport {\n Editor,\n EditorContent,\n MarkViewContent,\n NodeViewContent,\n NodeViewWrapper,\n VueMarkView,\n VueMarkViewRenderer,\n VueNodeViewRenderer,\n VueRenderer,\n markViewProps,\n nodeViewProps,\n useEditor\n};\n//# sourceMappingURL=index.js.map"],"names":["useDebouncedRef","value","customRef","track","trigger","newValue","Editor","CoreEditor","options","nextState","markRaw","plugin","handlePlugins","nameOrPluginKey","EditorContent","defineComponent","props","rootEl","ref","instance","getCurrentInstance","watchEffect","editor","nextTick","_a","element","unref","onBeforeUnmount","h","el","NodeViewContent","defineComponent2","h2","NodeViewWrapper","defineComponent3","_b","h3","useEditor","shallowRef","onMounted","onBeforeUnmount2","_c","_d","nodes","newEl","VueRenderer","component","markRaw2","reactive","vNode","h4","render","key","markViewProps","MarkViewContent","defineComponent4","h5","VueMarkView","MarkView","componentProps","extendedComponent","reactiveProps","attrs","unproxiedMark","toRaw","VueMarkViewRenderer","nodeViewProps","VueNodeView","NodeView","extension","target","prop","receiver","attributes","onDragStart","ref2","defineComponent5","provide","from","to","pos","node","decorations","innerDecorations","rerenderComponent","oldNode","oldDecorations","oldInnerDecorations","item","VueNodeViewRenderer","normalizedComponent"],"mappings":"iIAGA,SAASA,EAAgBC,EAAO,CAC9B,OAAOC,EAAAA,UAAU,CAACC,EAAOC,KAChB,CACL,KAAM,CACJ,OAAAD,EAAK,EACEF,CACT,EACA,IAAII,EAAU,CACZJ,EAAQI,EACR,sBAAsB,IAAM,CAC1B,sBAAsB,IAAM,CAC1BD,EAAO,CACT,CAAC,CACH,CAAC,CACH,CACN,EACG,CACH,CACG,IAACE,EAAS,cAAcC,EAAAA,MAAW,CACpC,YAAYC,EAAU,GAAI,CACxB,aAAMA,CAAO,EACb,KAAK,iBAAmB,KACxB,KAAK,WAAa,KAClB,KAAK,cAAgBR,EAAgB,KAAK,KAAK,KAAK,EACpD,KAAK,yBAA2BA,EAAgB,KAAK,gBAAgB,EACrE,KAAK,GAAG,oBAAqB,CAAC,CAAE,UAAAS,CAAS,IAAO,CAC9C,KAAK,cAAc,MAAQA,EAC3B,KAAK,yBAAyB,MAAQ,KAAK,gBAC7C,CAAC,EACMC,EAAAA,QAAQ,IAAI,CACrB,CACA,IAAI,OAAQ,CACV,OAAO,KAAK,cAAgB,KAAK,cAAc,MAAQ,KAAK,KAAK,KACnE,CACA,IAAI,SAAU,CACZ,OAAO,KAAK,yBAA2B,KAAK,yBAAyB,MAAQ,MAAM,OACrF,CAIA,eAAeC,EAAQC,EAAe,CACpC,MAAMH,EAAY,MAAM,eAAeE,EAAQC,CAAa,EAC5D,OAAI,KAAK,gBACP,KAAK,cAAc,MAAQH,GAEtBA,CACT,CAIA,iBAAiBI,EAAiB,CAChC,MAAMJ,EAAY,MAAM,iBAAiBI,CAAe,EACxD,OAAI,KAAK,eAAiBJ,IACxB,KAAK,cAAc,MAAQA,GAEtBA,CACT,CACF,EAIIK,EAAgBC,EAAAA,gBAAgB,CAClC,K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