@tiptap/vue-2 3.23.6 → 3.25.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/index.cjs +30 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/dist/menus/index.cjs +54 -13
- package/dist/menus/index.cjs.map +1 -1
- package/dist/menus/index.js +54 -13
- package/dist/menus/index.js.map +1 -1
- package/package.json +24 -25
- package/src/NodeViewContent.ts +16 -0
- package/src/VueNodeViewRenderer.ts +38 -3
- package/src/VueRenderer.ts +1 -1
package/dist/menus/index.js
CHANGED
|
@@ -1628,7 +1628,12 @@ var BubbleMenuView = class {
|
|
|
1628
1628
|
onUpdate: void 0,
|
|
1629
1629
|
onDestroy: void 0
|
|
1630
1630
|
};
|
|
1631
|
-
this.shouldShow = ({
|
|
1631
|
+
this.shouldShow = ({
|
|
1632
|
+
view,
|
|
1633
|
+
state,
|
|
1634
|
+
from,
|
|
1635
|
+
to
|
|
1636
|
+
}) => {
|
|
1632
1637
|
const { doc, selection } = state;
|
|
1633
1638
|
const { empty } = selection;
|
|
1634
1639
|
const isEmptyTextBlock = !doc.textBetween(from, to).length && isTextSelection(state.selection);
|
|
@@ -1759,23 +1764,35 @@ var BubbleMenuView = class {
|
|
|
1759
1764
|
get middlewares() {
|
|
1760
1765
|
const middlewares = [];
|
|
1761
1766
|
if (this.floatingUIOptions.flip) {
|
|
1762
|
-
middlewares.push(
|
|
1767
|
+
middlewares.push(
|
|
1768
|
+
flip2(
|
|
1769
|
+
typeof this.floatingUIOptions.flip !== "boolean" ? this.floatingUIOptions.flip : void 0
|
|
1770
|
+
)
|
|
1771
|
+
);
|
|
1763
1772
|
}
|
|
1764
1773
|
if (this.floatingUIOptions.shift) {
|
|
1765
1774
|
middlewares.push(
|
|
1766
|
-
shift2(
|
|
1775
|
+
shift2(
|
|
1776
|
+
typeof this.floatingUIOptions.shift !== "boolean" ? this.floatingUIOptions.shift : void 0
|
|
1777
|
+
)
|
|
1767
1778
|
);
|
|
1768
1779
|
}
|
|
1769
1780
|
if (this.floatingUIOptions.offset) {
|
|
1770
1781
|
middlewares.push(
|
|
1771
|
-
offset2(
|
|
1782
|
+
offset2(
|
|
1783
|
+
typeof this.floatingUIOptions.offset !== "boolean" ? this.floatingUIOptions.offset : void 0
|
|
1784
|
+
)
|
|
1772
1785
|
);
|
|
1773
1786
|
}
|
|
1774
1787
|
if (this.floatingUIOptions.arrow) {
|
|
1775
1788
|
middlewares.push(arrow2(this.floatingUIOptions.arrow));
|
|
1776
1789
|
}
|
|
1777
1790
|
if (this.floatingUIOptions.size) {
|
|
1778
|
-
middlewares.push(
|
|
1791
|
+
middlewares.push(
|
|
1792
|
+
size2(
|
|
1793
|
+
typeof this.floatingUIOptions.size !== "boolean" ? this.floatingUIOptions.size : void 0
|
|
1794
|
+
)
|
|
1795
|
+
);
|
|
1779
1796
|
}
|
|
1780
1797
|
if (this.floatingUIOptions.autoPlacement) {
|
|
1781
1798
|
middlewares.push(
|
|
@@ -1785,11 +1802,17 @@ var BubbleMenuView = class {
|
|
|
1785
1802
|
);
|
|
1786
1803
|
}
|
|
1787
1804
|
if (this.floatingUIOptions.hide) {
|
|
1788
|
-
middlewares.push(
|
|
1805
|
+
middlewares.push(
|
|
1806
|
+
hide2(
|
|
1807
|
+
typeof this.floatingUIOptions.hide !== "boolean" ? this.floatingUIOptions.hide : void 0
|
|
1808
|
+
)
|
|
1809
|
+
);
|
|
1789
1810
|
}
|
|
1790
1811
|
if (this.floatingUIOptions.inline) {
|
|
1791
1812
|
middlewares.push(
|
|
1792
|
-
inline2(
|
|
1813
|
+
inline2(
|
|
1814
|
+
typeof this.floatingUIOptions.inline !== "boolean" ? this.floatingUIOptions.inline : void 0
|
|
1815
|
+
)
|
|
1793
1816
|
);
|
|
1794
1817
|
}
|
|
1795
1818
|
return middlewares;
|
|
@@ -2208,23 +2231,35 @@ var FloatingMenuView = class {
|
|
|
2208
2231
|
get middlewares() {
|
|
2209
2232
|
const middlewares = [];
|
|
2210
2233
|
if (this.floatingUIOptions.flip) {
|
|
2211
|
-
middlewares.push(
|
|
2234
|
+
middlewares.push(
|
|
2235
|
+
flip2(
|
|
2236
|
+
typeof this.floatingUIOptions.flip !== "boolean" ? this.floatingUIOptions.flip : void 0
|
|
2237
|
+
)
|
|
2238
|
+
);
|
|
2212
2239
|
}
|
|
2213
2240
|
if (this.floatingUIOptions.shift) {
|
|
2214
2241
|
middlewares.push(
|
|
2215
|
-
shift2(
|
|
2242
|
+
shift2(
|
|
2243
|
+
typeof this.floatingUIOptions.shift !== "boolean" ? this.floatingUIOptions.shift : void 0
|
|
2244
|
+
)
|
|
2216
2245
|
);
|
|
2217
2246
|
}
|
|
2218
2247
|
if (this.floatingUIOptions.offset) {
|
|
2219
2248
|
middlewares.push(
|
|
2220
|
-
offset2(
|
|
2249
|
+
offset2(
|
|
2250
|
+
typeof this.floatingUIOptions.offset !== "boolean" ? this.floatingUIOptions.offset : void 0
|
|
2251
|
+
)
|
|
2221
2252
|
);
|
|
2222
2253
|
}
|
|
2223
2254
|
if (this.floatingUIOptions.arrow) {
|
|
2224
2255
|
middlewares.push(arrow2(this.floatingUIOptions.arrow));
|
|
2225
2256
|
}
|
|
2226
2257
|
if (this.floatingUIOptions.size) {
|
|
2227
|
-
middlewares.push(
|
|
2258
|
+
middlewares.push(
|
|
2259
|
+
size2(
|
|
2260
|
+
typeof this.floatingUIOptions.size !== "boolean" ? this.floatingUIOptions.size : void 0
|
|
2261
|
+
)
|
|
2262
|
+
);
|
|
2228
2263
|
}
|
|
2229
2264
|
if (this.floatingUIOptions.autoPlacement) {
|
|
2230
2265
|
middlewares.push(
|
|
@@ -2234,11 +2269,17 @@ var FloatingMenuView = class {
|
|
|
2234
2269
|
);
|
|
2235
2270
|
}
|
|
2236
2271
|
if (this.floatingUIOptions.hide) {
|
|
2237
|
-
middlewares.push(
|
|
2272
|
+
middlewares.push(
|
|
2273
|
+
hide2(
|
|
2274
|
+
typeof this.floatingUIOptions.hide !== "boolean" ? this.floatingUIOptions.hide : void 0
|
|
2275
|
+
)
|
|
2276
|
+
);
|
|
2238
2277
|
}
|
|
2239
2278
|
if (this.floatingUIOptions.inline) {
|
|
2240
2279
|
middlewares.push(
|
|
2241
|
-
inline2(
|
|
2280
|
+
inline2(
|
|
2281
|
+
typeof this.floatingUIOptions.inline !== "boolean" ? this.floatingUIOptions.inline : void 0
|
|
2282
|
+
)
|
|
2242
2283
|
);
|
|
2243
2284
|
}
|
|
2244
2285
|
return middlewares;
|