@templatical/editor 0.16.5 → 0.17.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/{AiChatSidebar-CYAbVB2G.js → AiChatSidebar-LxCHMdcj.js} +1 -1
- package/dist/{AiFeatureMenu-B1oEJebq.js → AiFeatureMenu-Cr8pLXMj.js} +3 -3
- package/dist/{BlockIssueBadge-BLytBabN.js → BlockIssueBadge-BQ1yB1me.js} +2 -2
- package/dist/{CloudEditor-D6KNL6VU.js → CloudEditor-qzoNS8K4.js} +11 -10
- package/dist/{CollaboratorBar-C_EhXQ5R.js → CollaboratorBar-BkfR0CyD.js} +2 -2
- package/dist/{ColorPicker-CppJgX_T.js → ColorPicker-DfzDyNKe.js} +4 -4
- package/dist/{CommentsSidebar-C_XLBbo3.js → CommentsSidebar-Cl93TN96.js} +3 -3
- package/dist/{CountdownBlock-173fiO5Z.js → CountdownBlock-DbXfzwae.js} +1 -1
- package/dist/{CountdownToolbar-D5GaA_lt.js → CountdownToolbar-BqaMWRyB.js} +3 -3
- package/dist/{DesignReferenceSidebar-Bh9uAZ4B.js → DesignReferenceSidebar-jVrdS8wW.js} +2 -2
- package/dist/{IssuesPanel-DltSuU6H.js → IssuesPanel-Bq3yXg6M.js} +2 -2
- package/dist/{MergeTagSuggestion-jIpT_jmz.js → MergeTagSuggestion-DCuaSOPQ.js} +148 -162
- package/dist/{ModuleBrowserModal-CXy8Bbv9.js → ModuleBrowserModal-XEHfEO0O.js} +7 -7
- package/dist/{ModulePreviewCanvas-CJC9kyZN.js → ModulePreviewCanvas-BM8XUgbc.js} +2 -2
- package/dist/{NumberWithSuffix-DNi-v4l1.js → NumberWithSuffix-9FG7mNnn.js} +1 -1
- package/dist/{ParagraphEditor-nk5Vvr7M.js → ParagraphEditor-Cs47wU1V.js} +19 -19
- package/dist/{RichTextEditorContent-DBaCrvH0.js → RichTextEditorContent-DCzmVeyb.js} +5 -5
- package/dist/{SaveModuleDialog-CYu5PhBz.js → SaveModuleDialog-BgOS9vCQ.js} +6 -6
- package/dist/{SnapshotHistory-B38ImqMO.js → SnapshotHistory-CLfYzwv9.js} +4 -4
- package/dist/{TemplateScoringPanel-ZhObHWeb.js → TemplateScoringPanel-CMrfa9Rd.js} +3 -3
- package/dist/{TestEmailModal-DbstIzEf.js → TestEmailModal-DTLfATNt.js} +3 -3
- package/dist/{TitleEditor-CmfkOHJT.js → TitleEditor-Bq9S0C8Z.js} +10 -10
- package/dist/{TplModal-BXnx3sLr.js → TplModal-BW0FAtYe.js} +3 -3
- package/dist/{blockTypeIcons-BVIEw0XJ.js → blockTypeIcons-CvSfLeyV.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CuIg4yrB.js → AiFeatureMenu-B0zH66nO.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-CuIg4yrB.js.map → AiFeatureMenu-B0zH66nO.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BHEl_Hs7.js → BlockIssueBadge-yD4pKsU9.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-BHEl_Hs7.js.map → BlockIssueBadge-yD4pKsU9.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-1Ms0w691.js → CloudEditor-Da-aSmw5.js} +10 -9
- package/dist/cdn/chunks/CloudEditor-Da-aSmw5.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-C0a5P64z.js → CollaboratorBar-DixaFis-.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0a5P64z.js.map → CollaboratorBar-DixaFis-.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-bsMmT-_B.js → ColorPicker-O6xXCPEg.js} +2 -2
- package/dist/cdn/chunks/{ColorPicker-bsMmT-_B.js.map → ColorPicker-O6xXCPEg.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-8053oz4k.js → CountdownBlock-jgBPbI1p.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-8053oz4k.js.map → CountdownBlock-jgBPbI1p.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DQ_zrorh.js → CountdownToolbar-DrmZwvIH.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-DQ_zrorh.js.map → CountdownToolbar-DrmZwvIH.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CwQ376nf.js → IssuesPanel-CpyhXg9M.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-CwQ376nf.js.map → IssuesPanel-CpyhXg9M.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-rpZ6Ol-i.js → MergeTagSuggestion-BmMmdcRg.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-rpZ6Ol-i.js.map → MergeTagSuggestion-BmMmdcRg.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DUegB2Jk.js → ModuleBrowserModal-DPQLFTti.js} +5 -5
- package/dist/cdn/chunks/{ModuleBrowserModal-DUegB2Jk.js.map → ModuleBrowserModal-DPQLFTti.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-f4h8r9Lh.js → ModulePreviewCanvas-Csc6M0RA.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-f4h8r9Lh.js.map → ModulePreviewCanvas-Csc6M0RA.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bu_nHJuD.js → NumberWithSuffix-YmcsBmCd.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-Bu_nHJuD.js.map → NumberWithSuffix-YmcsBmCd.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-IpZsg8qo.js → ParagraphEditor-DR5AcHB0.js} +17 -17
- package/dist/cdn/chunks/{ParagraphEditor-IpZsg8qo.js.map → ParagraphEditor-DR5AcHB0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DDnqZ9cB.js → RichTextEditorContent-52c2EuCT.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DDnqZ9cB.js.map → RichTextEditorContent-52c2EuCT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CVA5HPCi.js → SaveModuleDialog-dpRlVrrQ.js} +2 -2
- package/dist/cdn/chunks/{SaveModuleDialog-CVA5HPCi.js.map → SaveModuleDialog-dpRlVrrQ.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DU8wm0Rh.js → TitleEditor-DtQTPAg3.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-DU8wm0Rh.js.map → TitleEditor-DtQTPAg3.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-Dm5Oosjp.js → blockTypeIcons-B0ktHdUG.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-Dm5Oosjp.js.map → blockTypeIcons-B0ktHdUG.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +2 -2
- package/dist/cdn/chunks/ca-CSl--oWR.js.map +1 -0
- package/dist/{de-q9lTCMre.js → cdn/chunks/de-ZaffrKDP.js} +3 -1
- package/dist/cdn/chunks/de-ZaffrKDP.js.map +1 -0
- package/dist/cdn/chunks/{en-CR4LItrX.js → en-CHuXeJDt.js} +2 -2
- package/dist/cdn/chunks/en-CHuXeJDt.js.map +1 -0
- package/dist/cdn/chunks/{es-CEt-lrGd.js → es-CaC8VQjO.js} +2 -2
- package/dist/cdn/chunks/es-CaC8VQjO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BGUoo2a5.js → extensions-CiewgCtw.js} +4 -4
- package/dist/cdn/chunks/{extensions-BGUoo2a5.js.map → extensions-CiewgCtw.js.map} +1 -1
- package/dist/cdn/chunks/{features-BSpDuFFR.js → features-DLu_D-6j.js} +702 -671
- package/dist/cdn/chunks/features-DLu_D-6j.js.map +1 -0
- package/dist/cdn/chunks/{icons-k3XVoRvc.js → icons-B03IY-pm.js} +2 -2
- package/dist/cdn/chunks/{icons-k3XVoRvc.js.map → icons-B03IY-pm.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-iDq3otm6.js → media-library-CYF18RNk.js} +3 -3
- package/dist/cdn/chunks/{media-library-iDq3otm6.js.map → media-library-CYF18RNk.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +2 -2
- package/dist/cdn/chunks/pt-BR-C74zfEWH.js.map +1 -0
- package/dist/cdn/chunks/{quality-Bb7vN32U.js → quality-LmsngN2B.js} +2 -2
- package/dist/cdn/chunks/{quality-Bb7vN32U.js.map → quality-LmsngN2B.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-cOvtk8HM.js → renderer-DAeNIQqa.js} +4 -4
- package/dist/cdn/chunks/renderer-DAeNIQqa.js.map +1 -0
- package/dist/cdn/chunks/{src-Ddp969zE.js → src-CModhUDN.js} +4 -4
- package/dist/cdn/chunks/{src-Ddp969zE.js.map → src-CModhUDN.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CW_gRVVR.js → styles-hd_LBGaF.js} +10 -10
- package/dist/cdn/chunks/{styles-CW_gRVVR.js.map → styles-hd_LBGaF.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-zpXk5mN4.js → tiptap-C2indasq.js} +806 -811
- package/dist/cdn/chunks/tiptap-C2indasq.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +13 -12
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cdn/chunks/de-q9lTCMre.js → de-ZaffrKDP.js} +1 -3
- package/dist/{dist-BReUTadj.js → dist-8TKf-Jpg.js} +2 -2
- package/dist/{dist-BE9m_i60.js → dist-BDVm2MrW.js} +1 -1
- package/dist/{dist-D1WmF8BF.js → dist-BKKo5wPC.js} +1 -1
- package/dist/{dist-DhY2di4U.js → dist-COSN3oDJ.js} +1 -1
- package/dist/{dist-CHLoeloJ.js → dist-CcX5sLpz.js} +1 -1
- package/dist/{dist-D9g4CSnm.js → dist-CgTKuIUN.js} +300 -298
- package/dist/{dist-i_Z7t67A.js → dist-Cx7IUM7J.js} +22 -15
- package/dist/{dist-Bm07Z3Es.js → dist-D6M5FAY7.js} +1 -1
- package/dist/{dist-DGEaAAIb.js → dist-DXAZUjj3.js} +1 -1
- package/dist/{dist-BXR1aBJV.js → dist-DbekZDmJ.js} +1 -1
- package/dist/{dist-DcKlLQ8d.js → dist-Dk5AdwoQ.js} +1 -1
- package/dist/{dist-BPPeDw62.js → dist-YSCPD13F.js} +1 -1
- package/dist/{en-CR4LItrX.js → en-CHuXeJDt.js} +1 -1
- package/dist/{es-CEt-lrGd.js → es-CaC8VQjO.js} +1 -1
- package/dist/{extensions-Cjd-VAII.js → extensions-DhgbhfBX.js} +5 -5
- package/dist/index.d.ts +44 -0
- package/dist/keys-WVNarXg8.js +10 -0
- package/dist/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DJfTblY7.js → styles-BWC0jc5-.js} +26 -26
- package/dist/templatical-editor.js +11 -10
- package/dist/{useCloudI18n-WbfVWq5k.js → useCloudI18n-CIKI0hCd.js} +1 -1
- package/dist/{useEditorCore-DnOG2a_b.js → useEditorCore-FLMIhtv1.js} +703 -672
- package/dist/{useI18n-eR1yVW0v.js → useI18n-0EU_JVe7.js} +1 -1
- package/dist/{useMergeTag-C3GfSktg.js → useMergeTag-C7v6MVah.js} +2 -2
- package/dist/{usePopoverPosition-B3Byo68F.js → usePopoverPosition-BDqqnMeo.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/CloudEditor-1Ms0w691.js.map +0 -1
- package/dist/cdn/chunks/ca-DI1ViqMa.js.map +0 -1
- package/dist/cdn/chunks/de-q9lTCMre.js.map +0 -1
- package/dist/cdn/chunks/en-CR4LItrX.js.map +0 -1
- package/dist/cdn/chunks/es-CEt-lrGd.js.map +0 -1
- package/dist/cdn/chunks/features-BSpDuFFR.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DvBHY0AA.js.map +0 -1
- package/dist/cdn/chunks/renderer-cOvtk8HM.js.map +0 -1
- package/dist/cdn/chunks/tiptap-zpXk5mN4.js.map +0 -1
- package/dist/keys-BbDgCU6K.js +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as e, Et as t, O as n, Ot as r, Y as i, _ as a, c as o, d as s, r as c, u as l, y as u } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { c as d, n as f } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import { F as p, Sn as m, i as h, vn as g, xn as _, yn as v } from "./dist-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
3
|
+
import { F as p, Sn as m, i as h, vn as g, xn as _, yn as v } from "./dist-CgTKuIUN.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
5
5
|
var y = Math.min, b = Math.max, x = Math.round, S = Math.floor, C = (e) => ({
|
|
6
6
|
x: e,
|
|
7
7
|
y: e
|
|
@@ -69,11 +69,10 @@ function N(e) {
|
|
|
69
69
|
}
|
|
70
70
|
function ce(e) {
|
|
71
71
|
return {
|
|
72
|
-
top: 0,
|
|
73
|
-
right: 0,
|
|
74
|
-
bottom: 0,
|
|
75
|
-
left: 0
|
|
76
|
-
...e
|
|
72
|
+
top: e.top ?? 0,
|
|
73
|
+
right: e.right ?? 0,
|
|
74
|
+
bottom: e.bottom ?? 0,
|
|
75
|
+
left: e.left ?? 0
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
78
|
function le(e) {
|
|
@@ -98,7 +97,7 @@ function P(e) {
|
|
|
98
97
|
};
|
|
99
98
|
}
|
|
100
99
|
//#endregion
|
|
101
|
-
//#region ../../node_modules/.pnpm/@floating-ui+core@1.
|
|
100
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
102
101
|
function ue(e, t, n) {
|
|
103
102
|
let { reference: r, floating: i } = e, a = A(t), o = j(t), s = k(o), c = E(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
104
103
|
switch (c) {
|
|
@@ -131,15 +130,8 @@ function ue(e, t, n) {
|
|
|
131
130
|
y: r.y
|
|
132
131
|
};
|
|
133
132
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
p[o] -= f * (n && l ? -1 : 1);
|
|
137
|
-
break;
|
|
138
|
-
case "end":
|
|
139
|
-
p[o] += f * (n && l ? -1 : 1);
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
return p;
|
|
133
|
+
let m = D(t);
|
|
134
|
+
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
143
135
|
}
|
|
144
136
|
async function de(e, t) {
|
|
145
137
|
t === void 0 && (t = {});
|
|
@@ -298,7 +290,7 @@ var _e = function(e) {
|
|
|
298
290
|
};
|
|
299
291
|
};
|
|
300
292
|
//#endregion
|
|
301
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
293
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
302
294
|
function F() {
|
|
303
295
|
return typeof window < "u";
|
|
304
296
|
}
|
|
@@ -380,7 +372,7 @@ function J(e) {
|
|
|
380
372
|
}
|
|
381
373
|
function Ee(e) {
|
|
382
374
|
let t = J(e);
|
|
383
|
-
return G(t) ? e.ownerDocument
|
|
375
|
+
return G(t) ? (e.ownerDocument || e).body : B(t) && V(t) ? t : Ee(t);
|
|
384
376
|
}
|
|
385
377
|
function Y(e, t, n) {
|
|
386
378
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
@@ -394,7 +386,7 @@ function De(e) {
|
|
|
394
386
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
395
387
|
}
|
|
396
388
|
//#endregion
|
|
397
|
-
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
389
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
398
390
|
function Oe(e) {
|
|
399
391
|
let t = K(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = B(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = x(n) !== a || x(r) !== o;
|
|
400
392
|
return s && (n = a, r = o), {
|
|
@@ -424,16 +416,16 @@ function je(e) {
|
|
|
424
416
|
};
|
|
425
417
|
}
|
|
426
418
|
function Me(e, t, n) {
|
|
427
|
-
return t === void 0 && (t = !1),
|
|
419
|
+
return t === void 0 && (t = !1), !!n && t && n === L(e);
|
|
428
420
|
}
|
|
429
421
|
function Z(e, t, n, r) {
|
|
430
422
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
431
423
|
let i = e.getBoundingClientRect(), a = ke(e), o = C(1);
|
|
432
424
|
t && (r ? z(r) && (o = X(r)) : o = X(e));
|
|
433
425
|
let s = Me(a, n, r) ? je(a) : C(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
434
|
-
if (a) {
|
|
435
|
-
let e = L(a), t =
|
|
436
|
-
for (; i &&
|
|
426
|
+
if (a && r) {
|
|
427
|
+
let e = L(a), t = z(r) ? L(r) : r, n = e, i = De(n);
|
|
428
|
+
for (; i && t !== n;) {
|
|
437
429
|
let e = X(i), t = i.getBoundingClientRect(), r = K(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
438
430
|
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = L(i), i = De(n);
|
|
439
431
|
}
|
|
@@ -463,7 +455,7 @@ function Pe(e) {
|
|
|
463
455
|
scrollLeft: 0,
|
|
464
456
|
scrollTop: 0
|
|
465
457
|
}, l = C(1), u = C(0), d = B(r);
|
|
466
|
-
if ((d || !
|
|
458
|
+
if ((d || !a) && ((I(r) !== "body" || V(o)) && (c = q(r)), d)) {
|
|
467
459
|
let e = Z(r);
|
|
468
460
|
l = X(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
469
461
|
}
|
|
@@ -476,39 +468,38 @@ function Pe(e) {
|
|
|
476
468
|
};
|
|
477
469
|
}
|
|
478
470
|
function Fe(e) {
|
|
479
|
-
return Array.from(e.getClientRects());
|
|
471
|
+
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
480
472
|
}
|
|
481
473
|
function Ie(e) {
|
|
482
|
-
let t =
|
|
483
|
-
return K(
|
|
484
|
-
width:
|
|
485
|
-
height:
|
|
486
|
-
x:
|
|
487
|
-
y:
|
|
474
|
+
let t = q(e), n = e.ownerDocument.body, r = b(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = b(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Q(e), o = -t.scrollTop;
|
|
475
|
+
return K(n).direction === "rtl" && (a += b(e.clientWidth, n.clientWidth) - r), {
|
|
476
|
+
width: r,
|
|
477
|
+
height: i,
|
|
478
|
+
x: a,
|
|
479
|
+
y: o
|
|
488
480
|
};
|
|
489
481
|
}
|
|
490
482
|
var Le = 25;
|
|
491
|
-
function Re(e, t) {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
let e = Te();
|
|
496
|
-
|
|
483
|
+
function Re(e, t, n) {
|
|
484
|
+
n === void 0 && (n = "viewport");
|
|
485
|
+
let r = n === "layoutViewport", i = L(e), a = R(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
486
|
+
if (o) {
|
|
487
|
+
let e = !Te() || t === "fixed";
|
|
488
|
+
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
489
|
+
}
|
|
490
|
+
if (Q(a) <= 0) {
|
|
491
|
+
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
492
|
+
o <= Le && (s -= o);
|
|
497
493
|
}
|
|
498
|
-
let l = Q(r);
|
|
499
|
-
if (l <= 0) {
|
|
500
|
-
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
501
|
-
o <= Le && (a -= o);
|
|
502
|
-
} else l <= Le && (a += l);
|
|
503
494
|
return {
|
|
504
|
-
width:
|
|
505
|
-
height:
|
|
506
|
-
x:
|
|
507
|
-
y:
|
|
495
|
+
width: s,
|
|
496
|
+
height: c,
|
|
497
|
+
x: l,
|
|
498
|
+
y: u
|
|
508
499
|
};
|
|
509
500
|
}
|
|
510
501
|
function ze(e, t) {
|
|
511
|
-
let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a =
|
|
502
|
+
let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = X(e);
|
|
512
503
|
return {
|
|
513
504
|
width: e.clientWidth * a.x,
|
|
514
505
|
height: e.clientHeight * a.y,
|
|
@@ -518,7 +509,7 @@ function ze(e, t) {
|
|
|
518
509
|
}
|
|
519
510
|
function Be(e, t, n) {
|
|
520
511
|
let r;
|
|
521
|
-
if (t === "viewport") r = Re(e, n);
|
|
512
|
+
if (t === "viewport" || t === "layoutViewport") r = Re(e, n, t);
|
|
522
513
|
else if (t === "document") r = Ie(R(e));
|
|
523
514
|
else if (z(t)) r = ze(t, n);
|
|
524
515
|
else {
|
|
@@ -533,21 +524,17 @@ function Be(e, t, n) {
|
|
|
533
524
|
return P(r);
|
|
534
525
|
}
|
|
535
526
|
function Ve(e, t) {
|
|
536
|
-
let n = J(e);
|
|
537
|
-
return n === t || !z(n) || G(n) ? !1 : K(n).position === "fixed" || Ve(n, t);
|
|
538
|
-
}
|
|
539
|
-
function He(e, t) {
|
|
540
527
|
let n = t.get(e);
|
|
541
528
|
if (n) return n;
|
|
542
529
|
let r = Y(e, [], !1).filter((e) => z(e) && I(e) !== "body"), i = null, a = K(e).position === "fixed", o = a ? J(e) : e;
|
|
543
530
|
for (; z(o) && !G(o);) {
|
|
544
|
-
let
|
|
545
|
-
!
|
|
531
|
+
let e = K(o), t = W(o), n = i ? i.position : a ? "fixed" : "";
|
|
532
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = J(o);
|
|
546
533
|
}
|
|
547
534
|
return t.set(e, r), r;
|
|
548
535
|
}
|
|
549
|
-
function
|
|
550
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? H(t) ? [] :
|
|
536
|
+
function He(e) {
|
|
537
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? H(t) ? [] : Ve(t, this._c) : [].concat(n), r], o = Be(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
551
538
|
for (let e = 1; e < a.length; e++) {
|
|
552
539
|
let n = Be(t, a[e], i);
|
|
553
540
|
s = b(n.top, s), c = y(n.right, c), l = y(n.bottom, l), u = b(n.left, u);
|
|
@@ -559,30 +546,27 @@ function Ue(e) {
|
|
|
559
546
|
y: s
|
|
560
547
|
};
|
|
561
548
|
}
|
|
562
|
-
function
|
|
549
|
+
function Ue(e) {
|
|
563
550
|
let { width: t, height: n } = Oe(e);
|
|
564
551
|
return {
|
|
565
552
|
width: t,
|
|
566
553
|
height: n
|
|
567
554
|
};
|
|
568
555
|
}
|
|
569
|
-
function
|
|
556
|
+
function We(e, t, n) {
|
|
570
557
|
let r = B(t), i = R(t), a = n === "fixed", o = Z(e, !0, a, t), s = {
|
|
571
558
|
scrollLeft: 0,
|
|
572
559
|
scrollTop: 0
|
|
573
560
|
}, c = C(0);
|
|
574
|
-
|
|
575
|
-
c.x = Q(i);
|
|
576
|
-
}
|
|
577
|
-
if (r || !r && !a) if ((I(t) !== "body" || V(i)) && (s = q(t)), r) {
|
|
561
|
+
if ((r || !a) && ((I(t) !== "body" || V(i)) && (s = q(t)), r)) {
|
|
578
562
|
let e = Z(t, !0, a, t);
|
|
579
563
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
let
|
|
564
|
+
}
|
|
565
|
+
!r && i && (c.x = Q(i));
|
|
566
|
+
let l = i && !r && !a ? Ne(i, s) : C(0);
|
|
583
567
|
return {
|
|
584
|
-
x: o.left + s.scrollLeft - c.x -
|
|
585
|
-
y: o.top + s.scrollTop - c.y -
|
|
568
|
+
x: o.left + s.scrollLeft - c.x - l.x,
|
|
569
|
+
y: o.top + s.scrollTop - c.y - l.y,
|
|
586
570
|
width: o.width,
|
|
587
571
|
height: o.height
|
|
588
572
|
};
|
|
@@ -590,13 +574,13 @@ function Ge(e, t, n) {
|
|
|
590
574
|
function $(e) {
|
|
591
575
|
return K(e).position === "static";
|
|
592
576
|
}
|
|
593
|
-
function
|
|
577
|
+
function Ge(e, t) {
|
|
594
578
|
if (!B(e) || K(e).position === "fixed") return null;
|
|
595
579
|
if (t) return t(e);
|
|
596
580
|
let n = e.offsetParent;
|
|
597
581
|
return R(e) === n && (n = n.ownerDocument.body), n;
|
|
598
582
|
}
|
|
599
|
-
function
|
|
583
|
+
function Ke(e, t) {
|
|
600
584
|
let n = L(e);
|
|
601
585
|
if (H(e)) return n;
|
|
602
586
|
if (!B(e)) {
|
|
@@ -607,14 +591,14 @@ function qe(e, t) {
|
|
|
607
591
|
}
|
|
608
592
|
return n;
|
|
609
593
|
}
|
|
610
|
-
let r =
|
|
611
|
-
for (; r && be(r) && $(r);) r =
|
|
594
|
+
let r = Ge(e, t);
|
|
595
|
+
for (; r && be(r) && $(r);) r = Ge(r, t);
|
|
612
596
|
return r && G(r) && $(r) && !W(r) ? n : r || we(e) || n;
|
|
613
597
|
}
|
|
614
|
-
var
|
|
615
|
-
let t = this.getOffsetParent ||
|
|
598
|
+
var qe = async function(e) {
|
|
599
|
+
let t = this.getOffsetParent || Ke, n = this.getDimensions, r = await n(e.floating);
|
|
616
600
|
return {
|
|
617
|
-
reference:
|
|
601
|
+
reference: We(e.reference, await t(e.floating), e.strategy),
|
|
618
602
|
floating: {
|
|
619
603
|
x: 0,
|
|
620
604
|
y: 0,
|
|
@@ -623,67 +607,71 @@ var Je = async function(e) {
|
|
|
623
607
|
}
|
|
624
608
|
};
|
|
625
609
|
};
|
|
626
|
-
function
|
|
610
|
+
function Je(e) {
|
|
627
611
|
return K(e).direction === "rtl";
|
|
628
612
|
}
|
|
629
|
-
var
|
|
613
|
+
var Ye = {
|
|
630
614
|
convertOffsetParentRelativeRectToViewportRelativeRect: Pe,
|
|
631
615
|
getDocumentElement: R,
|
|
632
|
-
getClippingRect:
|
|
633
|
-
getOffsetParent:
|
|
634
|
-
getElementRects:
|
|
616
|
+
getClippingRect: He,
|
|
617
|
+
getOffsetParent: Ke,
|
|
618
|
+
getElementRects: qe,
|
|
635
619
|
getClientRects: Fe,
|
|
636
|
-
getDimensions:
|
|
620
|
+
getDimensions: Ue,
|
|
637
621
|
getScale: X,
|
|
638
622
|
isElement: z,
|
|
639
|
-
isRTL:
|
|
623
|
+
isRTL: Je
|
|
640
624
|
};
|
|
641
|
-
function
|
|
625
|
+
function Xe(e, t) {
|
|
642
626
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
643
627
|
}
|
|
644
|
-
function
|
|
645
|
-
let
|
|
646
|
-
function
|
|
628
|
+
function Ze(e, t, n) {
|
|
629
|
+
let r = null, i, a = R(e);
|
|
630
|
+
function o() {
|
|
647
631
|
var e;
|
|
648
|
-
clearTimeout(
|
|
632
|
+
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
649
633
|
}
|
|
650
|
-
function
|
|
651
|
-
|
|
634
|
+
function s(n, c) {
|
|
635
|
+
n === void 0 && (n = !1), c === void 0 && (c = 1), o();
|
|
652
636
|
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
653
|
-
if (
|
|
654
|
-
let m = S(d), h = S(
|
|
637
|
+
if (n || t(), !f || !p) return;
|
|
638
|
+
let m = S(d), h = S(a.clientWidth - (u + f)), g = S(a.clientHeight - (d + p)), _ = S(u), v = {
|
|
655
639
|
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
656
640
|
threshold: b(0, y(1, c)) || 1
|
|
657
641
|
}, x = !0;
|
|
658
642
|
function C(t) {
|
|
659
643
|
let n = t[0].intersectionRatio;
|
|
644
|
+
if (!Xe(l, e.getBoundingClientRect())) return s();
|
|
660
645
|
if (n !== c) {
|
|
661
|
-
if (!x) return
|
|
662
|
-
n ?
|
|
663
|
-
|
|
646
|
+
if (!x) return s();
|
|
647
|
+
n ? s(!1, n) : i = setTimeout(() => {
|
|
648
|
+
s(!1, 1e-7);
|
|
664
649
|
}, 1e3);
|
|
665
650
|
}
|
|
666
|
-
|
|
651
|
+
x = !1;
|
|
667
652
|
}
|
|
668
653
|
try {
|
|
669
|
-
|
|
654
|
+
r = new IntersectionObserver(C, {
|
|
670
655
|
...v,
|
|
671
|
-
root:
|
|
656
|
+
root: a.ownerDocument
|
|
672
657
|
});
|
|
673
658
|
} catch {
|
|
674
|
-
|
|
659
|
+
r = new IntersectionObserver(C, v);
|
|
675
660
|
}
|
|
676
|
-
|
|
661
|
+
r.observe(e);
|
|
677
662
|
}
|
|
678
|
-
|
|
663
|
+
let c = L(e), l = () => s(n);
|
|
664
|
+
return c.addEventListener("resize", l), s(!0), () => {
|
|
665
|
+
c.removeEventListener("resize", l), o();
|
|
666
|
+
};
|
|
679
667
|
}
|
|
680
|
-
function
|
|
668
|
+
function Qe(e, t, n, r) {
|
|
681
669
|
r === void 0 && (r = {});
|
|
682
670
|
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = ke(e), u = i || a ? [...l ? Y(l) : [], ...t ? Y(t) : []] : [];
|
|
683
671
|
u.forEach((e) => {
|
|
684
|
-
i && e.addEventListener("scroll", n
|
|
672
|
+
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
685
673
|
});
|
|
686
|
-
let d = l && s ?
|
|
674
|
+
let d = l && s ? Ze(l, n, a) : null, f = -1, p = null;
|
|
687
675
|
o && (p = new ResizeObserver((e) => {
|
|
688
676
|
let [r] = e;
|
|
689
677
|
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -695,7 +683,7 @@ function $e(e, t, n, r) {
|
|
|
695
683
|
c && g();
|
|
696
684
|
function g() {
|
|
697
685
|
let t = Z(e);
|
|
698
|
-
h && !
|
|
686
|
+
h && !Xe(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
699
687
|
}
|
|
700
688
|
return n(), () => {
|
|
701
689
|
var e;
|
|
@@ -704,11 +692,9 @@ function $e(e, t, n, r) {
|
|
|
704
692
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
705
693
|
};
|
|
706
694
|
}
|
|
707
|
-
var
|
|
708
|
-
let r = /* @__PURE__ */ new Map(), i = {
|
|
709
|
-
|
|
710
|
-
...n
|
|
711
|
-
}, a = {
|
|
695
|
+
var $e = _e, et = me, tt = (e, t, n) => {
|
|
696
|
+
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
697
|
+
...Ye,
|
|
712
698
|
...i.platform,
|
|
713
699
|
_c: r
|
|
714
700
|
};
|
|
@@ -718,8 +704,8 @@ var et = _e, tt = me, nt = (e, t, n) => {
|
|
|
718
704
|
});
|
|
719
705
|
};
|
|
720
706
|
//#endregion
|
|
721
|
-
//#region ../../node_modules/.pnpm/@tiptap+suggestion@3.28.0_@floating-ui+dom@1.
|
|
722
|
-
function
|
|
707
|
+
//#region ../../node_modules/.pnpm/@tiptap+suggestion@3.28.0_@floating-ui+dom@1.8.0_@tiptap+core@3.28.0_@tiptap+pm@3.28.0__@tiptap+pm@3.28.0/node_modules/@tiptap/suggestion/dist/index.js
|
|
708
|
+
function nt(e) {
|
|
723
709
|
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c = p(t), l = RegExp(`\\s${c}$`), u = a ? "^" : "", d = r ? "" : c, f = RegExp(s ? `${u}${c}.*?(?=\\s${d}|$)` : `${u}(?:^)?${c}[^\\s${d}]*`, "gm"), m = o.nodeBefore?.isText && o.nodeBefore.text;
|
|
724
710
|
if (!m) return null;
|
|
725
711
|
let h = o.pos - m.length, g = Array.from(m.matchAll(f)).pop();
|
|
@@ -736,7 +722,7 @@ function rt(e) {
|
|
|
736
722
|
text: g[0]
|
|
737
723
|
} : null;
|
|
738
724
|
}
|
|
739
|
-
function
|
|
725
|
+
function rt(e) {
|
|
740
726
|
return e.docChanged ? e.steps.some((e) => {
|
|
741
727
|
let t = e.slice;
|
|
742
728
|
if (!t?.content) return !1;
|
|
@@ -744,7 +730,7 @@ function it(e) {
|
|
|
744
730
|
return /\s/.test(n);
|
|
745
731
|
}) : !1;
|
|
746
732
|
}
|
|
747
|
-
function
|
|
733
|
+
function it(e) {
|
|
748
734
|
return () => {
|
|
749
735
|
let t = e.state.selection.$anchor.pos, { top: n, right: r, bottom: i, left: a } = e.view.coordsAtPos(t);
|
|
750
736
|
try {
|
|
@@ -754,13 +740,13 @@ function at(e) {
|
|
|
754
740
|
}
|
|
755
741
|
};
|
|
756
742
|
}
|
|
757
|
-
function
|
|
743
|
+
function at(e, t, n, r) {
|
|
758
744
|
return n ? () => {
|
|
759
745
|
let n = r.getState(e.state)?.decorationId;
|
|
760
746
|
return t.dom.querySelector(`[data-decoration-id="${n}"]`)?.getBoundingClientRect() || null;
|
|
761
|
-
} :
|
|
747
|
+
} : it(e);
|
|
762
748
|
}
|
|
763
|
-
function
|
|
749
|
+
function ot({ match: e, dismissedRange: t, state: n, transaction: r, editor: i, shouldResetDismissed: a, effectiveAllowSpaces: o }) {
|
|
764
750
|
return a?.({
|
|
765
751
|
editor: i,
|
|
766
752
|
state: n,
|
|
@@ -768,13 +754,13 @@ function st({ match: e, dismissedRange: t, state: n, transaction: r, editor: i,
|
|
|
768
754
|
match: e,
|
|
769
755
|
transaction: r,
|
|
770
756
|
allowSpaces: o
|
|
771
|
-
}) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !
|
|
757
|
+
}) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !rt(r);
|
|
772
758
|
}
|
|
773
|
-
function
|
|
759
|
+
function st({ view: e, pluginKeyRef: t }) {
|
|
774
760
|
let n = e.state.tr.setMeta(t, { exit: !0 });
|
|
775
761
|
e.dispatch(n);
|
|
776
762
|
}
|
|
777
|
-
function
|
|
763
|
+
function ct({ pluginKey: e, decorationTag: t, decorationClass: n, decorationContent: r, decorationEmptyClass: i, renderer: a, dispatchExit: o }) {
|
|
778
764
|
return {
|
|
779
765
|
handleKeyDown(t, n) {
|
|
780
766
|
var r;
|
|
@@ -802,7 +788,7 @@ function lt({ pluginKey: e, decorationTag: t, decorationClass: n, decorationCont
|
|
|
802
788
|
}
|
|
803
789
|
};
|
|
804
790
|
}
|
|
805
|
-
function
|
|
791
|
+
function lt({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, findSuggestionMatch: o, allow: s, shouldShow: c, shouldKeepDismissed: l, pluginKey: u }) {
|
|
806
792
|
return {
|
|
807
793
|
init() {
|
|
808
794
|
return {
|
|
@@ -861,7 +847,7 @@ function ut({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r
|
|
|
861
847
|
}
|
|
862
848
|
};
|
|
863
849
|
}
|
|
864
|
-
function
|
|
850
|
+
function ut({ editor: e, items: t }) {
|
|
865
851
|
let n = null, r = null, i = null, a = () => {
|
|
866
852
|
r !== null && (clearTimeout(r), r = null), i?.(), i = null;
|
|
867
853
|
}, o = (e) => new Promise((t) => {
|
|
@@ -895,18 +881,18 @@ function dt({ editor: e, items: t }) {
|
|
|
895
881
|
}
|
|
896
882
|
};
|
|
897
883
|
}
|
|
898
|
-
function
|
|
899
|
-
let i = [
|
|
884
|
+
function dt({ placement: e, offset: t, flip: n, floatingUi: r }) {
|
|
885
|
+
let i = [$e({
|
|
900
886
|
mainAxis: t.mainAxis ?? 4,
|
|
901
887
|
crossAxis: t.crossAxis ?? 0
|
|
902
888
|
})];
|
|
903
|
-
return n && i.push(
|
|
889
|
+
return n && i.push(et()), r?.middleware?.length && i.push(...r.middleware), {
|
|
904
890
|
placement: e,
|
|
905
891
|
strategy: r?.strategy ?? "absolute",
|
|
906
892
|
middleware: i
|
|
907
893
|
};
|
|
908
894
|
}
|
|
909
|
-
function
|
|
895
|
+
function ft(e) {
|
|
910
896
|
if (e instanceof HTMLElement) return e;
|
|
911
897
|
if (typeof e == "string") try {
|
|
912
898
|
let t = document.querySelector(e);
|
|
@@ -916,15 +902,15 @@ function pt(e) {
|
|
|
916
902
|
}
|
|
917
903
|
return document.body;
|
|
918
904
|
}
|
|
919
|
-
function
|
|
905
|
+
function pt({ getReferenceRect: e, contextElement: t, config: n, container: r, dismissOnOutsideClick: i, dismiss: a }) {
|
|
920
906
|
return (o, s = {}) => {
|
|
921
907
|
let c = {
|
|
922
908
|
getBoundingClientRect: () => e() ?? new DOMRect(),
|
|
923
909
|
contextElement: t
|
|
924
910
|
}, l = !1, u = !o.isConnected;
|
|
925
|
-
u &&
|
|
926
|
-
let d =
|
|
927
|
-
|
|
911
|
+
u && ft(r).appendChild(o), s.onPosition || (o.style.visibility = "hidden", o.style.width = "max-content");
|
|
912
|
+
let d = Qe(c, o, () => {
|
|
913
|
+
tt(c, o, {
|
|
928
914
|
placement: n.placement,
|
|
929
915
|
strategy: n.strategy,
|
|
930
916
|
middleware: n.middleware
|
|
@@ -953,11 +939,11 @@ function mt({ getReferenceRect: e, contextElement: t, config: n, container: r, d
|
|
|
953
939
|
};
|
|
954
940
|
};
|
|
955
941
|
}
|
|
956
|
-
function
|
|
957
|
-
let g, _ =
|
|
942
|
+
function mt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i, debounce: a, initialItems: o, placement: s, offset: c, container: l, flip: u, floatingUi: d, dismissOnOutsideClick: f, command: p, clientRectFor: m, dispatchExit: h }) {
|
|
943
|
+
let g, _ = ut({
|
|
958
944
|
editor: e,
|
|
959
945
|
items: n
|
|
960
|
-
}), v =
|
|
946
|
+
}), v = dt({
|
|
961
947
|
placement: s,
|
|
962
948
|
offset: c,
|
|
963
949
|
flip: u,
|
|
@@ -1011,7 +997,7 @@ function ht({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
1011
997
|
container: l,
|
|
1012
998
|
flip: u,
|
|
1013
999
|
floatingUi: v,
|
|
1014
|
-
mount:
|
|
1000
|
+
mount: pt({
|
|
1015
1001
|
getReferenceRect: j,
|
|
1016
1002
|
contextElement: n.dom,
|
|
1017
1003
|
config: v,
|
|
@@ -1057,24 +1043,24 @@ function ht({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
1057
1043
|
}
|
|
1058
1044
|
};
|
|
1059
1045
|
}
|
|
1060
|
-
var
|
|
1061
|
-
function
|
|
1062
|
-
let O = C?.(), k = r && !i, A = (n, r) =>
|
|
1046
|
+
var ht = new m("suggestion");
|
|
1047
|
+
function gt({ pluginKey: e = ht, editor: t, char: n = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: a = [" "], startOfLine: o = !1, decorationTag: s = "span", decorationClass: c = "suggestion", decorationContent: l = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], minQueryLength: p = 0, debounce: m = 0, initialItems: h, placement: g = "bottom-start", offset: v = {}, container: y, flip: b = !0, floatingUi: x, dismissOnOutsideClick: S = !0, render: C = () => ({}), allow: w = () => !0, findSuggestionMatch: T = nt, shouldShow: E, shouldResetDismissed: D }) {
|
|
1048
|
+
let O = C?.(), k = r && !i, A = (n, r) => at(t, n, r, e);
|
|
1063
1049
|
function j(e) {
|
|
1064
|
-
return
|
|
1050
|
+
return ot({
|
|
1065
1051
|
...e,
|
|
1066
1052
|
editor: t,
|
|
1067
1053
|
shouldResetDismissed: D,
|
|
1068
1054
|
effectiveAllowSpaces: k
|
|
1069
1055
|
});
|
|
1070
1056
|
}
|
|
1071
|
-
let M = (t) =>
|
|
1057
|
+
let M = (t) => st({
|
|
1072
1058
|
view: t,
|
|
1073
1059
|
pluginKeyRef: e
|
|
1074
1060
|
});
|
|
1075
1061
|
return new _({
|
|
1076
1062
|
key: e,
|
|
1077
|
-
view: () =>
|
|
1063
|
+
view: () => mt({
|
|
1078
1064
|
editor: t,
|
|
1079
1065
|
pluginKey: e,
|
|
1080
1066
|
items: f,
|
|
@@ -1092,7 +1078,7 @@ function _t({ pluginKey: e = gt, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
1092
1078
|
clientRectFor: A,
|
|
1093
1079
|
dispatchExit: M
|
|
1094
1080
|
}),
|
|
1095
|
-
state:
|
|
1081
|
+
state: lt({
|
|
1096
1082
|
editor: t,
|
|
1097
1083
|
char: n,
|
|
1098
1084
|
effectiveAllowSpaces: k,
|
|
@@ -1105,7 +1091,7 @@ function _t({ pluginKey: e = gt, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
1105
1091
|
shouldKeepDismissed: j,
|
|
1106
1092
|
pluginKey: e
|
|
1107
1093
|
}),
|
|
1108
|
-
props:
|
|
1094
|
+
props: ct({
|
|
1109
1095
|
pluginKey: e,
|
|
1110
1096
|
decorationTag: s,
|
|
1111
1097
|
decorationClass: c,
|
|
@@ -1116,18 +1102,18 @@ function _t({ pluginKey: e = gt, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
1116
1102
|
})
|
|
1117
1103
|
});
|
|
1118
1104
|
}
|
|
1119
|
-
var
|
|
1105
|
+
var _t = gt, vt = ["id"], yt = {
|
|
1120
1106
|
key: 0,
|
|
1121
1107
|
class: "tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
1122
1108
|
"data-testid": "merge-tag-suggestion-empty"
|
|
1123
|
-
},
|
|
1109
|
+
}, bt = [
|
|
1124
1110
|
"id",
|
|
1125
1111
|
"aria-selected",
|
|
1126
1112
|
"data-selected",
|
|
1127
1113
|
"data-merge-tag-value",
|
|
1128
1114
|
"onMousedown",
|
|
1129
1115
|
"onMousemove"
|
|
1130
|
-
],
|
|
1116
|
+
], xt = { class: "tpl:font-medium" }, St = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, Ct = /* @__PURE__ */ a({
|
|
1131
1117
|
__name: "MergeTagSuggestionList",
|
|
1132
1118
|
props: {
|
|
1133
1119
|
items: {},
|
|
@@ -1146,7 +1132,7 @@ var vt = _t, yt = ["id"], bt = {
|
|
|
1146
1132
|
class: "tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:py-1 tpl:shadow-lg",
|
|
1147
1133
|
role: "listbox",
|
|
1148
1134
|
"data-testid": "merge-tag-suggestion-list"
|
|
1149
|
-
}, [i.items.length === 0 ? (n(), s("div",
|
|
1135
|
+
}, [i.items.length === 0 ? (n(), s("div", yt, r(i.emptyText), 1)) : l("", !0), (n(!0), s(c, null, e(i.items, (e, c) => (n(), s("button", {
|
|
1150
1136
|
key: e.value,
|
|
1151
1137
|
id: u(c),
|
|
1152
1138
|
type: "button",
|
|
@@ -1157,21 +1143,21 @@ var vt = _t, yt = ["id"], bt = {
|
|
|
1157
1143
|
class: t(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", c === i.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
|
|
1158
1144
|
onMousedown: d((t) => a.$emit("select", e), ["prevent", "stop"]),
|
|
1159
1145
|
onMousemove: (e) => c !== i.selectedIndex && a.$emit("hover", c)
|
|
1160
|
-
}, [o("span",
|
|
1146
|
+
}, [o("span", xt, r(e.label), 1), o("span", St, r(e.value), 1)], 42, bt))), 128))], 8, vt));
|
|
1161
1147
|
}
|
|
1162
|
-
}),
|
|
1163
|
-
function
|
|
1148
|
+
}), wt = 10, Tt = 0;
|
|
1149
|
+
function Et(e, t) {
|
|
1164
1150
|
let n = t.trim().toLowerCase();
|
|
1165
|
-
return n === "" ? e.slice(0,
|
|
1151
|
+
return n === "" ? e.slice(0, wt) : e.filter((e) => {
|
|
1166
1152
|
let t = e.label.toLowerCase(), r = e.value.toLowerCase();
|
|
1167
1153
|
return t.includes(n) || r.includes(n);
|
|
1168
|
-
}).slice(0,
|
|
1154
|
+
}).slice(0, wt);
|
|
1169
1155
|
}
|
|
1170
|
-
function
|
|
1156
|
+
function Dt(e, t, n, r) {
|
|
1171
1157
|
return t.length === 0 ? e.key === "Enter" || e.key === "Tab" : e.key === "ArrowDown" ? (n.value = (n.value + 1) % t.length, !0) : e.key === "ArrowUp" ? (n.value = (n.value - 1 + t.length) % t.length, !0) : e.key === "Enter" || e.key === "Tab" ? (r(t[n.value]), !0) : !1;
|
|
1172
1158
|
}
|
|
1173
|
-
function
|
|
1174
|
-
let n = null, r = null, a = null, o = i([]), s = i(0), c = null, l = `tpl-merge-tag-suggestion-${++
|
|
1159
|
+
function Ot(e, t) {
|
|
1160
|
+
let n = null, r = null, a = null, o = i([]), s = i(0), c = null, l = `tpl-merge-tag-suggestion-${++Tt}`, d = null, p = [], m = null;
|
|
1175
1161
|
function h() {
|
|
1176
1162
|
b(d?.() ?? null);
|
|
1177
1163
|
}
|
|
@@ -1241,7 +1227,7 @@ function kt(e, t) {
|
|
|
1241
1227
|
return {
|
|
1242
1228
|
open: ({ items: i, getRect: p, anchorEl: m, onCommand: h }) => {
|
|
1243
1229
|
o.value = i, s.value = 0, c = h, r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup"), a = m, x(r, m), (t?.value ?? document.body).appendChild(r), n = f({ render() {
|
|
1244
|
-
return u(
|
|
1230
|
+
return u(Ct, {
|
|
1245
1231
|
items: o.value,
|
|
1246
1232
|
selectedIndex: s.value,
|
|
1247
1233
|
emptyText: e,
|
|
@@ -1257,7 +1243,7 @@ function kt(e, t) {
|
|
|
1257
1243
|
o.value = e, s.value >= e.length && (s.value = 0), c = n, C(), d = t, g();
|
|
1258
1244
|
},
|
|
1259
1245
|
handleKeyDown: (e) => {
|
|
1260
|
-
let t =
|
|
1246
|
+
let t = Dt(e, o.value, s, w);
|
|
1261
1247
|
return t && C(), t;
|
|
1262
1248
|
},
|
|
1263
1249
|
close: () => {
|
|
@@ -1266,9 +1252,9 @@ function kt(e, t) {
|
|
|
1266
1252
|
isOpen: () => r !== null
|
|
1267
1253
|
};
|
|
1268
1254
|
}
|
|
1269
|
-
function
|
|
1255
|
+
function kt(e, t) {
|
|
1270
1256
|
return () => {
|
|
1271
|
-
let n =
|
|
1257
|
+
let n = Ot(e, t);
|
|
1272
1258
|
return {
|
|
1273
1259
|
onStart: (e) => {
|
|
1274
1260
|
let t = e.editor.view?.dom;
|
|
@@ -1291,7 +1277,7 @@ function At(e, t) {
|
|
|
1291
1277
|
};
|
|
1292
1278
|
};
|
|
1293
1279
|
}
|
|
1294
|
-
var
|
|
1280
|
+
var At = h.create({
|
|
1295
1281
|
name: "mergeTagSuggestion",
|
|
1296
1282
|
addOptions() {
|
|
1297
1283
|
return {
|
|
@@ -1307,7 +1293,7 @@ var jt = h.create({
|
|
|
1307
1293
|
allowSpaces: !1,
|
|
1308
1294
|
startOfLine: !1,
|
|
1309
1295
|
allowedPrefixes: null,
|
|
1310
|
-
items: ({ query: t }) =>
|
|
1296
|
+
items: ({ query: t }) => Et(e, t),
|
|
1311
1297
|
command: ({ editor: e, range: t, props: n }) => {
|
|
1312
1298
|
e.chain().focus().insertContentAt(t, {
|
|
1313
1299
|
type: "mergeTagNode",
|
|
@@ -1317,13 +1303,13 @@ var jt = h.create({
|
|
|
1317
1303
|
}
|
|
1318
1304
|
}).run();
|
|
1319
1305
|
},
|
|
1320
|
-
render:
|
|
1306
|
+
render: kt(t, n)
|
|
1321
1307
|
};
|
|
1322
|
-
return [
|
|
1308
|
+
return [_t({
|
|
1323
1309
|
editor: this.editor,
|
|
1324
1310
|
...r
|
|
1325
1311
|
})];
|
|
1326
1312
|
}
|
|
1327
1313
|
});
|
|
1328
1314
|
//#endregion
|
|
1329
|
-
export {
|
|
1315
|
+
export { Dt as i, Ot as n, Et as r, At as t };
|