@templatical/editor 0.54.2 → 0.55.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/{AiAltTextPopover-BBKVJ6HA.js → AiAltTextPopover-D5QosKvB.js} +1 -1
- package/dist/{AiAltTextReview-BuVbeQh-.js → AiAltTextReview-D1W_lrI_.js} +1 -1
- package/dist/{AiRewriteMenu-ZpYJfm-O.js → AiRewriteMenu-BwztoMov.js} +4 -4
- package/dist/{BlockPreviewCanvas-DtOo5y3U.js → BlockPreviewCanvas-C23A6FRm.js} +4 -4
- package/dist/{CloudPanels-DQRWMc59.js → CloudPanels-Baoaj6Xf.js} +1 -1
- package/dist/{CountdownToolbar-DTpMEDyh.js → CountdownToolbar-CA_gDIdZ.js} +4 -4
- package/dist/{IssuesPanel-BZn7-p9e.js → IssuesPanel-nmFhWG1p.js} +1 -1
- package/dist/{LanguageMenu-OOmQWVzO.js → LanguageMenu-DcABUYop.js} +3 -3
- package/dist/{LogicTagInsertButton-XESwnJia.js → LogicTagInsertButton-qZ82VMFx.js} +284 -279
- package/dist/{MergeTagInput-CAsBRoSm.js → MergeTagInput-JJeZbFkD.js} +1 -1
- package/dist/{MergeTagModeToggle-bOf27Hg1.js → MergeTagModeToggle-DDucd1eC.js} +1 -1
- package/dist/{MergeTagTextarea-DH_6JFui.js → MergeTagTextarea-dQ2LRrNB.js} +2 -2
- package/dist/{ParagraphEditor-XGUkV5Uw.js → ParagraphEditor-VXYwGoz_.js} +8 -8
- package/dist/{RestoreVersionDialog-C72kWccI.js → RestoreVersionDialog-BibNvAaJ.js} +1 -1
- package/dist/{RichTextEditorContent-BZN8KRvR.js → RichTextEditorContent-CU5EOlM_.js} +2 -2
- package/dist/{SaveBlockDialog-CKOnTMTU.js → SaveBlockDialog-S9aFi0cy.js} +4 -4
- package/dist/{SavedBlocksBrowserModal-BrlNxqDH.js → SavedBlocksBrowserModal-DIdn6B0J.js} +4 -4
- package/dist/{SavedBlocksPanels--lPR6gdh.js → SavedBlocksPanels-Cme2M6u8.js} +1 -1
- package/dist/{SavedBlocksPickBar-4ON4_KKl.js → SavedBlocksPickBar-BDmA7r3m.js} +1 -1
- package/dist/{TemplateSettings-BE0jZmRJ.js → TemplateSettings-C_LHLm5M.js} +4 -4
- package/dist/{TestEmailModal-BKmNGrZN.js → TestEmailModal-CLIRn7eL.js} +5 -5
- package/dist/{TestEmailPanel-DT1wllX3.js → TestEmailPanel-frdtjC8h.js} +1 -1
- package/dist/{TitleEditor-HjVZuUTB.js → TitleEditor-D5kC56Jl.js} +4 -4
- package/dist/{Toolbar-BppchV2k.js → Toolbar-D904Yw_R.js} +551 -503
- package/dist/{TplModal-BFWOoK8l.js → TplModal-BBdotDf1.js} +1 -1
- package/dist/{VersionHistoryPanels-D4yNVLvq.js → VersionHistoryPanels-DhagEgOk.js} +1 -1
- package/dist/{WrapperBlock-BUzQTZuu.js → WrapperBlock-BAT3T0Cz.js} +3 -3
- package/dist/{blockTypeIcons-D91v9k0x.js → blockTypeIcons-CoRQV_hP.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-DOuIxWRv.js → ca-DIkMxYCN.js} +10 -3
- package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js → AiAltTextPopover-CUGOPuRo.js} +2 -2
- package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js.map → AiAltTextPopover-CUGOPuRo.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js → AiAltTextReview-B9vm_L-8.js} +2 -2
- package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js.map → AiAltTextReview-B9vm_L-8.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js → AiRewriteMenu-BvV_7tNZ.js} +7 -7
- package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js.map → AiRewriteMenu-BvV_7tNZ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js → BlockPreviewCanvas-Dr-xGq6v.js} +7 -7
- package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js.map → BlockPreviewCanvas-Dr-xGq6v.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js → CloudPanels-CQ0vNgsH.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js.map → CloudPanels-CQ0vNgsH.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js → CountdownToolbar-BxW-J7DX.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js.map → CountdownToolbar-BxW-J7DX.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js → IssuesPanel-BoHeIjvw.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js.map → IssuesPanel-BoHeIjvw.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js → LanguageMenu-BnYN5N1h.js} +7 -7
- package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js.map → LanguageMenu-BnYN5N1h.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-PDKuo2J3.js → LogicTagInsertButton-Bt2PXbQ0.js} +255 -250
- package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js → MergeTagInput-BELdMRni.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js.map → MergeTagInput-BELdMRni.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js → MergeTagModeToggle-DKfMDIEF.js} +2 -2
- package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js.map → MergeTagModeToggle-DKfMDIEF.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js → MergeTagTextarea-w6xen3Xh.js} +5 -5
- package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js.map → MergeTagTextarea-w6xen3Xh.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js → ParagraphEditor-Cal9hY3U.js} +9 -9
- package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js.map → ParagraphEditor-Cal9hY3U.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js → RestoreVersionDialog-f_ulmASY.js} +2 -2
- package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js.map → RestoreVersionDialog-f_ulmASY.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js → RichTextEditorContent-C_v0kS4A.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js.map → RichTextEditorContent-C_v0kS4A.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js → SaveBlockDialog-C6N9RFls.js} +5 -5
- package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js.map → SaveBlockDialog-C6N9RFls.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js → SavedBlocksBrowserModal-Bl2sl09D.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js.map → SavedBlocksBrowserModal-Bl2sl09D.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js → SavedBlocksPanels-DqVcmEUK.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js.map → SavedBlocksPanels-DqVcmEUK.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js → SavedBlocksPickBar-DE-J1JVL.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js.map → SavedBlocksPickBar-DE-J1JVL.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js → TemplateSettings-CpoKZ8oV.js} +5 -5
- package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js.map → TemplateSettings-CpoKZ8oV.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js → TestEmailModal-DI3z__Bd.js} +8 -8
- package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js.map → TestEmailModal-DI3z__Bd.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js → TestEmailPanel-Cp5d2YGn.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js.map → TestEmailPanel-Cp5d2YGn.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js → TitleEditor-C2syRLdZ.js} +4 -4
- package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js.map → TitleEditor-C2syRLdZ.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-Cv6Rv1S-.js → Toolbar-NEE8qxYh.js} +754 -706
- package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DGpGdwgf.js → TplModal-B1MgvtX8.js} +2 -2
- package/dist/cdn/chunks/{TplModal-DGpGdwgf.js.map → TplModal-B1MgvtX8.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js → VersionHistoryPanels-Cefd8i_e.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js.map → VersionHistoryPanels-Cefd8i_e.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js → WrapperBlock-DFY-7YSs.js} +4 -4
- package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js.map → WrapperBlock-DFY-7YSs.js.map} +1 -1
- package/dist/{ca-DOuIxWRv.js → cdn/chunks/ca-DIkMxYCN.js} +12 -1
- package/dist/cdn/chunks/{ca-DOuIxWRv.js.map → ca-DIkMxYCN.js.map} +1 -1
- package/dist/cdn/chunks/{composables-BxikPuC1.js → composables-nyxwrM27.js} +610 -594
- package/dist/cdn/chunks/composables-nyxwrM27.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js → createCloudRuntime-DJkDGKQ_.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js.map → createCloudRuntime-DJkDGKQ_.js.map} +1 -1
- package/dist/{de-DaOUfYBX.js → cdn/chunks/de-Cc6Ue0UD.js} +12 -1
- package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +1 -0
- package/dist/cdn/chunks/{en-C0pHHMiR.js → en-BX4FujAQ.js} +11 -2
- package/dist/cdn/chunks/en-BX4FujAQ.js.map +1 -0
- package/dist/{es-CxyEKr6n.js → cdn/chunks/es-Do5b-MKU.js} +12 -1
- package/dist/cdn/chunks/es-Do5b-MKU.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DuDWpKo7.js → extensions-BcwkOjVq.js} +76 -70
- package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +1 -0
- package/dist/{fr-CYbamiI6.js → cdn/chunks/fr-S1n2Ebzp.js} +12 -1
- package/dist/cdn/chunks/fr-S1n2Ebzp.js.map +1 -0
- package/dist/cdn/chunks/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +11 -2
- package/dist/cdn/chunks/ja-DLwcq4bA.js.map +1 -0
- package/dist/{nl-DkrB-VKZ.js → cdn/chunks/nl-0JSWaZpT.js} +12 -1
- package/dist/cdn/chunks/nl-0JSWaZpT.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Bn_hl4jd.js → normalizeMergeTagMarkup-BrGw5jxk.js} +99 -89
- package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js → preRenderCustomBlocks-Cj0XYwuh.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js.map → preRenderCustomBlocks-Cj0XYwuh.js.map} +1 -1
- package/dist/{pt-BR-CY5Ye7eP.js → cdn/chunks/pt-BR-D3VlIMDZ.js} +12 -1
- package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js → sanitizeHtml-GxJCxKcP.js} +3 -3
- package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js.map → sanitizeHtml-GxJCxKcP.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js → socialIcons-B5zrrV8-.js} +387 -386
- package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js.map → socialIcons-B5zrrV8-.js.map} +1 -1
- package/dist/cdn/chunks/{src-712f3ofG.js → src-Diw9SLIe.js} +673 -554
- package/dist/cdn/chunks/src-Diw9SLIe.js.map +1 -0
- package/dist/cdn/chunks/{src-B2tQbzf6.js → src-UR3AQocX.js} +221 -215
- package/dist/cdn/chunks/src-UR3AQocX.js.map +1 -0
- package/dist/cdn/chunks/{src-ZFw5fg_z.js → src-v47QHNmB.js} +809 -659
- package/dist/cdn/chunks/src-v47QHNmB.js.map +1 -0
- package/dist/cdn/chunks/useLocalizedDisplay-DekV8qar.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-DiNjT22M.js.map → useLocalizedDisplay-DekV8qar.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js → useLogicTag-Cbp3I7UN.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js.map → useLogicTag-Cbp3I7UN.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js → useMergeTag-1lrpNyR5.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js.map → useMergeTag-1lrpNyR5.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js → withCurrentFont-DZfmiv8V.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js.map → withCurrentFont-DZfmiv8V.js.map} +1 -1
- package/dist/cdn/editor.js +284 -284
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-BbPFRlBf.js → composables-DPgNn9GZ.js} +929 -913
- package/dist/{createCloudRuntime-Dlrg88gS.js → createCloudRuntime-Bw8TLmQ8.js} +2 -2
- package/dist/{cdn/chunks/de-DaOUfYBX.js → de-Cc6Ue0UD.js} +10 -3
- package/dist/{dist-C34cYI5S.js → dist-CBdk1Vcb.js} +963 -813
- package/dist/{en-C0pHHMiR.js → en-BX4FujAQ.js} +10 -1
- package/dist/{cdn/chunks/es-CxyEKr6n.js → es-Do5b-MKU.js} +10 -3
- package/dist/{extensions-xCiyqSg7.js → extensions-QFAARrjF.js} +338 -332
- package/dist/{cdn/chunks/fr-CYbamiI6.js → fr-S1n2Ebzp.js} +10 -3
- package/dist/index.d.ts +14 -1
- package/dist/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +10 -1
- package/dist/{cdn/chunks/nl-DkrB-VKZ.js → nl-0JSWaZpT.js} +10 -3
- package/dist/{normalizeMergeTagMarkup-C7FGNURu.js → normalizeMergeTagMarkup-BS0nRvhq.js} +89 -79
- package/dist/{preRenderCustomBlocks-DvbRa3L3.js → preRenderCustomBlocks-CiKvKd8V.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-CY5Ye7eP.js → pt-BR-D3VlIMDZ.js} +10 -3
- package/dist/{sanitizeHtml-D_ab7dD6.js → sanitizeHtml-USjTyALR.js} +1 -1
- package/dist/{socialIcons-DhAolBjt.js → socialIcons-NvIg5ahU.js} +338 -337
- package/dist/templatical-editor.js +41 -41
- package/dist/{useLocalizedDisplay-C9MBFUr4.js → useLocalizedDisplay-LdjosX4w.js} +1 -1
- package/dist/{useLogicTag-BmuakZBd.js → useLogicTag-D8zgkXfb.js} +1 -1
- package/dist/{useMergeTag-DC4a8b_v.js → useMergeTag-k7Kr0nMd.js} +1 -1
- package/dist/{withCurrentFont-BSxJai99.js → withCurrentFont-Bzeg_gfH.js} +1 -1
- package/package.json +7 -7
- package/dist/cdn/chunks/LogicTagInsertButton-PDKuo2J3.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-Cv6Rv1S-.js.map +0 -1
- package/dist/cdn/chunks/composables-BxikPuC1.js.map +0 -1
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +0 -1
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +0 -1
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +0 -1
- package/dist/cdn/chunks/extensions-DuDWpKo7.js.map +0 -1
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +0 -1
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +0 -1
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +0 -1
- package/dist/cdn/chunks/src-712f3ofG.js.map +0 -1
- package/dist/cdn/chunks/src-B2tQbzf6.js.map +0 -1
- package/dist/cdn/chunks/src-ZFw5fg_z.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-DiNjT22M.js +0 -33
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Ft as e, M as t, Mt as n, O as r, Pt as i, U as a, W as o, Z as s, c, ct as l, d as u, et as d, f, l as p, u as m, y as h } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
2
2
|
import { a as g, c as _, s as v } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { H as
|
|
8
|
-
import { n as
|
|
3
|
+
import { Jt as y, ct as b, g as x, lt as S, vt as C } from "./dist-CBdk1Vcb.js";
|
|
4
|
+
import { a as w, o as T, s as E } from "./LogicTagInsertButton-qZ82VMFx.js";
|
|
5
|
+
import { t as D } from "./useI18n-CgtvtF4C.js";
|
|
6
|
+
import { t as O } from "./useMergeTag-k7Kr0nMd.js";
|
|
7
|
+
import { H as k, Kn as A, Qn as j, Zn as M, _n as N, m as P, qn as ee, s as F, u as te, v as I } from "./dist-BWflWcpW.js";
|
|
8
|
+
import { n as ne, t as re } from "./dist-fqSers8_.js";
|
|
9
9
|
// src/extensions/FontSize.ts
|
|
10
|
-
var
|
|
10
|
+
var ie = F.create({
|
|
11
11
|
name: "fontSize",
|
|
12
12
|
addOptions() {
|
|
13
13
|
return { types: ["textStyle"] };
|
|
@@ -28,7 +28,7 @@ var ae = N.create({
|
|
|
28
28
|
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
31
|
+
}), ae = F.create({
|
|
32
32
|
name: "letterSpacing",
|
|
33
33
|
addOptions() {
|
|
34
34
|
return { types: ["textStyle"] };
|
|
@@ -49,7 +49,7 @@ var ae = N.create({
|
|
|
49
49
|
unsetLetterSpacing: () => ({ chain: e }) => e().setMark("textStyle", { letterSpacing: null }).removeEmptyTextStyle().run()
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
52
|
+
}), oe = F.create({
|
|
53
53
|
name: "lineBoundaryKeys",
|
|
54
54
|
addKeyboardShortcuts() {
|
|
55
55
|
let e = (e) => ({ editor: t }) => {
|
|
@@ -63,7 +63,7 @@ var ae = N.create({
|
|
|
63
63
|
Home: e("backward")
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), se = F.create({
|
|
67
67
|
name: "lineHeight",
|
|
68
68
|
addOptions() {
|
|
69
69
|
return {
|
|
@@ -87,11 +87,11 @@ var ae = N.create({
|
|
|
87
87
|
unsetLineHeight: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "lineHeight"))
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
90
|
+
}), ce = [
|
|
91
91
|
"aria-label",
|
|
92
92
|
"data-tooltip",
|
|
93
93
|
"onKeydown"
|
|
94
|
-
],
|
|
94
|
+
], le = ["aria-label", "onKeydown"], ue = ["aria-label"], de = /* @__PURE__ */ h({
|
|
95
95
|
__name: "LogicMergeTagNodeView",
|
|
96
96
|
props: {
|
|
97
97
|
node: {},
|
|
@@ -101,56 +101,56 @@ var ae = N.create({
|
|
|
101
101
|
updateAttributes: { type: Function }
|
|
102
102
|
},
|
|
103
103
|
setup(s) {
|
|
104
|
-
let h = s, { syntax:
|
|
105
|
-
function
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
let h = s, { syntax: y } = O(), { t: x } = D(), S = c(() => C(h.node.attrs.value, y)), w = c(() => b(h.node.attrs.value, y)), T = d(!1), E = d(""), k = d(null), A = !1;
|
|
105
|
+
function j() {
|
|
106
|
+
E.value = h.node.attrs.value, A = !1, T.value = !0, r(() => {
|
|
107
|
+
k.value?.focus(), k.value?.select();
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
|
|
113
|
-
let e =
|
|
110
|
+
function M() {
|
|
111
|
+
if (A) return;
|
|
112
|
+
A = !0;
|
|
113
|
+
let e = E.value.trim();
|
|
114
114
|
e && e !== h.node.attrs.value && h.updateAttributes({
|
|
115
115
|
value: e,
|
|
116
|
-
keyword:
|
|
116
|
+
keyword: C(e, y) ? b(e, y) : ""
|
|
117
117
|
}), T.value = !1;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
e.key === "Enter" ? (e.preventDefault(),
|
|
119
|
+
function N(e) {
|
|
120
|
+
e.key === "Enter" ? (e.preventDefault(), M()) : e.key === "Escape" && (T.value = !1);
|
|
121
121
|
}
|
|
122
|
-
return (r, c) => (t(), m(l(
|
|
122
|
+
return (r, c) => (t(), m(l(re), {
|
|
123
123
|
as: "span",
|
|
124
|
-
class: n(
|
|
125
|
-
style: i(
|
|
124
|
+
class: n(S.value ? "tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none" : ""),
|
|
125
|
+
style: i(S.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""),
|
|
126
126
|
contenteditable: "false"
|
|
127
127
|
}, {
|
|
128
128
|
default: a(() => [T.value ? o((t(), f("input", {
|
|
129
129
|
key: 0,
|
|
130
130
|
ref_key: "inputRef",
|
|
131
|
-
ref:
|
|
132
|
-
"onUpdate:modelValue": c[0] ||= (e) =>
|
|
131
|
+
ref: k,
|
|
132
|
+
"onUpdate:modelValue": c[0] ||= (e) => E.value = e,
|
|
133
133
|
type: "text",
|
|
134
134
|
class: "tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none tpl:text-[var(--tpl-primary)]",
|
|
135
|
-
onBlur:
|
|
136
|
-
onKeydown:
|
|
137
|
-
}, null, 544)), [[g,
|
|
135
|
+
onBlur: M,
|
|
136
|
+
onKeydown: N
|
|
137
|
+
}, null, 544)), [[g, E.value]]) : S.value ? (t(), f("span", {
|
|
138
138
|
key: 1,
|
|
139
139
|
role: "button",
|
|
140
140
|
tabindex: "0",
|
|
141
141
|
"aria-label": l(x).mergeTag.editValue,
|
|
142
142
|
class: "tpl-tooltip tpl:cursor-pointer",
|
|
143
143
|
"data-tooltip": s.node.attrs.value,
|
|
144
|
-
onClick: _(
|
|
145
|
-
onKeydown: [v(_(
|
|
146
|
-
}, e(w.value), 41,
|
|
144
|
+
onClick: _(j, ["stop"]),
|
|
145
|
+
onKeydown: [v(_(j, ["stop"]), ["enter"]), v(_(j, ["prevent", "stop"]), ["space"])]
|
|
146
|
+
}, e(w.value), 41, ce)) : (t(), f("span", {
|
|
147
147
|
key: 2,
|
|
148
148
|
role: "button",
|
|
149
149
|
tabindex: "0",
|
|
150
150
|
"aria-label": l(x).mergeTag.editValue,
|
|
151
|
-
onClick: _(
|
|
152
|
-
onKeydown: [v(_(
|
|
153
|
-
}, e(s.node.attrs.value), 41,
|
|
151
|
+
onClick: _(j, ["stop"]),
|
|
152
|
+
onKeydown: [v(_(j, ["stop"]), ["enter"]), v(_(j, ["prevent", "stop"]), ["space"])]
|
|
153
|
+
}, e(s.node.attrs.value), 41, le)), S.value ? (t(), f("button", {
|
|
154
154
|
key: 3,
|
|
155
155
|
type: "button",
|
|
156
156
|
"aria-label": l(x).mergeTag.deleteMergeTag,
|
|
@@ -175,28 +175,28 @@ var ae = N.create({
|
|
|
175
175
|
y1: "6",
|
|
176
176
|
x2: "18",
|
|
177
177
|
y2: "18"
|
|
178
|
-
})], -1)]], 8,
|
|
178
|
+
})], -1)]], 8, ue)) : u("", !0)]),
|
|
179
179
|
_: 1
|
|
180
180
|
}, 8, ["class", "style"]));
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
// src/extensions/isNodeSelected.ts
|
|
184
|
-
function
|
|
184
|
+
function L(e, t) {
|
|
185
185
|
let { $from: n, $to: r } = e.state.selection;
|
|
186
186
|
return n.pos === r.pos ? n.pos > 0 && n.nodeBefore?.type.name === t || n.nodeAfter?.type.name === t : !1;
|
|
187
187
|
}
|
|
188
188
|
// src/extensions/renderVueNodeView.ts
|
|
189
|
-
function
|
|
190
|
-
return
|
|
189
|
+
function fe(e) {
|
|
190
|
+
return ne(e);
|
|
191
191
|
}
|
|
192
192
|
// src/extensions/LogicMergeTagNode.ts
|
|
193
|
-
var
|
|
193
|
+
var pe = P.create({
|
|
194
194
|
name: "logicMergeTagNode",
|
|
195
195
|
group: "inline",
|
|
196
196
|
inline: !0,
|
|
197
197
|
atom: !0,
|
|
198
198
|
addOptions() {
|
|
199
|
-
return { syntax:
|
|
199
|
+
return { syntax: x.liquid };
|
|
200
200
|
},
|
|
201
201
|
addAttributes() {
|
|
202
202
|
return {
|
|
@@ -216,15 +216,15 @@ var me = M.create({
|
|
|
216
216
|
return [{ tag: "span[data-logic-merge-tag]" }];
|
|
217
217
|
},
|
|
218
218
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
219
|
-
if (!
|
|
219
|
+
if (!C(e.attrs.value, this.options.syntax)) return [
|
|
220
220
|
"span",
|
|
221
221
|
{},
|
|
222
222
|
e.attrs.value
|
|
223
223
|
];
|
|
224
|
-
let n =
|
|
224
|
+
let n = b(e.attrs.value, this.options.syntax);
|
|
225
225
|
return [
|
|
226
226
|
"span",
|
|
227
|
-
|
|
227
|
+
N(t, {
|
|
228
228
|
"data-logic-merge-tag": e.attrs.value,
|
|
229
229
|
"data-keyword": n
|
|
230
230
|
}),
|
|
@@ -232,22 +232,22 @@ var me = M.create({
|
|
|
232
232
|
];
|
|
233
233
|
},
|
|
234
234
|
addNodeView() {
|
|
235
|
-
return
|
|
235
|
+
return fe(de);
|
|
236
236
|
},
|
|
237
237
|
addKeyboardShortcuts() {
|
|
238
238
|
return {
|
|
239
|
-
Backspace: () =>
|
|
240
|
-
Delete: () =>
|
|
239
|
+
Backspace: () => L(this.editor, this.name),
|
|
240
|
+
Delete: () => L(this.editor, this.name)
|
|
241
241
|
};
|
|
242
242
|
},
|
|
243
243
|
addInputRules() {
|
|
244
244
|
let e = RegExp(this.options.syntax.logic.source + "$", "");
|
|
245
|
-
return [new
|
|
245
|
+
return [new te({
|
|
246
246
|
find: e,
|
|
247
247
|
handler: ({ state: e, range: t, match: n }) => {
|
|
248
248
|
let r = n[0];
|
|
249
|
-
if (!
|
|
250
|
-
let i =
|
|
249
|
+
if (!C(r, this.options.syntax)) return;
|
|
250
|
+
let i = b(r, this.options.syntax), a = this.type.create({
|
|
251
251
|
value: r,
|
|
252
252
|
keyword: i
|
|
253
253
|
});
|
|
@@ -256,13 +256,16 @@ var me = M.create({
|
|
|
256
256
|
})];
|
|
257
257
|
},
|
|
258
258
|
addPasteRules() {
|
|
259
|
-
let e =
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
let e = this.options.syntax, t = Object.values(x).includes(e) ? (t) => y(t, e, "logic").map((e) => ({
|
|
260
|
+
index: e.index,
|
|
261
|
+
text: e.value
|
|
262
|
+
})) : new RegExp(e.logic.source, "g");
|
|
263
|
+
return [new I({
|
|
264
|
+
find: t,
|
|
262
265
|
handler: ({ state: e, range: t, match: n }) => {
|
|
263
266
|
let r = n[0];
|
|
264
|
-
if (!
|
|
265
|
-
let i =
|
|
267
|
+
if (!C(r, this.options.syntax)) return;
|
|
268
|
+
let i = b(r, this.options.syntax), a = this.type.create({
|
|
266
269
|
value: r,
|
|
267
270
|
keyword: i
|
|
268
271
|
});
|
|
@@ -270,11 +273,11 @@ var me = M.create({
|
|
|
270
273
|
}
|
|
271
274
|
})];
|
|
272
275
|
}
|
|
273
|
-
}),
|
|
276
|
+
}), me = ["aria-invalid"], he = [
|
|
274
277
|
"aria-label",
|
|
275
278
|
"data-tooltip",
|
|
276
279
|
"onKeydown"
|
|
277
|
-
],
|
|
280
|
+
], ge = ["aria-label"], _e = /* @__PURE__ */ h({
|
|
278
281
|
__name: "MergeTagNodeView",
|
|
279
282
|
props: {
|
|
280
283
|
node: {},
|
|
@@ -282,68 +285,68 @@ var me = M.create({
|
|
|
282
285
|
updateAttributes: { type: Function }
|
|
283
286
|
},
|
|
284
287
|
setup(i) {
|
|
285
|
-
let u = i, { getMergeTagLabel: h, getMergeTagDisplayLabel: y, findMergeTag: b, canRepickMergeTag: x, showRawValue: S, isMergeTagValue: C, requestMergeTag: w } =
|
|
288
|
+
let u = i, { getMergeTagLabel: h, getMergeTagDisplayLabel: y, findMergeTag: b, canRepickMergeTag: x, showRawValue: S, isMergeTagValue: C, requestMergeTag: w } = O(), { t: T, format: E } = D(), k = c(() => y(u.node.attrs.value, u.node.attrs.label)), A = c(() => x(u.node.attrs.value)), j = d(!1), M = d(""), N = d(null), P = !1;
|
|
286
289
|
s(() => {
|
|
287
|
-
|
|
290
|
+
P = !0;
|
|
288
291
|
});
|
|
289
|
-
let
|
|
290
|
-
async function
|
|
292
|
+
let ee = c(() => M.value.trim() === "" || C(M.value.trim()));
|
|
293
|
+
async function F() {
|
|
291
294
|
let e = await w({
|
|
292
295
|
reason: "edit",
|
|
293
296
|
current: b(u.node.attrs.value)
|
|
294
297
|
});
|
|
295
|
-
!
|
|
298
|
+
!P && e && u.updateAttributes({
|
|
296
299
|
value: e.value,
|
|
297
300
|
label: e.label
|
|
298
301
|
});
|
|
299
302
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
302
|
-
|
|
303
|
+
function te() {
|
|
304
|
+
M.value = u.node.attrs.value, j.value = !0, r(() => {
|
|
305
|
+
N.value?.focus(), N.value?.select();
|
|
303
306
|
});
|
|
304
307
|
}
|
|
305
|
-
function
|
|
306
|
-
|
|
308
|
+
function I() {
|
|
309
|
+
A.value ? F() : te();
|
|
307
310
|
}
|
|
308
|
-
function
|
|
309
|
-
let e =
|
|
311
|
+
function ne() {
|
|
312
|
+
let e = M.value.trim();
|
|
310
313
|
e && e !== u.node.attrs.value && C(e) && u.updateAttributes({
|
|
311
314
|
value: e,
|
|
312
315
|
label: h(e)
|
|
313
|
-
}),
|
|
316
|
+
}), j.value = !1;
|
|
314
317
|
}
|
|
315
|
-
function
|
|
318
|
+
function ie(e) {
|
|
316
319
|
if (e.key === "Enter") {
|
|
317
|
-
if (e.preventDefault(), !
|
|
318
|
-
|
|
319
|
-
} else e.key === "Escape" && (
|
|
320
|
+
if (e.preventDefault(), !ee.value) return;
|
|
321
|
+
ne();
|
|
322
|
+
} else e.key === "Escape" && (j.value = !1);
|
|
320
323
|
}
|
|
321
|
-
return (r, s) => (t(), m(l(
|
|
324
|
+
return (r, s) => (t(), m(l(re), {
|
|
322
325
|
as: "span",
|
|
323
326
|
class: "tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none tpl:text-[var(--tpl-primary)]",
|
|
324
327
|
style: { "background-color": "color-mix(in srgb, var(--tpl-primary) 20%, transparent)" },
|
|
325
328
|
contenteditable: "false"
|
|
326
329
|
}, {
|
|
327
|
-
default: a(() => [
|
|
330
|
+
default: a(() => [j.value ? o((t(), f("input", {
|
|
328
331
|
key: 0,
|
|
329
332
|
ref_key: "inputRef",
|
|
330
|
-
ref:
|
|
331
|
-
"onUpdate:modelValue": s[0] ||= (e) =>
|
|
333
|
+
ref: N,
|
|
334
|
+
"onUpdate:modelValue": s[0] ||= (e) => M.value = e,
|
|
332
335
|
type: "text",
|
|
333
|
-
"aria-invalid":
|
|
334
|
-
class: n(["tpl:w-32 tpl:rounded tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]",
|
|
335
|
-
onBlur:
|
|
336
|
-
onKeydown:
|
|
337
|
-
}, null, 42,
|
|
336
|
+
"aria-invalid": ee.value ? void 0 : "true",
|
|
337
|
+
class: n(["tpl:w-32 tpl:rounded tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]", ee.value ? "tpl:border-none" : "tpl:border tpl:border-[var(--tpl-danger)]"]),
|
|
338
|
+
onBlur: ne,
|
|
339
|
+
onKeydown: ie
|
|
340
|
+
}, null, 42, me)), [[g, M.value]]) : (t(), f("span", {
|
|
338
341
|
key: 1,
|
|
339
342
|
role: "button",
|
|
340
343
|
tabindex: "0",
|
|
341
|
-
"aria-label":
|
|
344
|
+
"aria-label": A.value ? l(E)(l(T).mergeTag.changeTag, { label: k.value }) : l(T).mergeTag.editValue,
|
|
342
345
|
class: n(["tpl:cursor-pointer", l(S) ? "tpl-tooltip" : ""]),
|
|
343
346
|
"data-tooltip": l(S) ? i.node.attrs.value : void 0,
|
|
344
|
-
onClick: _(
|
|
345
|
-
onKeydown: [v(_(
|
|
346
|
-
}, e(
|
|
347
|
+
onClick: _(I, ["stop"]),
|
|
348
|
+
onKeydown: [v(_(I, ["stop"]), ["enter"]), v(_(I, ["prevent", "stop"]), ["space"])]
|
|
349
|
+
}, e(k.value), 43, he)), p("button", {
|
|
347
350
|
type: "button",
|
|
348
351
|
"aria-label": l(T).mergeTag.deleteMergeTag,
|
|
349
352
|
class: "tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]",
|
|
@@ -367,11 +370,11 @@ var me = M.create({
|
|
|
367
370
|
y1: "6",
|
|
368
371
|
x2: "18",
|
|
369
372
|
y2: "18"
|
|
370
|
-
})], -1)]], 8,
|
|
373
|
+
})], -1)]], 8, ge)]),
|
|
371
374
|
_: 1
|
|
372
375
|
}));
|
|
373
376
|
}
|
|
374
|
-
}),
|
|
377
|
+
}), ve = P.create({
|
|
375
378
|
name: "mergeTagNode",
|
|
376
379
|
group: "inline",
|
|
377
380
|
inline: !0,
|
|
@@ -379,7 +382,7 @@ var me = M.create({
|
|
|
379
382
|
addOptions() {
|
|
380
383
|
return {
|
|
381
384
|
mergeTags: () => [],
|
|
382
|
-
syntax:
|
|
385
|
+
syntax: x.liquid
|
|
383
386
|
};
|
|
384
387
|
},
|
|
385
388
|
addAttributes() {
|
|
@@ -400,10 +403,10 @@ var me = M.create({
|
|
|
400
403
|
return [{ tag: "span[data-merge-tag]" }];
|
|
401
404
|
},
|
|
402
405
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
403
|
-
let n =
|
|
406
|
+
let n = S(e.attrs.value, this.options.mergeTags());
|
|
404
407
|
return [
|
|
405
408
|
"span",
|
|
406
|
-
|
|
409
|
+
N(t, {
|
|
407
410
|
"data-merge-tag": e.attrs.value,
|
|
408
411
|
"data-label": n
|
|
409
412
|
}),
|
|
@@ -411,7 +414,7 @@ var me = M.create({
|
|
|
411
414
|
];
|
|
412
415
|
},
|
|
413
416
|
addNodeView() {
|
|
414
|
-
return
|
|
417
|
+
return fe(_e);
|
|
415
418
|
},
|
|
416
419
|
addCommands() {
|
|
417
420
|
return { insertMergeTag: (e) => ({ commands: t }) => t.insertContent({
|
|
@@ -424,16 +427,16 @@ var me = M.create({
|
|
|
424
427
|
},
|
|
425
428
|
addKeyboardShortcuts() {
|
|
426
429
|
return {
|
|
427
|
-
Backspace: () =>
|
|
428
|
-
Delete: () =>
|
|
430
|
+
Backspace: () => L(this.editor, this.name),
|
|
431
|
+
Delete: () => L(this.editor, this.name)
|
|
429
432
|
};
|
|
430
433
|
},
|
|
431
434
|
addInputRules() {
|
|
432
435
|
let e = RegExp(this.options.syntax.value.source + "$", "");
|
|
433
|
-
return [new
|
|
436
|
+
return [new te({
|
|
434
437
|
find: e,
|
|
435
438
|
handler: ({ state: e, range: t, match: n }) => {
|
|
436
|
-
let r = n[0], i =
|
|
439
|
+
let r = n[0], i = S(r, this.options.mergeTags()), a = this.type.create({
|
|
437
440
|
label: i,
|
|
438
441
|
value: r
|
|
439
442
|
});
|
|
@@ -442,11 +445,14 @@ var me = M.create({
|
|
|
442
445
|
})];
|
|
443
446
|
},
|
|
444
447
|
addPasteRules() {
|
|
445
|
-
let e =
|
|
446
|
-
|
|
447
|
-
|
|
448
|
+
let e = this.options.syntax, t = Object.values(x).includes(e) ? (t) => y(t, e, "value").map((e) => ({
|
|
449
|
+
index: e.index,
|
|
450
|
+
text: e.value
|
|
451
|
+
})) : new RegExp(e.value.source, "g");
|
|
452
|
+
return [new I({
|
|
453
|
+
find: t,
|
|
448
454
|
handler: ({ state: e, range: t, match: n }) => {
|
|
449
|
-
let r = n[0], i =
|
|
455
|
+
let r = n[0], i = S(r, this.options.mergeTags()), a = this.type.create({
|
|
450
456
|
label: i,
|
|
451
457
|
value: r
|
|
452
458
|
});
|
|
@@ -454,72 +460,72 @@ var me = M.create({
|
|
|
454
460
|
}
|
|
455
461
|
})];
|
|
456
462
|
}
|
|
457
|
-
}),
|
|
463
|
+
}), ye = Math.min, R = Math.max, be = Math.round, xe = Math.floor, z = (e) => ({
|
|
458
464
|
x: e,
|
|
459
465
|
y: e
|
|
460
|
-
}),
|
|
466
|
+
}), Se = {
|
|
461
467
|
left: "right",
|
|
462
468
|
right: "left",
|
|
463
469
|
bottom: "top",
|
|
464
470
|
top: "bottom"
|
|
465
471
|
};
|
|
466
|
-
function
|
|
472
|
+
function Ce(e, t) {
|
|
467
473
|
return typeof e == "function" ? e(t) : e;
|
|
468
474
|
}
|
|
469
475
|
function B(e) {
|
|
470
476
|
return e.split("-")[0];
|
|
471
477
|
}
|
|
472
|
-
function
|
|
478
|
+
function we(e) {
|
|
473
479
|
return e.split("-")[1];
|
|
474
480
|
}
|
|
475
|
-
function
|
|
481
|
+
function Te(e) {
|
|
476
482
|
return e === "x" ? "y" : "x";
|
|
477
483
|
}
|
|
478
|
-
function
|
|
484
|
+
function Ee(e) {
|
|
479
485
|
return e === "y" ? "height" : "width";
|
|
480
486
|
}
|
|
481
487
|
function V(e) {
|
|
482
488
|
let t = e[0];
|
|
483
489
|
return t === "t" || t === "b" ? "y" : "x";
|
|
484
490
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
491
|
+
function De(e) {
|
|
492
|
+
return Te(V(e));
|
|
487
493
|
}
|
|
488
|
-
function
|
|
494
|
+
function Oe(e, t, n) {
|
|
489
495
|
n === void 0 && (n = !1);
|
|
490
|
-
let r =
|
|
491
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
496
|
+
let r = we(e), i = De(e), a = Ee(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
497
|
+
return t.reference[a] > t.floating[a] && (o = Le(o)), [o, Le(o)];
|
|
492
498
|
}
|
|
493
|
-
function
|
|
494
|
-
let t =
|
|
499
|
+
function ke(e) {
|
|
500
|
+
let t = Le(e);
|
|
495
501
|
return [
|
|
496
|
-
|
|
502
|
+
Ae(e),
|
|
497
503
|
t,
|
|
498
|
-
|
|
504
|
+
Ae(t)
|
|
499
505
|
];
|
|
500
506
|
}
|
|
501
|
-
function
|
|
507
|
+
function Ae(e) {
|
|
502
508
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
503
509
|
}
|
|
504
|
-
var
|
|
505
|
-
function
|
|
510
|
+
var je = ["left", "right"], Me = ["right", "left"], Ne = ["top", "bottom"], Pe = ["bottom", "top"];
|
|
511
|
+
function Fe(e, t, n) {
|
|
506
512
|
switch (e) {
|
|
507
513
|
case "top":
|
|
508
|
-
case "bottom": return n ? t ?
|
|
514
|
+
case "bottom": return n ? t ? Me : je : t ? je : Me;
|
|
509
515
|
case "left":
|
|
510
|
-
case "right": return t ?
|
|
516
|
+
case "right": return t ? Ne : Pe;
|
|
511
517
|
default: return [];
|
|
512
518
|
}
|
|
513
519
|
}
|
|
514
|
-
function
|
|
515
|
-
let i =
|
|
516
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
520
|
+
function Ie(e, t, n, r) {
|
|
521
|
+
let i = we(e), a = Fe(B(e), n === "start", r);
|
|
522
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Ae)))), a;
|
|
517
523
|
}
|
|
518
|
-
function
|
|
524
|
+
function Le(e) {
|
|
519
525
|
let t = B(e);
|
|
520
|
-
return
|
|
526
|
+
return Se[t] + e.slice(t.length);
|
|
521
527
|
}
|
|
522
|
-
function
|
|
528
|
+
function Re(e) {
|
|
523
529
|
return {
|
|
524
530
|
top: e.top ?? 0,
|
|
525
531
|
right: e.right ?? 0,
|
|
@@ -527,15 +533,15 @@ function Le(e) {
|
|
|
527
533
|
left: e.left ?? 0
|
|
528
534
|
};
|
|
529
535
|
}
|
|
530
|
-
function
|
|
536
|
+
function ze(e) {
|
|
531
537
|
return typeof e == "number" ? {
|
|
532
538
|
top: e,
|
|
533
539
|
right: e,
|
|
534
540
|
bottom: e,
|
|
535
541
|
left: e
|
|
536
|
-
} :
|
|
542
|
+
} : Re(e);
|
|
537
543
|
}
|
|
538
|
-
function
|
|
544
|
+
function Be(e) {
|
|
539
545
|
let { x: t, y: n, width: r, height: i } = e;
|
|
540
546
|
return {
|
|
541
547
|
width: r,
|
|
@@ -549,8 +555,8 @@ function ze(e) {
|
|
|
549
555
|
};
|
|
550
556
|
}
|
|
551
557
|
// ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
552
|
-
function
|
|
553
|
-
let { reference: r, floating: i } = e, a = V(t), o =
|
|
558
|
+
function Ve(e, t, n) {
|
|
559
|
+
let { reference: r, floating: i } = e, a = V(t), o = De(t), s = Ee(o), c = B(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;
|
|
554
560
|
switch (c) {
|
|
555
561
|
case "top":
|
|
556
562
|
p = {
|
|
@@ -581,12 +587,12 @@ function Be(e, t, n) {
|
|
|
581
587
|
y: r.y
|
|
582
588
|
};
|
|
583
589
|
}
|
|
584
|
-
let m =
|
|
590
|
+
let m = we(t);
|
|
585
591
|
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
586
592
|
}
|
|
587
|
-
async function
|
|
593
|
+
async function He(e, t) {
|
|
588
594
|
t === void 0 && (t = {});
|
|
589
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } =
|
|
595
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = Ce(t, e), p = ze(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Be(await i.getClippingRect({
|
|
590
596
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
591
597
|
boundary: c,
|
|
592
598
|
rootBoundary: l,
|
|
@@ -599,7 +605,7 @@ async function Ve(e, t) {
|
|
|
599
605
|
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
600
606
|
x: 1,
|
|
601
607
|
y: 1
|
|
602
|
-
}, y =
|
|
608
|
+
}, y = Be(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
603
609
|
elements: o,
|
|
604
610
|
rect: g,
|
|
605
611
|
offsetParent: _,
|
|
@@ -612,15 +618,15 @@ async function Ve(e, t) {
|
|
|
612
618
|
right: (y.right - h.right + p.right) / v.x
|
|
613
619
|
};
|
|
614
620
|
}
|
|
615
|
-
var
|
|
621
|
+
var Ue = 50, We = async (e, t, n) => {
|
|
616
622
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
617
623
|
...o,
|
|
618
|
-
detectOverflow:
|
|
624
|
+
detectOverflow: He
|
|
619
625
|
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
620
626
|
reference: e,
|
|
621
627
|
floating: t,
|
|
622
628
|
strategy: i
|
|
623
|
-
}), { x: u, y: d } =
|
|
629
|
+
}), { x: u, y: d } = Ve(l, r, c), f = r, p = 0, m = {};
|
|
624
630
|
for (let n = 0; n < a.length; n++) {
|
|
625
631
|
let h = a[n];
|
|
626
632
|
if (!h) continue;
|
|
@@ -641,11 +647,11 @@ var He = 50, Ue = async (e, t, n) => {
|
|
|
641
647
|
u = v ?? u, d = y ?? d, m[g] = {
|
|
642
648
|
...m[g],
|
|
643
649
|
...b
|
|
644
|
-
}, x && p <
|
|
650
|
+
}, x && p < Ue && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
645
651
|
reference: e,
|
|
646
652
|
floating: t,
|
|
647
653
|
strategy: i
|
|
648
|
-
}) : x.rects), {x: u, y: d} =
|
|
654
|
+
}) : x.rects), {x: u, y: d} = Ve(l, f, c)), n = -1);
|
|
649
655
|
}
|
|
650
656
|
return {
|
|
651
657
|
x: u,
|
|
@@ -654,19 +660,19 @@ var He = 50, Ue = async (e, t, n) => {
|
|
|
654
660
|
strategy: i,
|
|
655
661
|
middlewareData: m
|
|
656
662
|
};
|
|
657
|
-
},
|
|
663
|
+
}, Ge = function(e) {
|
|
658
664
|
return e === void 0 && (e = {}), {
|
|
659
665
|
name: "flip",
|
|
660
666
|
options: e,
|
|
661
667
|
async fn(t) {
|
|
662
668
|
var n;
|
|
663
|
-
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } =
|
|
669
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = Ce(e, t);
|
|
664
670
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
665
|
-
let g = B(r), _ = V(o), v = B(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [
|
|
666
|
-
!d && x && b.push(...
|
|
671
|
+
let g = B(r), _ = V(o), v = B(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Le(o)] : ke(o)), x = p !== "none";
|
|
672
|
+
!d && x && b.push(...Ie(o, m, p, y));
|
|
667
673
|
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
668
674
|
if (l && w.push(C[g]), u) {
|
|
669
|
-
let e =
|
|
675
|
+
let e = Oe(r, a, y);
|
|
670
676
|
w.push(C[e[0]], C[e[1]]);
|
|
671
677
|
}
|
|
672
678
|
if (T = [...T, {
|
|
@@ -701,9 +707,9 @@ var He = 50, Ue = async (e, t, n) => {
|
|
|
701
707
|
return {};
|
|
702
708
|
}
|
|
703
709
|
};
|
|
704
|
-
},
|
|
705
|
-
async function
|
|
706
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = B(n), s =
|
|
710
|
+
}, Ke = /*#__PURE__*/ new Set(["left", "top"]);
|
|
711
|
+
async function qe(e, t) {
|
|
712
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = B(n), s = we(n), c = V(n) === "y", l = Ke.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = Ce(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
707
713
|
mainAxis: d,
|
|
708
714
|
crossAxis: 0,
|
|
709
715
|
alignmentAxis: null
|
|
@@ -720,13 +726,13 @@ async function Ke(e, t) {
|
|
|
720
726
|
y: p * u
|
|
721
727
|
};
|
|
722
728
|
}
|
|
723
|
-
var
|
|
729
|
+
var Je = function(e) {
|
|
724
730
|
return e === void 0 && (e = 0), {
|
|
725
731
|
name: "offset",
|
|
726
732
|
options: e,
|
|
727
733
|
async fn(t) {
|
|
728
734
|
var n;
|
|
729
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await
|
|
735
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await qe(t, e);
|
|
730
736
|
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
731
737
|
x: r + s.x,
|
|
732
738
|
y: i + s.y,
|
|
@@ -739,39 +745,39 @@ var qe = function(e) {
|
|
|
739
745
|
};
|
|
740
746
|
};
|
|
741
747
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
742
|
-
function
|
|
748
|
+
function Ye() {
|
|
743
749
|
return typeof window < "u";
|
|
744
750
|
}
|
|
745
751
|
function H(e) {
|
|
746
|
-
return
|
|
752
|
+
return Xe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
747
753
|
}
|
|
748
754
|
function U(e) {
|
|
749
755
|
var t;
|
|
750
756
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
751
757
|
}
|
|
752
758
|
function W(e) {
|
|
753
|
-
return ((
|
|
759
|
+
return ((Xe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
754
760
|
}
|
|
755
|
-
function
|
|
756
|
-
return
|
|
761
|
+
function Xe(e) {
|
|
762
|
+
return Ye() ? e instanceof Node || e instanceof U(e).Node : !1;
|
|
757
763
|
}
|
|
758
764
|
function G(e) {
|
|
759
|
-
return
|
|
765
|
+
return Ye() ? e instanceof Element || e instanceof U(e).Element : !1;
|
|
760
766
|
}
|
|
761
767
|
function K(e) {
|
|
762
|
-
return
|
|
763
|
-
}
|
|
764
|
-
function Xe(e) {
|
|
765
|
-
return !Je() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
768
|
+
return Ye() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
766
769
|
}
|
|
767
770
|
function Ze(e) {
|
|
771
|
+
return !Ye() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
772
|
+
}
|
|
773
|
+
function Qe(e) {
|
|
768
774
|
let { overflow: t, overflowX: n, overflowY: r, display: i } = Y(e);
|
|
769
775
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
770
776
|
}
|
|
771
|
-
function
|
|
777
|
+
function $e(e) {
|
|
772
778
|
return /^(table|td|th)$/.test(H(e));
|
|
773
779
|
}
|
|
774
|
-
function
|
|
780
|
+
function et(e) {
|
|
775
781
|
try {
|
|
776
782
|
if (e.matches(":popover-open")) return !0;
|
|
777
783
|
} catch {}
|
|
@@ -781,22 +787,22 @@ function $e(e) {
|
|
|
781
787
|
return !1;
|
|
782
788
|
}
|
|
783
789
|
}
|
|
784
|
-
var
|
|
785
|
-
function
|
|
790
|
+
var tt = /transform|translate|scale|rotate|perspective|filter/, nt = /paint|layout|strict|content/, q = (e) => !!e && e !== "none", rt;
|
|
791
|
+
function it(e) {
|
|
786
792
|
let t = G(e) ? Y(e) : e;
|
|
787
|
-
return q(t.transform) || q(t.translate) || q(t.scale) || q(t.rotate) || q(t.perspective) || !
|
|
793
|
+
return q(t.transform) || q(t.translate) || q(t.scale) || q(t.rotate) || q(t.perspective) || !ot() && (q(t.backdropFilter) || q(t.filter)) || tt.test(t.willChange || "") || nt.test(t.contain || "");
|
|
788
794
|
}
|
|
789
|
-
function
|
|
795
|
+
function at(e) {
|
|
790
796
|
let t = X(e);
|
|
791
797
|
for (; K(t) && !J(t);) {
|
|
792
|
-
if (
|
|
793
|
-
if (
|
|
798
|
+
if (it(t)) return t;
|
|
799
|
+
if (et(t)) return null;
|
|
794
800
|
t = X(t);
|
|
795
801
|
}
|
|
796
802
|
return null;
|
|
797
803
|
}
|
|
798
|
-
function
|
|
799
|
-
return
|
|
804
|
+
function ot() {
|
|
805
|
+
return rt ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), rt;
|
|
800
806
|
}
|
|
801
807
|
function J(e) {
|
|
802
808
|
return /^(html|body|#document)$/.test(H(e));
|
|
@@ -804,7 +810,7 @@ function J(e) {
|
|
|
804
810
|
function Y(e) {
|
|
805
811
|
return U(e).getComputedStyle(e);
|
|
806
812
|
}
|
|
807
|
-
function
|
|
813
|
+
function st(e) {
|
|
808
814
|
return G(e) ? {
|
|
809
815
|
scrollLeft: e.scrollLeft,
|
|
810
816
|
scrollTop: e.scrollTop
|
|
@@ -815,99 +821,99 @@ function ot(e) {
|
|
|
815
821
|
}
|
|
816
822
|
function X(e) {
|
|
817
823
|
if (H(e) === "html") return e;
|
|
818
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
819
|
-
return
|
|
824
|
+
let t = e.assignedSlot || e.parentNode || Ze(e) && e.host || W(e);
|
|
825
|
+
return Ze(t) ? t.host : t;
|
|
820
826
|
}
|
|
821
|
-
function
|
|
827
|
+
function ct(e) {
|
|
822
828
|
let t = X(e);
|
|
823
|
-
return J(t) ? (e.ownerDocument || e).body : K(t) &&
|
|
829
|
+
return J(t) ? (e.ownerDocument || e).body : K(t) && Qe(t) ? t : ct(t);
|
|
824
830
|
}
|
|
825
831
|
function Z(e, t, n) {
|
|
826
832
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
827
|
-
let r =
|
|
833
|
+
let r = ct(e), i = r === e.ownerDocument?.body, a = U(r);
|
|
828
834
|
if (i) {
|
|
829
|
-
let e =
|
|
830
|
-
return t.concat(a, a.visualViewport || [],
|
|
835
|
+
let e = lt(a);
|
|
836
|
+
return t.concat(a, a.visualViewport || [], Qe(r) ? r : [], e && n ? Z(e) : []);
|
|
831
837
|
}
|
|
832
838
|
return t.concat(r, Z(r, [], n));
|
|
833
839
|
}
|
|
834
|
-
function
|
|
840
|
+
function lt(e) {
|
|
835
841
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
836
842
|
}
|
|
837
843
|
// ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
838
|
-
function
|
|
839
|
-
let t = Y(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = K(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s =
|
|
844
|
+
function ut(e) {
|
|
845
|
+
let t = Y(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = K(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = be(n) !== a || be(r) !== o;
|
|
840
846
|
return s && (n = a, r = o), {
|
|
841
847
|
width: n,
|
|
842
848
|
height: r,
|
|
843
849
|
$: s
|
|
844
850
|
};
|
|
845
851
|
}
|
|
846
|
-
function
|
|
852
|
+
function dt(e) {
|
|
847
853
|
return G(e) ? e : e.contextElement;
|
|
848
854
|
}
|
|
849
855
|
function Q(e) {
|
|
850
|
-
let t =
|
|
856
|
+
let t = dt(e);
|
|
851
857
|
if (!K(t)) return z(1);
|
|
852
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } =
|
|
858
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = ut(t), o = (a ? be(n.width) : n.width) / r, s = (a ? be(n.height) : n.height) / i;
|
|
853
859
|
return o && Number.isFinite(o) || (o = 1), s && Number.isFinite(s) || (s = 1), {
|
|
854
860
|
x: o,
|
|
855
861
|
y: s
|
|
856
862
|
};
|
|
857
863
|
}
|
|
858
|
-
var
|
|
859
|
-
function
|
|
864
|
+
var ft = /*#__PURE__*/ z(0);
|
|
865
|
+
function pt(e) {
|
|
860
866
|
let t = U(e);
|
|
861
|
-
return !
|
|
867
|
+
return !ot() || !t.visualViewport ? ft : {
|
|
862
868
|
x: t.visualViewport.offsetLeft,
|
|
863
869
|
y: t.visualViewport.offsetTop
|
|
864
870
|
};
|
|
865
871
|
}
|
|
866
|
-
function
|
|
872
|
+
function mt(e, t, n) {
|
|
867
873
|
return t === void 0 && (t = !1), !!n && t && n === U(e);
|
|
868
874
|
}
|
|
869
875
|
function $(e, t, n, r) {
|
|
870
876
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
871
|
-
let i = e.getBoundingClientRect(), a =
|
|
877
|
+
let i = e.getBoundingClientRect(), a = dt(e), o = z(1);
|
|
872
878
|
t && (r ? G(r) && (o = Q(r)) : o = Q(e));
|
|
873
|
-
let s =
|
|
879
|
+
let s = mt(a, n, r) ? pt(a) : z(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;
|
|
874
880
|
if (a && r) {
|
|
875
|
-
let e = U(a), t = G(r) ? U(r) : r, n = e, i =
|
|
881
|
+
let e = U(a), t = G(r) ? U(r) : r, n = e, i = lt(n);
|
|
876
882
|
for (; i && t !== n;) {
|
|
877
883
|
let e = Q(i), t = i.getBoundingClientRect(), r = Y(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
878
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = U(i), i =
|
|
884
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = U(i), i = lt(n);
|
|
879
885
|
}
|
|
880
886
|
}
|
|
881
|
-
return
|
|
887
|
+
return Be({
|
|
882
888
|
width: u,
|
|
883
889
|
height: d,
|
|
884
890
|
x: c,
|
|
885
891
|
y: l
|
|
886
892
|
});
|
|
887
893
|
}
|
|
888
|
-
function
|
|
889
|
-
let n =
|
|
894
|
+
function ht(e, t) {
|
|
895
|
+
let n = st(e).scrollLeft;
|
|
890
896
|
return t ? t.left + n : $(W(e)).left + n;
|
|
891
897
|
}
|
|
892
|
-
function
|
|
898
|
+
function gt(e, t) {
|
|
893
899
|
let n = e.getBoundingClientRect();
|
|
894
900
|
return {
|
|
895
|
-
x: n.left + t.scrollLeft -
|
|
901
|
+
x: n.left + t.scrollLeft - ht(e, n),
|
|
896
902
|
y: n.top + t.scrollTop
|
|
897
903
|
};
|
|
898
904
|
}
|
|
899
|
-
function
|
|
900
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = W(r), s = t ?
|
|
905
|
+
function _t(e) {
|
|
906
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = W(r), s = t ? et(t.floating) : !1;
|
|
901
907
|
if (r === o || s && a) return n;
|
|
902
908
|
let c = {
|
|
903
909
|
scrollLeft: 0,
|
|
904
910
|
scrollTop: 0
|
|
905
911
|
}, l = z(1), u = z(0), d = K(r);
|
|
906
|
-
if ((d || !a) && ((H(r) !== "body" ||
|
|
912
|
+
if ((d || !a) && ((H(r) !== "body" || Qe(o)) && (c = st(r)), d)) {
|
|
907
913
|
let e = $(r);
|
|
908
914
|
l = Q(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
909
915
|
}
|
|
910
|
-
let f = o && !d && !a ?
|
|
916
|
+
let f = o && !d && !a ? gt(o, c) : z(0);
|
|
911
917
|
return {
|
|
912
918
|
width: n.width * l.x,
|
|
913
919
|
height: n.height * l.y,
|
|
@@ -915,29 +921,29 @@ function gt(e) {
|
|
|
915
921
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
916
922
|
};
|
|
917
923
|
}
|
|
918
|
-
function
|
|
924
|
+
function vt(e) {
|
|
919
925
|
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
920
926
|
}
|
|
921
|
-
function
|
|
922
|
-
let t =
|
|
923
|
-
return Y(n).direction === "rtl" && (a +=
|
|
927
|
+
function yt(e) {
|
|
928
|
+
let t = st(e), n = e.ownerDocument.body, r = R(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = R(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + ht(e), o = -t.scrollTop;
|
|
929
|
+
return Y(n).direction === "rtl" && (a += R(e.clientWidth, n.clientWidth) - r), {
|
|
924
930
|
width: r,
|
|
925
931
|
height: i,
|
|
926
932
|
x: a,
|
|
927
933
|
y: o
|
|
928
934
|
};
|
|
929
935
|
}
|
|
930
|
-
var
|
|
931
|
-
function
|
|
936
|
+
var bt = 25;
|
|
937
|
+
function xt(e, t, n) {
|
|
932
938
|
n === void 0 && (n = "viewport");
|
|
933
939
|
let r = n === "layoutViewport", i = U(e), a = W(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
934
940
|
if (o) {
|
|
935
|
-
let e = !
|
|
941
|
+
let e = !ot() || t === "fixed";
|
|
936
942
|
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
937
943
|
}
|
|
938
|
-
if (
|
|
944
|
+
if (ht(a) <= 0) {
|
|
939
945
|
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;
|
|
940
|
-
o <=
|
|
946
|
+
o <= bt && (s -= o);
|
|
941
947
|
}
|
|
942
948
|
return {
|
|
943
949
|
width: s,
|
|
@@ -946,7 +952,7 @@ function bt(e, t, n) {
|
|
|
946
952
|
y: u
|
|
947
953
|
};
|
|
948
954
|
}
|
|
949
|
-
function
|
|
955
|
+
function St(e, t) {
|
|
950
956
|
let n = $(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Q(e);
|
|
951
957
|
return {
|
|
952
958
|
width: e.clientWidth * a.x,
|
|
@@ -955,13 +961,13 @@ function xt(e, t) {
|
|
|
955
961
|
y: r * a.y
|
|
956
962
|
};
|
|
957
963
|
}
|
|
958
|
-
function
|
|
964
|
+
function Ct(e, t, n) {
|
|
959
965
|
let r;
|
|
960
|
-
if (t === "viewport" || t === "layoutViewport") r =
|
|
961
|
-
else if (t === "document") r =
|
|
962
|
-
else if (G(t)) r =
|
|
966
|
+
if (t === "viewport" || t === "layoutViewport") r = xt(e, n, t);
|
|
967
|
+
else if (t === "document") r = yt(W(e));
|
|
968
|
+
else if (G(t)) r = St(t, n);
|
|
963
969
|
else {
|
|
964
|
-
let n =
|
|
970
|
+
let n = pt(e);
|
|
965
971
|
r = {
|
|
966
972
|
x: t.x - n.x,
|
|
967
973
|
y: t.y - n.y,
|
|
@@ -969,23 +975,23 @@ function St(e, t, n) {
|
|
|
969
975
|
height: t.height
|
|
970
976
|
};
|
|
971
977
|
}
|
|
972
|
-
return
|
|
978
|
+
return Be(r);
|
|
973
979
|
}
|
|
974
|
-
function
|
|
980
|
+
function wt(e, t) {
|
|
975
981
|
let n = t.get(e);
|
|
976
982
|
if (n) return n;
|
|
977
983
|
let r = Z(e, [], !1).filter((e) => G(e) && H(e) !== "body"), i = null, a = Y(e).position === "fixed", o = a ? X(e) : e;
|
|
978
984
|
for (; G(o) && !J(o);) {
|
|
979
|
-
let e = Y(o), t =
|
|
985
|
+
let e = Y(o), t = it(o), n = i ? i.position : a ? "fixed" : "";
|
|
980
986
|
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = X(o);
|
|
981
987
|
}
|
|
982
988
|
return t.set(e, r), r;
|
|
983
989
|
}
|
|
984
|
-
function
|
|
985
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ?
|
|
990
|
+
function Tt(e) {
|
|
991
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? et(t) ? [] : wt(t, this._c) : [].concat(n), r], o = Ct(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
986
992
|
for (let e = 1; e < a.length; e++) {
|
|
987
|
-
let n =
|
|
988
|
-
s =
|
|
993
|
+
let n = Ct(t, a[e], i);
|
|
994
|
+
s = R(n.top, s), c = ye(n.right, c), l = ye(n.bottom, l), u = R(n.left, u);
|
|
989
995
|
}
|
|
990
996
|
return {
|
|
991
997
|
width: c - u,
|
|
@@ -994,24 +1000,24 @@ function wt(e) {
|
|
|
994
1000
|
y: s
|
|
995
1001
|
};
|
|
996
1002
|
}
|
|
997
|
-
function
|
|
998
|
-
let { width: t, height: n } =
|
|
1003
|
+
function Et(e) {
|
|
1004
|
+
let { width: t, height: n } = ut(e);
|
|
999
1005
|
return {
|
|
1000
1006
|
width: t,
|
|
1001
1007
|
height: n
|
|
1002
1008
|
};
|
|
1003
1009
|
}
|
|
1004
|
-
function
|
|
1010
|
+
function Dt(e, t, n) {
|
|
1005
1011
|
let r = K(t), i = W(t), a = n === "fixed", o = $(e, !0, a, t), s = {
|
|
1006
1012
|
scrollLeft: 0,
|
|
1007
1013
|
scrollTop: 0
|
|
1008
1014
|
}, c = z(0);
|
|
1009
|
-
if ((r || !a) && ((H(t) !== "body" ||
|
|
1015
|
+
if ((r || !a) && ((H(t) !== "body" || Qe(i)) && (s = st(t)), r)) {
|
|
1010
1016
|
let e = $(t, !0, a, t);
|
|
1011
1017
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
1012
1018
|
}
|
|
1013
|
-
!r && i && (c.x =
|
|
1014
|
-
let l = i && !r && !a ?
|
|
1019
|
+
!r && i && (c.x = ht(i));
|
|
1020
|
+
let l = i && !r && !a ? gt(i, s) : z(0);
|
|
1015
1021
|
return {
|
|
1016
1022
|
x: o.left + s.scrollLeft - c.x - l.x,
|
|
1017
1023
|
y: o.top + s.scrollTop - c.y - l.y,
|
|
@@ -1019,34 +1025,34 @@ function Et(e, t, n) {
|
|
|
1019
1025
|
height: o.height
|
|
1020
1026
|
};
|
|
1021
1027
|
}
|
|
1022
|
-
function
|
|
1028
|
+
function Ot(e) {
|
|
1023
1029
|
return Y(e).position === "static";
|
|
1024
1030
|
}
|
|
1025
|
-
function
|
|
1031
|
+
function kt(e, t) {
|
|
1026
1032
|
if (!K(e) || Y(e).position === "fixed") return null;
|
|
1027
1033
|
if (t) return t(e);
|
|
1028
1034
|
let n = e.offsetParent;
|
|
1029
1035
|
return W(e) === n && (n = n.ownerDocument.body), n;
|
|
1030
1036
|
}
|
|
1031
|
-
function
|
|
1037
|
+
function At(e, t) {
|
|
1032
1038
|
let n = U(e);
|
|
1033
|
-
if (
|
|
1039
|
+
if (et(e)) return n;
|
|
1034
1040
|
if (!K(e)) {
|
|
1035
1041
|
let t = X(e);
|
|
1036
1042
|
for (; t && !J(t);) {
|
|
1037
|
-
if (G(t) && !
|
|
1043
|
+
if (G(t) && !Ot(t)) return t;
|
|
1038
1044
|
t = X(t);
|
|
1039
1045
|
}
|
|
1040
1046
|
return n;
|
|
1041
1047
|
}
|
|
1042
|
-
let r =
|
|
1043
|
-
for (; r &&
|
|
1044
|
-
return r && J(r) &&
|
|
1048
|
+
let r = kt(e, t);
|
|
1049
|
+
for (; r && $e(r) && Ot(r);) r = kt(r, t);
|
|
1050
|
+
return r && J(r) && Ot(r) && !it(r) ? n : r || at(e) || n;
|
|
1045
1051
|
}
|
|
1046
|
-
var
|
|
1047
|
-
let t = this.getOffsetParent ||
|
|
1052
|
+
var jt = async function(e) {
|
|
1053
|
+
let t = this.getOffsetParent || At, n = this.getDimensions, r = await n(e.floating);
|
|
1048
1054
|
return {
|
|
1049
|
-
reference:
|
|
1055
|
+
reference: Dt(e.reference, await t(e.floating), e.strategy),
|
|
1050
1056
|
floating: {
|
|
1051
1057
|
x: 0,
|
|
1052
1058
|
y: 0,
|
|
@@ -1055,25 +1061,25 @@ var At = async function(e) {
|
|
|
1055
1061
|
}
|
|
1056
1062
|
};
|
|
1057
1063
|
};
|
|
1058
|
-
function
|
|
1064
|
+
function Mt(e) {
|
|
1059
1065
|
return Y(e).direction === "rtl";
|
|
1060
1066
|
}
|
|
1061
|
-
var
|
|
1062
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1067
|
+
var Nt = {
|
|
1068
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: _t,
|
|
1063
1069
|
getDocumentElement: W,
|
|
1064
|
-
getClippingRect:
|
|
1065
|
-
getOffsetParent:
|
|
1066
|
-
getElementRects:
|
|
1067
|
-
getClientRects:
|
|
1068
|
-
getDimensions:
|
|
1070
|
+
getClippingRect: Tt,
|
|
1071
|
+
getOffsetParent: At,
|
|
1072
|
+
getElementRects: jt,
|
|
1073
|
+
getClientRects: vt,
|
|
1074
|
+
getDimensions: Et,
|
|
1069
1075
|
getScale: Q,
|
|
1070
1076
|
isElement: G,
|
|
1071
|
-
isRTL:
|
|
1077
|
+
isRTL: Mt
|
|
1072
1078
|
};
|
|
1073
|
-
function
|
|
1079
|
+
function Pt(e, t) {
|
|
1074
1080
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1075
1081
|
}
|
|
1076
|
-
function
|
|
1082
|
+
function Ft(e, t, n) {
|
|
1077
1083
|
let r = null, i, a = W(e);
|
|
1078
1084
|
function o() {
|
|
1079
1085
|
var e;
|
|
@@ -1083,13 +1089,13 @@ function Pt(e, t, n) {
|
|
|
1083
1089
|
n === void 0 && (n = !1), c === void 0 && (c = 1), o();
|
|
1084
1090
|
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
1085
1091
|
if (n || t(), !f || !p) return;
|
|
1086
|
-
let m =
|
|
1092
|
+
let m = xe(d), h = xe(a.clientWidth - (u + f)), g = xe(a.clientHeight - (d + p)), _ = xe(u), v = {
|
|
1087
1093
|
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
1088
|
-
threshold:
|
|
1094
|
+
threshold: R(0, ye(1, c)) || 1
|
|
1089
1095
|
}, y = !0;
|
|
1090
1096
|
function b(t) {
|
|
1091
1097
|
let n = t[0].intersectionRatio;
|
|
1092
|
-
if (!
|
|
1098
|
+
if (!Pt(l, e.getBoundingClientRect())) return s();
|
|
1093
1099
|
if (n !== c) {
|
|
1094
1100
|
if (!y) return s();
|
|
1095
1101
|
n ? s(!1, n) : i = setTimeout(() => {
|
|
@@ -1113,13 +1119,13 @@ function Pt(e, t, n) {
|
|
|
1113
1119
|
c.removeEventListener("resize", l), o();
|
|
1114
1120
|
};
|
|
1115
1121
|
}
|
|
1116
|
-
function
|
|
1122
|
+
function It(e, t, n, r) {
|
|
1117
1123
|
r === void 0 && (r = {});
|
|
1118
|
-
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l =
|
|
1124
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = dt(e), u = i || a ? [...l ? Z(l) : [], ...t ? Z(t) : []] : [];
|
|
1119
1125
|
u.forEach((e) => {
|
|
1120
1126
|
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
1121
1127
|
});
|
|
1122
|
-
let d = l && s ?
|
|
1128
|
+
let d = l && s ? Ft(l, n, a) : null, f = -1, p = null;
|
|
1123
1129
|
o && (p = new ResizeObserver((e) => {
|
|
1124
1130
|
let [r] = e;
|
|
1125
1131
|
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -1131,7 +1137,7 @@ function Ft(e, t, n, r) {
|
|
|
1131
1137
|
c && g();
|
|
1132
1138
|
function g() {
|
|
1133
1139
|
let t = $(e);
|
|
1134
|
-
h && !
|
|
1140
|
+
h && !Pt(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
1135
1141
|
}
|
|
1136
1142
|
return n(), () => {
|
|
1137
1143
|
var e;
|
|
@@ -1140,24 +1146,24 @@ function Ft(e, t, n, r) {
|
|
|
1140
1146
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1141
1147
|
};
|
|
1142
1148
|
}
|
|
1143
|
-
var
|
|
1149
|
+
var Lt = Je, Rt = Ge, zt = (e, t, n) => {
|
|
1144
1150
|
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
1145
|
-
...
|
|
1151
|
+
...Nt,
|
|
1146
1152
|
...i.platform,
|
|
1147
1153
|
_c: r
|
|
1148
1154
|
};
|
|
1149
|
-
return
|
|
1155
|
+
return We(e, t, {
|
|
1150
1156
|
...i,
|
|
1151
1157
|
platform: a
|
|
1152
1158
|
});
|
|
1153
1159
|
};
|
|
1154
1160
|
// ../../node_modules/.pnpm/@tiptap+suggestion@3.32.2_@floating-ui+dom@1.8.0_@tiptap+core@3.32.2_@tiptap+pm@3.32.2__@tiptap+pm@3.32.2/node_modules/@tiptap/suggestion/dist/index.js
|
|
1155
|
-
function
|
|
1156
|
-
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c =
|
|
1161
|
+
function Bt(e) {
|
|
1162
|
+
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c = k(t), l = RegExp(`\\s${c}$`), u = a ? "^" : "", d = r ? "" : c, f = RegExp(s ? `${u}${c}.*?(?=\\s${d}|$)` : `${u}(?:^)?${c}[^\\s${d}]*`, "gm"), p = o.nodeBefore?.isText && o.nodeBefore.text;
|
|
1157
1163
|
if (!p) return null;
|
|
1158
1164
|
let m = o.pos - p.length, h = Array.from(p.matchAll(f)).pop();
|
|
1159
1165
|
if (!h || h.input === void 0 || h.index === void 0) return null;
|
|
1160
|
-
let g = h.input.slice(Math.max(0, h.index - 1), h.index), _ = RegExp(`^[${i?.map(
|
|
1166
|
+
let g = h.input.slice(Math.max(0, h.index - 1), h.index), _ = RegExp(`^[${i?.map(k).join("")}\0]?$`).test(g);
|
|
1161
1167
|
if (i !== null && !_) return null;
|
|
1162
1168
|
let v = m + h.index, y = v + h[0].length;
|
|
1163
1169
|
return s && l.test(p.slice(y - 1, y + 1)) && (h[0] += " ", y += 1), v < o.pos && y >= o.pos ? {
|
|
@@ -1169,7 +1175,7 @@ function zt(e) {
|
|
|
1169
1175
|
text: h[0]
|
|
1170
1176
|
} : null;
|
|
1171
1177
|
}
|
|
1172
|
-
function
|
|
1178
|
+
function Vt(e) {
|
|
1173
1179
|
return e.docChanged ? e.steps.some((e) => {
|
|
1174
1180
|
let t = e.slice;
|
|
1175
1181
|
if (!t?.content) return !1;
|
|
@@ -1177,7 +1183,7 @@ function Bt(e) {
|
|
|
1177
1183
|
return /\s/.test(n);
|
|
1178
1184
|
}) : !1;
|
|
1179
1185
|
}
|
|
1180
|
-
function
|
|
1186
|
+
function Ht(e) {
|
|
1181
1187
|
return () => {
|
|
1182
1188
|
let t = e.state.selection.$anchor.pos, { top: n, right: r, bottom: i, left: a } = e.view.coordsAtPos(t);
|
|
1183
1189
|
try {
|
|
@@ -1187,13 +1193,13 @@ function Vt(e) {
|
|
|
1187
1193
|
}
|
|
1188
1194
|
};
|
|
1189
1195
|
}
|
|
1190
|
-
function
|
|
1196
|
+
function Ut(e, t, n, r) {
|
|
1191
1197
|
return n ? () => {
|
|
1192
1198
|
let n = r.getState(e.state)?.decorationId;
|
|
1193
1199
|
return t.dom.querySelector(`[data-decoration-id="${n}"]`)?.getBoundingClientRect() || null;
|
|
1194
|
-
} :
|
|
1200
|
+
} : Ht(e);
|
|
1195
1201
|
}
|
|
1196
|
-
function
|
|
1202
|
+
function Wt({ match: e, dismissedRange: t, state: n, transaction: r, editor: i, shouldResetDismissed: a, effectiveAllowSpaces: o }) {
|
|
1197
1203
|
return a?.({
|
|
1198
1204
|
editor: i,
|
|
1199
1205
|
state: n,
|
|
@@ -1201,13 +1207,13 @@ function Ut({ match: e, dismissedRange: t, state: n, transaction: r, editor: i,
|
|
|
1201
1207
|
match: e,
|
|
1202
1208
|
transaction: r,
|
|
1203
1209
|
allowSpaces: o
|
|
1204
|
-
}) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !
|
|
1210
|
+
}) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !Vt(r);
|
|
1205
1211
|
}
|
|
1206
|
-
function
|
|
1212
|
+
function Gt({ view: e, pluginKeyRef: t }) {
|
|
1207
1213
|
let n = e.state.tr.setMeta(t, { exit: !0 });
|
|
1208
1214
|
e.dispatch(n);
|
|
1209
1215
|
}
|
|
1210
|
-
function
|
|
1216
|
+
function Kt({ pluginKey: e, decorationTag: t, decorationClass: n, decorationContent: r, decorationEmptyClass: i, renderer: a, dispatchExit: o }) {
|
|
1211
1217
|
return {
|
|
1212
1218
|
handleKeyDown(t, n) {
|
|
1213
1219
|
var r;
|
|
@@ -1231,7 +1237,7 @@ function Gt({ pluginKey: e, decorationTag: t, decorationClass: n, decorationCont
|
|
|
1231
1237
|
let { active: o, range: s, decorationId: c, query: l } = e.getState(a);
|
|
1232
1238
|
if (!o) return null;
|
|
1233
1239
|
let u = !l?.length, d = [n];
|
|
1234
|
-
return u && d.push(i),
|
|
1240
|
+
return u && d.push(i), ee.create(a.doc, [A.inline(s.from, s.to, {
|
|
1235
1241
|
nodeName: t,
|
|
1236
1242
|
class: d.join(" "),
|
|
1237
1243
|
"data-decoration-id": c || void 0,
|
|
@@ -1240,7 +1246,7 @@ function Gt({ pluginKey: e, decorationTag: t, decorationClass: n, decorationCont
|
|
|
1240
1246
|
}
|
|
1241
1247
|
};
|
|
1242
1248
|
}
|
|
1243
|
-
function
|
|
1249
|
+
function qt({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, findSuggestionMatch: o, allow: s, shouldShow: c, shouldKeepDismissed: l, pluginKey: u }) {
|
|
1244
1250
|
return {
|
|
1245
1251
|
init() {
|
|
1246
1252
|
return {
|
|
@@ -1299,7 +1305,7 @@ function Kt({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r
|
|
|
1299
1305
|
}
|
|
1300
1306
|
};
|
|
1301
1307
|
}
|
|
1302
|
-
function
|
|
1308
|
+
function Jt({ editor: e, items: t }) {
|
|
1303
1309
|
let n = null, r = null, i = null, a = () => {
|
|
1304
1310
|
r !== null && (clearTimeout(r), r = null), i?.(), i = null;
|
|
1305
1311
|
}, o = (e) => new Promise((t) => {
|
|
@@ -1333,19 +1339,19 @@ function qt({ editor: e, items: t }) {
|
|
|
1333
1339
|
}
|
|
1334
1340
|
};
|
|
1335
1341
|
}
|
|
1336
|
-
function
|
|
1342
|
+
function Yt({ placement: e, offset: t, flip: n, floatingUi: r }) {
|
|
1337
1343
|
var i;
|
|
1338
|
-
let a = [
|
|
1344
|
+
let a = [Lt({
|
|
1339
1345
|
mainAxis: t.mainAxis ?? 4,
|
|
1340
1346
|
crossAxis: t.crossAxis ?? 0
|
|
1341
1347
|
})];
|
|
1342
|
-
return n && a.push(
|
|
1348
|
+
return n && a.push(Rt()), r != null && (i = r.middleware) != null && i.length && a.push(...r.middleware), {
|
|
1343
1349
|
placement: e,
|
|
1344
1350
|
strategy: r?.strategy ?? "absolute",
|
|
1345
1351
|
middleware: a
|
|
1346
1352
|
};
|
|
1347
1353
|
}
|
|
1348
|
-
function
|
|
1354
|
+
function Xt(e) {
|
|
1349
1355
|
if (e instanceof HTMLElement) return e;
|
|
1350
1356
|
if (typeof e == "string") try {
|
|
1351
1357
|
let t = document.querySelector(e);
|
|
@@ -1355,15 +1361,15 @@ function Yt(e) {
|
|
|
1355
1361
|
}
|
|
1356
1362
|
return document.body;
|
|
1357
1363
|
}
|
|
1358
|
-
function
|
|
1364
|
+
function Zt({ getReferenceRect: e, contextElement: t, config: n, container: r, dismissOnOutsideClick: i, dismiss: a }) {
|
|
1359
1365
|
return (o, s = {}) => {
|
|
1360
1366
|
let c = {
|
|
1361
1367
|
getBoundingClientRect: () => e() ?? new DOMRect(),
|
|
1362
1368
|
contextElement: t
|
|
1363
1369
|
}, l = !1, u = !o.isConnected;
|
|
1364
|
-
u &&
|
|
1365
|
-
let d =
|
|
1366
|
-
|
|
1370
|
+
u && Xt(r).appendChild(o), s.onPosition || (o.style.visibility = "hidden", o.style.width = "max-content");
|
|
1371
|
+
let d = It(c, o, () => {
|
|
1372
|
+
zt(c, o, {
|
|
1367
1373
|
placement: n.placement,
|
|
1368
1374
|
strategy: n.strategy,
|
|
1369
1375
|
middleware: n.middleware
|
|
@@ -1388,11 +1394,11 @@ function Xt({ getReferenceRect: e, contextElement: t, config: n, container: r, d
|
|
|
1388
1394
|
};
|
|
1389
1395
|
};
|
|
1390
1396
|
}
|
|
1391
|
-
function
|
|
1392
|
-
let g, _ =
|
|
1397
|
+
function Qt({ 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 }) {
|
|
1398
|
+
let g, _ = Jt({
|
|
1393
1399
|
editor: e,
|
|
1394
1400
|
items: n
|
|
1395
|
-
}), v =
|
|
1401
|
+
}), v = Yt({
|
|
1396
1402
|
placement: s,
|
|
1397
1403
|
offset: c,
|
|
1398
1404
|
flip: u,
|
|
@@ -1417,26 +1423,26 @@ function Zt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
1417
1423
|
update: async (n, d) => {
|
|
1418
1424
|
let b = t.getState(d), x = t.getState(n.state);
|
|
1419
1425
|
if (!b || !x) return;
|
|
1420
|
-
let S = null, C = b.query !== x.query, w = b.text !== x.text, T = b.range.from !== x.range.from || b.range.to !== x.range.to,
|
|
1426
|
+
let S = null, C = b.query !== x.query, w = b.text !== x.text, T = b.range.from !== x.range.from || b.range.to !== x.range.to, E = C || w || T;
|
|
1421
1427
|
if (!b.active && x.active) S = "started";
|
|
1422
1428
|
else if (b.active && !x.active) S = "stopped";
|
|
1423
|
-
else if (x.active &&
|
|
1429
|
+
else if (x.active && E) S = "updated";
|
|
1424
1430
|
else return;
|
|
1425
|
-
let
|
|
1431
|
+
let D = S === "stopped" ? b : x, O = n.dom.querySelector(`[data-decoration-id="${D.decorationId}"]`), k = m(n, O), A = i === 0 || (D.query ? D.query.length >= i : !1), j = (S === "started" || S === "updated") && A;
|
|
1426
1432
|
if (g = {
|
|
1427
1433
|
editor: e,
|
|
1428
|
-
range:
|
|
1429
|
-
query:
|
|
1430
|
-
text:
|
|
1434
|
+
range: D.range,
|
|
1435
|
+
query: D.query || "",
|
|
1436
|
+
text: D.text || "",
|
|
1431
1437
|
items: o ?? [],
|
|
1432
1438
|
command: (t) => p({
|
|
1433
1439
|
editor: e,
|
|
1434
|
-
range:
|
|
1440
|
+
range: D.range,
|
|
1435
1441
|
props: t
|
|
1436
1442
|
}),
|
|
1437
|
-
decorationNode:
|
|
1438
|
-
clientRect:
|
|
1439
|
-
loading:
|
|
1443
|
+
decorationNode: O,
|
|
1444
|
+
clientRect: k,
|
|
1445
|
+
loading: j,
|
|
1440
1446
|
placement: s,
|
|
1441
1447
|
offset: {
|
|
1442
1448
|
mainAxis: c.mainAxis ?? 4,
|
|
@@ -1445,8 +1451,8 @@ function Zt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
1445
1451
|
container: l,
|
|
1446
1452
|
flip: u,
|
|
1447
1453
|
floatingUi: v,
|
|
1448
|
-
mount:
|
|
1449
|
-
getReferenceRect:
|
|
1454
|
+
mount: Zt({
|
|
1455
|
+
getReferenceRect: k,
|
|
1450
1456
|
contextElement: n.dom,
|
|
1451
1457
|
config: v,
|
|
1452
1458
|
container: l,
|
|
@@ -1454,15 +1460,15 @@ function Zt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
1454
1460
|
dismiss: () => h(e.view)
|
|
1455
1461
|
})
|
|
1456
1462
|
}, S === "started") {
|
|
1457
|
-
var
|
|
1458
|
-
r == null || (
|
|
1463
|
+
var M;
|
|
1464
|
+
r == null || (M = r.onBeforeStart) == null || M.call(r, g);
|
|
1459
1465
|
}
|
|
1460
1466
|
if (S === "updated") {
|
|
1461
|
-
var
|
|
1462
|
-
r == null || (
|
|
1467
|
+
var N;
|
|
1468
|
+
r == null || (N = r.onBeforeUpdate) == null || N.call(r, g);
|
|
1463
1469
|
}
|
|
1464
1470
|
if (S === "started" && y(S, g), S === "started" || S === "updated") {
|
|
1465
|
-
if (!
|
|
1471
|
+
if (!j) _.abort(), g = {
|
|
1466
1472
|
...g,
|
|
1467
1473
|
items: o ?? [],
|
|
1468
1474
|
loading: !1
|
|
@@ -1473,7 +1479,7 @@ function Zt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
1473
1479
|
items: o ?? [],
|
|
1474
1480
|
loading: !0
|
|
1475
1481
|
}, S = "updated", y(S, g);
|
|
1476
|
-
let e = await _.fetch(
|
|
1482
|
+
let e = await _.fetch(D.query || "", a);
|
|
1477
1483
|
if (e.status === "aborted") return;
|
|
1478
1484
|
if (!t.getState(n.state)?.active) {
|
|
1479
1485
|
_.abort();
|
|
@@ -1497,28 +1503,28 @@ function Zt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
1497
1503
|
}
|
|
1498
1504
|
};
|
|
1499
1505
|
}
|
|
1500
|
-
var
|
|
1501
|
-
function
|
|
1502
|
-
let
|
|
1503
|
-
function
|
|
1504
|
-
return
|
|
1506
|
+
var $t = new j("suggestion");
|
|
1507
|
+
function en({ pluginKey: e = $t, 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: _ = {}, container: v, flip: y = !0, floatingUi: b, dismissOnOutsideClick: x = !0, render: S = () => ({}), allow: C = () => !0, findSuggestionMatch: w = Bt, shouldShow: T, shouldResetDismissed: E }) {
|
|
1508
|
+
let D = S?.(), O = r && !i, k = (n, r) => Ut(t, n, r, e);
|
|
1509
|
+
function A(e) {
|
|
1510
|
+
return Wt({
|
|
1505
1511
|
...e,
|
|
1506
1512
|
editor: t,
|
|
1507
|
-
shouldResetDismissed:
|
|
1508
|
-
effectiveAllowSpaces:
|
|
1513
|
+
shouldResetDismissed: E,
|
|
1514
|
+
effectiveAllowSpaces: O
|
|
1509
1515
|
});
|
|
1510
1516
|
}
|
|
1511
|
-
let j = (t) =>
|
|
1517
|
+
let j = (t) => Gt({
|
|
1512
1518
|
view: t,
|
|
1513
1519
|
pluginKeyRef: e
|
|
1514
1520
|
});
|
|
1515
|
-
return new
|
|
1521
|
+
return new M({
|
|
1516
1522
|
key: e,
|
|
1517
|
-
view: () =>
|
|
1523
|
+
view: () => Qt({
|
|
1518
1524
|
editor: t,
|
|
1519
1525
|
pluginKey: e,
|
|
1520
1526
|
items: f,
|
|
1521
|
-
renderer:
|
|
1527
|
+
renderer: D,
|
|
1522
1528
|
minQueryLength: p,
|
|
1523
1529
|
debounce: m,
|
|
1524
1530
|
initialItems: h,
|
|
@@ -1529,38 +1535,38 @@ function $t({ pluginKey: e = Qt, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
1529
1535
|
floatingUi: b,
|
|
1530
1536
|
dismissOnOutsideClick: x,
|
|
1531
1537
|
command: d,
|
|
1532
|
-
clientRectFor:
|
|
1538
|
+
clientRectFor: k,
|
|
1533
1539
|
dispatchExit: j
|
|
1534
1540
|
}),
|
|
1535
|
-
state:
|
|
1541
|
+
state: qt({
|
|
1536
1542
|
editor: t,
|
|
1537
1543
|
char: n,
|
|
1538
|
-
effectiveAllowSpaces:
|
|
1544
|
+
effectiveAllowSpaces: O,
|
|
1539
1545
|
allowToIncludeChar: i,
|
|
1540
1546
|
allowedPrefixes: a,
|
|
1541
1547
|
startOfLine: o,
|
|
1542
1548
|
findSuggestionMatch: w,
|
|
1543
1549
|
allow: C,
|
|
1544
1550
|
shouldShow: T,
|
|
1545
|
-
shouldKeepDismissed:
|
|
1551
|
+
shouldKeepDismissed: A,
|
|
1546
1552
|
pluginKey: e
|
|
1547
1553
|
}),
|
|
1548
|
-
props:
|
|
1554
|
+
props: Kt({
|
|
1549
1555
|
pluginKey: e,
|
|
1550
1556
|
decorationTag: s,
|
|
1551
1557
|
decorationClass: c,
|
|
1552
1558
|
decorationContent: l,
|
|
1553
1559
|
decorationEmptyClass: u,
|
|
1554
|
-
renderer:
|
|
1560
|
+
renderer: D,
|
|
1555
1561
|
dispatchExit: j
|
|
1556
1562
|
})
|
|
1557
1563
|
});
|
|
1558
1564
|
}
|
|
1559
|
-
var
|
|
1565
|
+
var tn = en;
|
|
1560
1566
|
// src/extensions/MergeTagSuggestion.ts
|
|
1561
|
-
function
|
|
1567
|
+
function nn(e, t) {
|
|
1562
1568
|
return () => {
|
|
1563
|
-
let n =
|
|
1569
|
+
let n = w(e, t);
|
|
1564
1570
|
return {
|
|
1565
1571
|
onStart: (e) => {
|
|
1566
1572
|
let t = e.editor.view?.dom;
|
|
@@ -1583,7 +1589,7 @@ function tn(e, t) {
|
|
|
1583
1589
|
};
|
|
1584
1590
|
};
|
|
1585
1591
|
}
|
|
1586
|
-
var
|
|
1592
|
+
var rn = F.create({
|
|
1587
1593
|
name: "mergeTagSuggestion",
|
|
1588
1594
|
addOptions() {
|
|
1589
1595
|
return {
|
|
@@ -1599,7 +1605,7 @@ var nn = N.create({
|
|
|
1599
1605
|
allowSpaces: !1,
|
|
1600
1606
|
startOfLine: !1,
|
|
1601
1607
|
allowedPrefixes: null,
|
|
1602
|
-
items: ({ query: t }) =>
|
|
1608
|
+
items: ({ query: t }) => T(e(), t),
|
|
1603
1609
|
command: ({ editor: e, range: t, props: n }) => {
|
|
1604
1610
|
e.isEditable && e.chain().focus().insertContentAt(t, {
|
|
1605
1611
|
type: "mergeTagNode",
|
|
@@ -1609,12 +1615,12 @@ var nn = N.create({
|
|
|
1609
1615
|
}
|
|
1610
1616
|
}).run();
|
|
1611
1617
|
},
|
|
1612
|
-
render:
|
|
1618
|
+
render: nn(t, n)
|
|
1613
1619
|
};
|
|
1614
|
-
return [
|
|
1620
|
+
return [tn({
|
|
1615
1621
|
editor: this.editor,
|
|
1616
1622
|
...r
|
|
1617
1623
|
})];
|
|
1618
1624
|
}
|
|
1619
1625
|
});
|
|
1620
|
-
export {
|
|
1626
|
+
export { ie as FontSize, ae as LetterSpacing, oe as LineBoundaryKeys, se as LineHeight, pe as LogicMergeTagNode, ve as MergeTagNode, rn as MergeTagSuggestion, T as filterMergeTags, E as handleSuggestionKeyDown };
|