@dialpad/dialtone 9.161.0 → 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.
Files changed (28) hide show
  1. package/dist/tokens/doc.json +102311 -102311
  2. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +10 -10
  3. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  4. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +2351 -830
  5. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  6. package/dist/vue3/node_modules/@tiptap/vue-3.cjs +1 -1
  7. package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
  8. package/dist/vue3/node_modules/@tiptap/vue-3.js +233 -209
  9. package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
  10. package/dist/vue3/types/components/rich_text_editor/extensions/channels/suggestion.d.ts +1 -6
  11. package/dist/vue3/types/components/rich_text_editor/extensions/channels/suggestion.d.ts.map +1 -1
  12. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +1 -6
  13. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
  14. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/suggestion.d.ts +1 -6
  15. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/suggestion.d.ts.map +1 -1
  16. package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts +1 -6
  17. package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts.map +1 -1
  18. package/dist/vue3/types/components/rich_text_editor/extensions/utils/suggestion_utils.d.ts +29 -0
  19. package/dist/vue3/types/components/rich_text_editor/extensions/utils/suggestion_utils.d.ts.map +1 -0
  20. package/package.json +31 -37
  21. package/dist/vue3/types/components/rich_text_editor/extensions/tippy_plugins/hide_on_esc.d.ts +0 -12
  22. package/dist/vue3/types/components/rich_text_editor/extensions/tippy_plugins/hide_on_esc.d.ts.map +0 -1
  23. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +0 -768
  24. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +0 -1
  25. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +0 -4072
  26. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +0 -1
  27. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +0 -8005
  28. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"vue-3.js","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","norm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J,KAAK,GAAG;AAAA,EACjB;AAAA,EACA,UAAU;AACN,SAAK,SAAS,QAAO,GACrB,KAAK,OAAO,IAAI,mBAAmB,KAAK,qBAAqB;AAAA,EACjE;AACJ;AACA,SAASC,EAAoBzB,GAAW1B,GAAS;AAC7C,SAAO,CAAAtB,MAAS;AAIZ,QAAI,CAACA,EAAM,OAAO;AACd,aAAO,CAAA;AAGX,UAAM0E,IAAsB,OAAO1B,KAAc,cAAc,eAAeA,IACxEA,EAAU,YACVA;AACN,WAAO,IAAIO,EAAYmB,GAAqB1E,GAAOsB,CAAO;AAAA,EAC9D;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"vue-3.js","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":";;;AAGA,SAASA,EAAgBC,GAAO;AAC9B,SAAOC,EAAU,CAACC,GAAOC,OAChB;AAAA,IACL,MAAM;AACJ,aAAAD,EAAK,GACEF;AAAA,IACT;AAAA,IACA,IAAII,GAAU;AACZ,MAAAJ,IAAQI,GACR,sBAAsB,MAAM;AAC1B,8BAAsB,MAAM;AAC1B,UAAAD,EAAO;AAAA,QACT,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,EACN,EACG;AACH;AACG,IAACE,IAAS,cAAcC,EAAW;AAAA,EACpC,YAAYC,I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AAK,SAAS,QAAO,GACrB,KAAK,OAAO,IAAI,mBAAmB,KAAK,qBAAqB;AAAA,EAC/D;AACF;AACA,SAASC,EAAoB3C,GAAWtC,GAAS;AAC/C,SAAO,CAACQ,MAAU;AAChB,QAAI,CAACA,EAAM,OAAO;AAChB,aAAO,CAAA;AAET,UAAM0E,IAAsB,OAAO5C,KAAc,cAAc,eAAeA,IAAYA,EAAU,YAAYA;AAChH,WAAO,IAAIqB,EAAYuB,GAAqB1E,GAAOR,CAAO;AAAA,EAC5D;AACF;","x_google_ignoreList":[0]}
@@ -1,11 +1,6 @@
1
1
  declare namespace _default {
2
2
  let allowSpaces: boolean;
3
- function render(): {
4
- onStart: (props: any) => void;
5
- onUpdate(props: any): void;
6
- onKeyDown(props: any): any;
7
- onExit(): void;
8
- };
3
+ let render: Function;
9
4
  }
10
5
  export default _default;
11
6
  //# sourceMappingURL=suggestion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/suggestion.js"],"names":[],"mappings":";;IAgBU;;;;;MAsEP"}
1
+ {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/channels/suggestion.js"],"names":[],"mappings":""}
@@ -9,12 +9,7 @@ declare namespace _default {
9
9
  range: any;
10
10
  props: any;
11
11
  }): void;
12
- function render(): {
13
- onStart: (props: any) => void;
14
- onUpdate(props: any): void;
15
- onKeyDown(props: any): any;
16
- onExit(): void;
17
- };
12
+ let render: Function;
18
13
  }
19
14
  export default _default;
20
15
  //# sourceMappingURL=suggestion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"names":[],"mappings":";IA2BS;;;;QAiBN;IAEQ;;;;aAsBR;IAEO;;;;;MAiEP"}
