@templatical/editor 0.33.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-J7WsHRDS.js → AiChatSidebar-CkHJ28sf.js} +3 -3
- package/dist/{AiFeatureMenu-C9mxL_7U.js → AiFeatureMenu-DWdKguDN.js} +3 -3
- package/dist/{BlockIssueBadge-BI6v_eol.js → BlockIssueBadge-DcyHTAqw.js} +2 -2
- package/dist/{BlockPreviewCanvas-mZIr9mY2.js → BlockPreviewCanvas-B621ANn9.js} +4 -4
- package/dist/{CloudHeaderExtras-CLtTtK12.js → CloudHeaderExtras-BJ3Cebhv.js} +2 -2
- package/dist/{CloudPanels-BbLAX1jH.js → CloudPanels-BGz9ygo6.js} +6 -6
- package/dist/{CollaboratorBar-OBbLOhLK.js → CollaboratorBar-KphmSQeZ.js} +2 -2
- package/dist/{ColorPicker-Cs7iK01u.js → ColorPicker-C6EOwtHC.js} +5 -5
- package/dist/{CommentsPanel-G_uNzi1a.js → CommentsPanel-DmWh8f08.js} +1 -1
- package/dist/{CommentsSidebar-DlFlpfkU.js → CommentsSidebar-CL_tffzT.js} +4 -4
- package/dist/{CountdownBlock-Bdt8qZi1.js → CountdownBlock-D1fsNsyS.js} +1 -1
- package/dist/{CountdownToolbar-BWLYViOm.js → CountdownToolbar-B8J4i5Xp.js} +2 -2
- package/dist/{DesignReferenceSidebar-CK_xTLh2.js → DesignReferenceSidebar-BDhEeaAh.js} +4 -4
- package/dist/{IssuesPanel-DIbJ_jaa.js → IssuesPanel-CiOjeRFI.js} +4 -4
- package/dist/MergeTagInput-RytOlh1A.js +448 -0
- package/dist/{MergeTagModeToggle-DeI65T5k.js → MergeTagModeToggle-Bi-FydXj.js} +2 -2
- package/dist/{ParagraphEditor-Dr-u72hu.js → ParagraphEditor-C87tkmtE.js} +12 -12
- package/dist/{RestoreVersionDialog-6sBYYt9f.js → RestoreVersionDialog-Db5rZRMA.js} +2 -2
- package/dist/RichTextEditorContent-BmTcV2-a.js +152 -0
- package/dist/{SaveBlockDialog-DABN4-Jf.js → SaveBlockDialog-CDCzx6Bo.js} +16 -16
- package/dist/{SavedBlocksBrowserModal-BoylzTEq.js → SavedBlocksBrowserModal-DQR6kJB1.js} +101 -101
- package/dist/{SavedBlocksPanels-2np4Yu1H.js → SavedBlocksPanels-DFzV0CRD.js} +1 -1
- package/dist/{SavedBlocksPickBar-BM7aTSK2.js → SavedBlocksPickBar-XyXmnSnO.js} +2 -2
- package/dist/{TemplateScoringPanel-CzWoSM1V.js → TemplateScoringPanel-CpyEKMzC.js} +4 -4
- package/dist/{TestEmailModal-Cb0n7Dhj.js → TestEmailModal-DIfJy9eE.js} +8 -8
- package/dist/{TestEmailPanel-52HjvuU7.js → TestEmailPanel-C8Wx5yPS.js} +1 -1
- package/dist/{TitleEditor-_taBpBfB.js → TitleEditor-iNFOisr4.js} +11 -11
- package/dist/{TplModal-CEYnwBBk.js → TplModal-CowM3o_F.js} +5 -5
- package/dist/{VersionHistoryMenu-CsGlLSO8.js → VersionHistoryMenu-CV90OhXs.js} +2 -2
- package/dist/{VersionHistoryPanels-DPmYk00L.js → VersionHistoryPanels-BE3pplJG.js} +1 -1
- package/dist/{VersionPreviewBanner-VGJbEoXj.js → VersionPreviewBanner-BwUWBtlH.js} +1 -1
- package/dist/{blockTypeIcons-IhdBwbxp.js → blockTypeIcons-DQsKtHik.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatSidebar-6S5LPyRW.js → AiChatSidebar-BEnIWn6s.js} +4 -4
- package/dist/cdn/chunks/AiChatSidebar-BEnIWn6s.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-BHCtjIfV.js → AiFeatureMenu-DMl23akc.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-BHCtjIfV.js.map → AiFeatureMenu-DMl23akc.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-2-os120N.js → BlockIssueBadge-CloK4k3M.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-2-os120N.js.map → BlockIssueBadge-CloK4k3M.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CYNs-Yn-.js → BlockPreviewCanvas-DSiJFJa0.js} +5 -5
- package/dist/cdn/chunks/{BlockPreviewCanvas-CYNs-Yn-.js.map → BlockPreviewCanvas-DSiJFJa0.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DrbFk6Fy.js → CloudHeaderExtras-b4KpVeUN.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DrbFk6Fy.js.map → CloudHeaderExtras-b4KpVeUN.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-CpzYrAPQ.js → CloudPanels-DzwOq9lp.js} +7 -7
- package/dist/cdn/chunks/CloudPanels-DzwOq9lp.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-VMTCYn_z.js → CollaboratorBar-WXKvpoGK.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-VMTCYn_z.js.map → CollaboratorBar-WXKvpoGK.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-B0l_UF8G.js → ColorPicker-BubTDiS1.js} +6 -6
- package/dist/cdn/chunks/{ColorPicker-B0l_UF8G.js.map → ColorPicker-BubTDiS1.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CXMMdLrO.js → CommentsPanel-DAA2VqX4.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-CXMMdLrO.js.map → CommentsPanel-DAA2VqX4.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CGkhAJUW.js → CommentsSidebar-Ci0M2ePp.js} +5 -5
- package/dist/cdn/chunks/CommentsSidebar-Ci0M2ePp.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-CPe1ulzk.js → CountdownBlock-rK055jpy.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-CPe1ulzk.js.map → CountdownBlock-rK055jpy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-D5xyNd5V.js → CountdownToolbar-CzZq26Vp.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-D5xyNd5V.js.map → CountdownToolbar-CzZq26Vp.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-D1NH1WRv.js → DesignReferenceSidebar-C_ehdX5C.js} +5 -5
- package/dist/cdn/chunks/DesignReferenceSidebar-C_ehdX5C.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-07SBSZVN.js → IssuesPanel-BXAN2_al.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-07SBSZVN.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-Bg8eO5nc.js → MergeTagModeToggle-B_mUYJo4.js} +3 -3
- package/dist/cdn/chunks/{MergeTagModeToggle-Bg8eO5nc.js.map → MergeTagModeToggle-B_mUYJo4.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-x2LTi6DN.js → ParagraphEditor-DCDHMcmx.js} +10 -10
- package/dist/cdn/chunks/ParagraphEditor-DCDHMcmx.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog--SjTV0_4.js → RestoreVersionDialog-BkSSwf-Q.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog--SjTV0_4.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-CS1lqdsQ.js → SaveBlockDialog-BH774Nt0.js} +14 -14
- package/dist/cdn/chunks/{SaveBlockDialog-CS1lqdsQ.js.map → SaveBlockDialog-BH774Nt0.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D6nDZ4rq.js → SavedBlocksBrowserModal-CSUqw_dD.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D6nDZ4rq.js.map → SavedBlocksBrowserModal-CSUqw_dD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DdkwvYRR.js → SavedBlocksPanels-B6ApbCjG.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DdkwvYRR.js.map → SavedBlocksPanels-B6ApbCjG.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BLQr_6WM.js → SavedBlocksPickBar-C9MXSRcR.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-BLQr_6WM.js.map → SavedBlocksPickBar-C9MXSRcR.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CDC-JC6C.js → TemplateScoringPanel-QVOxc9TZ.js} +50 -50
- package/dist/cdn/chunks/TemplateScoringPanel-QVOxc9TZ.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-B2LcU11Y.js → TestEmailModal-_CZvaO58.js} +9 -9
- package/dist/cdn/chunks/{TestEmailModal-B2LcU11Y.js.map → TestEmailModal-_CZvaO58.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-ByqDSx8B.js → TestEmailPanel-DXLxvyrD.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-ByqDSx8B.js.map → TestEmailPanel-DXLxvyrD.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DCoulgN8.js → TitleEditor-BuCOahW3.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-BuCOahW3.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CxQDl-tN.js → TplModal-CqY8R3hn.js} +6 -6
- package/dist/cdn/chunks/TplModal-CqY8R3hn.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-BOy8aMB6.js → VersionHistoryMenu-DDjIBvad.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-BOy8aMB6.js.map → VersionHistoryMenu-DDjIBvad.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BPLhzW9c.js → VersionHistoryPanels-BuTw04T5.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BPLhzW9c.js.map → VersionHistoryPanels-BuTw04T5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CYC9qP2i.js → VersionPreviewBanner-fGAv20qI.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CYC9qP2i.js.map → VersionPreviewBanner-fGAv20qI.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-CbSqoOba.js → createCloudRuntime-JFE-sxbT.js} +2 -2
- package/dist/cdn/chunks/{createCloudRuntime-CbSqoOba.js.map → createCloudRuntime-JFE-sxbT.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CeP0iOPC.js → extensions-7z04EIGg.js} +3 -3
- package/dist/cdn/chunks/{extensions-CeP0iOPC.js.map → extensions-7z04EIGg.js.map} +1 -1
- package/dist/cdn/chunks/{keys-O8clwJ41.js → keys-DQp8x7Nx.js} +4 -4
- package/dist/cdn/chunks/{keys-O8clwJ41.js.map → keys-DQp8x7Nx.js.map} +1 -1
- package/dist/cdn/chunks/{src-C1lP5sIe.js → src-B7p3PQqm.js} +2 -2
- package/dist/cdn/chunks/{src-C1lP5sIe.js.map → src-B7p3PQqm.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-ZBEJvkf4.js → useCloudI18n-MxgHWrV6.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-ZBEJvkf4.js.map → useCloudI18n-MxgHWrV6.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CZxGbZmY.js → useEditorCore-ehUSEsbw.js} +503 -500
- package/dist/cdn/chunks/useEditorCore-ehUSEsbw.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-DVV-EsNI.js → useEditorRoot-CteADR3y.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-DVV-EsNI.js.map → useEditorRoot-CteADR3y.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DCbvHv6W.js → useI18n-Ct1VIFcf.js} +2 -2
- package/dist/cdn/chunks/{useI18n-DCbvHv6W.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-Ozg5iU3y.js → usePopoverPosition-BxVWE5_0.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-Ozg5iU3y.js.map → usePopoverPosition-BxVWE5_0.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CrUCYsIc.js → useScrollToBlock-Cz3fpgTK.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CrUCYsIc.js.map → useScrollToBlock-Cz3fpgTK.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1672 -2075
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{createCloudRuntime-j6a9Z-vL.js → createCloudRuntime-DbTFm1ES.js} +1 -1
- package/dist/{extensions-5xeZR9U9.js → extensions-Mf8iHey9.js} +2 -2
- package/dist/{keys-BJJ4hJ4z.js → keys-C3P1yxnr.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1835 -2239
- package/dist/{useCloudI18n-DaKcDMDz.js → useCloudI18n-BKoiYsWZ.js} +1 -1
- package/dist/{useEditorCore-BWrxHVKW.js → useEditorCore-DdkQuTHl.js} +1068 -1065
- package/dist/{useEditorRoot-E-oxHaEI.js → useEditorRoot-DkRGTQRs.js} +1 -1
- package/dist/{useI18n-DUVIAju4.js → useI18n-CL6RfPzK.js} +1 -1
- package/dist/useMergeTag-gSuYus-M.js +44 -0
- package/dist/{usePopoverPosition-APlWgXoQ.js → usePopoverPosition-CWxaIWd3.js} +1 -1
- package/dist/{useScrollToBlock--AzCOzlg.js → useScrollToBlock-CdI8fGqt.js} +1 -1
- package/package.json +7 -7
- package/dist/RichTextEditorContent-DKLVe6Io.js +0 -153
- package/dist/cdn/chunks/AiChatSidebar-6S5LPyRW.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-CpzYrAPQ.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-CGkhAJUW.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-D1NH1WRv.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-x2LTi6DN.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-CzdMJ1c9.js +0 -123
- package/dist/cdn/chunks/RichTextEditorContent-CzdMJ1c9.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-CDC-JC6C.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DCoulgN8.js.map +0 -1
- package/dist/cdn/chunks/TplModal-CxQDl-tN.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CZxGbZmY.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-CbuagYNK.js +0 -46
- package/dist/cdn/chunks/useMergeTag-CbuagYNK.js.map +0 -1
- package/dist/scan-line-E7w4yQyv.js +0 -31
- package/dist/useMergeTag-CuZZeiSE.js +0 -44
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { S as e, X as t } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { I as n, k as r, o as i } from "./dist-PL6vP4SC.js";
|
|
3
|
+
import { D as a, E as o, O as s, P as c, j as l, k as u } from "./keys-C3P1yxnr.js";
|
|
4
|
+
//#region src/composables/useMergeTag.ts
|
|
5
|
+
function d() {
|
|
6
|
+
let d = e(o, []), f = e(l, i.liquid), p = e(c, null), m = e(a, !0), h = e(s, null), g = e(u, null) ?? t(!1);
|
|
7
|
+
function _(e) {
|
|
8
|
+
return n(e, f);
|
|
9
|
+
}
|
|
10
|
+
function v(e) {
|
|
11
|
+
return r(e, d);
|
|
12
|
+
}
|
|
13
|
+
async function y() {
|
|
14
|
+
if (p) {
|
|
15
|
+
g.value = !0;
|
|
16
|
+
try {
|
|
17
|
+
return await p();
|
|
18
|
+
} finally {
|
|
19
|
+
g.value = !1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (d.length > 0 && h) {
|
|
23
|
+
g.value = !0;
|
|
24
|
+
try {
|
|
25
|
+
return await h.open(d);
|
|
26
|
+
} finally {
|
|
27
|
+
g.value = !1;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
mergeTags: d,
|
|
34
|
+
isRequesting: g,
|
|
35
|
+
canRequestMergeTag: !!p || d.length > 0,
|
|
36
|
+
autocomplete: m,
|
|
37
|
+
syntax: f,
|
|
38
|
+
isMergeTagValue: _,
|
|
39
|
+
getMergeTagLabel: v,
|
|
40
|
+
requestMergeTag: y
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { d as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { T as e } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
2
|
import { t } from "./createLucideIcon-Bvw1Zx56.js";
|
|
3
|
-
import { t as n } from "./useEditorRoot-
|
|
3
|
+
import { t as n } from "./useEditorRoot-DkRGTQRs.js";
|
|
4
4
|
var r = t("list-checks", [
|
|
5
5
|
["path", {
|
|
6
6
|
d: "M13 5h8",
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/editor",
|
|
3
3
|
"description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.34.1",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@lucide/vue": "^1.41.0",
|
|
8
|
-
"@templatical/core": "0.
|
|
9
|
-
"@templatical/quality": "0.
|
|
10
|
-
"@templatical/types": "0.
|
|
8
|
+
"@templatical/core": "0.34.1",
|
|
9
|
+
"@templatical/quality": "0.34.1",
|
|
10
|
+
"@templatical/types": "0.34.1",
|
|
11
11
|
"@tiptap/core": "^3.31.3",
|
|
12
12
|
"@tiptap/extension-color": "^3.31.3",
|
|
13
13
|
"@tiptap/extension-font-family": "^3.31.3",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"license": "FSL-1.1-MIT",
|
|
64
64
|
"module": "./dist/templatical-editor.js",
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@templatical/media-library": "0.
|
|
67
|
-
"@templatical/quality": "0.
|
|
68
|
-
"@templatical/renderer": "0.
|
|
66
|
+
"@templatical/media-library": "0.34.1",
|
|
67
|
+
"@templatical/quality": "0.34.1",
|
|
68
|
+
"@templatical/renderer": "0.34.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"@templatical/renderer": {
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { B as e, F as t, Ot as n, P as r, S as i, c as a, d as o, g as s, h as c, i as l, k as u, kt as d, l as f, rt as p, s as m, u as h, v as g, w as _ } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
-
import { a as v, c as y } from "./runtime-dom.esm-bundler-BuG03jBM.js";
|
|
3
|
-
import { V as b, W as x, h as S } from "./keys-BJJ4hJ4z.js";
|
|
4
|
-
import { t as C } from "./useI18n-DUVIAju4.js";
|
|
5
|
-
import { n as w } from "./usePopoverPosition-APlWgXoQ.js";
|
|
6
|
-
import { t as T } from "./createLucideIcon-Bvw1Zx56.js";
|
|
7
|
-
import { t as E } from "./x-DJOd1hS4.js";
|
|
8
|
-
import { t as D } from "./ColorPicker-Cs7iK01u.js";
|
|
9
|
-
var O = T("bold", [["path", {
|
|
10
|
-
d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
|
|
11
|
-
key: "mg9rjx"
|
|
12
|
-
}]]), k = T("italic", [
|
|
13
|
-
["line", {
|
|
14
|
-
x1: "19",
|
|
15
|
-
x2: "10",
|
|
16
|
-
y1: "4",
|
|
17
|
-
y2: "4",
|
|
18
|
-
key: "15jd3p"
|
|
19
|
-
}],
|
|
20
|
-
["line", {
|
|
21
|
-
x1: "14",
|
|
22
|
-
x2: "5",
|
|
23
|
-
y1: "20",
|
|
24
|
-
y2: "20",
|
|
25
|
-
key: "bu0au3"
|
|
26
|
-
}],
|
|
27
|
-
["line", {
|
|
28
|
-
x1: "15",
|
|
29
|
-
x2: "9",
|
|
30
|
-
y1: "4",
|
|
31
|
-
y2: "20",
|
|
32
|
-
key: "uljnxc"
|
|
33
|
-
}]
|
|
34
|
-
]), A = T("link", [["path", {
|
|
35
|
-
d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
|
|
36
|
-
key: "1cjeqo"
|
|
37
|
-
}], ["path", {
|
|
38
|
-
d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
|
|
39
|
-
key: "19qd67"
|
|
40
|
-
}]]), j = ["data-tpl-theme"], M = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-5 tpl:py-4" }, N = {
|
|
41
|
-
id: "tpl-link-dialog-title",
|
|
42
|
-
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
43
|
-
}, P = ["aria-label"], F = { class: "tpl:p-5" }, I = { class: "tpl:mb-4 tpl:last:mb-0" }, L = {
|
|
44
|
-
for: "tpl-link-dialog-url",
|
|
45
|
-
class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase"
|
|
46
|
-
}, R = ["placeholder"], z = { class: "tpl:mb-4 tpl:last:mb-0" }, B = { class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, V = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:px-5 tpl:py-4" }, H = { class: "tpl:ml-auto tpl:flex tpl:gap-2" }, U = /* @__PURE__ */ g({
|
|
47
|
-
__name: "RichTextLinkDialog",
|
|
48
|
-
props: /*@__PURE__*/ _({
|
|
49
|
-
visible: { type: Boolean },
|
|
50
|
-
isEditingLink: { type: Boolean }
|
|
51
|
-
}, {
|
|
52
|
-
linkUrl: { required: !0 },
|
|
53
|
-
linkUrlModifiers: {},
|
|
54
|
-
linkColor: { default: "" },
|
|
55
|
-
linkColorModifiers: {},
|
|
56
|
-
dialogRef: { required: !0 },
|
|
57
|
-
dialogRefModifiers: {}
|
|
58
|
-
}),
|
|
59
|
-
emits: /*@__PURE__*/ _([
|
|
60
|
-
"close",
|
|
61
|
-
"insert",
|
|
62
|
-
"remove",
|
|
63
|
-
"keydown"
|
|
64
|
-
], [
|
|
65
|
-
"update:linkUrl",
|
|
66
|
-
"update:linkColor",
|
|
67
|
-
"update:dialogRef"
|
|
68
|
-
]),
|
|
69
|
-
setup(r, { emit: c }) {
|
|
70
|
-
let g = t(r, "linkUrl"), _ = t(r, "linkColor"), T = t(r, "dialogRef"), O = c, k = i(b, null), A = i(x, null), U = w(), W = i(S, null), G = m(() => W?.content.value.settings.linkColor || "#2c85de"), { t: K } = C();
|
|
71
|
-
return (t, i) => p(U) ? (u(), f(l, {
|
|
72
|
-
key: 0,
|
|
73
|
-
to: p(U)
|
|
74
|
-
}, [r.visible ? (u(), o("div", {
|
|
75
|
-
key: 0,
|
|
76
|
-
"data-tpl-theme": p(A),
|
|
77
|
-
class: "tpl tpl-link-dialog tpl:fixed tpl:inset-0 tpl:z-modal tpl:flex tpl:items-center tpl:justify-center",
|
|
78
|
-
style: n(p(k)),
|
|
79
|
-
onClick: i[7] ||= y((e) => O("close"), ["self"])
|
|
80
|
-
}, [a("div", {
|
|
81
|
-
ref: (e) => T.value = e,
|
|
82
|
-
role: "dialog",
|
|
83
|
-
"aria-modal": "true",
|
|
84
|
-
"aria-labelledby": "tpl-link-dialog-title",
|
|
85
|
-
class: "tpl:w-[400px] tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-lg)]"
|
|
86
|
-
}, [
|
|
87
|
-
a("div", M, [a("h4", N, d(r.isEditingLink ? p(K).linkDialog.editLink : p(K).linkDialog.insertLink), 1), a("button", {
|
|
88
|
-
type: "button",
|
|
89
|
-
"aria-label": p(K).linkDialog.cancel,
|
|
90
|
-
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
91
|
-
onClick: i[0] ||= (e) => O("close")
|
|
92
|
-
}, [s(p(E), {
|
|
93
|
-
size: 16,
|
|
94
|
-
"stroke-width": 2
|
|
95
|
-
})], 8, P)]),
|
|
96
|
-
a("div", F, [a("div", I, [a("label", L, d(p(K).linkDialog.urlLabel), 1), e(a("input", {
|
|
97
|
-
id: "tpl-link-dialog-url",
|
|
98
|
-
"onUpdate:modelValue": i[1] ||= (e) => g.value = e,
|
|
99
|
-
type: "url",
|
|
100
|
-
class: "tpl:w-full tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:transition-all tpl:outline-none tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]",
|
|
101
|
-
placeholder: p(K).linkDialog.urlPlaceholder,
|
|
102
|
-
autofocus: "",
|
|
103
|
-
onKeydown: i[2] ||= (e) => O("keydown", e)
|
|
104
|
-
}, null, 40, R), [[v, g.value]])]), a("div", z, [a("label", B, d(p(K).linkDialog.colorLabel), 1), s(D, {
|
|
105
|
-
"model-value": _.value,
|
|
106
|
-
"seed-color": G.value,
|
|
107
|
-
"onUpdate:modelValue": i[3] ||= (e) => _.value = e
|
|
108
|
-
}, null, 8, ["model-value", "seed-color"])])]),
|
|
109
|
-
a("div", V, [r.isEditingLink ? (u(), o("button", {
|
|
110
|
-
key: 0,
|
|
111
|
-
type: "button",
|
|
112
|
-
class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-danger)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-danger)] tpl:transition-all tpl:hover:bg-[var(--tpl-danger-light)]",
|
|
113
|
-
onClick: i[4] ||= (e) => O("remove")
|
|
114
|
-
}, d(p(K).linkDialog.removeLink), 1)) : h("", !0), a("div", H, [a("button", {
|
|
115
|
-
type: "button",
|
|
116
|
-
class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
117
|
-
onClick: i[5] ||= (e) => O("close")
|
|
118
|
-
}, d(p(K).linkDialog.cancel), 1), a("button", {
|
|
119
|
-
type: "button",
|
|
120
|
-
class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:transition-all tpl:hover:bg-[var(--tpl-primary-hover)] tpl:text-[var(--tpl-on-primary)]",
|
|
121
|
-
onClick: i[6] ||= (e) => O("insert")
|
|
122
|
-
}, d(r.isEditingLink ? p(K).linkDialog.updateLink : p(K).linkDialog.insertLink), 1)])])
|
|
123
|
-
], 512)], 12, j)) : h("", !0)], 8, ["to"])) : h("", !0);
|
|
124
|
-
}
|
|
125
|
-
}), W = {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
|
|
128
|
-
}, G = { class: "tpl:animate-pulse tpl:text-[var(--tpl-text-dim)]" }, K = {
|
|
129
|
-
key: 1,
|
|
130
|
-
class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:p-2 tpl:text-center tpl:text-xs tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-text-muted)]"
|
|
131
|
-
}, q = /* @__PURE__ */ g({
|
|
132
|
-
__name: "RichTextEditorContent",
|
|
133
|
-
props: {
|
|
134
|
-
editor: {},
|
|
135
|
-
editorContent: {},
|
|
136
|
-
isLoading: { type: Boolean },
|
|
137
|
-
initError: {}
|
|
138
|
-
},
|
|
139
|
-
emits: ["retry"],
|
|
140
|
-
setup(e, { emit: t }) {
|
|
141
|
-
let n = t, { t: i } = C();
|
|
142
|
-
return (t, s) => e.isLoading ? (u(), o("div", W, [a("div", G, d(p(i).errors.editorLoading), 1)])) : e.initError ? (u(), o("div", K, [c(d(p(i).errors.editorLoadFailed) + " ", 1), a("button", {
|
|
143
|
-
class: "tpl:ml-1 tpl:cursor-pointer tpl:border-none tpl:bg-transparent tpl:p-0 tpl:underline tpl:text-[var(--tpl-primary)]",
|
|
144
|
-
onClick: s[0] ||= (e) => n("retry")
|
|
145
|
-
}, d(p(i).errors.retry), 1)])) : e.editorContent && e.editor ? (u(), f(r(e.editorContent), {
|
|
146
|
-
key: 2,
|
|
147
|
-
editor: e.editor,
|
|
148
|
-
class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
|
|
149
|
-
}, null, 8, ["editor"])) : h("", !0);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
//#endregion
|
|
153
|
-
export { O as a, k as i, U as n, A as r, q as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AiChatSidebar-6S5LPyRW.js","names":[],"sources":["../../../src/cloud/components/AiChatSidebar.vue","../../../src/cloud/components/AiChatSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport LoadingTrack from \"../../components/LoadingTrack.vue\";\nimport { useAiChat } from \"@templatical/core/cloud\";\nimport {\n CLOUD_TRANSLATIONS_KEY,\n EDITOR_KEY,\n AUTH_MANAGER_KEY,\n MERGE_TAGS_KEY,\n requireInject,\n} from \"../../keys\";\nimport { useAliveFlag } from \"../../composables/useAliveFlag\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport {\n CircleAlert,\n LoaderCircle,\n Redo2,\n Send,\n Sparkles,\n Trash2,\n Undo2,\n X,\n} from \"@lucide/vue\";\nimport { inject, nextTick, ref, watch } from \"vue\";\nimport { useIntervalFn, useTimeoutFn } from \"@vueuse/core\";\n\nconst props = defineProps<{\n visible: boolean;\n onApply?: (content: TemplateContent) => void;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n}>();\n\nconst cloudTranslations = requireInject(\n CLOUD_TRANSLATIONS_KEY,\n \"AiChatSidebar\",\n);\nconst editor = requireInject(EDITOR_KEY, \"AiChatSidebar\");\nconst authManager = requireInject(AUTH_MANAGER_KEY, \"AiChatSidebar\");\nconst mergeTags = inject(MERGE_TAGS_KEY, []);\nconst aliveFlag = useAliveFlag();\n\nconst aiChat = useAiChat({\n authManager,\n getTemplateId: () => editor.state.template?.id ?? null,\n onApply: props.onApply,\n onError: undefined,\n});\n\nconst promptInput = ref(\"\");\nconst messagesContainer = ref<HTMLElement | null>(null);\nconst historyLoaded = ref(false);\nconst visibleSuggestionCount = ref(0);\n\nconst { pause: pauseReveal, resume: resumeReveal } = useIntervalFn(\n () => {\n const count = aiChat.suggestions.value?.length ?? 0;\n if (visibleSuggestionCount.value < count) {\n visibleSuggestionCount.value++;\n } else {\n pauseReveal();\n }\n },\n 150,\n { immediate: false },\n);\n\nconst { start: startRevealTimeout } = useTimeoutFn(() => resumeReveal(), 100, {\n immediate: false,\n});\n\nwatch(\n () => aiChat.suggestions.value?.length ?? 0,\n (count) => {\n pauseReveal();\n if (count === 0) {\n visibleSuggestionCount.value = 0;\n return;\n }\n\n visibleSuggestionCount.value = 0;\n startRevealTimeout();\n },\n);\n\nfunction scrollToBottom(): void {\n nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight;\n }\n });\n}\n\nwatch(\n () => aiChat.messages.value?.length ?? 0,\n () => scrollToBottom(),\n);\n\nwatch(\n () => props.visible,\n async (isVisible) => {\n if (isVisible && !historyLoaded.value) {\n historyLoaded.value = true;\n await aiChat.loadConversation();\n if (!aliveFlag.alive) return;\n\n if (\n (aiChat.messages.value?.length ?? 0) === 0 &&\n editor.content.value.blocks.length === 0\n ) {\n aiChat.loadSuggestions(editor.content.value, mergeTags);\n }\n }\n },\n);\n\nasync function handleSend(): Promise<void> {\n const prompt = promptInput.value.trim();\n if (!prompt || aiChat.isGenerating.value) {\n return;\n }\n\n promptInput.value = \"\";\n aiChat.error.value = null;\n aiChat.failedPrompt.value = null;\n scrollToBottom();\n\n await aiChat.sendPrompt(prompt, editor.content.value, mergeTags);\n if (!aliveFlag.alive) return;\n\n if (aiChat.failedPrompt.value) {\n promptInput.value = aiChat.failedPrompt.value;\n }\n\n scrollToBottom();\n}\n\nfunction stripJsonBlock(text: string): string {\n return text\n .replace(/```json[\\s\\S]*?```/g, \"\")\n .replace(/```json[\\s\\S]*/g, \"\")\n .trim();\n}\n\nfunction handleSuggestionClick(suggestion: string): void {\n pauseReveal();\n promptInput.value = suggestion;\n handleSend();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n}\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-ai-slide-enter-active\"\n enter-from-class=\"tpl:translate-x-full\"\n enter-to-class=\"tpl:translate-x-0\"\n leave-active-class=\"tpl-ai-slide-leave-active\"\n leave-from-class=\"tpl:translate-x-0\"\n leave-to-class=\"tpl:translate-x-full\"\n >\n <div\n v-if=\"visible\"\n class=\"tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]\"\n >\n <!-- Header -->\n <div\n class=\"tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <Sparkles :size=\"13\" :stroke-width=\"2\" />\n <span>\n {{ cloudTranslations.aiChat.title }}\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-1\">\n <button\n v-if=\"(aiChat.messages.value?.length ?? 0) > 0\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :title=\"cloudTranslations.aiChat.clear\"\n @click=\"aiChat.clearChat()\"\n >\n <Trash2 :size=\"14\" :stroke-width=\"2\" />\n </button>\n <button\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Messages wrapper -->\n <div class=\"tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col\">\n <!-- Messages -->\n <div\n ref=\"messagesContainer\"\n class=\"tpl:flex-1 tpl:overflow-y-auto tpl:p-4\"\n >\n <!-- Loading history state -->\n <div\n v-if=\"aiChat.isLoadingHistory.value\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n />\n <p class=\"tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudTranslations.aiChat.loadingHistory }}\n </p>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"(aiChat.messages.value?.length ?? 0) === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <Sparkles\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudTranslations.aiChat.placeholder }}\n </p>\n </div>\n\n <!-- Message list -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-4\">\n <div\n v-for=\"(message, index) in aiChat.messages.value\"\n :key=\"message.id\"\n class=\"tpl:flex tpl:flex-col tpl:gap-2\"\n >\n <!-- User message -->\n <div\n v-if=\"message.role === 'user'\"\n class=\"tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm\"\n style=\"\n background-color: var(--tpl-primary-light);\n color: var(--tpl-text);\n max-width: 85%;\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ message.content }}\n </div>\n\n <!-- Assistant message -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-2\">\n <LoadingTrack\n v-if=\"\n !stripJsonBlock(message.content) &&\n aiChat.isGenerating.value &&\n index === (aiChat.messages.value?.length ?? 0) - 1\n \"\n />\n <div\n v-else\n class=\"tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n max-width: 85%;\n background-color: var(--tpl-bg);\n color: var(--tpl-text);\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{\n stripJsonBlock(message.content) ||\n cloudTranslations.aiChat.applied\n }}\n </div>\n <button\n v-if=\"\n message.id === aiChat.lastApplyMessageId.value &&\n !aiChat.isGenerating.value\n \"\n class=\"tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all\"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-text-muted);\n background-color: transparent;\n \"\n @click=\"aiChat.toggleLastRevert()\"\n >\n <template v-if=\"aiChat.isLastChangeReverted.value\">\n <Redo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.reapply }}\n </template>\n <template v-else>\n <Undo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.revert }}\n </template>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Error message -->\n <div\n v-if=\"aiChat.error.value\"\n class=\"tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs\"\n style=\"\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n \"\n >\n <CircleAlert\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:mt-0.5 tpl:shrink-0\"\n />\n <span>{{\n aiChat.error.value === \"ai_apply_failed\"\n ? cloudTranslations.aiChat.applyFailed\n : cloudTranslations.aiChat.error\n }}</span>\n </div>\n\n <!-- Suggestions (overlay) -->\n <div\n v-if=\"(aiChat.suggestions.value?.length ?? 0) > 0\"\n class=\"tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3\"\n style=\"\n background-color: color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n );\n backdrop-filter: blur(2px);\n \"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-1.5\">\n <button\n v-for=\"(suggestion, index) in aiChat.suggestions.value ?? []\"\n :key=\"index\"\n class=\"tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out\"\n :class=\"\n (aiChat.suggestions.value?.length ?? 0) - 1 - index <\n visibleSuggestionCount\n ? 'tpl:translate-y-0 tpl:opacity-100'\n : 'tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0'\n \"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-primary);\n background-color: var(--tpl-bg);\n box-shadow: var(--tpl-shadow);\n \"\n @click=\"handleSuggestionClick(suggestion)\"\n >\n {{ suggestion }}\n </button>\n </div>\n </div>\n </div>\n\n <!-- Input area -->\n <div class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\">\n <div\n class=\"tpl-ai-input-wrapper tpl-focus-ring-host tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]\"\n >\n <textarea\n v-model=\"promptInput\"\n class=\"tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]\"\n :placeholder=\"cloudTranslations.aiChat.inputPlaceholder\"\n :disabled=\"aiChat.isGenerating.value\"\n rows=\"3\"\n @keydown=\"handleKeydown\"\n />\n <button\n class=\"tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]\"\n :disabled=\"!promptInput.trim() || aiChat.isGenerating.value\"\n @click=\"handleSend\"\n >\n <Send :size=\"16\" :stroke-width=\"2\" />\n </button>\n </div>\n\n <!-- AI disclaimer -->\n <p\n class=\"tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ cloudTranslations.aiMenu.disclaimer }}\n </p>\n </div>\n </div>\n </Transition>\n</template>\n\n<style scoped>\n.tpl-ai-slide-enter-active {\n transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-slide-leave-active {\n transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-ai-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-suggestion-btn:hover {\n border-color: var(--tpl-primary) !important;\n background-color: var(--tpl-primary-light) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport LoadingTrack from \"../../components/LoadingTrack.vue\";\nimport { useAiChat } from \"@templatical/core/cloud\";\nimport {\n CLOUD_TRANSLATIONS_KEY,\n EDITOR_KEY,\n AUTH_MANAGER_KEY,\n MERGE_TAGS_KEY,\n requireInject,\n} from \"../../keys\";\nimport { useAliveFlag } from \"../../composables/useAliveFlag\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport {\n CircleAlert,\n LoaderCircle,\n Redo2,\n Send,\n Sparkles,\n Trash2,\n Undo2,\n X,\n} from \"@lucide/vue\";\nimport { inject, nextTick, ref, watch } from \"vue\";\nimport { useIntervalFn, useTimeoutFn } from \"@vueuse/core\";\n\nconst props = defineProps<{\n visible: boolean;\n onApply?: (content: TemplateContent) => void;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n}>();\n\nconst cloudTranslations = requireInject(\n CLOUD_TRANSLATIONS_KEY,\n \"AiChatSidebar\",\n);\nconst editor = requireInject(EDITOR_KEY, \"AiChatSidebar\");\nconst authManager = requireInject(AUTH_MANAGER_KEY, \"AiChatSidebar\");\nconst mergeTags = inject(MERGE_TAGS_KEY, []);\nconst aliveFlag = useAliveFlag();\n\nconst aiChat = useAiChat({\n authManager,\n getTemplateId: () => editor.state.template?.id ?? null,\n onApply: props.onApply,\n onError: undefined,\n});\n\nconst promptInput = ref(\"\");\nconst messagesContainer = ref<HTMLElement | null>(null);\nconst historyLoaded = ref(false);\nconst visibleSuggestionCount = ref(0);\n\nconst { pause: pauseReveal, resume: resumeReveal } = useIntervalFn(\n () => {\n const count = aiChat.suggestions.value?.length ?? 0;\n if (visibleSuggestionCount.value < count) {\n visibleSuggestionCount.value++;\n } else {\n pauseReveal();\n }\n },\n 150,\n { immediate: false },\n);\n\nconst { start: startRevealTimeout } = useTimeoutFn(() => resumeReveal(), 100, {\n immediate: false,\n});\n\nwatch(\n () => aiChat.suggestions.value?.length ?? 0,\n (count) => {\n pauseReveal();\n if (count === 0) {\n visibleSuggestionCount.value = 0;\n return;\n }\n\n visibleSuggestionCount.value = 0;\n startRevealTimeout();\n },\n);\n\nfunction scrollToBottom(): void {\n nextTick(() => {\n if (messagesContainer.value) {\n messagesContainer.value.scrollTop = messagesContainer.value.scrollHeight;\n }\n });\n}\n\nwatch(\n () => aiChat.messages.value?.length ?? 0,\n () => scrollToBottom(),\n);\n\nwatch(\n () => props.visible,\n async (isVisible) => {\n if (isVisible && !historyLoaded.value) {\n historyLoaded.value = true;\n await aiChat.loadConversation();\n if (!aliveFlag.alive) return;\n\n if (\n (aiChat.messages.value?.length ?? 0) === 0 &&\n editor.content.value.blocks.length === 0\n ) {\n aiChat.loadSuggestions(editor.content.value, mergeTags);\n }\n }\n },\n);\n\nasync function handleSend(): Promise<void> {\n const prompt = promptInput.value.trim();\n if (!prompt || aiChat.isGenerating.value) {\n return;\n }\n\n promptInput.value = \"\";\n aiChat.error.value = null;\n aiChat.failedPrompt.value = null;\n scrollToBottom();\n\n await aiChat.sendPrompt(prompt, editor.content.value, mergeTags);\n if (!aliveFlag.alive) return;\n\n if (aiChat.failedPrompt.value) {\n promptInput.value = aiChat.failedPrompt.value;\n }\n\n scrollToBottom();\n}\n\nfunction stripJsonBlock(text: string): string {\n return text\n .replace(/```json[\\s\\S]*?```/g, \"\")\n .replace(/```json[\\s\\S]*/g, \"\")\n .trim();\n}\n\nfunction handleSuggestionClick(suggestion: string): void {\n pauseReveal();\n promptInput.value = suggestion;\n handleSend();\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n handleSend();\n }\n}\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl-ai-slide-enter-active\"\n enter-from-class=\"tpl:translate-x-full\"\n enter-to-class=\"tpl:translate-x-0\"\n leave-active-class=\"tpl-ai-slide-leave-active\"\n leave-from-class=\"tpl:translate-x-0\"\n leave-to-class=\"tpl:translate-x-full\"\n >\n <div\n v-if=\"visible\"\n class=\"tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]\"\n >\n <!-- Header -->\n <div\n class=\"tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]\"\n >\n <Sparkles :size=\"13\" :stroke-width=\"2\" />\n <span>\n {{ cloudTranslations.aiChat.title }}\n </span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-1\">\n <button\n v-if=\"(aiChat.messages.value?.length ?? 0) > 0\"\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n :title=\"cloudTranslations.aiChat.clear\"\n @click=\"aiChat.clearChat()\"\n >\n <Trash2 :size=\"14\" :stroke-width=\"2\" />\n </button>\n <button\n class=\"tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-muted)]\"\n @click=\"emit('close')\"\n >\n <X :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n </div>\n\n <!-- Messages wrapper -->\n <div class=\"tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col\">\n <!-- Messages -->\n <div\n ref=\"messagesContainer\"\n class=\"tpl:flex-1 tpl:overflow-y-auto tpl:p-4\"\n >\n <!-- Loading history state -->\n <div\n v-if=\"aiChat.isLoadingHistory.value\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <LoaderCircle\n class=\"tpl-spinner tpl:text-[var(--tpl-text-muted)]\"\n :size=\"24\"\n :stroke-width=\"2\"\n />\n <p class=\"tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudTranslations.aiChat.loadingHistory }}\n </p>\n </div>\n\n <!-- Empty state -->\n <div\n v-else-if=\"(aiChat.messages.value?.length ?? 0) === 0\"\n class=\"tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center\"\n >\n <Sparkles\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-text-dim)]\"\n />\n <p\n class=\"tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudTranslations.aiChat.placeholder }}\n </p>\n </div>\n\n <!-- Message list -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-4\">\n <div\n v-for=\"(message, index) in aiChat.messages.value\"\n :key=\"message.id\"\n class=\"tpl:flex tpl:flex-col tpl:gap-2\"\n >\n <!-- User message -->\n <div\n v-if=\"message.role === 'user'\"\n class=\"tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm\"\n style=\"\n background-color: var(--tpl-primary-light);\n color: var(--tpl-text);\n max-width: 85%;\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{ message.content }}\n </div>\n\n <!-- Assistant message -->\n <div v-else class=\"tpl:flex tpl:flex-col tpl:gap-2\">\n <LoadingTrack\n v-if=\"\n !stripJsonBlock(message.content) &&\n aiChat.isGenerating.value &&\n index === (aiChat.messages.value?.length ?? 0) - 1\n \"\n />\n <div\n v-else\n class=\"tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap\"\n style=\"\n max-width: 85%;\n background-color: var(--tpl-bg);\n color: var(--tpl-text);\n box-shadow: var(--tpl-shadow);\n \"\n >\n {{\n stripJsonBlock(message.content) ||\n cloudTranslations.aiChat.applied\n }}\n </div>\n <button\n v-if=\"\n message.id === aiChat.lastApplyMessageId.value &&\n !aiChat.isGenerating.value\n \"\n class=\"tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all\"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-text-muted);\n background-color: transparent;\n \"\n @click=\"aiChat.toggleLastRevert()\"\n >\n <template v-if=\"aiChat.isLastChangeReverted.value\">\n <Redo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.reapply }}\n </template>\n <template v-else>\n <Undo2 :size=\"12\" :stroke-width=\"2\" />\n {{ cloudTranslations.aiChat.revert }}\n </template>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Error message -->\n <div\n v-if=\"aiChat.error.value\"\n class=\"tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs\"\n style=\"\n background-color: var(--tpl-danger-light);\n color: var(--tpl-danger);\n \"\n >\n <CircleAlert\n :size=\"14\"\n :stroke-width=\"2\"\n class=\"tpl:mt-0.5 tpl:shrink-0\"\n />\n <span>{{\n aiChat.error.value === \"ai_apply_failed\"\n ? cloudTranslations.aiChat.applyFailed\n : cloudTranslations.aiChat.error\n }}</span>\n </div>\n\n <!-- Suggestions (overlay) -->\n <div\n v-if=\"(aiChat.suggestions.value?.length ?? 0) > 0\"\n class=\"tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3\"\n style=\"\n background-color: color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n );\n backdrop-filter: blur(2px);\n \"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-1.5\">\n <button\n v-for=\"(suggestion, index) in aiChat.suggestions.value ?? []\"\n :key=\"index\"\n class=\"tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out\"\n :class=\"\n (aiChat.suggestions.value?.length ?? 0) - 1 - index <\n visibleSuggestionCount\n ? 'tpl:translate-y-0 tpl:opacity-100'\n : 'tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0'\n \"\n style=\"\n border-color: var(--tpl-border);\n color: var(--tpl-primary);\n background-color: var(--tpl-bg);\n box-shadow: var(--tpl-shadow);\n \"\n @click=\"handleSuggestionClick(suggestion)\"\n >\n {{ suggestion }}\n </button>\n </div>\n </div>\n </div>\n\n <!-- Input area -->\n <div class=\"tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]\">\n <div\n class=\"tpl-ai-input-wrapper tpl-focus-ring-host tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]\"\n >\n <textarea\n v-model=\"promptInput\"\n class=\"tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]\"\n :placeholder=\"cloudTranslations.aiChat.inputPlaceholder\"\n :disabled=\"aiChat.isGenerating.value\"\n rows=\"3\"\n @keydown=\"handleKeydown\"\n />\n <button\n class=\"tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]\"\n :disabled=\"!promptInput.trim() || aiChat.isGenerating.value\"\n @click=\"handleSend\"\n >\n <Send :size=\"16\" :stroke-width=\"2\" />\n </button>\n </div>\n\n <!-- AI disclaimer -->\n <p\n class=\"tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ cloudTranslations.aiMenu.disclaimer }}\n </p>\n </div>\n </div>\n </Transition>\n</template>\n\n<style scoped>\n.tpl-ai-slide-enter-active {\n transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-slide-leave-active {\n transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n.tpl-ai-input-wrapper:focus-within {\n border-color: var(--tpl-primary);\n box-shadow: var(--tpl-ring);\n}\n\n.tpl-ai-send-btn:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.tpl-suggestion-btn:hover {\n border-color: var(--tpl-primary) !important;\n background-color: var(--tpl-primary-light) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,IAAM,IAAQ,GAKR,KAAO,GAIP,IA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AA,EAAA,GAAA;KAA9B,MAAM;KAAK,gBAAc;IAKpC,CAAA,CAAA,GAAA,GAAA,EAAA,CAAA,CAAA,GAAA,EAII,KAJJ,IAII,EADC,EAAA,CAAA,CAAiB,CAAC,OAAO,UAAU,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudPanels-CpzYrAPQ.js","names":[],"sources":["../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CollabUndoToast.vue","../../../src/cloud/components/CollabUndoToast.vue","../../../src/cloud/components/CloudPanels.vue","../../../src/cloud/components/CloudPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n class=\"tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n class=\"tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-on-primary)]\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{\n visible: boolean;\n}>();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{\n visible: boolean;\n}>();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl:transition-opacity\"\n leave-active-class=\"tpl:transition-opacity\"\n enter-from-class=\"tpl:opacity-0\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <div\n v-if=\"open\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"cloudT.saveGate.title\"\n class=\"tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6\"\n @click.self=\"emit('cancel')\"\n >\n <div\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)]\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </div>\n </Transition>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <Transition\n enter-active-class=\"tpl:transition-opacity\"\n leave-active-class=\"tpl:transition-opacity\"\n enter-from-class=\"tpl:opacity-0\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <div\n v-if=\"open\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"cloudT.saveGate.title\"\n class=\"tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6\"\n @click.self=\"emit('cancel')\"\n >\n <div\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n class=\"tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)]\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </div>\n </Transition>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:absolute tpl:top-16 tpl:left-1/2 tpl:z-toast tpl:-translate-x-1/2 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"\n background-color: var(--tpl-warning-light);\n color: var(--tpl-text);\n border: 1px solid var(--tpl-warning);\n \"\n >\n {{ t.history.collabWarning }}\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:absolute tpl:top-16 tpl:left-1/2 tpl:z-toast tpl:-translate-x-1/2 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"\n background-color: var(--tpl-warning-light);\n color: var(--tpl-text);\n border: 1px solid var(--tpl-warning);\n \"\n >\n {{ t.history.collabWarning }}\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\nimport CollabUndoToast from \"./CollabUndoToast.vue\";\n\nconst AiChatSidebar = defineAsyncComponent(() => import(\"./AiChatSidebar.vue\"));\nconst DesignReferenceSidebar = defineAsyncComponent(\n () => import(\"./DesignReferenceSidebar.vue\"),\n);\nconst TemplateScoringPanel = defineAsyncComponent(\n () => import(\"./TemplateScoringPanel.vue\"),\n);\nconst MediaLibraryModal = defineAsyncComponent(async () => {\n // try/catch downgrades Webpack's \"Module not found\" from error to warning\n // when the optional peer isn't installed. Cloud consumers always install it.\n try {\n const m = await import(\"@templatical/media-library\");\n return m.MediaLibraryModal;\n } catch {\n throw new Error(\n \"[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.\",\n );\n }\n});\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n /**\n * The editor's `init({ locale })`, forwarded to `MediaLibraryModal` so\n * `@templatical/media-library` loads its own strings in the same language.\n * A locale rather than translations: that package owns its copy, and the\n * editor's own chunk carries none of it.\n */\n locale?: string;\n}>();\n\nfunction applyContent(content: TemplateContent): void {\n props.core.history.record();\n props.editor.setContent(content);\n props.core.conditionPreview.reset();\n}\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-200 tpl:ease-out\"\n enter-from-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n enter-to-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-300 tpl:ease-in\"\n leave-from-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-to-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n >\n <CollabUndoToast\n :visible=\"ready.collabWarning.collabUndoWarningVisible.value\"\n />\n </Transition>\n\n <AiChatSidebar\n :visible=\"cloud.panelState.aiChatOpen.value\"\n :on-apply=\"applyContent\"\n @close=\"cloud.panelState.aiChatOpen.value = false\"\n />\n\n <TemplateScoringPanel\n :visible=\"cloud.panelState.scoringPanelOpen.value\"\n @close=\"cloud.panelState.scoringPanelOpen.value = false\"\n />\n\n <DesignReferenceSidebar\n :visible=\"cloud.panelState.designReferenceOpen.value\"\n :has-existing-blocks=\"editor.content.value.blocks.length > 0\"\n @close=\"cloud.panelState.designReferenceOpen.value = false\"\n @apply=\"applyContent\"\n />\n\n <!-- `auth-manager` / `project-id` / `plan-config` are props, not injections.\n An injection would have to match the modal's key identity; a mismatch\n arrives as `undefined` with no error and the browser opens inert. -->\n <MediaLibraryModal\n :visible=\"cloud.panelState.mediaLibraryOpen.value\"\n :accept=\"cloud.panelState.mediaLibraryAccept.value\"\n :popover-target=\"core.popoverRoot.value\"\n :locale=\"locale\"\n :ui-theme=\"core.resolvedTheme.value\"\n :auth-manager=\"cloud.mediaBrowser.authManager\"\n :project-id=\"cloud.mediaBrowser.projectId\"\n :plan-config=\"cloud.mediaBrowser.planConfig\"\n @select=\"cloud.mediaLib.handleMediaSelect\"\n @close=\"cloud.mediaLib.handleMediaLibraryClose\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { defineAsyncComponent } from \"vue\";\nimport type { TemplateContent } from \"@templatical/types\";\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\nimport CollabUndoToast from \"./CollabUndoToast.vue\";\n\nconst AiChatSidebar = defineAsyncComponent(() => import(\"./AiChatSidebar.vue\"));\nconst DesignReferenceSidebar = defineAsyncComponent(\n () => import(\"./DesignReferenceSidebar.vue\"),\n);\nconst TemplateScoringPanel = defineAsyncComponent(\n () => import(\"./TemplateScoringPanel.vue\"),\n);\nconst MediaLibraryModal = defineAsyncComponent(async () => {\n // try/catch downgrades Webpack's \"Module not found\" from error to warning\n // when the optional peer isn't installed. Cloud consumers always install it.\n try {\n const m = await import(\"@templatical/media-library\");\n return m.MediaLibraryModal;\n } catch {\n throw new Error(\n \"[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.\",\n );\n }\n});\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n */\nconst props = defineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n /**\n * The editor's `init({ locale })`, forwarded to `MediaLibraryModal` so\n * `@templatical/media-library` loads its own strings in the same language.\n * A locale rather than translations: that package owns its copy, and the\n * editor's own chunk carries none of it.\n */\n locale?: string;\n}>();\n\nfunction applyContent(content: TemplateContent): void {\n props.core.history.record();\n props.editor.setContent(content);\n props.core.conditionPreview.reset();\n}\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n\n <Transition\n enter-active-class=\"tpl:transition-all tpl:duration-200 tpl:ease-out\"\n enter-from-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n enter-to-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-active-class=\"tpl:transition-all tpl:duration-300 tpl:ease-in\"\n leave-from-class=\"tpl:translate-y-0 tpl:opacity-100\"\n leave-to-class=\"tpl:translate-y-[-8px] tpl:opacity-0\"\n >\n <CollabUndoToast\n :visible=\"ready.collabWarning.collabUndoWarningVisible.value\"\n />\n </Transition>\n\n <AiChatSidebar\n :visible=\"cloud.panelState.aiChatOpen.value\"\n :on-apply=\"applyContent\"\n @close=\"cloud.panelState.aiChatOpen.value = false\"\n />\n\n <TemplateScoringPanel\n :visible=\"cloud.panelState.scoringPanelOpen.value\"\n @close=\"cloud.panelState.scoringPanelOpen.value = false\"\n />\n\n <DesignReferenceSidebar\n :visible=\"cloud.panelState.designReferenceOpen.value\"\n :has-existing-blocks=\"editor.content.value.blocks.length > 0\"\n @close=\"cloud.panelState.designReferenceOpen.value = false\"\n @apply=\"applyContent\"\n />\n\n <!-- `auth-manager` / `project-id` / `plan-config` are props, not injections.\n An injection would have to match the modal's key identity; a mismatch\n arrives as `undefined` with no error and the browser opens inert. -->\n <MediaLibraryModal\n :visible=\"cloud.panelState.mediaLibraryOpen.value\"\n :accept=\"cloud.panelState.mediaLibraryAccept.value\"\n :popover-target=\"core.popoverRoot.value\"\n :locale=\"locale\"\n :ui-theme=\"core.resolvedTheme.value\"\n :auth-manager=\"cloud.mediaBrowser.authManager\"\n :project-id=\"cloud.mediaBrowser.projectId\"\n :plan-config=\"cloud.mediaBrowser.planConfig\"\n @select=\"cloud.mediaLib.handleMediaSelect\"\n @close=\"cloud.mediaLib.handleMediaLibraryClose\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EASA,IAAM,IAAO,GAIP,EAAE,GAAG,MAAW,EAAmB;EAEzC,SAAS,EAAgB,GAAsB;GAU7C,OARE,oBAAoB,KACnB,EAAsC,iBAEhC,EAAO,MAAM,aAElB,gBAAgB,KAAU,EAAkC,aACvD,EAAO,MAAM,mBAEf,EAAO,MAAM;EACtB;EAEA,SAAS,EAAgB,GAAuB;GAC9C,OACE,gBAAgB,KAAS,CAAC,CAAE,EAAkC;EAElE;mBAKU,EAAA,WAAW,EAAA,SADnB,EAAA,GAAA,EA+BM,OA/BN,GA+BM;GA1BJ,EAQM,OARN,GAQM,CALJ,EAIE,EAAA,CAAA,GAAA;IAHC,MA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