@tiptap/vue-2 3.21.0 → 3.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +33 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/dist/menus/index.cjs +7 -1
- package/dist/menus/index.cjs.map +1 -1
- package/dist/menus/index.d.cts +1 -1
- package/dist/menus/index.d.ts +1 -1
- package/dist/menus/index.js +7 -1
- package/dist/menus/index.js.map +1 -1
- package/package.json +7 -7
- package/src/VueNodeViewRenderer.ts +52 -1
package/dist/menus/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { VirtualElement, offset, flip, shift, arrow, size, autoPlacement, hide,
|
|
|
2
2
|
import { Editor } from '@tiptap/core';
|
|
3
3
|
import { PluginKey, EditorState } from '@tiptap/pm/state';
|
|
4
4
|
import { EditorView } from '@tiptap/pm/view';
|
|
5
|
-
import {
|
|
5
|
+
import { Component, VNode } from 'vue';
|
|
6
6
|
|
|
7
7
|
interface BubbleMenuPluginProps {
|
|
8
8
|
/**
|
package/dist/menus/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { VirtualElement, offset, flip, shift, arrow, size, autoPlacement, hide,
|
|
|
2
2
|
import { Editor } from '@tiptap/core';
|
|
3
3
|
import { PluginKey, EditorState } from '@tiptap/pm/state';
|
|
4
4
|
import { EditorView } from '@tiptap/pm/view';
|
|
5
|
-
import {
|
|
5
|
+
import { Component, VNode } from 'vue';
|
|
6
6
|
|
|
7
7
|
interface BubbleMenuPluginProps {
|
|
8
8
|
/**
|
package/dist/menus/index.js
CHANGED
|
@@ -1703,8 +1703,8 @@ var BubbleMenuView = class {
|
|
|
1703
1703
|
this.hide();
|
|
1704
1704
|
return;
|
|
1705
1705
|
}
|
|
1706
|
-
this.updatePosition();
|
|
1707
1706
|
this.show();
|
|
1707
|
+
this.updatePosition();
|
|
1708
1708
|
};
|
|
1709
1709
|
/**
|
|
1710
1710
|
* Handles the transaction event to update the position of the bubble menu.
|
|
@@ -1838,6 +1838,9 @@ var BubbleMenuView = class {
|
|
|
1838
1838
|
return virtualElement;
|
|
1839
1839
|
}
|
|
1840
1840
|
updatePosition() {
|
|
1841
|
+
if (!this.isVisible) {
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1841
1844
|
const virtualElement = this.virtualElement;
|
|
1842
1845
|
if (!virtualElement) {
|
|
1843
1846
|
return;
|
|
@@ -1848,6 +1851,9 @@ var BubbleMenuView = class {
|
|
|
1848
1851
|
middleware: this.middlewares
|
|
1849
1852
|
}).then(({ x, y, strategy, middlewareData }) => {
|
|
1850
1853
|
var _a, _b;
|
|
1854
|
+
if (!this.isVisible || this.editor.isDestroyed || !this.element.isConnected) {
|
|
1855
|
+
return;
|
|
1856
|
+
}
|
|
1851
1857
|
if (((_a = middlewareData.hide) == null ? void 0 : _a.referenceHidden) || ((_b = middlewareData.hide) == null ? void 0 : _b.escaped)) {
|
|
1852
1858
|
this.element.style.visibility = "hidden";
|
|
1853
1859
|
return;
|