@templatical/editor 0.32.0 → 0.34.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/{AiChatSidebar-ftdKHSR-.js → AiChatSidebar-CkHJ28sf.js} +3 -3
- package/dist/{AiFeatureMenu-aNeCRlil.js → AiFeatureMenu-DWdKguDN.js} +3 -3
- package/dist/{BlockIssueBadge-bTDu6W_2.js → BlockIssueBadge-DcyHTAqw.js} +2 -2
- package/dist/{BlockPreviewCanvas-BsOuOfzB.js → BlockPreviewCanvas-B621ANn9.js} +4 -4
- package/dist/{CloudHeaderExtras-BNpFohqt.js → CloudHeaderExtras-BJ3Cebhv.js} +2 -2
- package/dist/{CloudPanels-xoGWwqSH.js → CloudPanels-BGz9ygo6.js} +6 -6
- package/dist/{CollaboratorBar-mEqXkdEi.js → CollaboratorBar-KphmSQeZ.js} +2 -2
- package/dist/{ColorPicker-FL5Vb9bE.js → ColorPicker-C6EOwtHC.js} +5 -5
- package/dist/{CommentsPanel-slfi74ng.js → CommentsPanel-DmWh8f08.js} +1 -1
- package/dist/{CommentsSidebar-Dea4spMl.js → CommentsSidebar-CL_tffzT.js} +4 -4
- package/dist/{CountdownBlock-DQTwaRxP.js → CountdownBlock-D1fsNsyS.js} +1 -1
- package/dist/{CountdownToolbar-C7xwJoqh.js → CountdownToolbar-B8J4i5Xp.js} +2 -2
- package/dist/{DesignReferenceSidebar-BtBd7bbz.js → DesignReferenceSidebar-BDhEeaAh.js} +4 -4
- package/dist/{IssuesPanel-Ci2H36L2.js → IssuesPanel-CiOjeRFI.js} +4 -4
- package/dist/MergeTagInput-RytOlh1A.js +448 -0
- package/dist/{MergeTagModeToggle-Cdi_DmVw.js → MergeTagModeToggle-Bi-FydXj.js} +2 -2
- package/dist/{ParagraphEditor-DQEOFc0K.js → ParagraphEditor-C87tkmtE.js} +12 -12
- package/dist/{RestoreVersionDialog-CHwngBae.js → RestoreVersionDialog-Db5rZRMA.js} +2 -2
- package/dist/RichTextEditorContent-BmTcV2-a.js +152 -0
- package/dist/{SaveBlockDialog-tZqZzPjW.js → SaveBlockDialog-CDCzx6Bo.js} +15 -15
- package/dist/{SavedBlocksBrowserModal-Bdj3GOD_.js → SavedBlocksBrowserModal-DQR6kJB1.js} +101 -101
- package/dist/{SavedBlocksPanels-2sBxAH9w.js → SavedBlocksPanels-DFzV0CRD.js} +1 -1
- package/dist/{SavedBlocksPickBar-DTjQBR00.js → SavedBlocksPickBar-XyXmnSnO.js} +2 -2
- package/dist/{TemplateScoringPanel-B6nHSrBD.js → TemplateScoringPanel-CpyEKMzC.js} +4 -4
- package/dist/{TestEmailModal-DuHbzO37.js → TestEmailModal-DIfJy9eE.js} +8 -8
- package/dist/{TestEmailPanel-TpwP-eK_.js → TestEmailPanel-C8Wx5yPS.js} +1 -1
- package/dist/{TitleEditor-C0JQJu38.js → TitleEditor-iNFOisr4.js} +11 -11
- package/dist/{TplModal-BMGmhquu.js → TplModal-CowM3o_F.js} +5 -5
- package/dist/{VersionHistoryMenu-D2x6MMYx.js → VersionHistoryMenu-CV90OhXs.js} +2 -2
- package/dist/{VersionHistoryPanels-aGlUVEGF.js → VersionHistoryPanels-BE3pplJG.js} +1 -1
- package/dist/{VersionPreviewBanner-61t3_Z-a.js → VersionPreviewBanner-BwUWBtlH.js} +1 -1
- package/dist/{blockTypeIcons-BsNup009.js → blockTypeIcons-DQsKtHik.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatSidebar-CqWvtRwB.js → AiChatSidebar-BEnIWn6s.js} +4 -4
- package/dist/cdn/chunks/AiChatSidebar-BEnIWn6s.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js → AiFeatureMenu-DMl23akc.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js.map → AiFeatureMenu-DMl23akc.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js → BlockIssueBadge-CloK4k3M.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js.map → BlockIssueBadge-CloK4k3M.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js → BlockPreviewCanvas-DSiJFJa0.js} +5 -5
- package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js.map → BlockPreviewCanvas-DSiJFJa0.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js → CloudHeaderExtras-b4KpVeUN.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js.map → CloudHeaderExtras-b4KpVeUN.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-B91lUmof.js → CloudPanels-DzwOq9lp.js} +7 -7
- package/dist/cdn/chunks/CloudPanels-DzwOq9lp.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js → CollaboratorBar-WXKvpoGK.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js.map → CollaboratorBar-WXKvpoGK.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js → ColorPicker-BubTDiS1.js} +6 -6
- package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js.map → ColorPicker-BubTDiS1.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js → CommentsPanel-DAA2VqX4.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js.map → CommentsPanel-DAA2VqX4.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-D6VIIPhB.js → CommentsSidebar-Ci0M2ePp.js} +5 -5
- package/dist/cdn/chunks/CommentsSidebar-Ci0M2ePp.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js → CountdownBlock-rK055jpy.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js.map → CountdownBlock-rK055jpy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js → CountdownToolbar-CzZq26Vp.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js.map → CountdownToolbar-CzZq26Vp.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BvOwE1kg.js → DesignReferenceSidebar-C_ehdX5C.js} +5 -5
- package/dist/cdn/chunks/DesignReferenceSidebar-C_ehdX5C.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js → IssuesPanel-BXAN2_al.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js.map → IssuesPanel-BXAN2_al.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-1vcI9uQH.js +419 -0
- package/dist/cdn/chunks/MergeTagInput-1vcI9uQH.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js → MergeTagModeToggle-B_mUYJo4.js} +3 -3
- package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js.map → MergeTagModeToggle-B_mUYJo4.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BU8tlFbL.js → ParagraphEditor-DCDHMcmx.js} +10 -10
- package/dist/cdn/chunks/ParagraphEditor-DCDHMcmx.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js → RestoreVersionDialog-BkSSwf-Q.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js.map → RestoreVersionDialog-BkSSwf-Q.js.map} +1 -1
- package/dist/cdn/chunks/RichTextEditorContent-S4KogjIj.js +122 -0
- package/dist/cdn/chunks/RichTextEditorContent-S4KogjIj.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js → SaveBlockDialog-BH774Nt0.js} +14 -14
- package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js.map → SaveBlockDialog-BH774Nt0.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js → SavedBlocksBrowserModal-CSUqw_dD.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js.map → SavedBlocksBrowserModal-CSUqw_dD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js → SavedBlocksPanels-B6ApbCjG.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js.map → SavedBlocksPanels-B6ApbCjG.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js → SavedBlocksPickBar-C9MXSRcR.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js.map → SavedBlocksPickBar-C9MXSRcR.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CroWaWqy.js → TemplateScoringPanel-QVOxc9TZ.js} +50 -50
- package/dist/cdn/chunks/TemplateScoringPanel-QVOxc9TZ.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js → TestEmailModal-_CZvaO58.js} +9 -9
- package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js.map → TestEmailModal-_CZvaO58.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js → TestEmailPanel-DXLxvyrD.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js.map → TestEmailPanel-DXLxvyrD.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DvXUW2j-.js → TitleEditor-BuCOahW3.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-BuCOahW3.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-X-qNoLGZ.js → TplModal-CqY8R3hn.js} +6 -6
- package/dist/cdn/chunks/TplModal-CqY8R3hn.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js → VersionHistoryMenu-DDjIBvad.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js.map → VersionHistoryMenu-DDjIBvad.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js → VersionHistoryPanels-BuTw04T5.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js.map → VersionHistoryPanels-BuTw04T5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js → VersionPreviewBanner-fGAv20qI.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js.map → VersionPreviewBanner-fGAv20qI.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js → createCloudRuntime-JFE-sxbT.js} +2 -2
- package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js.map → createCloudRuntime-JFE-sxbT.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BUPHNpKD.js → extensions-7z04EIGg.js} +3 -3
- package/dist/cdn/chunks/{extensions-BUPHNpKD.js.map → extensions-7z04EIGg.js.map} +1 -1
- package/dist/cdn/chunks/keys-DQp8x7Nx.js +12 -0
- package/dist/cdn/chunks/keys-DQp8x7Nx.js.map +1 -0
- package/dist/cdn/chunks/src-CLoCCDfs.js.map +1 -1
- package/dist/cdn/chunks/{src-DtnvR_Hl.js → src-CiAi5oRe.js} +2 -2
- package/dist/cdn/chunks/{src-DtnvR_Hl.js.map → src-CiAi5oRe.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js → useCloudI18n-MxgHWrV6.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js.map → useCloudI18n-MxgHWrV6.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-ChlgO2GN.js → useEditorCore-ehUSEsbw.js} +548 -511
- package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js → useEditorRoot-CteADR3y.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js.map → useEditorRoot-CteADR3y.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-BdxNNw6j.js → useI18n-Ct1VIFcf.js} +2 -2
- package/dist/cdn/chunks/{useI18n-BdxNNw6j.js.map → useI18n-Ct1VIFcf.js.map} +1 -1
- package/dist/cdn/chunks/useMergeTag-TLhF2fGK.js +46 -0
- package/dist/cdn/chunks/useMergeTag-TLhF2fGK.js.map +1 -0
- package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js → usePopoverPosition-BxVWE5_0.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js.map → usePopoverPosition-BxVWE5_0.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js → useScrollToBlock-Cz3fpgTK.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js.map → useScrollToBlock-Cz3fpgTK.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1722 -2071
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{createCloudRuntime-zNcMjRgb.js → createCloudRuntime-DbTFm1ES.js} +1 -1
- package/dist/{extensions-kOYwOh72.js → extensions-Mf8iHey9.js} +2 -2
- package/dist/index.d.ts +41 -0
- package/dist/keys-C3P1yxnr.js +10 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1890 -2240
- package/dist/{useCloudI18n-BlMajbKp.js → useCloudI18n-BKoiYsWZ.js} +1 -1
- package/dist/{useEditorCore-CwQYCSXO.js → useEditorCore-DdkQuTHl.js} +1101 -1064
- package/dist/{useEditorRoot-C92q8uV-.js → useEditorRoot-DkRGTQRs.js} +1 -1
- package/dist/{useI18n-Ce_BRzYv.js → useI18n-CL6RfPzK.js} +1 -1
- package/dist/useMergeTag-gSuYus-M.js +44 -0
- package/dist/{usePopoverPosition-CPk7Twye.js → usePopoverPosition-CWxaIWd3.js} +1 -1
- package/dist/{useScrollToBlock-DvpMfWs2.js → useScrollToBlock-CdI8fGqt.js} +1 -1
- package/package.json +7 -7
- package/dist/RichTextEditorContent-C_9xi7dD.js +0 -153
- package/dist/cdn/chunks/AiChatSidebar-CqWvtRwB.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-B91lUmof.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-D6VIIPhB.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-BvOwE1kg.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BU8tlFbL.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-C1-5I8Df.js +0 -123
- package/dist/cdn/chunks/RichTextEditorContent-C1-5I8Df.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-CroWaWqy.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DvXUW2j-.js.map +0 -1
- package/dist/cdn/chunks/TplModal-X-qNoLGZ.js.map +0 -1
- package/dist/cdn/chunks/keys-BOn5i9jV.js +0 -12
- package/dist/cdn/chunks/keys-BOn5i9jV.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-CI2WUNrR.js +0 -46
- package/dist/cdn/chunks/useMergeTag-CI2WUNrR.js.map +0 -1
- package/dist/keys-BOhFlHsv.js +0 -10
- package/dist/scan-line-E7w4yQyv.js +0 -31
- package/dist/useMergeTag-CrXJ49lr.js +0 -44
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { Dt as e, G as t, S as n, T as r, U as i, X as a, c as o, d as s, g as c, h as l, j as u, k as d, kt as f, l as p, q as m, r as h, rt as g, s as _, u as v, v as y } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { c as b, s as x } from "./runtime-dom.esm-bundler-BuG03jBM.js";
|
|
3
|
+
import { F as S, M as C, O as w, j as T } from "./dist-PL6vP4SC.js";
|
|
4
|
+
import { w as E } from "./useEditorCore-DdkQuTHl.js";
|
|
5
|
+
import { W as D } from "./keys-C3P1yxnr.js";
|
|
6
|
+
import { t as O } from "./useI18n-CL6RfPzK.js";
|
|
7
|
+
import { n as k } from "./usePopoverPosition-CWxaIWd3.js";
|
|
8
|
+
import { t as A } from "./createLucideIcon-Bvw1Zx56.js";
|
|
9
|
+
import { t as j } from "./x-DJOd1hS4.js";
|
|
10
|
+
import { t as M } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
11
|
+
import { t as N } from "./useMergeTag-gSuYus-M.js";
|
|
12
|
+
import { p as P } from "./styleConstants-C_YAPdQS.js";
|
|
13
|
+
import { n as F, r as I } from "./MergeTagSuggestion-CoCuzEmW.js";
|
|
14
|
+
var L = A("braces", [["path", {
|
|
15
|
+
d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",
|
|
16
|
+
key: "ezmyqa"
|
|
17
|
+
}], ["path", {
|
|
18
|
+
d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",
|
|
19
|
+
key: "e1hn23"
|
|
20
|
+
}]]), R = A("scan-line", [
|
|
21
|
+
["path", {
|
|
22
|
+
d: "M3 7V5a2 2 0 0 1 2-2h2",
|
|
23
|
+
key: "aa7l1z"
|
|
24
|
+
}],
|
|
25
|
+
["path", {
|
|
26
|
+
d: "M17 3h2a2 2 0 0 1 2 2v2",
|
|
27
|
+
key: "4qcy5o"
|
|
28
|
+
}],
|
|
29
|
+
["path", {
|
|
30
|
+
d: "M21 17v2a2 2 0 0 1-2 2h-2",
|
|
31
|
+
key: "6vwrx8"
|
|
32
|
+
}],
|
|
33
|
+
["path", {
|
|
34
|
+
d: "M7 21H5a2 2 0 0 1-2-2v-2",
|
|
35
|
+
key: "ioqczr"
|
|
36
|
+
}],
|
|
37
|
+
["path", {
|
|
38
|
+
d: "M7 12h10",
|
|
39
|
+
key: "b7w52i"
|
|
40
|
+
}]
|
|
41
|
+
]);
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/utils/mergeTagTrigger.ts
|
|
44
|
+
function z(e, t, n, r) {
|
|
45
|
+
if (!n) return null;
|
|
46
|
+
let i = e.slice(0, t), a = i.lastIndexOf(n);
|
|
47
|
+
if (a === -1) return null;
|
|
48
|
+
let o = i.slice(a + n.length);
|
|
49
|
+
return /\s/.test(o) || r && o.includes(r) ? null : {
|
|
50
|
+
triggerStart: a,
|
|
51
|
+
caret: t,
|
|
52
|
+
query: o
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/utils/textFieldCaret.ts
|
|
57
|
+
var B = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
|
|
58
|
+
function V(e, t, n) {
|
|
59
|
+
return {
|
|
60
|
+
left: e,
|
|
61
|
+
top: t,
|
|
62
|
+
bottom: n,
|
|
63
|
+
right: e,
|
|
64
|
+
width: 0,
|
|
65
|
+
height: n - t,
|
|
66
|
+
x: e,
|
|
67
|
+
y: t,
|
|
68
|
+
toJSON: () => ({})
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function H(e, t) {
|
|
72
|
+
let n = e.ownerDocument, r = n.defaultView;
|
|
73
|
+
if (!r) return null;
|
|
74
|
+
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
75
|
+
o.setAttribute("aria-hidden", "true");
|
|
76
|
+
let s = o.style;
|
|
77
|
+
s.position = "absolute", s.visibility = "hidden", s.top = "0", s.left = "0", s.overflow = "hidden", s.whiteSpace = i ? "pre" : "pre-wrap", s.wordWrap = i ? "normal" : "break-word";
|
|
78
|
+
let c = s, l = a;
|
|
79
|
+
for (let e of B) c[e] = l[e];
|
|
80
|
+
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
81
|
+
let u = e.value, d = u.slice(0, t);
|
|
82
|
+
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
83
|
+
let f = n.createElement("span");
|
|
84
|
+
f.textContent = u.slice(t) || ".", o.appendChild(f), n.body.appendChild(o);
|
|
85
|
+
let p = f.offsetTop, m = f.offsetLeft;
|
|
86
|
+
n.body.removeChild(o);
|
|
87
|
+
let h = e.getBoundingClientRect(), g = parseFloat(a.borderTopWidth) || 0, _ = parseFloat(a.borderLeftWidth) || 0, v = parseFloat(a.lineHeight) || parseFloat(a.fontSize) || 0, y = h.left + m + _ - e.scrollLeft;
|
|
88
|
+
if (i) return V(y, h.top, h.bottom);
|
|
89
|
+
let b = h.top + p + g - e.scrollTop;
|
|
90
|
+
return V(y, b, b + v);
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/composables/useMergeTagAutocomplete.ts
|
|
94
|
+
var U = /* @__PURE__ */ new Set([
|
|
95
|
+
"ArrowLeft",
|
|
96
|
+
"ArrowRight",
|
|
97
|
+
"Home",
|
|
98
|
+
"End"
|
|
99
|
+
]);
|
|
100
|
+
function W(e) {
|
|
101
|
+
let { elementRef: a, modelValue: o, emit: s, mergeTags: c, syntax: l, enabled: u, onInsert: d } = e, f = C(l), p = T(l), h = u && f !== null && c.length > 0, g = n(D, null), _ = (t(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = k(), y = F(_, v), b = !1;
|
|
102
|
+
i() && m(() => {
|
|
103
|
+
b = !0, y.close();
|
|
104
|
+
});
|
|
105
|
+
function x(e) {
|
|
106
|
+
let t = e.value ?? "";
|
|
107
|
+
return z(t, e.selectionStart ?? t.length, f, p);
|
|
108
|
+
}
|
|
109
|
+
function S(e, t, n) {
|
|
110
|
+
let i = e.value ?? o(), c = i.slice(t.caret), l = p && c.startsWith(p) ? p.length : 0, u = i.slice(0, t.triggerStart), f = i.slice(t.caret + l), m = u + n.value + f, h = u.length + n.value.length;
|
|
111
|
+
d?.(), s(m), y.close(), r(() => {
|
|
112
|
+
if (b) return;
|
|
113
|
+
let e = a.value;
|
|
114
|
+
e?.focus(), e?.setSelectionRange(h, h);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function w() {
|
|
118
|
+
if (!h || b) return;
|
|
119
|
+
let e = a.value;
|
|
120
|
+
if (!e) {
|
|
121
|
+
y.close();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let t = x(e);
|
|
125
|
+
if (!t) {
|
|
126
|
+
y.close();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let n = I(c, t.query), r = () => H(e, t.triggerStart), i = (n) => S(e, t, n);
|
|
130
|
+
y.isOpen() ? y.update({
|
|
131
|
+
items: n,
|
|
132
|
+
getRect: r,
|
|
133
|
+
onCommand: i
|
|
134
|
+
}) : y.open({
|
|
135
|
+
items: n,
|
|
136
|
+
getRect: r,
|
|
137
|
+
anchorEl: e,
|
|
138
|
+
onCommand: i
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function E(e) {
|
|
142
|
+
return y.isOpen() ? e.key === "Escape" ? (y.close(), !0) : U.has(e.key) ? (y.close(), !1) : y.handleKeyDown(e) : !1;
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
available: h,
|
|
146
|
+
refresh: w,
|
|
147
|
+
handleKeydown: E,
|
|
148
|
+
close: () => y.close(),
|
|
149
|
+
isOpen: () => y.isOpen()
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/composables/useMergeTagField.ts
|
|
154
|
+
function G(e) {
|
|
155
|
+
let { modelValue: t, emit: n, elementRef: o } = e, { mergeTags: s, canRequestMergeTag: c, isRequesting: l, isMergeTagValue: u, getMergeTagLabel: d, requestMergeTag: f, syntax: p, autocomplete: h } = N(), { canInsertLogicTag: g, isRequesting: v, requestLogicTag: y } = E(), b = a(!1), x = !1, C = !1;
|
|
156
|
+
i() && m(() => {
|
|
157
|
+
C = !0;
|
|
158
|
+
});
|
|
159
|
+
let T = W({
|
|
160
|
+
elementRef: o,
|
|
161
|
+
modelValue: t,
|
|
162
|
+
emit: n,
|
|
163
|
+
mergeTags: s,
|
|
164
|
+
syntax: p,
|
|
165
|
+
enabled: h,
|
|
166
|
+
onInsert: () => {
|
|
167
|
+
b.value = !0;
|
|
168
|
+
}
|
|
169
|
+
}), D = _(() => {
|
|
170
|
+
let e = t();
|
|
171
|
+
if (!e) return [];
|
|
172
|
+
let n = [], r = `(${p.value.source}|${p.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
|
|
173
|
+
for (; (o = i.exec(e)) !== null;) {
|
|
174
|
+
o.index > a && n.push({
|
|
175
|
+
type: "text",
|
|
176
|
+
value: e.slice(a, o.index)
|
|
177
|
+
});
|
|
178
|
+
let t = o[0];
|
|
179
|
+
u(t) ? n.push({
|
|
180
|
+
type: "mergeTag",
|
|
181
|
+
value: t,
|
|
182
|
+
label: d(t)
|
|
183
|
+
}) : S(t, p) ? n.push({
|
|
184
|
+
type: "logicMergeTag",
|
|
185
|
+
value: t,
|
|
186
|
+
keyword: w(t, p)
|
|
187
|
+
}) : n.push({
|
|
188
|
+
type: "text",
|
|
189
|
+
value: t
|
|
190
|
+
}), a = o.index + t.length;
|
|
191
|
+
}
|
|
192
|
+
return a < e.length && n.push({
|
|
193
|
+
type: "text",
|
|
194
|
+
value: e.slice(a)
|
|
195
|
+
}), n;
|
|
196
|
+
}), O = _(() => D.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
197
|
+
function k() {
|
|
198
|
+
b.value = !0, r(() => {
|
|
199
|
+
o.value?.focus();
|
|
200
|
+
let e = t()?.length || 0;
|
|
201
|
+
o.value?.setSelectionRange(e, e);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function A() {
|
|
205
|
+
x || (b.value = !1);
|
|
206
|
+
}
|
|
207
|
+
function j(e) {
|
|
208
|
+
n(e.target.value), T.refresh();
|
|
209
|
+
}
|
|
210
|
+
function M(e) {
|
|
211
|
+
return T.handleKeydown(e) ? (e.preventDefault(), !0) : (e.key === "Escape" && A(), !1);
|
|
212
|
+
}
|
|
213
|
+
function P() {
|
|
214
|
+
T.refresh();
|
|
215
|
+
}
|
|
216
|
+
function F() {
|
|
217
|
+
T.close(), A();
|
|
218
|
+
}
|
|
219
|
+
function I() {
|
|
220
|
+
n("");
|
|
221
|
+
}
|
|
222
|
+
async function L() {
|
|
223
|
+
let e = b.value && o.value ? o.value.selectionStart ?? t().length : t().length;
|
|
224
|
+
x = !0;
|
|
225
|
+
let i;
|
|
226
|
+
try {
|
|
227
|
+
i = await f();
|
|
228
|
+
} finally {
|
|
229
|
+
x = !1;
|
|
230
|
+
}
|
|
231
|
+
if (!C && i) {
|
|
232
|
+
let a = t().slice(0, e), s = t().slice(e), c = a + i.value + s;
|
|
233
|
+
n(c), b.value = !0, r(() => {
|
|
234
|
+
if (C) return;
|
|
235
|
+
let t = e + i.value.length;
|
|
236
|
+
o.value?.focus(), o.value?.setSelectionRange(t, t);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
async function R() {
|
|
241
|
+
let e = o.value, i = e?.selectionStart ?? t().length, a = e?.selectionEnd ?? i;
|
|
242
|
+
x = !0;
|
|
243
|
+
let s;
|
|
244
|
+
try {
|
|
245
|
+
s = await y();
|
|
246
|
+
} finally {
|
|
247
|
+
x = !1;
|
|
248
|
+
}
|
|
249
|
+
if (C || !s) return;
|
|
250
|
+
let c = t(), l, u;
|
|
251
|
+
"before" in s ? (l = c.slice(0, i) + s.before + c.slice(i, a) + s.after + c.slice(a), u = i + s.before.length + (a - i)) : (l = c.slice(0, i) + s.value + c.slice(i), u = i + s.value.length), n(l), b.value = !0, r(() => {
|
|
252
|
+
C || (o.value?.focus(), o.value?.setSelectionRange(u, u));
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
segments: D,
|
|
257
|
+
hasMergeTags: O,
|
|
258
|
+
canRequestMergeTag: c,
|
|
259
|
+
isRequestingMergeTag: l,
|
|
260
|
+
canInsertLogicTag: g,
|
|
261
|
+
isRequestingLogicTag: v,
|
|
262
|
+
isEditing: b,
|
|
263
|
+
startEditing: k,
|
|
264
|
+
stopEditing: A,
|
|
265
|
+
handleInput: j,
|
|
266
|
+
handleKeydown: M,
|
|
267
|
+
handleClick: P,
|
|
268
|
+
handleBlur: F,
|
|
269
|
+
clearValue: I,
|
|
270
|
+
insertMergeTag: L,
|
|
271
|
+
insertLogicTag: R,
|
|
272
|
+
autocompleteAvailable: T.available
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
277
|
+
var K = ["aria-label", "onKeydown"], q = ["data-tooltip"], J = ["data-tooltip"], Y = {
|
|
278
|
+
key: 2,
|
|
279
|
+
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
280
|
+
}, X = ["aria-label", "title"], Z = /* @__PURE__ */ y({
|
|
281
|
+
__name: "MergeTagSegments",
|
|
282
|
+
props: {
|
|
283
|
+
segments: {},
|
|
284
|
+
displayClass: {},
|
|
285
|
+
pulse: { type: Boolean }
|
|
286
|
+
},
|
|
287
|
+
emits: ["edit", "clear"],
|
|
288
|
+
setup(t, { emit: n }) {
|
|
289
|
+
let r = n, { t: i } = O();
|
|
290
|
+
function a() {
|
|
291
|
+
r("edit");
|
|
292
|
+
}
|
|
293
|
+
return (n, l) => (d(), s("div", {
|
|
294
|
+
role: "button",
|
|
295
|
+
tabindex: "0",
|
|
296
|
+
"aria-label": g(i).mergeTag.clickToEdit,
|
|
297
|
+
class: e([t.displayClass, { "tpl-pulse-fill": t.pulse }]),
|
|
298
|
+
onClick: a,
|
|
299
|
+
onKeydown: [x(a, ["enter"]), x(b(a, ["prevent"]), ["space"])]
|
|
300
|
+
}, [(d(!0), s(h, null, u(t.segments, (e, t) => (d(), s(h, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" ? (d(), s("span", {
|
|
301
|
+
key: 0,
|
|
302
|
+
class: "tpl-tooltip 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",
|
|
303
|
+
"data-tooltip": e.value,
|
|
304
|
+
style: {
|
|
305
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
306
|
+
color: "var(--tpl-primary)"
|
|
307
|
+
}
|
|
308
|
+
}, f(e.label), 9, q)) : e.type === "logicMergeTag" ? (d(), s("span", {
|
|
309
|
+
key: 1,
|
|
310
|
+
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
311
|
+
"data-tooltip": e.value,
|
|
312
|
+
style: {
|
|
313
|
+
"background-color": "transparent",
|
|
314
|
+
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
315
|
+
color: "var(--tpl-primary)"
|
|
316
|
+
}
|
|
317
|
+
}, f(e.keyword), 9, J)) : (d(), s("span", Y, f(e.value), 1))], 64))), 128)), o("button", {
|
|
318
|
+
type: "button",
|
|
319
|
+
class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all tpl:hover:text-[var(--tpl-danger)] tpl:hover:opacity-100",
|
|
320
|
+
"aria-label": g(i).mergeTag.remove,
|
|
321
|
+
title: g(i).mergeTag.remove,
|
|
322
|
+
onClick: l[0] ||= b((e) => r("clear"), ["stop"])
|
|
323
|
+
}, [c(g(j), {
|
|
324
|
+
size: 12,
|
|
325
|
+
"stroke-width": 2.5
|
|
326
|
+
})], 8, X)], 42, K));
|
|
327
|
+
}
|
|
328
|
+
}), ee = [
|
|
329
|
+
"aria-label",
|
|
330
|
+
"title",
|
|
331
|
+
"disabled"
|
|
332
|
+
], te = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Q = /* @__PURE__ */ y({
|
|
333
|
+
__name: "MergeTagInsertButton",
|
|
334
|
+
props: { disabled: { type: Boolean } },
|
|
335
|
+
emits: ["insert"],
|
|
336
|
+
setup(t) {
|
|
337
|
+
let { t: n } = O();
|
|
338
|
+
return (r, i) => (d(), s("button", {
|
|
339
|
+
type: "button",
|
|
340
|
+
class: e([te, "tpl:mt-1.5"]),
|
|
341
|
+
"aria-label": g(n).mergeTag.insert,
|
|
342
|
+
title: g(n).mergeTag.insert,
|
|
343
|
+
disabled: t.disabled,
|
|
344
|
+
onMousedown: i[0] ||= b(() => {}, ["prevent"]),
|
|
345
|
+
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
346
|
+
}, [c(g(R), {
|
|
347
|
+
size: 12,
|
|
348
|
+
"stroke-width": 2
|
|
349
|
+
}), l(" " + f(g(n).mergeTag.insertShort), 1)], 42, ee));
|
|
350
|
+
}
|
|
351
|
+
}), ne = [
|
|
352
|
+
"aria-label",
|
|
353
|
+
"title",
|
|
354
|
+
"disabled"
|
|
355
|
+
], re = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", $ = /* @__PURE__ */ y({
|
|
356
|
+
__name: "LogicTagInsertButton",
|
|
357
|
+
props: { disabled: { type: Boolean } },
|
|
358
|
+
emits: ["insert"],
|
|
359
|
+
setup(t) {
|
|
360
|
+
let { t: n } = O();
|
|
361
|
+
return (r, i) => (d(), s("button", {
|
|
362
|
+
type: "button",
|
|
363
|
+
class: e([re, "tpl:mt-1.5"]),
|
|
364
|
+
"aria-label": g(n).logicTag.insert,
|
|
365
|
+
title: g(n).logicTag.insert,
|
|
366
|
+
disabled: t.disabled,
|
|
367
|
+
"data-testid": "field-insert-logic-button",
|
|
368
|
+
onMousedown: i[0] ||= b(() => {}, ["prevent"]),
|
|
369
|
+
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
370
|
+
}, [c(g(L), {
|
|
371
|
+
size: 12,
|
|
372
|
+
"stroke-width": 2
|
|
373
|
+
}), l(" " + f(g(n).logicTag.insertShort), 1)], 42, ne));
|
|
374
|
+
}
|
|
375
|
+
}), ie = { key: 0 }, ae = {
|
|
376
|
+
key: 0,
|
|
377
|
+
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
378
|
+
}, oe = { key: 1 }, se = [
|
|
379
|
+
"type",
|
|
380
|
+
"value",
|
|
381
|
+
"placeholder"
|
|
382
|
+
], ce = {
|
|
383
|
+
key: 0,
|
|
384
|
+
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
385
|
+
}, le = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-[var(--tpl-shadow-sm)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", ue = /*#__PURE__*/ M(/* @__PURE__ */ y({
|
|
386
|
+
__name: "MergeTagInput",
|
|
387
|
+
props: {
|
|
388
|
+
modelValue: {},
|
|
389
|
+
type: { default: "text" },
|
|
390
|
+
placeholder: { default: "" },
|
|
391
|
+
pulse: {
|
|
392
|
+
type: Boolean,
|
|
393
|
+
default: !1
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
emits: ["update:modelValue", "keydown"],
|
|
397
|
+
setup(t, { emit: n }) {
|
|
398
|
+
let r = t, i = n, l = a(null), { segments: u, hasMergeTags: f, canRequestMergeTag: m, isRequestingMergeTag: h, canInsertLogicTag: _, isRequestingLogicTag: y, isEditing: b, startEditing: x, handleInput: S, handleKeydown: C, handleClick: w, handleBlur: T, clearValue: E, insertMergeTag: D, insertLogicTag: O } = G({
|
|
399
|
+
modelValue: () => r.modelValue,
|
|
400
|
+
emit: (e) => i("update:modelValue", e),
|
|
401
|
+
elementRef: l
|
|
402
|
+
});
|
|
403
|
+
function k(e) {
|
|
404
|
+
C(e) || i("keydown", e);
|
|
405
|
+
}
|
|
406
|
+
return (n, r) => g(f) && !g(b) ? (d(), s("div", ie, [c(Z, {
|
|
407
|
+
segments: g(u),
|
|
408
|
+
"display-class": le,
|
|
409
|
+
pulse: t.pulse,
|
|
410
|
+
onEdit: g(x),
|
|
411
|
+
onClear: g(E)
|
|
412
|
+
}, null, 8, [
|
|
413
|
+
"segments",
|
|
414
|
+
"pulse",
|
|
415
|
+
"onEdit",
|
|
416
|
+
"onClear"
|
|
417
|
+
]), g(m) || g(_) ? (d(), s("div", ae, [g(m) ? (d(), p(Q, {
|
|
418
|
+
key: 0,
|
|
419
|
+
disabled: g(h),
|
|
420
|
+
onInsert: g(D)
|
|
421
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0), g(_) ? (d(), p($, {
|
|
422
|
+
key: 1,
|
|
423
|
+
disabled: g(y),
|
|
424
|
+
onInsert: g(O)
|
|
425
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : v("", !0)])) : (d(), s("div", oe, [o("input", {
|
|
426
|
+
ref_key: "inputRef",
|
|
427
|
+
ref: l,
|
|
428
|
+
type: t.type,
|
|
429
|
+
class: e([g(P), { "tpl-pulse-fill": t.pulse }]),
|
|
430
|
+
value: t.modelValue,
|
|
431
|
+
placeholder: t.placeholder,
|
|
432
|
+
onInput: r[0] ||= (...e) => g(S) && g(S)(...e),
|
|
433
|
+
onKeydown: k,
|
|
434
|
+
onClick: r[1] ||= (...e) => g(w) && g(w)(...e),
|
|
435
|
+
onBlur: r[2] ||= (...e) => g(T) && g(T)(...e)
|
|
436
|
+
}, null, 42, se), g(m) || g(_) ? (d(), s("div", ce, [g(m) ? (d(), p(Q, {
|
|
437
|
+
key: 0,
|
|
438
|
+
disabled: g(h),
|
|
439
|
+
onInsert: g(D)
|
|
440
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0), g(_) ? (d(), p($, {
|
|
441
|
+
key: 1,
|
|
442
|
+
disabled: g(y),
|
|
443
|
+
onInsert: g(O)
|
|
444
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : v("", !0)]));
|
|
445
|
+
}
|
|
446
|
+
}), [["__scopeId", "data-v-31b31866"]]);
|
|
447
|
+
//#endregion
|
|
448
|
+
export { G as a, Z as i, $ as n, R as o, Q as r, L as s, ue as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ot as e, S as t, c as n, d as r, j as i, k as a, kt as o, l as s, r as c, rt as l, s as u, u as d, v as f } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
2
|
import { N as p } from "./dist-PL6vP4SC.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as h } from "./useI18n-
|
|
3
|
+
import { E as m } from "./keys-C3P1yxnr.js";
|
|
4
|
+
import { t as h } from "./useI18n-CL6RfPzK.js";
|
|
5
5
|
import { t as g } from "./createLucideIcon-Bvw1Zx56.js";
|
|
6
6
|
import { t as _ } from "./sparkles-Dy2BJjiX.js";
|
|
7
7
|
var v = g("monitor", [
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Dt as e, G as t, Ot as n, P as r, S as i, X as a, c as o, d as s, g as c, h as l, i as u, j as d, k as f, kt as p, l as m, r as h, rt as g, s as _, u as v, v as y } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
2
|
import { c as b, s as x } from "./runtime-dom.esm-bundler-BuG03jBM.js";
|
|
3
|
-
import { C as S, D as C, E as w, S as T } from "./useEditorCore-
|
|
3
|
+
import { C as S, D as C, E as w, S as T } from "./useEditorCore-DdkQuTHl.js";
|
|
4
4
|
import { t as E } from "./dist-dNiknO7j.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as A } from "./useI18n-
|
|
7
|
-
import { n as j } from "./usePopoverPosition-
|
|
5
|
+
import { J as D, K as O, O as k, U as ee, _ as te, h as ne, w as re } from "./keys-C3P1yxnr.js";
|
|
6
|
+
import { t as A } from "./useI18n-CL6RfPzK.js";
|
|
7
|
+
import { n as j } from "./usePopoverPosition-CWxaIWd3.js";
|
|
8
8
|
import { t as M } from "./createLucideIcon-Bvw1Zx56.js";
|
|
9
|
-
import { a as N, i as ie, n as P, r as ae, t as F } from "./RichTextEditorContent-
|
|
10
|
-
import {
|
|
9
|
+
import { a as N, i as ie, n as P, r as ae, t as F } from "./RichTextEditorContent-BmTcV2-a.js";
|
|
10
|
+
import { o as oe, s as se } from "./MergeTagInput-RytOlh1A.js";
|
|
11
11
|
import { t as ce } from "./loader-circle-t-SVgmJ3.js";
|
|
12
12
|
import { n as le, r as ue, t as de } from "./text-align-start-DrxjxvIy.js";
|
|
13
13
|
import { t as I } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
14
|
import { a as fe, n as pe, o as me, s as he } from "./styleConstants-C_YAPdQS.js";
|
|
15
|
-
import { t as L } from "./ColorPicker-
|
|
15
|
+
import { t as L } from "./ColorPicker-C6EOwtHC.js";
|
|
16
16
|
var R = M("face-slightly-smiling", [
|
|
17
17
|
["path", {
|
|
18
18
|
d: "M15 10V9",
|
|
@@ -314,7 +314,7 @@ var De = ["data-tpl-theme", "aria-label"], $ = { class: "tpl:flex tpl:items-cent
|
|
|
314
314
|
"add-logic-tag"
|
|
315
315
|
],
|
|
316
316
|
setup(e, { emit: t }) {
|
|
317
|
-
let r = e, a = t, d = i(
|
|
317
|
+
let r = e, a = t, d = i(ee, null), y = i(O, null), b = D(te, "ParagraphToolbar"), x = j(), S = i(k, null), C = i(re, null), w = i(ne, null), T = _(() => (S?.isOpen.value ?? !1) || (C?.isOpen.value ?? !1)), { t: E } = A(), M = b.fonts;
|
|
318
318
|
function P(e) {
|
|
319
319
|
r.editor?.chain().focus().insertContent(e).run();
|
|
320
320
|
}
|
|
@@ -371,7 +371,7 @@ var De = ["data-tpl-theme", "aria-label"], $ = { class: "tpl:flex tpl:items-cent
|
|
|
371
371
|
"data-tpl-theme": g(y),
|
|
372
372
|
role: "toolbar",
|
|
373
373
|
"aria-label": g(E).paragraphEditor.toolbar,
|
|
374
|
-
class: "tpl tpl-text-toolbar tpl:absolute tpl:
|
|
374
|
+
class: "tpl tpl-text-toolbar tpl:absolute tpl:flex tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
375
375
|
style: n({
|
|
376
376
|
...g(d),
|
|
377
377
|
top: `${e.toolbarPosition.top}px`,
|
|
@@ -608,7 +608,7 @@ var De = ["data-tpl-theme", "aria-label"], $ = { class: "tpl:flex tpl:items-cent
|
|
|
608
608
|
"aria-label": g(E).mergeTag.insert,
|
|
609
609
|
title: g(E).mergeTag.insert,
|
|
610
610
|
onClick: r[14] ||= (e) => a("add-merge-tag")
|
|
611
|
-
}, [c(g(
|
|
611
|
+
}, [c(g(oe), {
|
|
612
612
|
size: 16,
|
|
613
613
|
"stroke-width": 2
|
|
614
614
|
}), l(" " + p(g(E).mergeTag.insertShort), 1)], 8, ke)], 64)) : v("", !0),
|
|
@@ -619,7 +619,7 @@ var De = ["data-tpl-theme", "aria-label"], $ = { class: "tpl:flex tpl:items-cent
|
|
|
619
619
|
title: g(E).logicTag.insert,
|
|
620
620
|
"data-testid": "insert-logic-button",
|
|
621
621
|
onClick: r[15] ||= (e) => a("add-logic-tag")
|
|
622
|
-
}, [c(g(
|
|
622
|
+
}, [c(g(se), {
|
|
623
623
|
size: 16,
|
|
624
624
|
"stroke-width": 2
|
|
625
625
|
}), l(" " + p(g(E).logicTag.insertShort), 1)], 8, Ae)], 64)) : v("", !0)
|
|
@@ -655,7 +655,7 @@ var De = ["data-tpl-theme", "aria-label"], $ = { class: "tpl:flex tpl:items-cent
|
|
|
655
655
|
import("./dist-D08oVYhr.js"),
|
|
656
656
|
import("./dist-DzdeVn-W.js"),
|
|
657
657
|
import("./dist-f7HXo6j6.js"),
|
|
658
|
-
import("./extensions-
|
|
658
|
+
import("./extensions-Mf8iHey9.js")
|
|
659
659
|
]);
|
|
660
660
|
return {
|
|
661
661
|
TiptapEditor: o,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Dt as e, c as t, d as n, g as r, h as i, k as a, kt as o, l as s, rt as c, u as l, v as u, z as d } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
-
import { t as f } from "./useI18n-
|
|
2
|
+
import { t as f } from "./useI18n-CL6RfPzK.js";
|
|
3
3
|
import { t as p } from "./loader-circle-t-SVgmJ3.js";
|
|
4
4
|
import { t as m } from "./triangle-alert-DxnFj4-B.js";
|
|
5
5
|
import { d as h, v as g, x as _ } from "./styleConstants-C_YAPdQS.js";
|
|
6
|
-
import { t as v } from "./TplModal-
|
|
6
|
+
import { t as v } from "./TplModal-CowM3o_F.js";
|
|
7
7
|
//#region src/components/RestoreVersionDialog.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var y = ["aria-busy"], b = { class: "tpl:flex tpl:items-center tpl:gap-2" }, x = {
|
|
9
9
|
id: "tpl-restore-version-title",
|