1
+ {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/emoji/suggestion.js"],"names":[],"mappings":";IAsBS;;;;QAiBN;IAEQ;;;;aAsBR"}
@@ -1,11 +1,6 @@
1
1
  declare namespace _default {
2
2
  let allowSpaces: boolean;
3
- function render(): {
4
- onStart: (props: any) => void;
5
- onUpdate(props: any): void;
6
- onKeyDown(props: any): any;
7
- onExit(): void;
8
- };
3
+ let render: Function;
9
4
  }
10
5
  export default _default;
11
6
  //# sourceMappingURL=suggestion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/suggestion.js"],"names":[],"mappings":";;IAgBU;;;;;MAsEP"}
1
+ {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/mentions/suggestion.js"],"names":[],"mappings":""}
@@ -1,12 +1,7 @@
1
1
  declare namespace _default {
2
2
  let allowSpaces: boolean;
3
3
  let startOfLine: boolean;
4
- function render(): {
5
- onStart: (props: any) => void;
6
- onUpdate(props: any): void;
7
- onKeyDown(props: any): any;
8
- onExit(): void;
9
- };
4
+ let render: Function;
10
5
  }
11
6
  export default _default;
12
7
  //# sourceMappingURL=suggestion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/suggestion.js"],"names":[],"mappings":";;;IAiBU;;;;;MAuEP"}
1
+ {"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/slash_command/suggestion.js"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ import { VueRenderer } from '@tiptap/vue-3';
2
+ export function createDefaultVirtualElement(): Object;
3
+ export function createVirtualElement(clientRect: Function): Object;
4
+ export function updateFloatingPosition(floatingEl: HTMLElement, virtualEl: Object, options?: {
5
+ placement: string;
6
+ middleware: any[];
7
+ }): Promise<void>;
8
+ export function initializeFloatingElement(element: HTMLElement, options?: {
9
+ zIndex: string;
10
+ }): void;
11
+ export function showFloatingElement(element: HTMLElement): void;
12
+ export function hideFloatingElement(element: HTMLElement): void;
13
+ export function createEscapeHandler(onEscape: Function, isActive: Function): Function;
14
+ export function attachEscapeHandler(handler: Function): void;
15
+ export function detachEscapeHandler(handler: Function): void;
16
+ export function createSuggestionComponent(listComponent: Object, itemComponent: Object, itemType: string, props: Object): VueRenderer;
17
+ export function cleanupSuggestionPopup(state: {
18
+ escHandler: Function;
19
+ floatingEl: HTMLElement;
20
+ component: VueRenderer;
21
+ }): void;
22
+ export function createSuggestionRenderer(itemComponent: Object, itemType: string, options?: {
23
+ listComponent: Object;
24
+ placement: string;
25
+ zIndex: string;
26
+ }): Function;
27
+ export const DEFAULT_PLACEMENT: "top-start";
28
+ export const DEFAULT_Z_INDEX: "650";
29
+ //# sourceMappingURL=suggestion_utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestion_utils.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/utils/suggestion_utils.js"],"names":[],"mappings":"AAoBA,+CAFa,MAAM,CAelB;AAOD,4DAFa,MAAM,CAIlB;AAUD,mDANW,WAAW,aACX,MAAM,YAEd;IAAwB,SAAS,EAAzB,MAAM;IACS,UAAU;CACnC,iBAkBA;AAQD,mDAJW,WAAW,YAEnB;IAAwB,MAAM,EAAtB,MAAM;CAChB,QAMA;AAMD,6CAFW,WAAW,QAKrB;AAMD,6CAFW,WAAW,QAKrB;AAQD,sFAMC;AAMD,6DAEC;AAMD,6DAEC;AAUD,yDANW,MAAM,iBACN,MAAM,YACN,MAAM,SACN,MAAM,GACJ,WAAW,CAWvB;AASD,8CAJG;IAAwB,UAAU;IACP,UAAU,EAA7B,WAAW;IACQ,SAAS,EAA5B,WAAW;CACrB,QAOA;AAYD,wDARW,MAAM,YACN,MAAM,YAEd;IAAwB,aAAa,EAA7B,MAAM;IACU,SAAS,EAAzB,MAAM;IACU,MAAM,EAAtB,MAAM;CACd,YAoFF;AAzPD,gCAAiC,WAAW,CAAC;AAK7C,8BAA+B,KAAK,CAAC;4BAbT,eAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone",
3
- "version": "9.161.0",
3
+ "version": "9.162.0",
4
4
  "description": "Dialpad's Dialtone design system monorepo",
5
5
  "files": [
6
6
  "dist"
@@ -36,39 +36,33 @@
36
36
  "./*": "./dist/*"
37
37
  },
38
38
  "dependencies": {
39
- "@tiptap/core": "2.12.0",
40
- "@tiptap/extension-blockquote": "2.12.0",
41
- "@tiptap/extension-bold": "2.12.0",
42
- "@tiptap/extension-bubble-menu": "2.12.0",
43
- "@tiptap/extension-bullet-list": "2.12.0",
44
- "@tiptap/extension-code": "2.12.0",
45
- "@tiptap/extension-code-block": "2.12.0",
46
- "@tiptap/extension-color": "2.12.0",
47
- "@tiptap/extension-document": "2.12.0",
48
- "@tiptap/extension-floating-menu": "2.12.0",
49
- "@tiptap/extension-font-family": "2.12.0",
50
- "@tiptap/extension-gapcursor": "2.12.0",
51
- "@tiptap/extension-hard-break": "2.12.0",
52
- "@tiptap/extension-history": "2.12.0",
53
- "@tiptap/extension-image": "2.12.0",
54
- "@tiptap/extension-italic": "2.12.0",
55
- "@tiptap/extension-link": "2.12.0",
56
- "@tiptap/extension-list-item": "2.12.0",
57
- "@tiptap/extension-mention": "2.12.0",
58
- "@tiptap/extension-ordered-list": "2.12.0",
59
- "@tiptap/extension-paragraph": "2.12.0",
60
- "@tiptap/extension-placeholder": "2.12.0",
61
- "@tiptap/extension-strike": "2.12.0",
62
- "@tiptap/extension-table": "2.12.0",
63
- "@tiptap/extension-table-cell": "2.12.0",
64
- "@tiptap/extension-table-header": "2.12.0",
65
- "@tiptap/extension-table-row": "2.12.0",
66
- "@tiptap/extension-text": "2.12.0",
67
- "@tiptap/extension-text-align": "2.12.0",
68
- "@tiptap/extension-text-style": "2.12.0",
69
- "@tiptap/extension-underline": "2.12.0",
70
- "@tiptap/pm": "2.12.0",
71
- "@tiptap/suggestion": "2.12.0",
39
+ "@floating-ui/dom": "^1.6.0",
40
+ "@tiptap/core": "3.19.0",
41
+ "@tiptap/extension-blockquote": "3.19.0",
42
+ "@tiptap/extension-bold": "3.19.0",
43
+ "@tiptap/extension-bubble-menu": "3.19.0",
44
+ "@tiptap/extension-code": "3.19.0",
45
+ "@tiptap/extension-code-block": "3.19.0",
46
+ "@tiptap/extension-color": "3.19.0",
47
+ "@tiptap/extension-document": "3.19.0",
48
+ "@tiptap/extension-floating-menu": "3.19.0",
49
+ "@tiptap/extension-font-family": "3.19.0",
50
+ "@tiptap/extension-hard-break": "3.19.0",
51
+ "@tiptap/extension-image": "3.19.0",
52
+ "@tiptap/extension-italic": "3.19.0",
53
+ "@tiptap/extension-link": "3.19.0",
54
+ "@tiptap/extension-list": "3.19",
55
+ "@tiptap/extension-mention": "3.19.0",
56
+ "@tiptap/extension-paragraph": "3.19.0",
57
+ "@tiptap/extension-strike": "3.19.0",
58
+ "@tiptap/extension-table": "3.19.0",
59
+ "@tiptap/extension-text": "3.19.0",
60
+ "@tiptap/extension-text-align": "3.19.0",
61
+ "@tiptap/extension-text-style": "3.19.0",
62
+ "@tiptap/extension-underline": "3.19.0",
63
+ "@tiptap/extensions": "3.19",
64
+ "@tiptap/pm": "3.19.0",
65
+ "@tiptap/suggestion": "3.19.0",
72
66
  "date-fns": "4.1.0",
73
67
  "deep-equal": "2.2.3",
74
68
  "docopt": "0.6.2",
@@ -78,10 +72,10 @@
78
72
  "overlayscrollbars": "2.10.0",
79
73
  "regex-combined-emojis": "1.6.0",
80
74
  "tippy.js": "6.3.7",
81
- "@dialpad/dialtone-emojis": "1.2.4",
75
+ "@dialpad/dialtone-icons": "4.48.0",
82
76
  "@dialpad/dialtone-tokens": "1.47.4",
83
- "@dialpad/dialtone-icons": "4.47.2",
84
- "@dialpad/dialtone-mcp-server": "1.2.1"
77
+ "@dialpad/dialtone-mcp-server": "1.2.1",
78
+ "@dialpad/dialtone-emojis": "1.2.4"
85
79
  },
86
80
  "devDependencies": {
87
81
  "@commitlint/cli": "^18.4.3",
@@ -1,12 +0,0 @@
1
- declare namespace _default {
2
- let name: string;
3
- let defaultValue: boolean;
4
- function fn({ hide }: {
5
- hide: any;
6
- }): {
7
- onShow(): void;
8
- onHide(): void;
9
- };
10
- }
11
- export default _default;
12
- //# sourceMappingURL=hide_on_esc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hide_on_esc.d.ts","sourceRoot":"","sources":["../../../../../../components/rich_text_editor/extensions/tippy_plugins/hide_on_esc.js"],"names":[],"mappings":";;;IAGE;;;;;MAeC"}