UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

1 lines 25.6 kB
{"version":3,"file":"vue-3.cjs","names":["CoreEditor","MarkView","NodeView"],"sources":["../../../../../node_modules/.pnpm/@tiptap+vue-3@3.19.0_patch_hash=hlk524tqy4svh2bbayevihx324_@floating-ui+dom@1.7.6_@tiptap+cor_kpexihlfm3sl2tcft5dydpfypm/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"],"x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