@templatical/editor 0.10.4 → 0.11.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-Djjqrmoh.js → AiChatSidebar-Cm5RM5Qh.js} +8 -8
- package/dist/{AiFeatureMenu-DR56EYbL.js → AiFeatureMenu-D4D2Sqfk.js} +6 -6
- package/dist/{BlockIssueBadge-ySMhwDRR.js → BlockIssueBadge-BF4sdsr4.js} +4 -4
- package/dist/{CloudEditor-BLlRKq5D.js → CloudEditor-CLwyq3kf.js} +18 -17
- package/dist/{CollaboratorBar-BlXmZrIj.js → CollaboratorBar-DjX-o5Pi.js} +3 -3
- package/dist/{CommentsSidebar-XcYtqAn8.js → CommentsSidebar-BQJzyCc6.js} +11 -11
- package/dist/{CountdownBlock-sAAv3BHE.js → CountdownBlock-D_AsF4F3.js} +1 -1
- package/dist/{CountdownToolbar-CUvqPILZ.js → CountdownToolbar-BGTkFky9.js} +2 -2
- package/dist/{DesignReferenceSidebar-B0Upq2MY.js → DesignReferenceSidebar-O3epZMXD.js} +6 -6
- package/dist/{IssuesPanel-BvcqQ0ec.js → IssuesPanel-CPBbR8yp.js} +7 -7
- package/dist/{ModuleBrowserModal-BdOB1Lbt.js → ModuleBrowserModal-CVS4Sf7H.js} +9 -9
- package/dist/{ModulePreviewCanvas-BeglLfBF.js → ModulePreviewCanvas-C10YXsL_.js} +2 -2
- package/dist/{NumberWithSuffix-Cb7HI_yW.js → NumberWithSuffix-eI9pPDWT.js} +1 -1
- package/dist/{ParagraphEditor-4Wrd3nnB.js → ParagraphEditor-BKoqcKIt.js} +22 -22
- package/dist/{RichTextEditorContent-D-uKzBDa.js → RichTextEditorContent-Dvn4woIt.js} +6 -6
- package/dist/{SaveModuleDialog-ueFhCVWN.js → SaveModuleDialog-BMuIjxVn.js} +6 -6
- package/dist/{SnapshotHistory-DNuw_gCY.js → SnapshotHistory-DZ5_W7e4.js} +7 -7
- package/dist/{TemplateScoringPanel-bkIhEokb.js → TemplateScoringPanel-Bt5Rsgen.js} +12 -12
- package/dist/{TestEmailModal-Tg30-itu.js → TestEmailModal-EjpH-F-W.js} +4 -4
- package/dist/{TitleEditor-CY8QWbEw.js → TitleEditor-Rv1deuV7.js} +12 -12
- package/dist/{TplModal-D338Vv9U.js → TplModal-DSmCQIm4.js} +3 -3
- package/dist/{blockTypeIcons-CYoPwoH9.js → blockTypeIcons-OhEkQhYj.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-DRWRoPdh.js → AiFeatureMenu-Dm9CL3u0.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-DRWRoPdh.js.map → AiFeatureMenu-Dm9CL3u0.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D2ApLp61.js → BlockIssueBadge-DjnFAeWq.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D2ApLp61.js.map → BlockIssueBadge-DjnFAeWq.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-gvOOuXac.js → CloudEditor-XSmLmdgp.js} +157 -156
- package/dist/cdn/chunks/CloudEditor-XSmLmdgp.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BZK3R383.js → CollaboratorBar-BfoGJhns.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BZK3R383.js.map → CollaboratorBar-BfoGJhns.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DU5YmjFP.js → CountdownBlock-GRio55a1.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-DU5YmjFP.js.map → CountdownBlock-GRio55a1.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C1nlFm4e.js → CountdownToolbar-Cd1oEopw.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-C1nlFm4e.js.map → CountdownToolbar-Cd1oEopw.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-R3M60NTk.js → IssuesPanel-C-BiFQDQ.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-R3M60NTk.js.map → IssuesPanel-C-BiFQDQ.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DMithQu8.js → ModuleBrowserModal-Dj7gRT4Q.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-DMithQu8.js.map → ModuleBrowserModal-Dj7gRT4Q.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-BNKbV_c2.js → ModulePreviewCanvas-hwdveKb0.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-BNKbV_c2.js.map → ModulePreviewCanvas-hwdveKb0.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-C5zNn3Oc.js → NumberWithSuffix-bE_6cfiA.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-C5zNn3Oc.js.map → NumberWithSuffix-bE_6cfiA.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-H136qVNI.js → ParagraphEditor-y1kGJRBX.js} +48 -48
- package/dist/cdn/chunks/{ParagraphEditor-H136qVNI.js.map → ParagraphEditor-y1kGJRBX.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BxW6vSck.js → RichTextEditorContent-DPy9D4hc.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-BxW6vSck.js.map → RichTextEditorContent-DPy9D4hc.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BaiynUWb.js → SaveModuleDialog-CPu5e2VG.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-BaiynUWb.js.map → SaveModuleDialog-CPu5e2VG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BBsR46vE.js → TitleEditor-CMzzOPye.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-BBsR46vE.js.map → TitleEditor-CMzzOPye.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CX05RINM.js → blockTypeIcons-BC5qpvuV.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-CX05RINM.js.map → blockTypeIcons-BC5qpvuV.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-2LuW8PHB.js → extensions-DH7ESsaz.js} +22 -22
- package/dist/cdn/chunks/{extensions-2LuW8PHB.js.map → extensions-DH7ESsaz.js.map} +1 -1
- package/dist/cdn/chunks/{features-CxHQG9xr.js → features-DmUOSthI.js} +647 -678
- package/dist/cdn/chunks/features-DmUOSthI.js.map +1 -0
- package/dist/cdn/chunks/{icons-DrsFvnNP.js → icons-DguD4x_X.js} +2 -2
- package/dist/cdn/chunks/{icons-DrsFvnNP.js.map → icons-DguD4x_X.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CDXkfBa7.js → media-library-ClQUPxRM.js} +71 -71
- package/dist/cdn/chunks/{media-library-CDXkfBa7.js.map → media-library-ClQUPxRM.js.map} +1 -1
- package/dist/cdn/chunks/{quality-HR87TCZc.js → quality-CIw_7cXv.js} +479 -479
- package/dist/cdn/chunks/{quality-HR87TCZc.js.map → quality-CIw_7cXv.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Dh5WdraW.js → renderer-Bx8I7_Rb.js} +19 -19
- package/dist/cdn/chunks/{renderer-Dh5WdraW.js.map → renderer-Bx8I7_Rb.js.map} +1 -1
- package/dist/cdn/chunks/{src-fyYLC_tY.js → src-C-GlM149.js} +4 -4
- package/dist/cdn/chunks/{src-fyYLC_tY.js.map → src-C-GlM149.js.map} +1 -1
- package/dist/cdn/chunks/{styles-NhU45rEI.js → styles-CfqCvq0Z.js} +666 -635
- package/dist/cdn/chunks/styles-CfqCvq0Z.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CfnwT9a8.js → tiptap-BAwu9VcJ.js} +4454 -3328
- package/dist/cdn/chunks/tiptap-BAwu9VcJ.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +11 -10
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B4oiQEsJ.js → check-BsNM6BDs.js} +1 -1
- package/dist/{chevron-down-BrL7CDST.js → chevron-down-fcsZ5DU7.js} +1 -1
- package/dist/{circle-alert-Ddf06I0D.js → circle-alert-BZTbwc-B.js} +1 -1
- package/dist/{clock-CbIkIHL5.js → clock-B7iQRubC.js} +1 -1
- package/dist/{createLucideIcon-Bn5l6hkC.js → createLucideIcon-C_fetdGM.js} +2 -2
- package/dist/{dist-BRvZBY6r.js → dist-B4NkMBYc.js} +2 -2
- package/dist/{dist-DDB4TfTY.js → dist-BLcYl_de.js} +2 -2
- package/dist/{dist-DS9NXb20.js → dist-BOHAk4zI.js} +2 -2
- package/dist/dist-BsB4nPJD.js +5 -0
- package/dist/{dist-B6B8IO1W.js → dist-ByBVNmRN.js} +2 -2
- package/dist/dist-CD3wbUoR.js +5 -0
- package/dist/{dist-DbGsZrPu.js → dist-Cwl7XXr4.js} +806 -601
- package/dist/{dist-BShwEwPy.js → dist-Dem8ODLh.js} +1512 -1501
- package/dist/{dist-BdIM5Jt8.js → dist-Dhs3W2WW.js} +2 -2
- package/dist/{dist-ZiEahccA.js → dist-XdF11ZkX.js} +2 -2
- package/dist/{dist-BhZo8-eC.js → dist-c2sj5PQ5.js} +2 -2
- package/dist/{dist-Ctv43HTN.js → dist-eVlXvuKI.js} +3 -3
- package/dist/extensions-B2lSGCA8.js +1720 -0
- package/dist/{image-up-D3KvvHLf.js → image-up-1xrPPJYH.js} +1 -1
- package/dist/index.d.ts +29 -0
- package/dist/{info-RwcI2EUD.js → info-ByAFxArD.js} +1 -1
- package/dist/keys-DsRdOmg3.js +10 -0
- package/dist/{list-checks-ruqK9lCo.js → list-checks-CKUP4UZU.js} +1 -1
- package/dist/{loader-circle-D4SXJ8eQ.js → loader-circle-BuxX338d.js} +1 -1
- package/dist/{message-circle-p9UiFyS7.js → message-circle-nLwqegRi.js} +1 -1
- package/dist/{refresh-cw-C8HbO4hg.js → refresh-cw-DAkD6iDI.js} +1 -1
- package/dist/{scan-line-CmPIMm63.js → scan-line-DEELRJJ5.js} +1 -1
- package/dist/{send-DacXlri3.js → send-DCMgrNT4.js} +1 -1
- package/dist/{shield-check-BdrHnTnJ.js → shield-check-BFtVr_ov.js} +1 -1
- package/dist/{sparkles-tT7wcus5.js → sparkles-CeYIQ5RJ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BmZWc8sc.js → styles-D_ztiOsh.js} +768 -737
- package/dist/templatical-editor.js +6 -5
- package/dist/{text-align-start-DaSSBZVi.js → text-align-start-BsmIoqLS.js} +1 -1
- package/dist/{trash-2-B0uIJOwX.js → trash-2-C2S4-CIH.js} +1 -1
- package/dist/{triangle-alert-FLQWRf-c.js → triangle-alert-DMdedF6W.js} +1 -1
- package/dist/{useCloudI18n-Lh0xWlQ4.js → useCloudI18n-BEuiZdzs.js} +1 -1
- package/dist/{useEditorCore-CMukR8kX.js → useEditorCore-tZGAVvNz.js} +649 -680
- package/dist/{useI18n-CNEz8RK7.js → useI18n-DNspT6uw.js} +1 -1
- package/dist/{useMergeTag-C54tabTK.js → useMergeTag-abutjUud.js} +1 -1
- package/dist/{usePopoverRoot-dvg2XFmj.js → usePopoverRoot-DG3mlvd1.js} +1 -1
- package/dist/{x-BROzFhGs.js → x-_9jw816B.js} +1 -1
- package/package.json +24 -24
- package/dist/cdn/chunks/CloudEditor-gvOOuXac.js.map +0 -1
- package/dist/cdn/chunks/features-CxHQG9xr.js.map +0 -1
- package/dist/cdn/chunks/styles-NhU45rEI.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CfnwT9a8.js.map +0 -1
- package/dist/dist-BVKpiz3S.js +0 -5
- package/dist/dist-BzeOnbU8.js +0 -5
- package/dist/extensions-CqrSpX_i.js +0 -806
- package/dist/keys-DSm2p8zn.js +0 -10
|
@@ -1408,7 +1408,7 @@ function Pn() {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
//#endregion
|
|
1410
1410
|
//#region src/keys.ts
|
|
1411
|
-
var Fn = Symbol("translations"), In = Symbol("editor"), Ln = Symbol("history"), Rn = Symbol("blockActions"), zn = Symbol("conditionPreview"), Bn = Symbol("fontsManager"), Vn = Symbol("themeStyles"), Hn = Symbol("tplUiTheme"), Un = Symbol("blockDefaults"), Wn = Symbol("blockRegistry"), Gn = Symbol("customBlockDefinitions"), Kn = Symbol("
|
|
1411
|
+
var Fn = Symbol("translations"), In = Symbol("editor"), Ln = Symbol("history"), Rn = Symbol("blockActions"), zn = Symbol("conditionPreview"), Bn = Symbol("fontsManager"), Vn = Symbol("themeStyles"), Hn = Symbol("tplUiTheme"), Un = Symbol("blockDefaults"), Wn = Symbol("blockRegistry"), Gn = Symbol("customBlockDefinitions"), Kn = Symbol("paletteBlocks"), qn = Symbol("customBlockStylesheets"), Jn = Symbol("mergeTags"), Yn = Symbol("mergeTagSyntax"), Xn = Symbol("onRequestMergeTag"), Zn = Symbol("mergeTagAutocomplete"), Qn = Symbol("mergeTagPicker"), $n = Symbol("onRequestMedia"), er = Symbol("displayConditions"), tr = Symbol("allowCustomConditions"), nr = Symbol("capabilities"), rr = Symbol("keyboardReorder"), ir = Symbol("templateLint"), ar = Symbol("editorRoot"), or = Symbol("popoverRoot"), sr = Symbol("authManager"), cr = Symbol("aiConfig"), lr = Symbol("comments"), ur = Symbol("savedModulesHeadless"), dr = Symbol("scoring"), fr = Symbol("cloudTranslations");
|
|
1412
1412
|
function J(e, t) {
|
|
1413
1413
|
let n = v(e, null);
|
|
1414
1414
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
@@ -1416,7 +1416,7 @@ function J(e, t) {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
//#endregion
|
|
1418
1418
|
//#region src/composables/useMergeTagPicker.ts
|
|
1419
|
-
function
|
|
1419
|
+
function pr() {
|
|
1420
1420
|
let e = C(!1), t = C([]), n = null;
|
|
1421
1421
|
function r(r) {
|
|
1422
1422
|
if (n) {
|
|
@@ -1446,15 +1446,15 @@ function fr() {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
//#endregion
|
|
1448
1448
|
//#region src/composables/useTemplateLint.ts
|
|
1449
|
-
function
|
|
1449
|
+
function mr(e) {
|
|
1450
1450
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1453
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1452
|
+
function hr(e) {
|
|
1453
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = mr(e.options), s = null, c = !1;
|
|
1454
1454
|
o || l();
|
|
1455
1455
|
async function l() {
|
|
1456
1456
|
try {
|
|
1457
|
-
let t = await import("./quality-
|
|
1457
|
+
let t = await import("./quality-CIw_7cXv.js").then((e) => e.t);
|
|
1458
1458
|
if (c) return;
|
|
1459
1459
|
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = ln(e.content, u, {
|
|
1460
1460
|
debounce: e.debounce ?? 500,
|
|
@@ -1505,12 +1505,12 @@ function Y(e) {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
//#endregion
|
|
1507
1507
|
//#region src/utils/blockTypeLabels.ts
|
|
1508
|
-
function
|
|
1508
|
+
function gr(e, t) {
|
|
1509
1509
|
return t.blocks[e] ?? e;
|
|
1510
1510
|
}
|
|
1511
1511
|
//#endregion
|
|
1512
1512
|
//#region src/composables/useKeyboardReorder.ts
|
|
1513
|
-
function
|
|
1513
|
+
function _r(e, t) {
|
|
1514
1514
|
let n = C(null), r = C(""), i = null;
|
|
1515
1515
|
function a(t) {
|
|
1516
1516
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1537,7 +1537,7 @@ function gr(e, t) {
|
|
|
1537
1537
|
let r = a(n);
|
|
1538
1538
|
if (!r) return "";
|
|
1539
1539
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1540
|
-
return i ?
|
|
1540
|
+
return i ? gr(i.type, t.t) : "";
|
|
1541
1541
|
}
|
|
1542
1542
|
function s(t, n) {
|
|
1543
1543
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1606,13 +1606,13 @@ function gr(e, t) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
//#endregion
|
|
1608
1608
|
//#region src/composables/useUiTheme.ts
|
|
1609
|
-
function
|
|
1609
|
+
function vr(e) {
|
|
1610
1610
|
let t = xn("(prefers-color-scheme: dark)");
|
|
1611
1611
|
return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1612
1612
|
}
|
|
1613
1613
|
//#endregion
|
|
1614
1614
|
//#region src/composables/useThemeStyles.ts
|
|
1615
|
-
var
|
|
1615
|
+
var yr = {
|
|
1616
1616
|
bg: "--tpl-bg",
|
|
1617
1617
|
bgElevated: "--tpl-bg-elevated",
|
|
1618
1618
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1636,10 +1636,10 @@ var vr = {
|
|
|
1636
1636
|
dangerLight: "--tpl-danger-light",
|
|
1637
1637
|
canvasBg: "--tpl-canvas-bg"
|
|
1638
1638
|
};
|
|
1639
|
-
function
|
|
1639
|
+
function br({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1640
1640
|
return { themeStyles: O(() => {
|
|
1641
1641
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1642
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1642
|
+
if (a) for (let [e, t] of Object.entries(yr)) {
|
|
1643
1643
|
let n = a[e];
|
|
1644
1644
|
n && (r[t] = n);
|
|
1645
1645
|
}
|
|
@@ -1648,27 +1648,27 @@ function yr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
//#endregion
|
|
1650
1650
|
//#region src/utils/logger.ts
|
|
1651
|
-
var
|
|
1652
|
-
function
|
|
1651
|
+
var xr = "[Templatical]";
|
|
1652
|
+
function Sr() {
|
|
1653
1653
|
return typeof process < "u" && !0;
|
|
1654
1654
|
}
|
|
1655
|
-
var
|
|
1655
|
+
var Cr = {
|
|
1656
1656
|
warn(...e) {
|
|
1657
|
-
console.warn(
|
|
1657
|
+
console.warn(xr, ...e);
|
|
1658
1658
|
},
|
|
1659
1659
|
error(...e) {
|
|
1660
|
-
console.error(
|
|
1660
|
+
console.error(xr, ...e);
|
|
1661
1661
|
},
|
|
1662
1662
|
debug(...e) {
|
|
1663
|
-
|
|
1663
|
+
Sr() || console.debug(xr, ...e);
|
|
1664
1664
|
},
|
|
1665
1665
|
info(...e) {
|
|
1666
|
-
|
|
1666
|
+
Sr() || console.info(xr, ...e);
|
|
1667
1667
|
}
|
|
1668
1668
|
};
|
|
1669
1669
|
//#endregion
|
|
1670
1670
|
//#region src/composables/useBlockRegistry.ts
|
|
1671
|
-
function
|
|
1671
|
+
function wr() {
|
|
1672
1672
|
let e = n(/* @__PURE__ */ new Map());
|
|
1673
1673
|
function t(t, n) {
|
|
1674
1674
|
e.value.set(t, n), oe(e);
|
|
@@ -1678,13 +1678,6 @@ function Cr() {
|
|
|
1678
1678
|
e.value.set(r, {
|
|
1679
1679
|
component: n,
|
|
1680
1680
|
createBlock: () => ot(t),
|
|
1681
|
-
sidebarItem: {
|
|
1682
|
-
type: r,
|
|
1683
|
-
label: t.name,
|
|
1684
|
-
icon: t.icon,
|
|
1685
|
-
description: t.description,
|
|
1686
|
-
isCustom: !0
|
|
1687
|
-
},
|
|
1688
1681
|
definition: t
|
|
1689
1682
|
}), oe(e);
|
|
1690
1683
|
}
|
|
@@ -1698,21 +1691,16 @@ function Cr() {
|
|
|
1698
1691
|
function a(t) {
|
|
1699
1692
|
return e.value.get(t)?.createBlock();
|
|
1700
1693
|
}
|
|
1701
|
-
function o() {
|
|
1702
|
-
let t = [], n = [];
|
|
1703
|
-
for (let r of e.value.values()) r.sidebarItem.isCustom ? n.push(r.sidebarItem) : t.push(r.sidebarItem);
|
|
1704
|
-
return [...t, ...n];
|
|
1705
|
-
}
|
|
1706
|
-
function s(t) {
|
|
1694
|
+
function o(t) {
|
|
1707
1695
|
let n = `custom:${t}`;
|
|
1708
1696
|
return e.value.get(n)?.definition;
|
|
1709
1697
|
}
|
|
1710
|
-
function
|
|
1698
|
+
function s(e) {
|
|
1711
1699
|
return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
|
|
1712
1700
|
}
|
|
1713
|
-
async function
|
|
1714
|
-
let t =
|
|
1715
|
-
if (!t) return
|
|
1701
|
+
async function c(e) {
|
|
1702
|
+
let t = o(e.customType);
|
|
1703
|
+
if (!t) return s("Block definition not found");
|
|
1716
1704
|
try {
|
|
1717
1705
|
let { Liquid: n } = await import("./liquid.browser-DUDc3U21.js");
|
|
1718
1706
|
return await new n({
|
|
@@ -1720,10 +1708,10 @@ function Cr() {
|
|
|
1720
1708
|
strictFilters: !1
|
|
1721
1709
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1722
1710
|
} catch (t) {
|
|
1723
|
-
return
|
|
1711
|
+
return Cr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
1724
1712
|
}
|
|
1725
1713
|
}
|
|
1726
|
-
function
|
|
1714
|
+
function l(t) {
|
|
1727
1715
|
return e.value.has(t);
|
|
1728
1716
|
}
|
|
1729
1717
|
return {
|
|
@@ -1731,17 +1719,16 @@ function Cr() {
|
|
|
1731
1719
|
registerCustom: r,
|
|
1732
1720
|
getComponent: i,
|
|
1733
1721
|
createBlock: a,
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
isRegistered: u
|
|
1722
|
+
getDefinition: o,
|
|
1723
|
+
renderCustomBlock: c,
|
|
1724
|
+
isRegistered: l
|
|
1738
1725
|
};
|
|
1739
1726
|
}
|
|
1740
1727
|
//#endregion
|
|
1741
1728
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1742
|
-
function
|
|
1729
|
+
function Tr(e, t) {
|
|
1743
1730
|
return O(() => {
|
|
1744
|
-
let n =
|
|
1731
|
+
let n = Er(e.value.blocks);
|
|
1745
1732
|
if (n.size === 0) return [];
|
|
1746
1733
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1747
1734
|
for (let e of n) {
|
|
@@ -1753,11 +1740,11 @@ function wr(e, t) {
|
|
|
1753
1740
|
return i;
|
|
1754
1741
|
});
|
|
1755
1742
|
}
|
|
1756
|
-
function
|
|
1743
|
+
function Er(e) {
|
|
1757
1744
|
let t = /* @__PURE__ */ new Set();
|
|
1758
|
-
return
|
|
1745
|
+
return Dr(e, t), t;
|
|
1759
1746
|
}
|
|
1760
|
-
function
|
|
1747
|
+
function Dr(e, t) {
|
|
1761
1748
|
for (let n of e) {
|
|
1762
1749
|
if (Ee(n)) {
|
|
1763
1750
|
t.add(n.customType);
|
|
@@ -1766,96 +1753,78 @@ function Er(e, t) {
|
|
|
1766
1753
|
if (n.type === "section") {
|
|
1767
1754
|
let e = n.children;
|
|
1768
1755
|
if (!e) continue;
|
|
1769
|
-
for (let n of e)
|
|
1756
|
+
for (let n of e) Dr(n, t);
|
|
1770
1757
|
}
|
|
1771
1758
|
}
|
|
1772
1759
|
}
|
|
1773
1760
|
//#endregion
|
|
1774
1761
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1775
|
-
var
|
|
1762
|
+
var Or = [
|
|
1776
1763
|
{
|
|
1777
1764
|
type: "section",
|
|
1778
|
-
label: "Section",
|
|
1779
1765
|
createBlock: Xe
|
|
1780
1766
|
},
|
|
1781
1767
|
{
|
|
1782
1768
|
type: "title",
|
|
1783
|
-
label: "Title",
|
|
1784
1769
|
createBlock: Ge
|
|
1785
1770
|
},
|
|
1786
1771
|
{
|
|
1787
1772
|
type: "paragraph",
|
|
1788
|
-
label: "Paragraph",
|
|
1789
1773
|
createBlock: Ke
|
|
1790
1774
|
},
|
|
1791
1775
|
{
|
|
1792
1776
|
type: "image",
|
|
1793
|
-
label: "Image",
|
|
1794
1777
|
createBlock: qe
|
|
1795
1778
|
},
|
|
1796
1779
|
{
|
|
1797
1780
|
type: "button",
|
|
1798
|
-
label: "Button",
|
|
1799
1781
|
createBlock: Je
|
|
1800
1782
|
},
|
|
1801
1783
|
{
|
|
1802
1784
|
type: "divider",
|
|
1803
|
-
label: "Divider",
|
|
1804
1785
|
createBlock: Ye
|
|
1805
1786
|
},
|
|
1806
1787
|
{
|
|
1807
1788
|
type: "video",
|
|
1808
|
-
label: "Video",
|
|
1809
1789
|
createBlock: Ze
|
|
1810
1790
|
},
|
|
1811
1791
|
{
|
|
1812
1792
|
type: "social",
|
|
1813
|
-
label: "Social",
|
|
1814
1793
|
createBlock: Qe
|
|
1815
1794
|
},
|
|
1816
1795
|
{
|
|
1817
1796
|
type: "menu",
|
|
1818
|
-
label: "Menu",
|
|
1819
1797
|
createBlock: tt
|
|
1820
1798
|
},
|
|
1821
1799
|
{
|
|
1822
1800
|
type: "table",
|
|
1823
|
-
label: "Table",
|
|
1824
1801
|
createBlock: rt
|
|
1825
1802
|
},
|
|
1826
1803
|
{
|
|
1827
1804
|
type: "spacer",
|
|
1828
|
-
label: "Spacer",
|
|
1829
1805
|
createBlock: $e
|
|
1830
1806
|
},
|
|
1831
1807
|
{
|
|
1832
1808
|
type: "html",
|
|
1833
|
-
label: "HTML",
|
|
1834
1809
|
createBlock: et
|
|
1835
1810
|
},
|
|
1836
1811
|
{
|
|
1837
1812
|
type: "countdown",
|
|
1838
|
-
label: "Countdown",
|
|
1839
1813
|
createBlock: it
|
|
1840
1814
|
}
|
|
1841
1815
|
];
|
|
1842
|
-
function
|
|
1843
|
-
for (let n of
|
|
1816
|
+
function kr(e, t) {
|
|
1817
|
+
for (let n of Or) {
|
|
1844
1818
|
let r = t[n.type];
|
|
1845
1819
|
r && e.registerBuiltIn(n.type, {
|
|
1846
1820
|
component: r,
|
|
1847
|
-
createBlock: n.createBlock
|
|
1848
|
-
sidebarItem: {
|
|
1849
|
-
type: n.type,
|
|
1850
|
-
label: n.label,
|
|
1851
|
-
isCustom: !1
|
|
1852
|
-
}
|
|
1821
|
+
createBlock: n.createBlock
|
|
1853
1822
|
});
|
|
1854
1823
|
}
|
|
1855
1824
|
}
|
|
1856
1825
|
//#endregion
|
|
1857
1826
|
//#region src/utils/keyboardShortcuts.ts
|
|
1858
|
-
function
|
|
1827
|
+
function Ar(e) {
|
|
1859
1828
|
for (let t of e.composedPath()) {
|
|
1860
1829
|
if (!(t instanceof HTMLElement)) continue;
|
|
1861
1830
|
if (t.isContentEditable) return !0;
|
|
@@ -1864,14 +1833,14 @@ function kr(e) {
|
|
|
1864
1833
|
}
|
|
1865
1834
|
return !1;
|
|
1866
1835
|
}
|
|
1867
|
-
function
|
|
1836
|
+
function jr(e, t) {
|
|
1868
1837
|
let n = e.metaKey || e.ctrlKey;
|
|
1869
1838
|
if (n && e.key.toLowerCase() === "s") {
|
|
1870
1839
|
e.preventDefault(), t.onSave?.();
|
|
1871
1840
|
return;
|
|
1872
1841
|
}
|
|
1873
1842
|
if (n && e.key.toLowerCase() === "z") {
|
|
1874
|
-
if (
|
|
1843
|
+
if (Ar(e)) return;
|
|
1875
1844
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1876
1845
|
return;
|
|
1877
1846
|
}
|
|
@@ -1879,11 +1848,11 @@ function Ar(e, t) {
|
|
|
1879
1848
|
t.selectBlock(null);
|
|
1880
1849
|
return;
|
|
1881
1850
|
}
|
|
1882
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1851
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ar(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1883
1852
|
}
|
|
1884
1853
|
//#endregion
|
|
1885
1854
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1886
|
-
var
|
|
1855
|
+
var Mr = { class: "tpl:text-center" }, Nr = ["href"], Pr = /* @__PURE__ */ B({
|
|
1887
1856
|
__name: "ButtonBlock",
|
|
1888
1857
|
props: {
|
|
1889
1858
|
block: {},
|
|
@@ -1904,17 +1873,17 @@ var jr = { class: "tpl:text-center" }, Mr = ["href"], Nr = /* @__PURE__ */ B({
|
|
|
1904
1873
|
};
|
|
1905
1874
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1906
1875
|
});
|
|
1907
|
-
return (t, r) => (f(), k("div",
|
|
1876
|
+
return (t, r) => (f(), k("div", Mr, [I("a", {
|
|
1908
1877
|
href: e.block.url || "#",
|
|
1909
1878
|
style: L(n.value),
|
|
1910
1879
|
class: "tpl:cursor-default",
|
|
1911
1880
|
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1912
|
-
}, D(e.block.text), 13,
|
|
1881
|
+
}, D(e.block.text), 13, Nr)]));
|
|
1913
1882
|
}
|
|
1914
|
-
}),
|
|
1915
|
-
let t =
|
|
1883
|
+
}), Fr = (e) => e === "", Ir = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Lr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Rr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), zr = (e) => {
|
|
1884
|
+
let t = Rr(e);
|
|
1916
1885
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1917
|
-
},
|
|
1886
|
+
}, Br = {
|
|
1918
1887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1919
1888
|
width: 24,
|
|
1920
1889
|
height: 24,
|
|
@@ -1924,35 +1893,35 @@ var jr = { class: "tpl:text-center" }, Mr = ["href"], Nr = /* @__PURE__ */ B({
|
|
|
1924
1893
|
"stroke-width": 2,
|
|
1925
1894
|
"stroke-linecap": "round",
|
|
1926
1895
|
"stroke-linejoin": "round"
|
|
1927
|
-
},
|
|
1928
|
-
function
|
|
1929
|
-
return v(
|
|
1896
|
+
}, Vr = Symbol("lucide-icons");
|
|
1897
|
+
function Hr() {
|
|
1898
|
+
return v(Vr, {});
|
|
1930
1899
|
}
|
|
1931
1900
|
//#endregion
|
|
1932
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.
|
|
1933
|
-
var
|
|
1934
|
-
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } =
|
|
1935
|
-
let e =
|
|
1936
|
-
return e ? Number(t) * 24 / Number(s ?? d ??
|
|
1901
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.21.0_vue@3.5.38_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1902
|
+
var Ur = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
1903
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Hr(), g = O(() => {
|
|
1904
|
+
let e = Fr(n) || Fr(r) || n === !0 || r === !0 || m === !0, t = i || o || p || Br["stroke-width"];
|
|
1905
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? Br.width) : t;
|
|
1937
1906
|
});
|
|
1938
1907
|
return a("svg", {
|
|
1939
|
-
...
|
|
1908
|
+
...Br,
|
|
1940
1909
|
...l,
|
|
1941
|
-
width: s ?? d ??
|
|
1942
|
-
height: s ?? d ??
|
|
1943
|
-
stroke: c ?? f ??
|
|
1910
|
+
width: s ?? d ?? Br.width,
|
|
1911
|
+
height: s ?? d ?? Br.height,
|
|
1912
|
+
stroke: c ?? f ?? Br.stroke,
|
|
1944
1913
|
"stroke-width": g.value,
|
|
1945
|
-
class:
|
|
1914
|
+
class: Ir("lucide", h, ...e ? [`lucide-${Lr(zr(e))}-icon`, `lucide-${Lr(e)}`] : ["lucide-icon"])
|
|
1946
1915
|
}, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
|
|
1947
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
1916
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(Ur, {
|
|
1948
1917
|
...i,
|
|
1949
1918
|
...n,
|
|
1950
1919
|
iconNode: t,
|
|
1951
1920
|
name: e
|
|
1952
|
-
}, r.default ? { default: r.default } : void 0),
|
|
1921
|
+
}, r.default ? { default: r.default } : void 0), Wr = X("bookmark", [["path", {
|
|
1953
1922
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
1954
1923
|
key: "oz39mx"
|
|
1955
|
-
}]]),
|
|
1924
|
+
}]]), Gr = X("box", [
|
|
1956
1925
|
["path", {
|
|
1957
1926
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1958
1927
|
key: "hh9hay"
|
|
@@ -1965,22 +1934,22 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1965
1934
|
d: "M12 22V12",
|
|
1966
1935
|
key: "d0xqtd"
|
|
1967
1936
|
}]
|
|
1968
|
-
]),
|
|
1937
|
+
]), Kr = X("check", [["path", {
|
|
1969
1938
|
d: "M20 6 9 17l-5-5",
|
|
1970
1939
|
key: "1gmf2c"
|
|
1971
|
-
}]]),
|
|
1940
|
+
}]]), qr = X("chevron-down", [["path", {
|
|
1972
1941
|
d: "m6 9 6 6 6-6",
|
|
1973
1942
|
key: "qrunsl"
|
|
1974
|
-
}]]),
|
|
1943
|
+
}]]), Jr = X("chevron-left", [["path", {
|
|
1975
1944
|
d: "m15 18-6-6 6-6",
|
|
1976
1945
|
key: "1wnfg3"
|
|
1977
|
-
}]]),
|
|
1946
|
+
}]]), Yr = X("chevron-right", [["path", {
|
|
1978
1947
|
d: "m9 18 6-6-6-6",
|
|
1979
1948
|
key: "mthhwq"
|
|
1980
|
-
}]]),
|
|
1949
|
+
}]]), Xr = X("chevron-up", [["path", {
|
|
1981
1950
|
d: "m18 15-6-6-6 6",
|
|
1982
1951
|
key: "153udz"
|
|
1983
|
-
}]]),
|
|
1952
|
+
}]]), Zr = X("circle-alert", [
|
|
1984
1953
|
["circle", {
|
|
1985
1954
|
cx: "12",
|
|
1986
1955
|
cy: "12",
|
|
@@ -2001,7 +1970,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2001
1970
|
y2: "16",
|
|
2002
1971
|
key: "4dfq90"
|
|
2003
1972
|
}]
|
|
2004
|
-
]),
|
|
1973
|
+
]), Qr = X("circle-check", [["circle", {
|
|
2005
1974
|
cx: "12",
|
|
2006
1975
|
cy: "12",
|
|
2007
1976
|
r: "10",
|
|
@@ -2009,7 +1978,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2009
1978
|
}], ["path", {
|
|
2010
1979
|
d: "m9 12 2 2 4-4",
|
|
2011
1980
|
key: "dzmm74"
|
|
2012
|
-
}]]),
|
|
1981
|
+
}]]), $r = X("clock", [["circle", {
|
|
2013
1982
|
cx: "12",
|
|
2014
1983
|
cy: "12",
|
|
2015
1984
|
r: "10",
|
|
@@ -2017,13 +1986,13 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2017
1986
|
}], ["path", {
|
|
2018
1987
|
d: "M12 6v6l4 2",
|
|
2019
1988
|
key: "mmk7yg"
|
|
2020
|
-
}]]),
|
|
1989
|
+
}]]), ei = X("code", [["path", {
|
|
2021
1990
|
d: "m16 18 6-6-6-6",
|
|
2022
1991
|
key: "eg8j8"
|
|
2023
1992
|
}], ["path", {
|
|
2024
1993
|
d: "m8 6-6 6 6 6",
|
|
2025
1994
|
key: "ppft3o"
|
|
2026
|
-
}]]),
|
|
1995
|
+
}]]), ti = X("copy", [["rect", {
|
|
2027
1996
|
width: "14",
|
|
2028
1997
|
height: "14",
|
|
2029
1998
|
x: "8",
|
|
@@ -2034,7 +2003,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2034
2003
|
}], ["path", {
|
|
2035
2004
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
2036
2005
|
key: "zix9uf"
|
|
2037
|
-
}]]),
|
|
2006
|
+
}]]), ni = X("eye-off", [
|
|
2038
2007
|
["path", {
|
|
2039
2008
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
2040
2009
|
key: "ct8e1f"
|
|
@@ -2051,7 +2020,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2051
2020
|
d: "m2 2 20 20",
|
|
2052
2021
|
key: "1ooewy"
|
|
2053
2022
|
}]
|
|
2054
|
-
]),
|
|
2023
|
+
]), ri = X("eye", [["path", {
|
|
2055
2024
|
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
2056
2025
|
key: "1nclc0"
|
|
2057
2026
|
}], ["circle", {
|
|
@@ -2059,7 +2028,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2059
2028
|
cy: "12",
|
|
2060
2029
|
r: "3",
|
|
2061
2030
|
key: "1v7zrd"
|
|
2062
|
-
}]]),
|
|
2031
|
+
}]]), ii = X("file-image", [
|
|
2063
2032
|
["path", {
|
|
2064
2033
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
2065
2034
|
key: "1oefj6"
|
|
@@ -2078,7 +2047,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2078
2047
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
2079
2048
|
key: "wt3hpn"
|
|
2080
2049
|
}]
|
|
2081
|
-
]),
|
|
2050
|
+
]), ai = X("file-text", [
|
|
2082
2051
|
["path", {
|
|
2083
2052
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
2084
2053
|
key: "1oefj6"
|
|
@@ -2099,10 +2068,10 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2099
2068
|
d: "M16 17H8",
|
|
2100
2069
|
key: "z1uh3a"
|
|
2101
2070
|
}]
|
|
2102
|
-
]),
|
|
2071
|
+
]), oi = X("funnel", [["path", {
|
|
2103
2072
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
2104
2073
|
key: "sc7q7i"
|
|
2105
|
-
}]]),
|
|
2074
|
+
}]]), si = X("grip-vertical", [
|
|
2106
2075
|
["circle", {
|
|
2107
2076
|
cx: "9",
|
|
2108
2077
|
cy: "12",
|
|
@@ -2139,7 +2108,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2139
2108
|
r: "1",
|
|
2140
2109
|
key: "f4zoj3"
|
|
2141
2110
|
}]
|
|
2142
|
-
]),
|
|
2111
|
+
]), ci = X("image-up", [
|
|
2143
2112
|
["path", {
|
|
2144
2113
|
d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
|
|
2145
2114
|
key: "9csbqa"
|
|
@@ -2158,7 +2127,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2158
2127
|
r: "2",
|
|
2159
2128
|
key: "af1f0g"
|
|
2160
2129
|
}]
|
|
2161
|
-
]),
|
|
2130
|
+
]), li = X("image", [
|
|
2162
2131
|
["rect", {
|
|
2163
2132
|
width: "18",
|
|
2164
2133
|
height: "18",
|
|
@@ -2178,7 +2147,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2178
2147
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
2179
2148
|
key: "1xmnt7"
|
|
2180
2149
|
}]
|
|
2181
|
-
]),
|
|
2150
|
+
]), ui = X("info", [
|
|
2182
2151
|
["circle", {
|
|
2183
2152
|
cx: "12",
|
|
2184
2153
|
cy: "12",
|
|
@@ -2193,31 +2162,31 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2193
2162
|
d: "M12 8h.01",
|
|
2194
2163
|
key: "e9boi3"
|
|
2195
2164
|
}]
|
|
2196
|
-
]),
|
|
2165
|
+
]), di = X("loader-circle", [["path", {
|
|
2197
2166
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
2198
2167
|
key: "13zald"
|
|
2199
|
-
}]]),
|
|
2168
|
+
}]]), fi = X("message-circle", [["path", {
|
|
2200
2169
|
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
2201
2170
|
key: "1sd12s"
|
|
2202
|
-
}]]),
|
|
2171
|
+
}]]), pi = X("navigation", [["polygon", {
|
|
2203
2172
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2204
2173
|
key: "1ltx0t"
|
|
2205
|
-
}]]),
|
|
2174
|
+
}]]), mi = X("pencil", [["path", {
|
|
2206
2175
|
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
2207
2176
|
key: "1a8usu"
|
|
2208
2177
|
}], ["path", {
|
|
2209
2178
|
d: "m15 5 4 4",
|
|
2210
2179
|
key: "1mk7zo"
|
|
2211
|
-
}]]),
|
|
2180
|
+
}]]), hi = X("puzzle", [["path", {
|
|
2212
2181
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
2213
2182
|
key: "w46dr5"
|
|
2214
|
-
}]]),
|
|
2183
|
+
}]]), gi = X("redo-2", [["path", {
|
|
2215
2184
|
d: "m15 14 5-5-5-5",
|
|
2216
2185
|
key: "12vg1m"
|
|
2217
2186
|
}], ["path", {
|
|
2218
2187
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2219
2188
|
key: "6uklza"
|
|
2220
|
-
}]]),
|
|
2189
|
+
}]]), _i = X("refresh-cw", [
|
|
2221
2190
|
["path", {
|
|
2222
2191
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2223
2192
|
key: "v9h5vc"
|
|
@@ -2234,19 +2203,19 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2234
2203
|
d: "M8 16H3v5",
|
|
2235
2204
|
key: "1cv678"
|
|
2236
2205
|
}]
|
|
2237
|
-
]),
|
|
2206
|
+
]), vi = X("reply", [["path", {
|
|
2238
2207
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2239
2208
|
key: "5vmcpk"
|
|
2240
2209
|
}], ["path", {
|
|
2241
2210
|
d: "m9 17-5-5 5-5",
|
|
2242
2211
|
key: "nvlc11"
|
|
2243
|
-
}]]),
|
|
2212
|
+
}]]), yi = X("send", [["path", {
|
|
2244
2213
|
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
2245
2214
|
key: "1ffxy3"
|
|
2246
2215
|
}], ["path", {
|
|
2247
2216
|
d: "m21.854 2.147-10.94 10.939",
|
|
2248
2217
|
key: "12cjpa"
|
|
2249
|
-
}]]),
|
|
2218
|
+
}]]), bi = X("share-2", [
|
|
2250
2219
|
["circle", {
|
|
2251
2220
|
cx: "18",
|
|
2252
2221
|
cy: "5",
|
|
@@ -2279,13 +2248,13 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2279
2248
|
y2: "10.49",
|
|
2280
2249
|
key: "1n3mei"
|
|
2281
2250
|
}]
|
|
2282
|
-
]),
|
|
2251
|
+
]), xi = X("shield-check", [["path", {
|
|
2283
2252
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2284
2253
|
key: "oel41y"
|
|
2285
2254
|
}], ["path", {
|
|
2286
2255
|
d: "m9 12 2 2 4-4",
|
|
2287
2256
|
key: "dzmm74"
|
|
2288
|
-
}]]),
|
|
2257
|
+
}]]), Si = X("shield-x", [
|
|
2289
2258
|
["path", {
|
|
2290
2259
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2291
2260
|
key: "oel41y"
|
|
@@ -2298,7 +2267,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2298
2267
|
d: "m9.5 9.5 5 5",
|
|
2299
2268
|
key: "18nt4w"
|
|
2300
2269
|
}]
|
|
2301
|
-
]),
|
|
2270
|
+
]), Ci = X("sparkles", [
|
|
2302
2271
|
["path", {
|
|
2303
2272
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
2304
2273
|
key: "1s2grr"
|
|
@@ -2317,7 +2286,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2317
2286
|
r: "2",
|
|
2318
2287
|
key: "6kqj1y"
|
|
2319
2288
|
}]
|
|
2320
|
-
]),
|
|
2289
|
+
]), wi = X("table", [
|
|
2321
2290
|
["path", {
|
|
2322
2291
|
d: "M12 3v18",
|
|
2323
2292
|
key: "108xh3"
|
|
@@ -2338,7 +2307,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2338
2307
|
d: "M3 15h18",
|
|
2339
2308
|
key: "5xshup"
|
|
2340
2309
|
}]
|
|
2341
|
-
]),
|
|
2310
|
+
]), Ti = X("trash-2", [
|
|
2342
2311
|
["path", {
|
|
2343
2312
|
d: "M10 11v6",
|
|
2344
2313
|
key: "nco0om"
|
|
@@ -2359,7 +2328,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2359
2328
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2360
2329
|
key: "e791ji"
|
|
2361
2330
|
}]
|
|
2362
|
-
]),
|
|
2331
|
+
]), Ei = X("triangle-alert", [
|
|
2363
2332
|
["path", {
|
|
2364
2333
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
2365
2334
|
key: "wmoenq"
|
|
@@ -2372,13 +2341,13 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2372
2341
|
d: "M12 17h.01",
|
|
2373
2342
|
key: "p32p05"
|
|
2374
2343
|
}]
|
|
2375
|
-
]),
|
|
2344
|
+
]), Di = X("undo-2", [["path", {
|
|
2376
2345
|
d: "M9 14 4 9l5-5",
|
|
2377
2346
|
key: "102s5s"
|
|
2378
2347
|
}], ["path", {
|
|
2379
2348
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2380
2349
|
key: "f3b9sd"
|
|
2381
|
-
}]]),
|
|
2350
|
+
}]]), Oi = X("upload", [
|
|
2382
2351
|
["path", {
|
|
2383
2352
|
d: "M12 3v12",
|
|
2384
2353
|
key: "1x0j5s"
|
|
@@ -2391,7 +2360,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2391
2360
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2392
2361
|
key: "ih7n3h"
|
|
2393
2362
|
}]
|
|
2394
|
-
]),
|
|
2363
|
+
]), ki = X("video", [["path", {
|
|
2395
2364
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2396
2365
|
key: "ftymec"
|
|
2397
2366
|
}], ["rect", {
|
|
@@ -2401,20 +2370,20 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2401
2370
|
height: "12",
|
|
2402
2371
|
rx: "2",
|
|
2403
2372
|
key: "158x01"
|
|
2404
|
-
}]]),
|
|
2373
|
+
}]]), Ai = X("x", [["path", {
|
|
2405
2374
|
d: "M18 6 6 18",
|
|
2406
2375
|
key: "1bl5f8"
|
|
2407
2376
|
}], ["path", {
|
|
2408
2377
|
d: "m6 6 12 12",
|
|
2409
2378
|
key: "d8bk6v"
|
|
2410
|
-
}]]),
|
|
2379
|
+
}]]), ji = X("zap", [["path", {
|
|
2411
2380
|
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
2412
2381
|
key: "1xq2db"
|
|
2413
|
-
}]]),
|
|
2382
|
+
}]]), Mi = ["innerHTML"], Ni = [
|
|
2414
2383
|
"src",
|
|
2415
2384
|
"width",
|
|
2416
2385
|
"height"
|
|
2417
|
-
],
|
|
2386
|
+
], Pi = /* @__PURE__ */ B({
|
|
2418
2387
|
__name: "CustomBlockIcon",
|
|
2419
2388
|
props: {
|
|
2420
2389
|
icon: {},
|
|
@@ -2430,40 +2399,40 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2430
2399
|
height: `${n.value}px`
|
|
2431
2400
|
}),
|
|
2432
2401
|
innerHTML: e.icon
|
|
2433
|
-
}, null, 12,
|
|
2402
|
+
}, null, 12, Mi)) : i.value ? (f(), k("img", {
|
|
2434
2403
|
key: 1,
|
|
2435
2404
|
src: e.icon,
|
|
2436
2405
|
width: n.value,
|
|
2437
2406
|
height: n.value,
|
|
2438
2407
|
class: "tpl:inline-block",
|
|
2439
2408
|
alt: ""
|
|
2440
|
-
}, null, 8,
|
|
2409
|
+
}, null, 8, Ni)) : (f(), N(j(Gr), {
|
|
2441
2410
|
key: 2,
|
|
2442
2411
|
size: n.value,
|
|
2443
2412
|
"stroke-width": 1.5
|
|
2444
2413
|
}, null, 8, ["size"]));
|
|
2445
2414
|
}
|
|
2446
|
-
}),
|
|
2415
|
+
}), Fi = (e, t) => {
|
|
2447
2416
|
let n = e.__vccOpts || e;
|
|
2448
2417
|
for (let [e, r] of t) n[e] = r;
|
|
2449
2418
|
return n;
|
|
2450
|
-
},
|
|
2451
|
-
function
|
|
2452
|
-
return f(), k("div",
|
|
2419
|
+
}, Ii = {}, Li = { class: "tpl-loading-track" };
|
|
2420
|
+
function Ri(e, t) {
|
|
2421
|
+
return f(), k("div", Li);
|
|
2453
2422
|
}
|
|
2454
|
-
var
|
|
2423
|
+
var zi = /*#__PURE__*/ Fi(Ii, [["render", Ri], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2455
2424
|
//#endregion
|
|
2456
2425
|
//#region src/composables/useEditorRoot.ts
|
|
2457
|
-
function
|
|
2458
|
-
return v(
|
|
2426
|
+
function Bi() {
|
|
2427
|
+
return v(ar, document) ?? document;
|
|
2459
2428
|
}
|
|
2460
2429
|
//#endregion
|
|
2461
2430
|
//#region src/composables/useFocusTrap.ts
|
|
2462
|
-
var
|
|
2463
|
-
function
|
|
2464
|
-
let n =
|
|
2431
|
+
var Vi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2432
|
+
function Hi(e, t) {
|
|
2433
|
+
let n = Bi(), r = null, i = null, a = null;
|
|
2465
2434
|
function o() {
|
|
2466
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2435
|
+
return e.value ? Array.from(e.value.querySelectorAll(Vi)).filter((e) => e.offsetParent !== null) : [];
|
|
2467
2436
|
}
|
|
2468
2437
|
function s(e) {
|
|
2469
2438
|
if (e.key !== "Tab") return;
|
|
@@ -2493,18 +2462,18 @@ function Vi(e, t) {
|
|
|
2493
2462
|
}
|
|
2494
2463
|
//#endregion
|
|
2495
2464
|
//#region src/composables/useCloudI18n.ts
|
|
2496
|
-
function
|
|
2465
|
+
function Ui(e, t) {
|
|
2497
2466
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2498
2467
|
}
|
|
2499
|
-
function
|
|
2500
|
-
let t = e ?? v(
|
|
2468
|
+
function Wi(e) {
|
|
2469
|
+
let t = e ?? v(fr, null);
|
|
2501
2470
|
return {
|
|
2502
2471
|
t: t ? u(t) ? t.value : t : null,
|
|
2503
|
-
format:
|
|
2472
|
+
format: Ui
|
|
2504
2473
|
};
|
|
2505
2474
|
}
|
|
2506
|
-
function
|
|
2507
|
-
let { t, format: n } =
|
|
2475
|
+
function Gi(e) {
|
|
2476
|
+
let { t, format: n } = Wi(e);
|
|
2508
2477
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2509
2478
|
return {
|
|
2510
2479
|
t,
|
|
@@ -2513,8 +2482,8 @@ function Wi(e) {
|
|
|
2513
2482
|
}
|
|
2514
2483
|
//#endregion
|
|
2515
2484
|
//#region src/composables/useMergeTag.ts
|
|
2516
|
-
function
|
|
2517
|
-
let e = v(
|
|
2485
|
+
function Ki() {
|
|
2486
|
+
let e = v(Jn, []), t = v(Yn, ut.liquid), n = v(Xn, null), r = v(Zn, !0), i = v(Qn, null), a = C(!1);
|
|
2518
2487
|
function o(e) {
|
|
2519
2488
|
return ht(e, t);
|
|
2520
2489
|
}
|
|
@@ -2553,7 +2522,7 @@ function Gi() {
|
|
|
2553
2522
|
}
|
|
2554
2523
|
//#endregion
|
|
2555
2524
|
//#region src/composables/useEmoji.ts
|
|
2556
|
-
function
|
|
2525
|
+
function qi() {
|
|
2557
2526
|
let [e, t] = cn(!1), r = n([]), i = !1;
|
|
2558
2527
|
l(() => {
|
|
2559
2528
|
i = !0;
|
|
@@ -2579,7 +2548,7 @@ function Ki() {
|
|
|
2579
2548
|
}
|
|
2580
2549
|
//#endregion
|
|
2581
2550
|
//#region src/composables/useDragDrop.ts
|
|
2582
|
-
function
|
|
2551
|
+
function Ji(e) {
|
|
2583
2552
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2584
2553
|
function o(e) {
|
|
2585
2554
|
r.value = !0, i.value = e;
|
|
@@ -2629,7 +2598,7 @@ function qi(e) {
|
|
|
2629
2598
|
}
|
|
2630
2599
|
//#endregion
|
|
2631
2600
|
//#region src/composables/useFonts.ts
|
|
2632
|
-
var
|
|
2601
|
+
var Yi = [
|
|
2633
2602
|
{
|
|
2634
2603
|
value: "Arial",
|
|
2635
2604
|
label: "Arial"
|
|
@@ -2658,7 +2627,7 @@ var Ji = [
|
|
|
2658
2627
|
value: "Courier New",
|
|
2659
2628
|
label: "Courier New"
|
|
2660
2629
|
}
|
|
2661
|
-
],
|
|
2630
|
+
], Xi = {
|
|
2662
2631
|
arial: "Arial, sans-serif",
|
|
2663
2632
|
helvetica: "Helvetica, sans-serif",
|
|
2664
2633
|
georgia: "Georgia, serif",
|
|
@@ -2666,14 +2635,14 @@ var Ji = [
|
|
|
2666
2635
|
verdana: "Verdana, sans-serif",
|
|
2667
2636
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2668
2637
|
"courier new": "'Courier New', monospace"
|
|
2669
|
-
},
|
|
2670
|
-
function
|
|
2671
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ??
|
|
2638
|
+
}, Zi = "Arial, sans-serif";
|
|
2639
|
+
function Qi(e) {
|
|
2640
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? Zi);
|
|
2672
2641
|
function a(e) {
|
|
2673
2642
|
n.value = e;
|
|
2674
2643
|
}
|
|
2675
2644
|
let o = O(() => {
|
|
2676
|
-
let e = [...
|
|
2645
|
+
let e = [...Yi];
|
|
2677
2646
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2678
2647
|
let r = t.value.map((e) => ({
|
|
2679
2648
|
value: e.name,
|
|
@@ -2686,23 +2655,23 @@ function Zi(e) {
|
|
|
2686
2655
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2687
2656
|
}
|
|
2688
2657
|
function u(e) {
|
|
2689
|
-
return
|
|
2658
|
+
return Yi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2690
2659
|
}
|
|
2691
2660
|
function d() {
|
|
2692
2661
|
if (e?.defaultFont) {
|
|
2693
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2662
|
+
if (!n.value && !u(e.defaultFont)) return Zi;
|
|
2694
2663
|
if (c(e.defaultFont)) {
|
|
2695
2664
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2696
2665
|
if (t) return t.value;
|
|
2697
2666
|
}
|
|
2698
2667
|
}
|
|
2699
|
-
return
|
|
2668
|
+
return Zi;
|
|
2700
2669
|
}
|
|
2701
2670
|
let f = O(() => d());
|
|
2702
2671
|
function p(e) {
|
|
2703
2672
|
if (!e) return i.value;
|
|
2704
2673
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2705
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2674
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Xi[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2706
2675
|
}
|
|
2707
2676
|
let m = [], h = !1;
|
|
2708
2677
|
async function g() {
|
|
@@ -2718,7 +2687,7 @@ function Zi(e) {
|
|
|
2718
2687
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2719
2688
|
});
|
|
2720
2689
|
} catch (t) {
|
|
2721
|
-
|
|
2690
|
+
Cr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2722
2691
|
}
|
|
2723
2692
|
});
|
|
2724
2693
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -2745,9 +2714,9 @@ function Zi(e) {
|
|
|
2745
2714
|
}
|
|
2746
2715
|
//#endregion
|
|
2747
2716
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2748
|
-
function
|
|
2717
|
+
function $i(e) {
|
|
2749
2718
|
let t = C(!1), n = C(""), r = C(null);
|
|
2750
|
-
|
|
2719
|
+
Hi(r, t);
|
|
2751
2720
|
function i() {
|
|
2752
2721
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2753
2722
|
}
|
|
@@ -2798,8 +2767,8 @@ function Qi(e) {
|
|
|
2798
2767
|
}
|
|
2799
2768
|
//#endregion
|
|
2800
2769
|
//#region src/composables/useRichTextEditor.ts
|
|
2801
|
-
function
|
|
2802
|
-
let t = v(In, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } =
|
|
2770
|
+
function ea(e) {
|
|
2771
|
+
let t = v(In, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Ki(), l = v(Fn, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = ft(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = $i(p), { start: w, stop: ee } = sn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), T = n(null), E = C(!0), D = C(null), te = !1;
|
|
2803
2772
|
async function ne() {
|
|
2804
2773
|
D.value = null, E.value = !0;
|
|
2805
2774
|
try {
|
|
@@ -2829,7 +2798,7 @@ function $i(e) {
|
|
|
2829
2798
|
p.value = l, E.value = !1, w();
|
|
2830
2799
|
} catch (t) {
|
|
2831
2800
|
if (te) return;
|
|
2832
|
-
|
|
2801
|
+
Cr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), D.value = t instanceof Error ? t.message : "Failed to load editor", E.value = !1;
|
|
2833
2802
|
}
|
|
2834
2803
|
}
|
|
2835
2804
|
function O() {
|
|
@@ -2877,20 +2846,20 @@ function $i(e) {
|
|
|
2877
2846
|
}
|
|
2878
2847
|
//#endregion
|
|
2879
2848
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2880
|
-
var
|
|
2849
|
+
var ta = { class: "tpl:w-full" }, na = {
|
|
2881
2850
|
key: 0,
|
|
2882
2851
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
2883
|
-
},
|
|
2852
|
+
}, ra = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ia = {
|
|
2884
2853
|
key: 1,
|
|
2885
2854
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
2886
|
-
},
|
|
2855
|
+
}, aa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, oa = {
|
|
2887
2856
|
key: 2,
|
|
2888
2857
|
class: "tpl:relative"
|
|
2889
|
-
},
|
|
2858
|
+
}, sa = ["innerHTML"], ca = {
|
|
2890
2859
|
key: 0,
|
|
2891
2860
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
2892
2861
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2893
|
-
},
|
|
2862
|
+
}, la = /* @__PURE__ */ B({
|
|
2894
2863
|
__name: "CustomBlock",
|
|
2895
2864
|
props: {
|
|
2896
2865
|
block: {},
|
|
@@ -2924,10 +2893,10 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2924
2893
|
g();
|
|
2925
2894
|
}), H(() => n.block.fieldValues, () => {
|
|
2926
2895
|
_();
|
|
2927
|
-
}, { deep: !0 }), (e, t) => (f(), k("div",
|
|
2896
|
+
}, { deep: !0 }), (e, t) => (f(), k("div", ta, [u.value ? c.value ? (f(), k("div", ia, [V(j(Ei), {
|
|
2928
2897
|
size: 24,
|
|
2929
2898
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2930
|
-
}), I("span",
|
|
2899
|
+
}), I("span", aa, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", oa, [I("div", { innerHTML: s.value }, null, 8, sa), j(h) && j(m) ? (f(), k("div", ca, [j(d) ? (f(), N(zi, {
|
|
2931
2900
|
key: 1,
|
|
2932
2901
|
class: "tpl:w-48"
|
|
2933
2902
|
})) : (f(), k("button", {
|
|
@@ -2935,16 +2904,16 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2935
2904
|
type: "button",
|
|
2936
2905
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
2937
2906
|
onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
|
|
2938
|
-
}, [l.value?.icon ? (f(), N(
|
|
2907
|
+
}, [l.value?.icon ? (f(), N(Pi, {
|
|
2939
2908
|
key: 0,
|
|
2940
2909
|
icon: l.value.icon,
|
|
2941
2910
|
size: 16
|
|
2942
|
-
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div",
|
|
2911
|
+
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", na, [V(j(hi), {
|
|
2943
2912
|
size: 24,
|
|
2944
2913
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2945
|
-
}), I("span",
|
|
2914
|
+
}), I("span", ra, D(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2946
2915
|
}
|
|
2947
|
-
}),
|
|
2916
|
+
}), ua = { class: "tpl:w-full" }, da = /* @__PURE__ */ B({
|
|
2948
2917
|
__name: "DividerBlock",
|
|
2949
2918
|
props: {
|
|
2950
2919
|
block: {},
|
|
@@ -2956,18 +2925,18 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2956
2925
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2957
2926
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2958
2927
|
}));
|
|
2959
|
-
return (e, t) => (f(), k("div",
|
|
2928
|
+
return (e, t) => (f(), k("div", ua, [I("hr", {
|
|
2960
2929
|
class: "tpl:m-0 tpl:border-none",
|
|
2961
2930
|
style: L(n.value)
|
|
2962
2931
|
}, null, 4)]));
|
|
2963
2932
|
}
|
|
2964
|
-
}),
|
|
2933
|
+
}), fa = { class: "tpl:w-full" }, pa = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, ma = {
|
|
2965
2934
|
key: 0,
|
|
2966
2935
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2967
|
-
},
|
|
2936
|
+
}, ha = {
|
|
2968
2937
|
key: 1,
|
|
2969
2938
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2970
|
-
},
|
|
2939
|
+
}, ga = /* @__PURE__ */ B({
|
|
2971
2940
|
__name: "HtmlBlock",
|
|
2972
2941
|
props: {
|
|
2973
2942
|
block: {},
|
|
@@ -2975,15 +2944,15 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2975
2944
|
},
|
|
2976
2945
|
setup(e) {
|
|
2977
2946
|
let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
|
|
2978
|
-
return (e, t) => (f(), k("div",
|
|
2947
|
+
return (e, t) => (f(), k("div", fa, [I("div", pa, [V(j(ei), {
|
|
2979
2948
|
size: 24,
|
|
2980
2949
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2981
|
-
}), r.value ? (f(), k("span",
|
|
2950
|
+
}), r.value ? (f(), k("span", ma, D(j(n).html.preview), 1)) : (f(), k("span", ha, D(j(n).html.empty), 1))])]));
|
|
2982
2951
|
}
|
|
2983
2952
|
});
|
|
2984
2953
|
//#endregion
|
|
2985
2954
|
//#region src/composables/useAliveFlag.ts
|
|
2986
|
-
function
|
|
2955
|
+
function _a() {
|
|
2987
2956
|
let e = { alive: !0 };
|
|
2988
2957
|
return re(() => {
|
|
2989
2958
|
e.alive = !1;
|
|
@@ -2991,13 +2960,13 @@ function ga() {
|
|
|
2991
2960
|
}
|
|
2992
2961
|
//#endregion
|
|
2993
2962
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2994
|
-
var
|
|
2963
|
+
var va = ["href"], ya = ["src", "alt"], ba = ["src", "alt"], xa = {
|
|
2995
2964
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2996
2965
|
style: { opacity: "0.7" }
|
|
2997
|
-
},
|
|
2966
|
+
}, Sa = ["href"], Ca = ["src", "alt"], wa = ["src", "alt"], Ta = {
|
|
2998
2967
|
key: 3,
|
|
2999
2968
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3000
|
-
},
|
|
2969
|
+
}, Ea = ["aria-label"], Da = { key: 1 }, Oa = /* @__PURE__ */ B({
|
|
3001
2970
|
__name: "ImageBlock",
|
|
3002
2971
|
props: {
|
|
3003
2972
|
block: {},
|
|
@@ -3005,7 +2974,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3005
2974
|
},
|
|
3006
2975
|
emits: ["update"],
|
|
3007
2976
|
setup(e, { emit: t }) {
|
|
3008
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } =
|
|
2977
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = Ki(), o = v($n, null), s = O(() => !!o), c = _a();
|
|
3009
2978
|
async function l() {
|
|
3010
2979
|
let e = await o?.({ accept: ["images"] });
|
|
3011
2980
|
if (c.alive && e) {
|
|
@@ -3038,22 +3007,22 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3038
3007
|
src: e.block.placeholderUrl,
|
|
3039
3008
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3040
3009
|
style: L(d.value)
|
|
3041
|
-
}, null, 12,
|
|
3010
|
+
}, null, 12, ya)], 8, va)) : (f(), k("img", {
|
|
3042
3011
|
key: 1,
|
|
3043
3012
|
class: "tpl:border-0",
|
|
3044
3013
|
src: e.block.placeholderUrl,
|
|
3045
3014
|
alt: e.block.alt,
|
|
3046
3015
|
style: L(d.value)
|
|
3047
|
-
}, null, 12,
|
|
3016
|
+
}, null, 12, ba))], 64)) : e.block.src && p.value ? (f(), k("div", {
|
|
3048
3017
|
key: 1,
|
|
3049
3018
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3050
3019
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3051
|
-
}, [V(j(
|
|
3020
|
+
}, [V(j(li), {
|
|
3052
3021
|
size: 32,
|
|
3053
3022
|
"stroke-width": 1.5,
|
|
3054
3023
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3055
3024
|
style: { opacity: "0.5" }
|
|
3056
|
-
}), I("span",
|
|
3025
|
+
}), I("span", xa, D(e.block.src), 1)], 4)) : e.block.src ? (f(), k(R, { key: 2 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3057
3026
|
key: 0,
|
|
3058
3027
|
href: e.block.linkUrl,
|
|
3059
3028
|
target: "_blank",
|
|
@@ -3065,26 +3034,26 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3065
3034
|
src: e.block.src,
|
|
3066
3035
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3067
3036
|
style: L(d.value)
|
|
3068
|
-
}, null, 12,
|
|
3037
|
+
}, null, 12, Ca)], 8, Sa)) : (f(), k("img", {
|
|
3069
3038
|
key: 1,
|
|
3070
3039
|
class: "tpl:border-0",
|
|
3071
3040
|
src: e.block.src,
|
|
3072
3041
|
alt: e.block.alt,
|
|
3073
3042
|
style: L(d.value)
|
|
3074
|
-
}, null, 12,
|
|
3043
|
+
}, null, 12, wa))], 64)) : (f(), k("div", Ta, [s.value ? (f(), k("button", {
|
|
3075
3044
|
key: 0,
|
|
3076
3045
|
"aria-label": j(i).image.browseMedia,
|
|
3077
3046
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
3078
3047
|
onClick: M(l, ["stop"])
|
|
3079
|
-
}, [V(j(
|
|
3048
|
+
}, [V(j(li), {
|
|
3080
3049
|
size: 14,
|
|
3081
3050
|
"stroke-width": 1.5
|
|
3082
|
-
}), z(" " + D(j(i).image.browseMedia), 1)], 8,
|
|
3051
|
+
}), z(" " + D(j(i).image.browseMedia), 1)], 8, Ea)) : (f(), k("span", Da, D(j(i).image.clickToAdd), 1))]))], 4));
|
|
3083
3052
|
}
|
|
3084
|
-
}),
|
|
3053
|
+
}), ka = { class: "tpl:w-full" }, Aa = ["href"], ja = {
|
|
3085
3054
|
key: 1,
|
|
3086
3055
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3087
|
-
},
|
|
3056
|
+
}, Ma = /* @__PURE__ */ B({
|
|
3088
3057
|
__name: "MenuBlock",
|
|
3089
3058
|
props: {
|
|
3090
3059
|
block: {},
|
|
@@ -3103,7 +3072,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3103
3072
|
function a(e) {
|
|
3104
3073
|
return e || t.block.linkColor || t.block.color;
|
|
3105
3074
|
}
|
|
3106
|
-
return (t, o) => (f(), k("div",
|
|
3075
|
+
return (t, o) => (f(), k("div", ka, [i.value ? (f(), k("div", {
|
|
3107
3076
|
key: 0,
|
|
3108
3077
|
style: L(r.value)
|
|
3109
3078
|
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
|
|
@@ -3115,15 +3084,15 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3115
3084
|
textDecoration: t.underline ? "underline" : "none"
|
|
3116
3085
|
}),
|
|
3117
3086
|
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
3118
|
-
}, D(t.text || "..."), 13,
|
|
3087
|
+
}, D(t.text || "..."), 13, Aa), n < e.block.items.length - 1 ? (f(), k("span", {
|
|
3119
3088
|
key: 0,
|
|
3120
3089
|
style: L({
|
|
3121
3090
|
color: e.block.separatorColor,
|
|
3122
3091
|
padding: `0 ${e.block.spacing}px`
|
|
3123
3092
|
})
|
|
3124
|
-
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div",
|
|
3093
|
+
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", ja, [V(j(pi), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
3125
3094
|
}
|
|
3126
|
-
}),
|
|
3095
|
+
}), Na = new Set([
|
|
3127
3096
|
"http",
|
|
3128
3097
|
"https",
|
|
3129
3098
|
"mailto",
|
|
@@ -3133,7 +3102,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3133
3102
|
"sms",
|
|
3134
3103
|
"xmpp",
|
|
3135
3104
|
"cid"
|
|
3136
|
-
]),
|
|
3105
|
+
]), Pa = new Set([
|
|
3137
3106
|
"SCRIPT",
|
|
3138
3107
|
"STYLE",
|
|
3139
3108
|
"IFRAME",
|
|
@@ -3143,7 +3112,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3143
3112
|
"META",
|
|
3144
3113
|
"BASE",
|
|
3145
3114
|
"FORM"
|
|
3146
|
-
]),
|
|
3115
|
+
]), Fa = new Set([
|
|
3147
3116
|
"href",
|
|
3148
3117
|
"xlink:href",
|
|
3149
3118
|
"formaction",
|
|
@@ -3152,16 +3121,16 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3152
3121
|
"background",
|
|
3153
3122
|
"poster"
|
|
3154
3123
|
]);
|
|
3155
|
-
function
|
|
3124
|
+
function Ia(e, t) {
|
|
3156
3125
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
3157
3126
|
if (!n || n.startsWith("#")) return !0;
|
|
3158
3127
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3159
3128
|
if (!r) return !0;
|
|
3160
3129
|
let i = r[1].toLowerCase();
|
|
3161
|
-
return
|
|
3130
|
+
return Na.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3162
3131
|
}
|
|
3163
|
-
function
|
|
3164
|
-
if (
|
|
3132
|
+
function La(e) {
|
|
3133
|
+
if (Pa.has(e.tagName)) {
|
|
3165
3134
|
e.remove();
|
|
3166
3135
|
return;
|
|
3167
3136
|
}
|
|
@@ -3173,29 +3142,29 @@ function Ia(e) {
|
|
|
3173
3142
|
e.removeAttribute(n);
|
|
3174
3143
|
continue;
|
|
3175
3144
|
}
|
|
3176
|
-
if (
|
|
3177
|
-
|
|
3145
|
+
if (Fa.has(t)) {
|
|
3146
|
+
Ia(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3178
3147
|
continue;
|
|
3179
3148
|
}
|
|
3180
3149
|
if (t === "src") {
|
|
3181
|
-
|
|
3150
|
+
Ia(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3182
3151
|
continue;
|
|
3183
3152
|
}
|
|
3184
3153
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3185
3154
|
}
|
|
3186
3155
|
let n = Array.from(e.children);
|
|
3187
|
-
for (let e of n)
|
|
3156
|
+
for (let e of n) La(e);
|
|
3188
3157
|
}
|
|
3189
|
-
function
|
|
3158
|
+
function Ra(e) {
|
|
3190
3159
|
if (typeof DOMParser > "u") return e;
|
|
3191
3160
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3192
|
-
for (let e of n)
|
|
3161
|
+
for (let e of n) La(e);
|
|
3193
3162
|
return t.innerHTML;
|
|
3194
3163
|
}
|
|
3195
3164
|
//#endregion
|
|
3196
3165
|
//#region src/composables/useEditableTextBlock.ts
|
|
3197
|
-
function
|
|
3198
|
-
let t = v(
|
|
3166
|
+
function za(e) {
|
|
3167
|
+
let t = v(Jn, []), { syntax: n } = Ki(), r = O(() => Ra(xt(_t(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = En(a), c = O(() => ({
|
|
3199
3168
|
top: o.value - 8,
|
|
3200
3169
|
left: s.value
|
|
3201
3170
|
}));
|
|
@@ -3216,14 +3185,14 @@ function Ra(e) {
|
|
|
3216
3185
|
}
|
|
3217
3186
|
//#endregion
|
|
3218
3187
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3219
|
-
var
|
|
3188
|
+
var Ba = ["innerHTML"], Va = /* @__PURE__ */ B({
|
|
3220
3189
|
__name: "ParagraphBlock",
|
|
3221
3190
|
props: {
|
|
3222
3191
|
block: {},
|
|
3223
3192
|
viewport: {}
|
|
3224
3193
|
},
|
|
3225
3194
|
setup(e) {
|
|
3226
|
-
let t = e, n = T(() => import("./ParagraphEditor-
|
|
3195
|
+
let t = e, n = T(() => import("./ParagraphEditor-y1kGJRBX.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = za(() => t.block.content);
|
|
3227
3196
|
return (t, l) => (f(), k("div", {
|
|
3228
3197
|
ref_key: "blockRef",
|
|
3229
3198
|
ref: i,
|
|
@@ -3242,19 +3211,19 @@ var za = ["innerHTML"], Ba = /* @__PURE__ */ B({
|
|
|
3242
3211
|
key: 1,
|
|
3243
3212
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
3244
3213
|
innerHTML: j(o)
|
|
3245
|
-
}, null, 8,
|
|
3214
|
+
}, null, 8, Ba))], 544));
|
|
3246
3215
|
}
|
|
3247
3216
|
});
|
|
3248
3217
|
//#endregion
|
|
3249
3218
|
//#region src/utils/blockComponentResolver.ts
|
|
3250
|
-
function
|
|
3219
|
+
function Ha(e, t, n) {
|
|
3251
3220
|
if (t) {
|
|
3252
3221
|
let n = t.getComponent(e);
|
|
3253
3222
|
if (n) return n;
|
|
3254
3223
|
}
|
|
3255
3224
|
return n[e.type] ?? null;
|
|
3256
3225
|
}
|
|
3257
|
-
function
|
|
3226
|
+
function Ua(e) {
|
|
3258
3227
|
let { padding: t, backgroundColor: n } = e.styles;
|
|
3259
3228
|
return {
|
|
3260
3229
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -3263,20 +3232,20 @@ function Ha(e) {
|
|
|
3263
3232
|
}
|
|
3264
3233
|
//#endregion
|
|
3265
3234
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3266
|
-
var
|
|
3235
|
+
var Wa = ["data-block-id", "data-block-type"], Ga = ["aria-label"], Ka = [
|
|
3267
3236
|
"aria-label",
|
|
3268
3237
|
"aria-pressed",
|
|
3269
3238
|
"title"
|
|
3270
|
-
],
|
|
3239
|
+
], qa = ["aria-label", "title"], Ja = ["aria-label", "title"], Ya = ["aria-label", "title"], Xa = {
|
|
3271
3240
|
key: 1,
|
|
3272
3241
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
3273
|
-
},
|
|
3242
|
+
}, Za = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Qa = {
|
|
3274
3243
|
key: 2,
|
|
3275
3244
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3276
|
-
},
|
|
3245
|
+
}, $a = ["aria-label", "title"], eo = {
|
|
3277
3246
|
key: 3,
|
|
3278
3247
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3279
|
-
},
|
|
3248
|
+
}, to = ["aria-label"], no = /*#__PURE__*/ Fi(/* @__PURE__ */ B({
|
|
3280
3249
|
__name: "BlockWrapper",
|
|
3281
3250
|
props: {
|
|
3282
3251
|
block: {},
|
|
@@ -3286,7 +3255,7 @@ var Ua = ["data-block-id", "data-block-type"], Wa = ["aria-label"], Ga = [
|
|
|
3286
3255
|
},
|
|
3287
3256
|
emits: ["select"],
|
|
3288
3257
|
setup(e, { emit: t }) {
|
|
3289
|
-
let n = T(() => import("./BlockIssueBadge-
|
|
3258
|
+
let n = T(() => import("./BlockIssueBadge-DjnFAeWq.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(rr, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
3290
3259
|
async function p() {
|
|
3291
3260
|
await m(), l.value?.focus();
|
|
3292
3261
|
}
|
|
@@ -3312,8 +3281,8 @@ var Ua = ["data-block-id", "data-block-type"], Wa = ["aria-label"], Ga = [
|
|
|
3312
3281
|
let g = O(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), _ = O(() => r.previewMode === !0 && g.value), y = O(() => r.viewport ? {
|
|
3313
3282
|
desktop: a.viewport.desktop,
|
|
3314
3283
|
mobile: a.viewport.mobile
|
|
3315
|
-
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Rn, null), S = v(zn, null), w = v(
|
|
3316
|
-
let e =
|
|
3284
|
+
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Rn, null), S = v(zn, null), w = v(nr, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
|
|
3285
|
+
let e = Ua(r.block);
|
|
3317
3286
|
return {
|
|
3318
3287
|
padding: e.padding,
|
|
3319
3288
|
backgroundColor: e.backgroundColor
|
|
@@ -3361,90 +3330,90 @@ var Ua = ["data-block-id", "data-block-type"], Wa = ["aria-label"], Ga = [
|
|
|
3361
3330
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3362
3331
|
title: j(a).blockActions.drag,
|
|
3363
3332
|
onKeydown: h
|
|
3364
|
-
}, [V(j(
|
|
3333
|
+
}, [V(j(si), {
|
|
3365
3334
|
size: 14,
|
|
3366
3335
|
"stroke-width": 1.5
|
|
3367
|
-
})], 40,
|
|
3336
|
+
})], 40, Ka),
|
|
3368
3337
|
I("button", {
|
|
3369
3338
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3370
3339
|
"aria-label": j(a).blockActions.duplicate,
|
|
3371
3340
|
title: j(a).blockActions.duplicate,
|
|
3372
3341
|
onClick: M(N, ["stop"])
|
|
3373
|
-
}, [V(j(
|
|
3342
|
+
}, [V(j(ti), {
|
|
3374
3343
|
size: 14,
|
|
3375
3344
|
"stroke-width": 1.5
|
|
3376
|
-
})], 8,
|
|
3345
|
+
})], 8, qa),
|
|
3377
3346
|
ee.value ? (f(), k("button", {
|
|
3378
3347
|
key: 0,
|
|
3379
3348
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3380
3349
|
"aria-label": j(a).blockActions.saveAsModule,
|
|
3381
3350
|
title: j(a).blockActions.saveAsModule,
|
|
3382
3351
|
onClick: M(ie, ["stop"])
|
|
3383
|
-
}, [V(j(
|
|
3352
|
+
}, [V(j(Wr), {
|
|
3384
3353
|
size: 14,
|
|
3385
3354
|
"stroke-width": 1.5
|
|
3386
|
-
})], 8,
|
|
3355
|
+
})], 8, Ja)) : A("", !0),
|
|
3387
3356
|
I("button", {
|
|
3388
3357
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3389
3358
|
"aria-label": j(a).blockActions.delete,
|
|
3390
3359
|
title: j(a).blockActions.delete,
|
|
3391
3360
|
onClick: M(re, ["stop"])
|
|
3392
|
-
}, [V(j(
|
|
3361
|
+
}, [V(j(Ti), {
|
|
3393
3362
|
size: 14,
|
|
3394
3363
|
"stroke-width": 1.5
|
|
3395
|
-
})], 8,
|
|
3396
|
-
], 8,
|
|
3397
|
-
g.value ? (f(), k("div",
|
|
3364
|
+
})], 8, Ya)
|
|
3365
|
+
], 8, Ga)) : A("", !0),
|
|
3366
|
+
g.value ? (f(), k("div", Xa, [I("span", Za, [V(j(ni), {
|
|
3398
3367
|
size: 12,
|
|
3399
3368
|
"stroke-width": 1.5
|
|
3400
3369
|
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3401
|
-
b.value && !g.value ? (f(), k("div",
|
|
3370
|
+
b.value && !g.value ? (f(), k("div", Qa, [I("button", {
|
|
3402
3371
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
3403
3372
|
"aria-label": j(a).blockActions.conditionToggle,
|
|
3404
3373
|
title: e.block.displayCondition?.label,
|
|
3405
3374
|
onClick: M(P, ["stop"])
|
|
3406
|
-
}, [V(j(
|
|
3375
|
+
}, [V(j(oi), {
|
|
3407
3376
|
size: 12,
|
|
3408
3377
|
"stroke-width": 2
|
|
3409
|
-
})], 8,
|
|
3410
|
-
E.value > 0 && !g.value ? (f(), k("div",
|
|
3378
|
+
})], 8, $a)])) : A("", !0),
|
|
3379
|
+
E.value > 0 && !g.value ? (f(), k("div", eo, [I("button", {
|
|
3411
3380
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
3412
3381
|
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3413
3382
|
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3414
|
-
}, [V(j(
|
|
3383
|
+
}, [V(j(fi), {
|
|
3415
3384
|
size: 12,
|
|
3416
3385
|
"stroke-width": 2.5
|
|
3417
|
-
}), z(" " + D(E.value), 1)], 8,
|
|
3386
|
+
}), z(" " + D(E.value), 1)], 8, to)])) : A("", !0),
|
|
3418
3387
|
I("div", {
|
|
3419
3388
|
class: "tpl-block-content",
|
|
3420
3389
|
style: L(te.value)
|
|
3421
3390
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3422
|
-
], 10,
|
|
3391
|
+
], 10, Wa));
|
|
3423
3392
|
}
|
|
3424
3393
|
}), [["__scopeId", "data-v-4a48371d"]]);
|
|
3425
3394
|
//#endregion
|
|
3426
3395
|
//#region src/utils/unwrapParagraph.ts
|
|
3427
|
-
function
|
|
3396
|
+
function ro(e) {
|
|
3428
3397
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3429
3398
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3430
3399
|
}
|
|
3431
3400
|
//#endregion
|
|
3432
3401
|
//#region src/components/blocks/TitleBlock.vue
|
|
3433
|
-
var
|
|
3402
|
+
var io = /* @__PURE__ */ B({
|
|
3434
3403
|
__name: "TitleBlock",
|
|
3435
3404
|
props: {
|
|
3436
3405
|
block: {},
|
|
3437
3406
|
viewport: {}
|
|
3438
3407
|
},
|
|
3439
3408
|
setup(e) {
|
|
3440
|
-
let t = e, n = T(() => import("./TitleEditor-
|
|
3409
|
+
let t = e, n = T(() => import("./TitleEditor-CMzzOPye.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = za(() => t.block.content), l = O(() => {
|
|
3441
3410
|
let e = {
|
|
3442
3411
|
fontSize: `${pe[t.block.level]}px`,
|
|
3443
3412
|
color: t.block.color,
|
|
3444
3413
|
textAlign: t.block.textAlign
|
|
3445
3414
|
};
|
|
3446
3415
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3447
|
-
}), u = O(() => `h${t.block.level}`), p = O(() =>
|
|
3416
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => ro(o.value));
|
|
3448
3417
|
return (t, o) => (f(), k("div", {
|
|
3449
3418
|
ref_key: "blockRef",
|
|
3450
3419
|
ref: i,
|
|
@@ -3467,11 +3436,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3467
3436
|
innerHTML: p.value
|
|
3468
3437
|
}, null, 8, ["innerHTML"]))], 36));
|
|
3469
3438
|
}
|
|
3470
|
-
}),
|
|
3439
|
+
}), ao = { class: "tpl:w-full" }, oo = { class: "tpl:flex tpl:gap-0" }, so = {
|
|
3471
3440
|
key: 0,
|
|
3472
3441
|
"data-testid": "section-drop-hint",
|
|
3473
3442
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
3474
|
-
},
|
|
3443
|
+
}, co = /* @__PURE__ */ B({
|
|
3475
3444
|
__name: "SectionBlock",
|
|
3476
3445
|
props: {
|
|
3477
3446
|
block: {},
|
|
@@ -3479,12 +3448,12 @@ var ro = /* @__PURE__ */ B({
|
|
|
3479
3448
|
},
|
|
3480
3449
|
setup(e) {
|
|
3481
3450
|
let t = {
|
|
3482
|
-
title:
|
|
3483
|
-
paragraph:
|
|
3484
|
-
image:
|
|
3485
|
-
button:
|
|
3486
|
-
divider:
|
|
3487
|
-
custom:
|
|
3451
|
+
title: io,
|
|
3452
|
+
paragraph: Va,
|
|
3453
|
+
image: Oa,
|
|
3454
|
+
button: Pr,
|
|
3455
|
+
divider: da,
|
|
3456
|
+
custom: la
|
|
3488
3457
|
}, n = e, { t: r } = Y(), i = J(In, "SectionBlock"), a = v(zn, null), o = v(Wn, null), s = O(() => {
|
|
3489
3458
|
switch (n.block.columns) {
|
|
3490
3459
|
case "2": return ["50%", "50%"];
|
|
@@ -3511,7 +3480,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3511
3480
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3512
3481
|
}
|
|
3513
3482
|
function m(e) {
|
|
3514
|
-
return
|
|
3483
|
+
return Ha(e, o, t);
|
|
3515
3484
|
}
|
|
3516
3485
|
function g(e, t) {
|
|
3517
3486
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3519,7 +3488,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3519
3488
|
dataSourceFetched: t.dataSourceFetched
|
|
3520
3489
|
});
|
|
3521
3490
|
}
|
|
3522
|
-
return (t, n) => (f(), k("div",
|
|
3491
|
+
return (t, n) => (f(), k("div", ao, [I("div", oo, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3523
3492
|
key: n,
|
|
3524
3493
|
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3525
3494
|
style: L({ width: s.value[n] })
|
|
@@ -3541,7 +3510,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3541
3510
|
class: "tpl:min-h-[60px]",
|
|
3542
3511
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3543
3512
|
}, {
|
|
3544
|
-
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(
|
|
3513
|
+
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(no, {
|
|
3545
3514
|
block: t,
|
|
3546
3515
|
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3547
3516
|
viewport: e.viewport,
|
|
@@ -3572,9 +3541,9 @@ var ro = /* @__PURE__ */ B({
|
|
|
3572
3541
|
"model-value",
|
|
3573
3542
|
"group",
|
|
3574
3543
|
"onUpdate:modelValue"
|
|
3575
|
-
]), u(n).length === 0 ? (f(), k("div",
|
|
3544
|
+
]), u(n).length === 0 ? (f(), k("div", so, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
|
|
3576
3545
|
}
|
|
3577
|
-
}),
|
|
3546
|
+
}), lo = {
|
|
3578
3547
|
facebook: {
|
|
3579
3548
|
name: "Facebook",
|
|
3580
3549
|
color: "#1877F2",
|
|
@@ -3655,11 +3624,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3655
3624
|
color: "#1769FF",
|
|
3656
3625
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
3657
3626
|
}
|
|
3658
|
-
},
|
|
3627
|
+
}, uo = {
|
|
3659
3628
|
small: 24,
|
|
3660
3629
|
medium: 32,
|
|
3661
3630
|
large: 48
|
|
3662
|
-
},
|
|
3631
|
+
}, fo = [
|
|
3663
3632
|
"facebook",
|
|
3664
3633
|
"twitter",
|
|
3665
3634
|
"instagram",
|
|
@@ -3676,11 +3645,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3676
3645
|
"github",
|
|
3677
3646
|
"dribbble",
|
|
3678
3647
|
"behance"
|
|
3679
|
-
],
|
|
3648
|
+
], po = [
|
|
3680
3649
|
"width",
|
|
3681
3650
|
"height",
|
|
3682
3651
|
"fill"
|
|
3683
|
-
],
|
|
3652
|
+
], mo = ["d"], ho = /* @__PURE__ */ B({
|
|
3684
3653
|
__name: "SocialIconSvg",
|
|
3685
3654
|
props: {
|
|
3686
3655
|
platform: {},
|
|
@@ -3688,7 +3657,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3688
3657
|
iconSize: {}
|
|
3689
3658
|
},
|
|
3690
3659
|
setup(e) {
|
|
3691
|
-
let t = e, n = O(() =>
|
|
3660
|
+
let t = e, n = O(() => lo[t.platform]), r = O(() => uo[t.iconSize]), i = O(() => {
|
|
3692
3661
|
let e = {
|
|
3693
3662
|
display: "inline-flex",
|
|
3694
3663
|
alignItems: "center",
|
|
@@ -3732,12 +3701,12 @@ var ro = /* @__PURE__ */ B({
|
|
|
3732
3701
|
viewBox: "0 0 24 24",
|
|
3733
3702
|
fill: o.value,
|
|
3734
3703
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3735
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
3704
|
+
}, [I("path", { d: n.value.path }, null, 8, mo)], 8, po))], 4));
|
|
3736
3705
|
}
|
|
3737
|
-
}),
|
|
3706
|
+
}), go = { class: "tpl:w-full" }, _o = ["href"], vo = {
|
|
3738
3707
|
key: 1,
|
|
3739
3708
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3740
|
-
},
|
|
3709
|
+
}, yo = /* @__PURE__ */ B({
|
|
3741
3710
|
__name: "SocialIconsBlock",
|
|
3742
3711
|
props: {
|
|
3743
3712
|
block: {},
|
|
@@ -3750,7 +3719,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3750
3719
|
gap: `${t.block.spacing}px`,
|
|
3751
3720
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3752
3721
|
})), i = O(() => t.block.icons.length > 0);
|
|
3753
|
-
return (t, a) => (f(), k("div",
|
|
3722
|
+
return (t, a) => (f(), k("div", go, [i.value ? (f(), k("div", {
|
|
3754
3723
|
key: 0,
|
|
3755
3724
|
style: L(r.value)
|
|
3756
3725
|
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
@@ -3758,7 +3727,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3758
3727
|
href: t.url || "#",
|
|
3759
3728
|
class: "tpl:cursor-default",
|
|
3760
3729
|
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3761
|
-
}, [V(
|
|
3730
|
+
}, [V(ho, {
|
|
3762
3731
|
platform: t.platform,
|
|
3763
3732
|
"icon-style": e.block.iconStyle,
|
|
3764
3733
|
"icon-size": e.block.iconSize
|
|
@@ -3766,16 +3735,16 @@ var ro = /* @__PURE__ */ B({
|
|
|
3766
3735
|
"platform",
|
|
3767
3736
|
"icon-style",
|
|
3768
3737
|
"icon-size"
|
|
3769
|
-
])], 8,
|
|
3738
|
+
])], 8, _o))), 128))], 4)) : (f(), k("div", vo, [V(j(bi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
3770
3739
|
}
|
|
3771
|
-
}),
|
|
3740
|
+
}), bo = { class: "tpl:w-full" }, xo = {
|
|
3772
3741
|
key: 0,
|
|
3773
3742
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3774
3743
|
style: {
|
|
3775
3744
|
"background-color": "var(--tpl-bg-hover)",
|
|
3776
3745
|
color: "var(--tpl-text-dim)"
|
|
3777
3746
|
}
|
|
3778
|
-
},
|
|
3747
|
+
}, So = /* @__PURE__ */ B({
|
|
3779
3748
|
__name: "SpacerBlock",
|
|
3780
3749
|
props: {
|
|
3781
3750
|
block: {},
|
|
@@ -3787,23 +3756,23 @@ var ro = /* @__PURE__ */ B({
|
|
|
3787
3756
|
minHeight: `${t.block.height}px`,
|
|
3788
3757
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3789
3758
|
}));
|
|
3790
|
-
return (t, i) => (f(), k("div",
|
|
3759
|
+
return (t, i) => (f(), k("div", bo, [I("div", {
|
|
3791
3760
|
style: L(r.value),
|
|
3792
3761
|
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
3793
|
-
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span",
|
|
3762
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", xo, D(e.block.height) + "px ", 1))], 6)]));
|
|
3794
3763
|
}
|
|
3795
|
-
}),
|
|
3764
|
+
}), Co = { class: "tpl:w-full" }, wo = { key: 0 }, To = [
|
|
3796
3765
|
"aria-label",
|
|
3797
3766
|
"data-placeholder",
|
|
3798
3767
|
"onBlur"
|
|
3799
|
-
],
|
|
3768
|
+
], Eo = [
|
|
3800
3769
|
"aria-label",
|
|
3801
3770
|
"data-placeholder",
|
|
3802
3771
|
"onBlur"
|
|
3803
|
-
],
|
|
3772
|
+
], Do = {
|
|
3804
3773
|
key: 1,
|
|
3805
3774
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3806
|
-
},
|
|
3775
|
+
}, Oo = /*#__PURE__*/ Fi(/* @__PURE__ */ B({
|
|
3807
3776
|
__name: "TableBlock",
|
|
3808
3777
|
props: {
|
|
3809
3778
|
block: {},
|
|
@@ -3846,11 +3815,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3846
3815
|
} : n);
|
|
3847
3816
|
i.updateBlock(n.block.id, { rows: o });
|
|
3848
3817
|
}
|
|
3849
|
-
return (e, n) => (f(), k("div",
|
|
3818
|
+
return (e, n) => (f(), k("div", Co, [a.value ? (f(), k("table", {
|
|
3850
3819
|
key: 0,
|
|
3851
3820
|
style: L(o.value),
|
|
3852
3821
|
class: "tpl-table-editable"
|
|
3853
|
-
}, [u.value ? (f(), k("thead",
|
|
3822
|
+
}, [u.value ? (f(), k("thead", wo, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
3854
3823
|
key: e.id,
|
|
3855
3824
|
style: L(l.value),
|
|
3856
3825
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -3859,7 +3828,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3859
3828
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3860
3829
|
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3861
3830
|
onClick: M(p, ["stop"])
|
|
3862
|
-
}, null, 44,
|
|
3831
|
+
}, null, 44, To)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
|
|
3863
3832
|
key: i.id,
|
|
3864
3833
|
style: L(s.value),
|
|
3865
3834
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -3868,9 +3837,9 @@ var ro = /* @__PURE__ */ B({
|
|
|
3868
3837
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3869
3838
|
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3870
3839
|
onClick: M(p, ["stop"])
|
|
3871
|
-
}, null, 44,
|
|
3840
|
+
}, null, 44, Eo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", Do, [V(j(wi), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
3872
3841
|
}
|
|
3873
|
-
}), [["__scopeId", "data-v-de1a7c76"]]),
|
|
3842
|
+
}), [["__scopeId", "data-v-de1a7c76"]]), ko = /* @__PURE__ */ B({
|
|
3874
3843
|
__name: "VideoPlayButton",
|
|
3875
3844
|
props: { hoverEffect: {
|
|
3876
3845
|
type: Boolean,
|
|
@@ -3888,7 +3857,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3888
3857
|
});
|
|
3889
3858
|
//#endregion
|
|
3890
3859
|
//#region src/utils/videoThumbnail.ts
|
|
3891
|
-
function
|
|
3860
|
+
function Ao(e) {
|
|
3892
3861
|
if (!e) return {
|
|
3893
3862
|
platform: "unknown",
|
|
3894
3863
|
videoId: null,
|
|
@@ -3920,25 +3889,25 @@ function ko(e) {
|
|
|
3920
3889
|
thumbnailUrl: null
|
|
3921
3890
|
};
|
|
3922
3891
|
}
|
|
3923
|
-
function
|
|
3924
|
-
return t ||
|
|
3892
|
+
function jo(e, t) {
|
|
3893
|
+
return t || Ao(e).thumbnailUrl;
|
|
3925
3894
|
}
|
|
3926
3895
|
//#endregion
|
|
3927
3896
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3928
|
-
var
|
|
3897
|
+
var Mo = ["src", "alt"], No = {
|
|
3929
3898
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3930
3899
|
style: { opacity: "0.7" }
|
|
3931
|
-
},
|
|
3900
|
+
}, Po = ["href"], Fo = ["src", "alt"], Io = ["src", "alt"], Lo = {
|
|
3932
3901
|
key: 3,
|
|
3933
3902
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3934
|
-
},
|
|
3903
|
+
}, Ro = /* @__PURE__ */ B({
|
|
3935
3904
|
__name: "VideoBlock",
|
|
3936
3905
|
props: {
|
|
3937
3906
|
block: {},
|
|
3938
3907
|
viewport: {}
|
|
3939
3908
|
},
|
|
3940
3909
|
setup(e) {
|
|
3941
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
3910
|
+
let t = e, { t: n } = Y(), { syntax: r } = Ki(), i = O(() => vt(t.block.url, r) || vt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : jo(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
|
|
3942
3911
|
let e = t.block.align;
|
|
3943
3912
|
return {
|
|
3944
3913
|
maxWidth: "100%",
|
|
@@ -3959,16 +3928,16 @@ var jo = ["src", "alt"], Mo = {
|
|
|
3959
3928
|
class: "tpl:w-full tpl:border-0",
|
|
3960
3929
|
src: e.block.placeholderUrl,
|
|
3961
3930
|
alt: e.block.alt
|
|
3962
|
-
}, null, 8,
|
|
3931
|
+
}, null, 8, Mo), V(ko)], 4)) : i.value ? (f(), k("div", {
|
|
3963
3932
|
key: 1,
|
|
3964
3933
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3965
3934
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3966
|
-
}, [V(j(
|
|
3935
|
+
}, [V(j(ki), {
|
|
3967
3936
|
size: 36,
|
|
3968
3937
|
"stroke-width": 1.5,
|
|
3969
3938
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3970
3939
|
style: { opacity: "0.5" }
|
|
3971
|
-
}), I("span",
|
|
3940
|
+
}), I("span", No, D(c.value), 1)], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
3972
3941
|
key: 0,
|
|
3973
3942
|
href: e.block.url,
|
|
3974
3943
|
target: "_blank",
|
|
@@ -3980,7 +3949,7 @@ var jo = ["src", "alt"], Mo = {
|
|
|
3980
3949
|
class: "tpl:w-full tpl:border-0",
|
|
3981
3950
|
src: a.value,
|
|
3982
3951
|
alt: e.block.alt
|
|
3983
|
-
}, null, 8,
|
|
3952
|
+
}, null, 8, Fo), V(ko, { "hover-effect": "" })], 12, Po)) : (f(), k("div", {
|
|
3984
3953
|
key: 1,
|
|
3985
3954
|
class: "tpl:relative tpl:inline-block",
|
|
3986
3955
|
style: L(s.value)
|
|
@@ -3988,31 +3957,31 @@ var jo = ["src", "alt"], Mo = {
|
|
|
3988
3957
|
class: "tpl:w-full tpl:border-0",
|
|
3989
3958
|
src: a.value,
|
|
3990
3959
|
alt: e.block.alt
|
|
3991
|
-
}, null, 8,
|
|
3960
|
+
}, null, 8, Io), V(ko)], 4))], 64)) : (f(), k("div", Lo, [V(j(ki), {
|
|
3992
3961
|
size: 40,
|
|
3993
3962
|
"stroke-width": 1.5,
|
|
3994
3963
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3995
3964
|
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
3996
3965
|
}
|
|
3997
|
-
}),
|
|
3998
|
-
section:
|
|
3999
|
-
title:
|
|
4000
|
-
paragraph:
|
|
4001
|
-
image:
|
|
4002
|
-
button:
|
|
4003
|
-
divider:
|
|
4004
|
-
video:
|
|
4005
|
-
social:
|
|
4006
|
-
menu:
|
|
4007
|
-
table:
|
|
4008
|
-
spacer:
|
|
4009
|
-
html:
|
|
4010
|
-
countdown: T(() => import("./CountdownBlock-
|
|
3966
|
+
}), zo = {
|
|
3967
|
+
section: co,
|
|
3968
|
+
title: io,
|
|
3969
|
+
paragraph: Va,
|
|
3970
|
+
image: Oa,
|
|
3971
|
+
button: Pr,
|
|
3972
|
+
divider: da,
|
|
3973
|
+
video: Ro,
|
|
3974
|
+
social: yo,
|
|
3975
|
+
menu: Ma,
|
|
3976
|
+
table: Oo,
|
|
3977
|
+
spacer: So,
|
|
3978
|
+
html: ga,
|
|
3979
|
+
countdown: T(() => import("./CountdownBlock-GRio55a1.js").then((e) => e.n))
|
|
4011
3980
|
};
|
|
4012
|
-
function
|
|
3981
|
+
function Bo(e) {
|
|
4013
3982
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
4014
3983
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4015
|
-
let { resolvedTheme: c } =
|
|
3984
|
+
let { resolvedTheme: c } = vr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = br({
|
|
4016
3985
|
themeOverrides: u,
|
|
4017
3986
|
resolvedTheme: c,
|
|
4018
3987
|
extraStyles: e.themeExtraStyles
|
|
@@ -4037,13 +4006,13 @@ function zo(e) {
|
|
|
4037
4006
|
g && (_ = H(f.isNavigating, (e) => {
|
|
4038
4007
|
e ? g.pause() : g.resume();
|
|
4039
4008
|
}));
|
|
4040
|
-
let v =
|
|
4009
|
+
let v = _r(t, {
|
|
4041
4010
|
t: a,
|
|
4042
4011
|
format: o
|
|
4043
|
-
}), y =
|
|
4044
|
-
if (
|
|
4012
|
+
}), y = wr();
|
|
4013
|
+
if (kr(y, zo), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, la);
|
|
4045
4014
|
function b(e) {
|
|
4046
|
-
for (let t of e) y.registerCustom(t,
|
|
4015
|
+
for (let t of e) y.registerCustom(t, la);
|
|
4047
4016
|
}
|
|
4048
4017
|
let x = Pn();
|
|
4049
4018
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -4054,7 +4023,7 @@ function zo(e) {
|
|
|
4054
4023
|
}, { capture: !0 });
|
|
4055
4024
|
}
|
|
4056
4025
|
function S(r) {
|
|
4057
|
-
x.isActive() &&
|
|
4026
|
+
x.isActive() && jr(r, {
|
|
4058
4027
|
history: f,
|
|
4059
4028
|
selectBlock: (e) => t.selectBlock(e),
|
|
4060
4029
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4065,17 +4034,17 @@ function zo(e) {
|
|
|
4065
4034
|
}
|
|
4066
4035
|
q(document, "keydown", S);
|
|
4067
4036
|
let w = C(null);
|
|
4068
|
-
p(
|
|
4037
|
+
p(ar, e.editorRoot ?? document), p(or, w), p(Fn, r), p(In, t), p(Ln, f), p(Rn, m), p(zn, h), p(Bn, i), p(Vn, d), p(Hn, c), p(Un, n.blockDefaults), p(Wn, y), p(Gn, n.customBlocks ?? []), p(Kn, n.paletteBlocks), p(qn, Tr(t.content, y));
|
|
4069
4038
|
let ee = pt(n.mergeTags?.syntax);
|
|
4070
|
-
p(
|
|
4071
|
-
let T =
|
|
4039
|
+
p(Jn, n.mergeTags?.tags ?? []), p(Yn, ee), p(Xn, n.mergeTags?.onRequest ?? null), p(Zn, n.mergeTags?.autocomplete !== !1), p(Qn, pr()), p($n, n.onRequestMedia ?? null), p(er, n.displayConditions?.conditions ?? []), p(tr, n.displayConditions?.allowCustom ?? !1), p(nr, e.capabilities ?? {}), p(rr, v);
|
|
4040
|
+
let T = mr(n.lint) ? null : hr({
|
|
4072
4041
|
content: t.content,
|
|
4073
4042
|
options: n.lint ?? {},
|
|
4074
4043
|
updateBlock: t.updateBlock,
|
|
4075
4044
|
updateSettings: t.updateSettings,
|
|
4076
4045
|
removeBlock: t.removeBlock
|
|
4077
4046
|
});
|
|
4078
|
-
p(
|
|
4047
|
+
p(ir, T);
|
|
4079
4048
|
function E() {
|
|
4080
4049
|
_?.(), T?.destroy(), g?.destroy(), f.destroy();
|
|
4081
4050
|
}
|
|
@@ -4099,19 +4068,19 @@ function zo(e) {
|
|
|
4099
4068
|
}
|
|
4100
4069
|
//#endregion
|
|
4101
4070
|
//#region src/composables/usePopoverRoot.ts
|
|
4102
|
-
function
|
|
4103
|
-
return v(
|
|
4071
|
+
function Vo() {
|
|
4072
|
+
return v(or, C(null));
|
|
4104
4073
|
}
|
|
4105
4074
|
//#endregion
|
|
4106
4075
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4107
|
-
var
|
|
4076
|
+
var Ho = ["data-tpl-theme"], Uo = /* @__PURE__ */ B({
|
|
4108
4077
|
__name: "TplModal",
|
|
4109
4078
|
props: { visible: { type: Boolean } },
|
|
4110
4079
|
emits: ["close", "keydown"],
|
|
4111
4080
|
setup(e, { emit: t }) {
|
|
4112
4081
|
let n = e, r = t, i = C(null);
|
|
4113
|
-
|
|
4114
|
-
let a = v(Hn), s =
|
|
4082
|
+
Hi(i, O(() => n.visible));
|
|
4083
|
+
let a = v(Hn), s = Vo();
|
|
4115
4084
|
function c(e) {
|
|
4116
4085
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4117
4086
|
}
|
|
@@ -4140,11 +4109,11 @@ var Vo = ["data-tpl-theme"], Ho = /* @__PURE__ */ B({
|
|
|
4140
4109
|
}, [I("div", {
|
|
4141
4110
|
ref_key: "dialogRef",
|
|
4142
4111
|
ref: i
|
|
4143
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4112
|
+
}, [o(t.$slots, "default")], 512)], 40, Ho)) : A("", !0)]),
|
|
4144
4113
|
_: 3
|
|
4145
4114
|
})], 8, ["to"])) : A("", !0);
|
|
4146
4115
|
}
|
|
4147
|
-
}),
|
|
4116
|
+
}), Wo = class e {
|
|
4148
4117
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4149
4118
|
accessToken = null;
|
|
4150
4119
|
expiresAt = null;
|
|
@@ -4245,8 +4214,8 @@ var Vo = ["data-tpl-theme"], Ho = /* @__PURE__ */ B({
|
|
|
4245
4214
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4246
4215
|
}
|
|
4247
4216
|
};
|
|
4248
|
-
function
|
|
4249
|
-
return e.mode === "direct" ? new
|
|
4217
|
+
function Go(e, t) {
|
|
4218
|
+
return e.mode === "direct" ? new Wo({
|
|
4250
4219
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4251
4220
|
baseUrl: e.baseUrl,
|
|
4252
4221
|
requestOptions: {
|
|
@@ -4260,7 +4229,7 @@ function Wo(e, t) {
|
|
|
4260
4229
|
}
|
|
4261
4230
|
},
|
|
4262
4231
|
onError: t
|
|
4263
|
-
}) : new
|
|
4232
|
+
}) : new Wo({
|
|
4264
4233
|
url: e.url,
|
|
4265
4234
|
baseUrl: e.baseUrl,
|
|
4266
4235
|
requestOptions: e.requestOptions,
|
|
@@ -4272,16 +4241,16 @@ function Wo(e, t) {
|
|
|
4272
4241
|
function Z(e, t) {
|
|
4273
4242
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4274
4243
|
}
|
|
4275
|
-
var
|
|
4244
|
+
var Ko = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Ko}/templates/{template}`, qo = `${Q}/ai`, Jo = `${Ko}/media`, Yo = `${Jo}/folders`, Xo = `${Ko}/saved-modules`, $ = {
|
|
4276
4245
|
health: "/api/v1/health",
|
|
4277
|
-
"projects.config": `${
|
|
4278
|
-
"broadcasting.auth": `${
|
|
4279
|
-
"templates.store": `${
|
|
4246
|
+
"projects.config": `${Ko}/config`,
|
|
4247
|
+
"broadcasting.auth": `${Ko}/broadcasting/auth`,
|
|
4248
|
+
"templates.store": `${Ko}/templates`,
|
|
4280
4249
|
"templates.show": `${Q}`,
|
|
4281
4250
|
"templates.update": `${Q}`,
|
|
4282
4251
|
"templates.destroy": `${Q}`,
|
|
4283
4252
|
"templates.export": `${Q}/export`,
|
|
4284
|
-
"templates.importFromBeefree": `${
|
|
4253
|
+
"templates.importFromBeefree": `${Ko}/templates/import/from-beefree`,
|
|
4285
4254
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4286
4255
|
"snapshots.index": `${Q}/snapshots`,
|
|
4287
4256
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4292,31 +4261,31 @@ var Go = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Go}/templates/{te
|
|
|
4292
4261
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4293
4262
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4294
4263
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4295
|
-
"ai.generate": `${
|
|
4296
|
-
"ai.conversationMessages": `${
|
|
4297
|
-
"ai.suggestions": `${
|
|
4298
|
-
"ai.rewriteText": `${
|
|
4299
|
-
"ai.score": `${
|
|
4300
|
-
"ai.fixFinding": `${
|
|
4301
|
-
"ai.generateFromDesign": `${
|
|
4302
|
-
"media.upload": `${
|
|
4303
|
-
"media.browse": `${
|
|
4304
|
-
"media.delete": `${
|
|
4305
|
-
"media.move": `${
|
|
4306
|
-
"media.update": `${
|
|
4307
|
-
"media.replace": `${
|
|
4308
|
-
"media.checkUsage": `${
|
|
4309
|
-
"media.frequentlyUsed": `${
|
|
4310
|
-
"media.importFromUrl": `${
|
|
4311
|
-
"folders.index": `${
|
|
4312
|
-
"folders.store": `${
|
|
4313
|
-
"folders.update": `${
|
|
4314
|
-
"folders.destroy": `${
|
|
4315
|
-
"savedModules.index": `${
|
|
4316
|
-
"savedModules.store": `${
|
|
4317
|
-
"savedModules.update": `${
|
|
4318
|
-
"savedModules.destroy": `${
|
|
4319
|
-
},
|
|
4264
|
+
"ai.generate": `${qo}/generate`,
|
|
4265
|
+
"ai.conversationMessages": `${qo}/conversation-messages`,
|
|
4266
|
+
"ai.suggestions": `${qo}/suggestions`,
|
|
4267
|
+
"ai.rewriteText": `${qo}/rewrite-text`,
|
|
4268
|
+
"ai.score": `${qo}/score`,
|
|
4269
|
+
"ai.fixFinding": `${qo}/fix-finding`,
|
|
4270
|
+
"ai.generateFromDesign": `${qo}/generate-from-design`,
|
|
4271
|
+
"media.upload": `${Jo}/upload`,
|
|
4272
|
+
"media.browse": `${Jo}/browse`,
|
|
4273
|
+
"media.delete": `${Jo}/delete`,
|
|
4274
|
+
"media.move": `${Jo}/move`,
|
|
4275
|
+
"media.update": `${Jo}/{media}`,
|
|
4276
|
+
"media.replace": `${Jo}/{media}/replace`,
|
|
4277
|
+
"media.checkUsage": `${Jo}/check-usage`,
|
|
4278
|
+
"media.frequentlyUsed": `${Jo}/frequently-used`,
|
|
4279
|
+
"media.importFromUrl": `${Jo}/import-from-url`,
|
|
4280
|
+
"folders.index": `${Yo}`,
|
|
4281
|
+
"folders.store": `${Yo}`,
|
|
4282
|
+
"folders.update": `${Yo}/{mediaFolder}`,
|
|
4283
|
+
"folders.destroy": `${Yo}/{mediaFolder}`,
|
|
4284
|
+
"savedModules.index": `${Xo}`,
|
|
4285
|
+
"savedModules.store": `${Xo}`,
|
|
4286
|
+
"savedModules.update": `${Xo}/{savedModule}`,
|
|
4287
|
+
"savedModules.destroy": `${Xo}/{savedModule}`
|
|
4288
|
+
}, Zo = class {
|
|
4320
4289
|
authManager;
|
|
4321
4290
|
constructor(e) {
|
|
4322
4291
|
this.authManager = e;
|
|
@@ -4502,14 +4471,14 @@ var Go = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Go}/templates/{te
|
|
|
4502
4471
|
};
|
|
4503
4472
|
//#endregion
|
|
4504
4473
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4505
|
-
function
|
|
4474
|
+
function Qo(e) {
|
|
4506
4475
|
return {
|
|
4507
4476
|
host: e.host,
|
|
4508
4477
|
port: e.port,
|
|
4509
4478
|
appKey: e.app_key
|
|
4510
4479
|
};
|
|
4511
4480
|
}
|
|
4512
|
-
var
|
|
4481
|
+
var $o = class {
|
|
4513
4482
|
pusher = null;
|
|
4514
4483
|
authManager;
|
|
4515
4484
|
config;
|
|
@@ -4576,7 +4545,7 @@ var Qo = class {
|
|
|
4576
4545
|
};
|
|
4577
4546
|
//#endregion
|
|
4578
4547
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4579
|
-
function
|
|
4548
|
+
function es(e, t) {
|
|
4580
4549
|
let { operation: n, data: r } = t;
|
|
4581
4550
|
switch (n) {
|
|
4582
4551
|
case "add_block":
|
|
@@ -4604,11 +4573,11 @@ function $o(e, t) {
|
|
|
4604
4573
|
}
|
|
4605
4574
|
//#endregion
|
|
4606
4575
|
//#region ../core/src/cloud/editor.ts
|
|
4607
|
-
function
|
|
4576
|
+
function ts(e) {
|
|
4608
4577
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
4609
4578
|
}
|
|
4610
|
-
function
|
|
4611
|
-
let t = new
|
|
4579
|
+
function ns(e) {
|
|
4580
|
+
let t = new Zo(e.authManager), n = S({
|
|
4612
4581
|
template: null,
|
|
4613
4582
|
content: Ue(e.defaultFontFamily, e.templateDefaults),
|
|
4614
4583
|
selectedBlockId: null,
|
|
@@ -4714,7 +4683,7 @@ function ts(e) {
|
|
|
4714
4683
|
let l;
|
|
4715
4684
|
if (r) {
|
|
4716
4685
|
let e = o(n.content.blocks, r);
|
|
4717
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
4686
|
+
if (!e || e.type !== "section" || i < 0 || i >= ts(e.columns)) return;
|
|
4718
4687
|
e.children[i] = e.children[i] || [], l = e.children[i];
|
|
4719
4688
|
} else l = n.content.blocks;
|
|
4720
4689
|
let [u] = a.blocks.splice(c, 1);
|
|
@@ -4806,11 +4775,11 @@ function ts(e) {
|
|
|
4806
4775
|
}
|
|
4807
4776
|
//#endregion
|
|
4808
4777
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4809
|
-
var
|
|
4810
|
-
function
|
|
4811
|
-
return `msg_${Date.now()}_${++
|
|
4778
|
+
var rs = 0;
|
|
4779
|
+
function is() {
|
|
4780
|
+
return `msg_${Date.now()}_${++rs}`;
|
|
4812
4781
|
}
|
|
4813
|
-
function
|
|
4782
|
+
function as(e) {
|
|
4814
4783
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C([]), o = C(!1), s = C(!1), c = C(null), l = C(null), u = C(null), d = C(null), f = C(null), p = C(null), m = C(!1), h = C([]), g = C(!1);
|
|
4815
4784
|
function _(e, t) {
|
|
4816
4785
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -4904,14 +4873,14 @@ function is(e) {
|
|
|
4904
4873
|
let v = n();
|
|
4905
4874
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
4906
4875
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
4907
|
-
let y =
|
|
4876
|
+
let y = is();
|
|
4908
4877
|
a.value = [...a.value, {
|
|
4909
4878
|
id: y,
|
|
4910
4879
|
role: "user",
|
|
4911
4880
|
content: e,
|
|
4912
4881
|
timestamp: Date.now()
|
|
4913
4882
|
}];
|
|
4914
|
-
let b =
|
|
4883
|
+
let b = is();
|
|
4915
4884
|
a.value = [...a.value, {
|
|
4916
4885
|
id: b,
|
|
4917
4886
|
role: "assistant",
|
|
@@ -5002,7 +4971,7 @@ function is(e) {
|
|
|
5002
4971
|
}
|
|
5003
4972
|
//#endregion
|
|
5004
4973
|
//#region ../core/src/cloud/ai-config.ts
|
|
5005
|
-
function
|
|
4974
|
+
function os(e) {
|
|
5006
4975
|
function t(t) {
|
|
5007
4976
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
5008
4977
|
}
|
|
@@ -5013,7 +4982,7 @@ function as(e) {
|
|
|
5013
4982
|
}
|
|
5014
4983
|
//#endregion
|
|
5015
4984
|
//#region ../core/src/cloud/template-scoring.ts
|
|
5016
|
-
function
|
|
4985
|
+
function ss(e) {
|
|
5017
4986
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
5018
4987
|
async function l(e, o) {
|
|
5019
4988
|
let s = n();
|
|
@@ -5158,7 +5127,7 @@ function os(e) {
|
|
|
5158
5127
|
}
|
|
5159
5128
|
//#endregion
|
|
5160
5129
|
//#region ../core/src/cloud/design-reference.ts
|
|
5161
|
-
function
|
|
5130
|
+
function cs(e) {
|
|
5162
5131
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5163
5132
|
async function s(e) {
|
|
5164
5133
|
let s = n();
|
|
@@ -5221,8 +5190,8 @@ function ss(e) {
|
|
|
5221
5190
|
}
|
|
5222
5191
|
//#endregion
|
|
5223
5192
|
//#region ../core/src/cloud/comments.ts
|
|
5224
|
-
function
|
|
5225
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5193
|
+
function ls(e) {
|
|
5194
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new Zo(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
5226
5195
|
let e = 0;
|
|
5227
5196
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5228
5197
|
return e;
|
|
@@ -5421,17 +5390,17 @@ function cs(e) {
|
|
|
5421
5390
|
}
|
|
5422
5391
|
//#endregion
|
|
5423
5392
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5424
|
-
function
|
|
5393
|
+
function us(e) {
|
|
5425
5394
|
let { comments: t, channel: n } = e;
|
|
5426
5395
|
H(n, (e, n) => {
|
|
5427
5396
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5428
|
-
|
|
5397
|
+
ds(t, e);
|
|
5429
5398
|
});
|
|
5430
5399
|
}), l(() => {
|
|
5431
5400
|
n.value?.unbind("comment-broadcast");
|
|
5432
5401
|
});
|
|
5433
5402
|
}
|
|
5434
|
-
function
|
|
5403
|
+
function ds(e, t) {
|
|
5435
5404
|
switch (t.action) {
|
|
5436
5405
|
case "comment_created":
|
|
5437
5406
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5450,7 +5419,7 @@ function us(e, t) {
|
|
|
5450
5419
|
}
|
|
5451
5420
|
//#endregion
|
|
5452
5421
|
//#region ../core/src/cloud/collaboration.ts
|
|
5453
|
-
var
|
|
5422
|
+
var fs = [
|
|
5454
5423
|
"pusher:member_added",
|
|
5455
5424
|
"pusher:member_removed",
|
|
5456
5425
|
"client-block_locked",
|
|
@@ -5458,10 +5427,10 @@ var ds = [
|
|
|
5458
5427
|
"client-operation",
|
|
5459
5428
|
"mcp-operation"
|
|
5460
5429
|
];
|
|
5461
|
-
function
|
|
5462
|
-
for (let t of
|
|
5430
|
+
function ps(e) {
|
|
5431
|
+
for (let t of fs) e.unbind(t);
|
|
5463
5432
|
}
|
|
5464
|
-
var
|
|
5433
|
+
var ms = [
|
|
5465
5434
|
"#3b82f6",
|
|
5466
5435
|
"#ef4444",
|
|
5467
5436
|
"#10b981",
|
|
@@ -5473,10 +5442,10 @@ var ps = [
|
|
|
5473
5442
|
"#6366f1",
|
|
5474
5443
|
"#14b8a6"
|
|
5475
5444
|
];
|
|
5476
|
-
function
|
|
5445
|
+
function hs(e) {
|
|
5477
5446
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5478
5447
|
function u() {
|
|
5479
|
-
let e =
|
|
5448
|
+
let e = ms[o % ms.length];
|
|
5480
5449
|
return o++, e;
|
|
5481
5450
|
}
|
|
5482
5451
|
function d(e) {
|
|
@@ -5518,7 +5487,7 @@ function ms(e) {
|
|
|
5518
5487
|
function h(e) {
|
|
5519
5488
|
s = !0;
|
|
5520
5489
|
try {
|
|
5521
|
-
|
|
5490
|
+
es(n, e);
|
|
5522
5491
|
} finally {
|
|
5523
5492
|
s = !1;
|
|
5524
5493
|
}
|
|
@@ -5538,7 +5507,7 @@ function ms(e) {
|
|
|
5538
5507
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5539
5508
|
s || (t && v(t), e && _(e));
|
|
5540
5509
|
}), H(r, (t, n) => {
|
|
5541
|
-
if (n &&
|
|
5510
|
+
if (n && ps(n), !t) {
|
|
5542
5511
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5543
5512
|
return;
|
|
5544
5513
|
}
|
|
@@ -5570,7 +5539,7 @@ function ms(e) {
|
|
|
5570
5539
|
h(e);
|
|
5571
5540
|
});
|
|
5572
5541
|
}), l(() => {
|
|
5573
|
-
r.value &&
|
|
5542
|
+
r.value && ps(r.value);
|
|
5574
5543
|
}), {
|
|
5575
5544
|
collaborators: i,
|
|
5576
5545
|
lockedBlocks: a,
|
|
@@ -5580,7 +5549,7 @@ function ms(e) {
|
|
|
5580
5549
|
}
|
|
5581
5550
|
//#endregion
|
|
5582
5551
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5583
|
-
function
|
|
5552
|
+
function gs(e, t) {
|
|
5584
5553
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5585
5554
|
e.addBlock = (e, r, i, a) => {
|
|
5586
5555
|
n(e, r, i, a), t._broadcastOperation({
|
|
@@ -5635,11 +5604,11 @@ function hs(e, t) {
|
|
|
5635
5604
|
}
|
|
5636
5605
|
//#endregion
|
|
5637
5606
|
//#region ../core/src/cloud/web-socket.ts
|
|
5638
|
-
function
|
|
5607
|
+
function _s(e) {
|
|
5639
5608
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5640
5609
|
async function s(e, s) {
|
|
5641
5610
|
if (a) return;
|
|
5642
|
-
a = new
|
|
5611
|
+
a = new $o({
|
|
5643
5612
|
authManager: t,
|
|
5644
5613
|
config: s,
|
|
5645
5614
|
onError: n
|
|
@@ -5667,8 +5636,8 @@ function gs(e) {
|
|
|
5667
5636
|
}
|
|
5668
5637
|
//#endregion
|
|
5669
5638
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5670
|
-
function
|
|
5671
|
-
let t = new
|
|
5639
|
+
function vs(e) {
|
|
5640
|
+
let t = new Zo(e.authManager), n = C([]), r = C(!1);
|
|
5672
5641
|
async function i(i) {
|
|
5673
5642
|
r.value = !0;
|
|
5674
5643
|
try {
|
|
@@ -5716,8 +5685,8 @@ function _s(e) {
|
|
|
5716
5685
|
}
|
|
5717
5686
|
//#endregion
|
|
5718
5687
|
//#region ../core/src/cloud/snapshots.ts
|
|
5719
|
-
function
|
|
5720
|
-
let t = new
|
|
5688
|
+
function ys(e) {
|
|
5689
|
+
let t = new Zo(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5721
5690
|
async function a() {
|
|
5722
5691
|
r.value = !0;
|
|
5723
5692
|
try {
|
|
@@ -5749,8 +5718,8 @@ function vs(e) {
|
|
|
5749
5718
|
}
|
|
5750
5719
|
//#endregion
|
|
5751
5720
|
//#region ../core/src/cloud/test-email.ts
|
|
5752
|
-
function
|
|
5753
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5721
|
+
function bs(e) {
|
|
5722
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Zo(t), l = C(!1), u = C(null), d = C(null);
|
|
5754
5723
|
o && H(o, (e) => {
|
|
5755
5724
|
e && (d.value = t.testEmailConfig);
|
|
5756
5725
|
}, { immediate: !0 });
|
|
@@ -5786,8 +5755,8 @@ function ys(e) {
|
|
|
5786
5755
|
}
|
|
5787
5756
|
//#endregion
|
|
5788
5757
|
//#region ../core/src/cloud/export.ts
|
|
5789
|
-
function
|
|
5790
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5758
|
+
function xs(e) {
|
|
5759
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new Zo(t);
|
|
5791
5760
|
function a() {
|
|
5792
5761
|
let e = n?.();
|
|
5793
5762
|
return {
|
|
@@ -5813,8 +5782,8 @@ function bs(e) {
|
|
|
5813
5782
|
}
|
|
5814
5783
|
//#endregion
|
|
5815
5784
|
//#region ../core/src/cloud/plan-config.ts
|
|
5816
|
-
function
|
|
5817
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
5785
|
+
function Ss(e) {
|
|
5786
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new Zo(t), o = O(() => r.value?.features ?? null);
|
|
5818
5787
|
function s(e) {
|
|
5819
5788
|
return r.value?.features[e] ?? !1;
|
|
5820
5789
|
}
|
|
@@ -5840,11 +5809,11 @@ function xs(e) {
|
|
|
5840
5809
|
}
|
|
5841
5810
|
//#endregion
|
|
5842
5811
|
//#region ../core/src/cloud/health-check.ts
|
|
5843
|
-
var
|
|
5844
|
-
function
|
|
5812
|
+
var Cs = 5e3;
|
|
5813
|
+
function ws(e) {
|
|
5845
5814
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5846
5815
|
}
|
|
5847
|
-
async function
|
|
5816
|
+
async function Ts(e, t) {
|
|
5848
5817
|
let n = performance.now();
|
|
5849
5818
|
try {
|
|
5850
5819
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5896,7 +5865,7 @@ async function ws(e, t) {
|
|
|
5896
5865
|
};
|
|
5897
5866
|
}
|
|
5898
5867
|
}
|
|
5899
|
-
async function
|
|
5868
|
+
async function Es(e) {
|
|
5900
5869
|
if (!e?.host || !e?.app_key) return {
|
|
5901
5870
|
ok: !1,
|
|
5902
5871
|
error: "WebSocket configuration not available"
|
|
@@ -5912,7 +5881,7 @@ async function Ts(e) {
|
|
|
5912
5881
|
ok: !1,
|
|
5913
5882
|
error: "WebSocket connection timed out"
|
|
5914
5883
|
});
|
|
5915
|
-
},
|
|
5884
|
+
}, Cs);
|
|
5916
5885
|
try {
|
|
5917
5886
|
n = new WebSocket(t);
|
|
5918
5887
|
} catch (t) {
|
|
@@ -5932,8 +5901,8 @@ async function Ts(e) {
|
|
|
5932
5901
|
};
|
|
5933
5902
|
});
|
|
5934
5903
|
}
|
|
5935
|
-
async function
|
|
5936
|
-
let t = await ws(
|
|
5904
|
+
async function Ds(e = {}) {
|
|
5905
|
+
let t = await Ts(ws(e), e.authManager), n = await Es(t.wsConfig);
|
|
5937
5906
|
return {
|
|
5938
5907
|
api: t.api,
|
|
5939
5908
|
websocket: n,
|
|
@@ -5943,29 +5912,29 @@ async function Es(e = {}) {
|
|
|
5943
5912
|
}
|
|
5944
5913
|
//#endregion
|
|
5945
5914
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5946
|
-
function
|
|
5915
|
+
function Os(e) {
|
|
5947
5916
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5948
5917
|
H(n, (e, n) => {
|
|
5949
5918
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5950
|
-
|
|
5919
|
+
es(t, e), r?.(e);
|
|
5951
5920
|
});
|
|
5952
5921
|
});
|
|
5953
5922
|
}
|
|
5954
5923
|
//#endregion
|
|
5955
5924
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5956
|
-
var
|
|
5925
|
+
var ks = {
|
|
5957
5926
|
key: 0,
|
|
5958
5927
|
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)]"
|
|
5959
|
-
},
|
|
5928
|
+
}, As = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, js = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Ms = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Ns = ["title"], Ps = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Fs = {
|
|
5960
5929
|
key: 0,
|
|
5961
5930
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5962
|
-
},
|
|
5931
|
+
}, Is = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ls = {
|
|
5963
5932
|
key: 1,
|
|
5964
5933
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5965
|
-
},
|
|
5934
|
+
}, Rs = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, zs = {
|
|
5966
5935
|
key: 2,
|
|
5967
5936
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5968
|
-
},
|
|
5937
|
+
}, Bs = {
|
|
5969
5938
|
key: 0,
|
|
5970
5939
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5971
5940
|
style: {
|
|
@@ -5974,10 +5943,10 @@ var Os = {
|
|
|
5974
5943
|
"max-width": "85%",
|
|
5975
5944
|
"box-shadow": "var(--tpl-shadow)"
|
|
5976
5945
|
}
|
|
5977
|
-
},
|
|
5946
|
+
}, Vs = {
|
|
5978
5947
|
key: 1,
|
|
5979
5948
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5980
|
-
},
|
|
5949
|
+
}, Hs = {
|
|
5981
5950
|
key: 1,
|
|
5982
5951
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5983
5952
|
style: {
|
|
@@ -5986,21 +5955,21 @@ var Os = {
|
|
|
5986
5955
|
color: "var(--tpl-text)",
|
|
5987
5956
|
"box-shadow": "var(--tpl-shadow)"
|
|
5988
5957
|
}
|
|
5989
|
-
},
|
|
5958
|
+
}, Us = {
|
|
5990
5959
|
key: 0,
|
|
5991
5960
|
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",
|
|
5992
5961
|
style: {
|
|
5993
5962
|
"background-color": "var(--tpl-danger-light)",
|
|
5994
5963
|
color: "var(--tpl-danger)"
|
|
5995
5964
|
}
|
|
5996
|
-
},
|
|
5965
|
+
}, Ws = {
|
|
5997
5966
|
key: 1,
|
|
5998
5967
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5999
5968
|
style: {
|
|
6000
5969
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
6001
5970
|
"backdrop-filter": "blur(2px)"
|
|
6002
5971
|
}
|
|
6003
|
-
},
|
|
5972
|
+
}, Gs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ks = ["onClick"], qs = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Js = { class: "tpl-ai-input-wrapper 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)]" }, Ys = ["placeholder", "disabled"], Xs = ["disabled"], Zs = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Qs = /*@__PURE__*/ B({
|
|
6004
5973
|
__name: "AiChatSidebar",
|
|
6005
5974
|
props: {
|
|
6006
5975
|
visible: { type: Boolean },
|
|
@@ -6008,7 +5977,7 @@ var Os = {
|
|
|
6008
5977
|
},
|
|
6009
5978
|
emits: ["close"],
|
|
6010
5979
|
setup(e, { emit: t }) {
|
|
6011
|
-
let n = e, r = t, i = J(
|
|
5980
|
+
let n = e, r = t, i = J(fr, "AiChatSidebar"), a = J(In, "AiChatSidebar"), o = J(sr, "AiChatSidebar"), s = v(Jn, []), l = _a(), u = as({
|
|
6012
5981
|
authManager: o,
|
|
6013
5982
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6014
5983
|
onApply: n.onApply,
|
|
@@ -6055,42 +6024,42 @@ var Os = {
|
|
|
6055
6024
|
"leave-from-class": "tpl:translate-x-0",
|
|
6056
6025
|
"leave-to-class": "tpl:translate-x-full"
|
|
6057
6026
|
}, {
|
|
6058
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6059
|
-
I("div",
|
|
6027
|
+
default: b(() => [e.visible ? (f(), k("div", ks, [
|
|
6028
|
+
I("div", As, [I("div", js, [V(j(Ci), {
|
|
6060
6029
|
size: 13,
|
|
6061
6030
|
"stroke-width": 2
|
|
6062
|
-
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div",
|
|
6031
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", Ms, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6063
6032
|
key: 0,
|
|
6064
6033
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6065
6034
|
title: j(i).aiChat.clear,
|
|
6066
6035
|
onClick: n[0] ||= (e) => j(u).clearChat()
|
|
6067
|
-
}, [V(j(
|
|
6036
|
+
}, [V(j(Ti), {
|
|
6068
6037
|
size: 14,
|
|
6069
6038
|
"stroke-width": 2
|
|
6070
|
-
})], 8,
|
|
6039
|
+
})], 8, Ns)) : A("", !0), I("button", {
|
|
6071
6040
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6072
6041
|
onClick: n[1] ||= (e) => r("close")
|
|
6073
|
-
}, [V(j(
|
|
6042
|
+
}, [V(j(Ai), {
|
|
6074
6043
|
size: 14,
|
|
6075
6044
|
"stroke-width": 2
|
|
6076
6045
|
})])])]),
|
|
6077
|
-
I("div",
|
|
6046
|
+
I("div", Ps, [
|
|
6078
6047
|
I("div", {
|
|
6079
6048
|
ref_key: "messagesContainer",
|
|
6080
6049
|
ref: p,
|
|
6081
6050
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6082
|
-
}, [j(u).isLoadingHistory.value ? (f(), k("div",
|
|
6051
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", Fs, [V(j(di), {
|
|
6083
6052
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6084
6053
|
size: 24,
|
|
6085
6054
|
"stroke-width": 2
|
|
6086
|
-
}), I("p",
|
|
6055
|
+
}), I("p", Is, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", Ls, [V(j(Ci), {
|
|
6087
6056
|
size: 32,
|
|
6088
6057
|
"stroke-width": 1.5,
|
|
6089
6058
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6090
|
-
}), I("p",
|
|
6059
|
+
}), I("p", Rs, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", zs, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
6091
6060
|
key: e.id,
|
|
6092
6061
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6093
|
-
}, [e.role === "user" ? (f(), k("div",
|
|
6062
|
+
}, [e.role === "user" ? (f(), k("div", Bs, D(e.content), 1)) : (f(), k("div", Vs, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(zi, { key: 0 })) : (f(), k("div", Hs, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
6094
6063
|
key: 2,
|
|
6095
6064
|
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 tpl:duration-150",
|
|
6096
6065
|
style: {
|
|
@@ -6099,19 +6068,19 @@ var Os = {
|
|
|
6099
6068
|
"background-color": "transparent"
|
|
6100
6069
|
},
|
|
6101
6070
|
onClick: n[2] ||= (e) => j(u).toggleLastRevert()
|
|
6102
|
-
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(
|
|
6071
|
+
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(gi), {
|
|
6103
6072
|
size: 12,
|
|
6104
6073
|
"stroke-width": 2
|
|
6105
|
-
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(
|
|
6074
|
+
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Di), {
|
|
6106
6075
|
size: 12,
|
|
6107
6076
|
"stroke-width": 2
|
|
6108
6077
|
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6109
|
-
j(u).error.value ? (f(), k("div",
|
|
6078
|
+
j(u).error.value ? (f(), k("div", Us, [V(j(Zr), {
|
|
6110
6079
|
size: 14,
|
|
6111
6080
|
"stroke-width": 2,
|
|
6112
6081
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6113
6082
|
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6114
|
-
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div",
|
|
6083
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", Ws, [I("div", Gs, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
6115
6084
|
key: t,
|
|
6116
6085
|
class: F(["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", (j(u).suggestions.value?.length ?? 0) - 1 - t < _.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
6117
6086
|
style: {
|
|
@@ -6121,104 +6090,104 @@ var Os = {
|
|
|
6121
6090
|
"box-shadow": "var(--tpl-shadow)"
|
|
6122
6091
|
},
|
|
6123
6092
|
onClick: (t) => E(e)
|
|
6124
|
-
}, D(e), 11,
|
|
6093
|
+
}, D(e), 11, Ks))), 128))])])) : A("", !0)
|
|
6125
6094
|
]),
|
|
6126
|
-
I("div",
|
|
6095
|
+
I("div", qs, [I("div", Js, [c(I("textarea", {
|
|
6127
6096
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6128
6097
|
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)]",
|
|
6129
6098
|
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6130
6099
|
disabled: j(u).isGenerating.value,
|
|
6131
6100
|
rows: "3",
|
|
6132
6101
|
onKeydown: te
|
|
6133
|
-
}, null, 40,
|
|
6102
|
+
}, null, 40, Ys), [[ae, d.value]]), I("button", {
|
|
6134
6103
|
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:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6135
6104
|
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6136
6105
|
onClick: ee
|
|
6137
|
-
}, [V(j(
|
|
6106
|
+
}, [V(j(yi), {
|
|
6138
6107
|
size: 16,
|
|
6139
6108
|
"stroke-width": 2
|
|
6140
|
-
})], 8,
|
|
6109
|
+
})], 8, Xs)]), I("p", Zs, D(j(i).aiMenu.disclaimer), 1)])
|
|
6141
6110
|
])) : A("", !0)]),
|
|
6142
6111
|
_: 1
|
|
6143
6112
|
}));
|
|
6144
6113
|
}
|
|
6145
|
-
}),
|
|
6146
|
-
function
|
|
6114
|
+
}), $s = /* @__PURE__ */ e({ default: () => ec }), ec = /*#__PURE__*/ Fi(Qs, [["__scopeId", "data-v-a55e4bff"]]), tc = 6e4, nc = 36e5, rc = 864e5;
|
|
6115
|
+
function ic(e, t, n, r) {
|
|
6147
6116
|
let i = new Date(e).getTime();
|
|
6148
6117
|
if (Number.isNaN(i)) return null;
|
|
6149
6118
|
let a = Date.now() - i;
|
|
6150
6119
|
if (a < -6e4) return null;
|
|
6151
|
-
let o = Math.floor(a /
|
|
6120
|
+
let o = Math.floor(a / tc), s = Math.floor(a / nc), c = Math.floor(a / rc);
|
|
6152
6121
|
return o < 1 ? t.justNow : o < 60 ? n ? n(t.minutesAgo, { minutes: o }) : t.minutesAgo.replace("{minutes}", String(o)) : s < 24 ? n ? n(t.hoursAgo, { hours: s }) : t.hoursAgo.replace("{hours}", String(s)) : r !== void 0 && c >= r ? null : n ? n(t.daysAgo, { days: c }) : t.daysAgo.replace("{days}", String(c));
|
|
6153
6122
|
}
|
|
6154
6123
|
//#endregion
|
|
6155
6124
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6156
|
-
var
|
|
6125
|
+
var ac = {
|
|
6157
6126
|
key: 0,
|
|
6158
6127
|
class: "tpl-comments-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)]"
|
|
6159
|
-
},
|
|
6128
|
+
}, oc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, sc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, cc = {
|
|
6160
6129
|
key: 0,
|
|
6161
6130
|
class: "tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
|
|
6162
|
-
},
|
|
6131
|
+
}, lc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, uc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, dc = {
|
|
6163
6132
|
key: 0,
|
|
6164
6133
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6165
|
-
},
|
|
6134
|
+
}, fc = {
|
|
6166
6135
|
key: 1,
|
|
6167
6136
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6168
|
-
},
|
|
6137
|
+
}, pc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, mc = {
|
|
6169
6138
|
key: 2,
|
|
6170
6139
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6171
|
-
},
|
|
6140
|
+
}, hc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, gc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, _c = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, vc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, yc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, bc = {
|
|
6172
6141
|
key: 0,
|
|
6173
6142
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6174
|
-
},
|
|
6143
|
+
}, xc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Sc = ["title", "onClick"], Cc = ["title", "onClick"], wc = ["title", "onClick"], Tc = {
|
|
6175
6144
|
key: 0,
|
|
6176
6145
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6177
|
-
},
|
|
6146
|
+
}, Ec = {
|
|
6178
6147
|
key: 0,
|
|
6179
6148
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6180
|
-
},
|
|
6149
|
+
}, Dc = ["onClick"], Oc = {
|
|
6181
6150
|
key: 2,
|
|
6182
6151
|
class: "tpl:mt-2"
|
|
6183
|
-
},
|
|
6152
|
+
}, kc = ["onKeydown"], Ac = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, jc = ["disabled", "onClick"], Mc = {
|
|
6184
6153
|
key: 3,
|
|
6185
6154
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6186
|
-
},
|
|
6155
|
+
}, Nc = {
|
|
6187
6156
|
key: 4,
|
|
6188
6157
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6189
|
-
},
|
|
6158
|
+
}, Pc = { class: "tpl:flex-1" }, Fc = ["onClick"], Ic = {
|
|
6190
6159
|
key: 5,
|
|
6191
6160
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6192
|
-
},
|
|
6161
|
+
}, Lc = ["title", "onClick"], Rc = ["onClick"], zc = {
|
|
6193
6162
|
key: 0,
|
|
6194
6163
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6195
|
-
},
|
|
6164
|
+
}, Bc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Vc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Hc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Uc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Wc = {
|
|
6196
6165
|
key: 0,
|
|
6197
6166
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6198
|
-
},
|
|
6167
|
+
}, Gc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Kc = ["title", "onClick"], qc = ["title", "onClick"], Jc = {
|
|
6199
6168
|
key: 0,
|
|
6200
6169
|
class: "tpl:mt-1.5"
|
|
6201
|
-
},
|
|
6170
|
+
}, Yc = ["onKeydown"], Xc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Zc = ["disabled", "onClick"], Qc = {
|
|
6202
6171
|
key: 1,
|
|
6203
6172
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6204
|
-
},
|
|
6173
|
+
}, $c = {
|
|
6205
6174
|
key: 2,
|
|
6206
6175
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6207
|
-
},
|
|
6176
|
+
}, el = { class: "tpl:flex-1" }, tl = ["onClick"], nl = {
|
|
6208
6177
|
key: 0,
|
|
6209
6178
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6210
|
-
},
|
|
6179
|
+
}, rl = { class: "tpl:flex tpl:items-end tpl:gap-2" }, il = ["placeholder", "onKeydown"], al = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, ol = ["disabled", "onClick"], sl = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, cl = {
|
|
6211
6180
|
key: 0,
|
|
6212
6181
|
class: "tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6213
|
-
},
|
|
6182
|
+
}, ll = {
|
|
6214
6183
|
key: 1,
|
|
6215
6184
|
class: "tpl-comments-input-wrapper tpl:flex tpl:min-h-[68px] 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)]"
|
|
6216
|
-
},
|
|
6185
|
+
}, ul = ["placeholder", "disabled"], dl = ["disabled"], fl = /*@__PURE__*/ B({
|
|
6217
6186
|
__name: "CommentsSidebar",
|
|
6218
6187
|
props: { visible: { type: Boolean } },
|
|
6219
6188
|
emits: ["close", "filterBlock"],
|
|
6220
6189
|
setup(e, { expose: t, emit: n }) {
|
|
6221
|
-
let r = e, i = n, { format: a } = Y(), { t: o } =
|
|
6190
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = Gi(), s = J(In, "CommentsSidebar"), l = J(sr, "CommentsSidebar"), u = J(lr, "CommentsSidebar"), d = C("unresolved"), p = C(null), g = C(""), _ = C(null), v = C(""), y = C(null), x = C(""), S = C(/* @__PURE__ */ new Set()), w = C(null), ee = C(null), T = O(() => l.userConfig?.id ?? null), E = O(() => {
|
|
6222
6191
|
let e = /* @__PURE__ */ new Set();
|
|
6223
6192
|
for (let t of s.content.value.blocks) if (e.add(t.id), t.type === "section") for (let n of t.children) for (let t of n) e.add(t.id);
|
|
6224
6193
|
return e;
|
|
@@ -6286,7 +6255,7 @@ var ic = {
|
|
|
6286
6255
|
return e.author_identifier === T.value;
|
|
6287
6256
|
}
|
|
6288
6257
|
function ve(e) {
|
|
6289
|
-
return
|
|
6258
|
+
return ic(e, o.snapshotHistory) ?? e;
|
|
6290
6259
|
}
|
|
6291
6260
|
function ye(e) {
|
|
6292
6261
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6313,22 +6282,22 @@ var ic = {
|
|
|
6313
6282
|
"leave-from-class": "tpl:translate-x-0",
|
|
6314
6283
|
"leave-to-class": "tpl:translate-x-full"
|
|
6315
6284
|
}, {
|
|
6316
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6317
|
-
I("div",
|
|
6318
|
-
V(j(
|
|
6285
|
+
default: b(() => [e.visible ? (f(), k("div", ac, [
|
|
6286
|
+
I("div", oc, [I("div", sc, [
|
|
6287
|
+
V(j(fi), {
|
|
6319
6288
|
size: 13,
|
|
6320
6289
|
"stroke-width": 2
|
|
6321
6290
|
}),
|
|
6322
6291
|
I("span", null, D(j(o).comments.title), 1),
|
|
6323
|
-
j(u).unresolvedCount.value > 0 ? (f(), k("span",
|
|
6292
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", cc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
6324
6293
|
]), I("button", {
|
|
6325
6294
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6326
6295
|
onClick: n[0] ||= (e) => i("close")
|
|
6327
|
-
}, [V(j(
|
|
6296
|
+
}, [V(j(Ai), {
|
|
6328
6297
|
size: 14,
|
|
6329
6298
|
"stroke-width": 2
|
|
6330
6299
|
})])]),
|
|
6331
|
-
I("div",
|
|
6300
|
+
I("div", lc, [
|
|
6332
6301
|
I("button", {
|
|
6333
6302
|
class: F(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
6334
6303
|
onClick: n[1] ||= (e) => M("unresolved")
|
|
@@ -6343,156 +6312,156 @@ var ic = {
|
|
|
6343
6312
|
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6344
6313
|
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6345
6314
|
]),
|
|
6346
|
-
I("div",
|
|
6315
|
+
I("div", uc, [j(u).isLoading.value ? (f(), k("div", dc, [V(j(di), {
|
|
6347
6316
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6348
6317
|
size: 24,
|
|
6349
6318
|
"stroke-width": 2
|
|
6350
|
-
})])) : re.value.length === 0 ? (f(), k("div",
|
|
6319
|
+
})])) : re.value.length === 0 ? (f(), k("div", fc, [V(j(fi), {
|
|
6351
6320
|
size: 32,
|
|
6352
6321
|
"stroke-width": 1.5,
|
|
6353
6322
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6354
|
-
}), I("p",
|
|
6323
|
+
}), I("p", pc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", mc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
6355
6324
|
key: e.id,
|
|
6356
6325
|
class: "tpl-comment-thread"
|
|
6357
6326
|
}, [
|
|
6358
|
-
I("div",
|
|
6359
|
-
I("div",
|
|
6360
|
-
I("span",
|
|
6361
|
-
I("span",
|
|
6362
|
-
e.updated_at === e.created_at ? A("", !0) : (f(), k("span",
|
|
6363
|
-
]), I("div",
|
|
6327
|
+
I("div", hc, [
|
|
6328
|
+
I("div", gc, [I("div", _c, [
|
|
6329
|
+
I("span", vc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
6330
|
+
I("span", yc, D(ve(e.created_at)), 1),
|
|
6331
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", bc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6332
|
+
]), I("div", xc, [
|
|
6364
6333
|
I("button", {
|
|
6365
6334
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6366
6335
|
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
6367
6336
|
onClick: (t) => ge(e.id)
|
|
6368
|
-
}, [V(j(
|
|
6337
|
+
}, [V(j(Qr), {
|
|
6369
6338
|
size: 13,
|
|
6370
6339
|
"stroke-width": 2,
|
|
6371
6340
|
class: "tpl-resolve-icon",
|
|
6372
6341
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6373
|
-
}, null, 8, ["style"])], 8,
|
|
6342
|
+
}, null, 8, ["style"])], 8, Sc),
|
|
6374
6343
|
_e(e) ? (f(), k("button", {
|
|
6375
6344
|
key: 0,
|
|
6376
6345
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6377
6346
|
title: j(o).comments.edit,
|
|
6378
6347
|
onClick: (t) => le(e)
|
|
6379
|
-
}, [V(j(
|
|
6348
|
+
}, [V(j(mi), {
|
|
6380
6349
|
size: 12,
|
|
6381
6350
|
"stroke-width": 2
|
|
6382
|
-
})], 8,
|
|
6351
|
+
})], 8, Cc)) : A("", !0),
|
|
6383
6352
|
_e(e) ? (f(), k("button", {
|
|
6384
6353
|
key: 1,
|
|
6385
6354
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6386
6355
|
title: j(o).comments.delete,
|
|
6387
6356
|
onClick: (t) => ue(e.id)
|
|
6388
|
-
}, [V(j(
|
|
6357
|
+
}, [V(j(Ti), {
|
|
6389
6358
|
size: 12,
|
|
6390
6359
|
"stroke-width": 2
|
|
6391
|
-
})], 8,
|
|
6360
|
+
})], 8, wc)) : A("", !0)
|
|
6392
6361
|
])]),
|
|
6393
6362
|
V(ie, { name: "tpl-resolve" }, {
|
|
6394
|
-
default: b(() => [e.resolved_at ? (f(), k("div",
|
|
6363
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Tc, [V(j(Kr), {
|
|
6395
6364
|
size: 10,
|
|
6396
6365
|
"stroke-width": 2.5
|
|
6397
6366
|
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6398
6367
|
_: 2
|
|
6399
6368
|
}, 1024),
|
|
6400
|
-
e.block_id && te(e.block_id) ? (f(), k("span",
|
|
6369
|
+
e.block_id && te(e.block_id) ? (f(), k("span", Ec, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
6401
6370
|
key: 1,
|
|
6402
6371
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6403
6372
|
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6404
|
-
}, " Block ", 8,
|
|
6405
|
-
y.value === e.id ? (f(), k("div",
|
|
6373
|
+
}, " Block ", 8, Dc)) : A("", !0),
|
|
6374
|
+
y.value === e.id ? (f(), k("div", Oc, [c(I("textarea", {
|
|
6406
6375
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6407
6376
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6408
6377
|
rows: "3",
|
|
6409
6378
|
onKeydown: (t) => xe(t, e.id)
|
|
6410
|
-
}, null, 40,
|
|
6379
|
+
}, null, 40, kc), [[ae, x.value]]), I("div", Ac, [I("button", {
|
|
6411
6380
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6412
6381
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6413
6382
|
onClick: (t) => me(e.id)
|
|
6414
|
-
}, D(j(o).comments.save), 9,
|
|
6383
|
+
}, D(j(o).comments.save), 9, jc), I("button", {
|
|
6415
6384
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6416
6385
|
onClick: n[5] ||= (e) => B()
|
|
6417
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6418
|
-
w.value === e.id ? (f(), k("div",
|
|
6419
|
-
I("span",
|
|
6386
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Mc, D(e.body), 1)),
|
|
6387
|
+
w.value === e.id ? (f(), k("div", Nc, [
|
|
6388
|
+
I("span", Pc, D(j(o).comments.deleteConfirm), 1),
|
|
6420
6389
|
I("button", {
|
|
6421
6390
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6422
6391
|
onClick: (t) => he(e.id)
|
|
6423
|
-
}, D(j(o).comments.delete), 9,
|
|
6392
|
+
}, D(j(o).comments.delete), 9, Fc),
|
|
6424
6393
|
I("button", {
|
|
6425
6394
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6426
6395
|
onClick: n[6] ||= (e) => de()
|
|
6427
6396
|
}, D(j(o).comments.cancel), 1)
|
|
6428
6397
|
])) : A("", !0),
|
|
6429
|
-
y.value !== e.id && w.value !== e.id ? (f(), k("div",
|
|
6398
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", Ic, [I("button", {
|
|
6430
6399
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6431
6400
|
title: j(o).comments.reply,
|
|
6432
6401
|
onClick: (t) => se(e.id)
|
|
6433
|
-
}, [V(j(
|
|
6402
|
+
}, [V(j(vi), {
|
|
6434
6403
|
size: 13,
|
|
6435
6404
|
"stroke-width": 2,
|
|
6436
6405
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6437
|
-
})], 8,
|
|
6406
|
+
})], 8, Lc), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6438
6407
|
key: 0,
|
|
6439
6408
|
class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-[11px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6440
6409
|
onClick: (t) => oe(e.id)
|
|
6441
|
-
}, [S.value.has(e.id) ? (f(), N(j(
|
|
6410
|
+
}, [S.value.has(e.id) ? (f(), N(j(Xr), {
|
|
6442
6411
|
key: 0,
|
|
6443
6412
|
size: 11,
|
|
6444
6413
|
"stroke-width": 2
|
|
6445
|
-
})) : (f(), N(j(
|
|
6414
|
+
})) : (f(), N(j(qr), {
|
|
6446
6415
|
key: 1,
|
|
6447
6416
|
size: 11,
|
|
6448
6417
|
"stroke-width": 2
|
|
6449
|
-
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8,
|
|
6418
|
+
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Rc)) : A("", !0)])) : A("", !0)
|
|
6450
6419
|
]),
|
|
6451
6420
|
V(ie, { name: "tpl-replies" }, {
|
|
6452
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div",
|
|
6421
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", zc, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6453
6422
|
key: t.id,
|
|
6454
6423
|
class: F(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
6455
6424
|
}, [
|
|
6456
|
-
I("div",
|
|
6457
|
-
I("span",
|
|
6458
|
-
I("span",
|
|
6459
|
-
t.updated_at === t.created_at ? A("", !0) : (f(), k("span",
|
|
6460
|
-
]), I("div",
|
|
6425
|
+
I("div", Bc, [I("div", Vc, [
|
|
6426
|
+
I("span", Hc, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6427
|
+
I("span", Uc, D(ve(t.created_at)), 1),
|
|
6428
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", Wc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6429
|
+
]), I("div", Gc, [_e(t) ? (f(), k("button", {
|
|
6461
6430
|
key: 0,
|
|
6462
6431
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6463
6432
|
title: j(o).comments.edit,
|
|
6464
6433
|
onClick: (e) => le(t)
|
|
6465
|
-
}, [V(j(
|
|
6434
|
+
}, [V(j(mi), {
|
|
6466
6435
|
size: 11,
|
|
6467
6436
|
"stroke-width": 2
|
|
6468
|
-
})], 8,
|
|
6437
|
+
})], 8, Kc)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6469
6438
|
key: 1,
|
|
6470
6439
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6471
6440
|
title: j(o).comments.delete,
|
|
6472
6441
|
onClick: (e) => ue(t.id)
|
|
6473
|
-
}, [V(j(
|
|
6442
|
+
}, [V(j(Ti), {
|
|
6474
6443
|
size: 11,
|
|
6475
6444
|
"stroke-width": 2
|
|
6476
|
-
})], 8,
|
|
6477
|
-
y.value === t.id ? (f(), k("div",
|
|
6445
|
+
})], 8, qc)) : A("", !0)])]),
|
|
6446
|
+
y.value === t.id ? (f(), k("div", Jc, [c(I("textarea", {
|
|
6478
6447
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6479
6448
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6480
6449
|
rows: "2",
|
|
6481
6450
|
onKeydown: (e) => xe(e, t.id)
|
|
6482
|
-
}, null, 40,
|
|
6451
|
+
}, null, 40, Yc), [[ae, x.value]]), I("div", Xc, [I("button", {
|
|
6483
6452
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6484
6453
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6485
6454
|
onClick: (e) => me(t.id)
|
|
6486
|
-
}, D(j(o).comments.save), 9,
|
|
6455
|
+
}, D(j(o).comments.save), 9, Zc), I("button", {
|
|
6487
6456
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6488
6457
|
onClick: n[8] ||= (e) => B()
|
|
6489
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6490
|
-
w.value === t.id ? (f(), k("div",
|
|
6491
|
-
I("span",
|
|
6458
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Qc, D(t.body), 1)),
|
|
6459
|
+
w.value === t.id ? (f(), k("div", $c, [
|
|
6460
|
+
I("span", el, D(j(o).comments.deleteConfirm), 1),
|
|
6492
6461
|
I("button", {
|
|
6493
6462
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6494
6463
|
onClick: (e) => he(t.id)
|
|
6495
|
-
}, D(j(o).comments.delete), 9,
|
|
6464
|
+
}, D(j(o).comments.delete), 9, tl),
|
|
6496
6465
|
I("button", {
|
|
6497
6466
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6498
6467
|
onClick: n[9] ||= (e) => de()
|
|
@@ -6502,30 +6471,30 @@ var ic = {
|
|
|
6502
6471
|
_: 2
|
|
6503
6472
|
}, 1024),
|
|
6504
6473
|
V(ie, { name: "tpl-replies" }, {
|
|
6505
|
-
default: b(() => [_.value === e.id ? (f(), k("div",
|
|
6474
|
+
default: b(() => [_.value === e.id ? (f(), k("div", nl, [I("div", rl, [c(I("textarea", {
|
|
6506
6475
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6507
6476
|
class: "tpl:flex-1 tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6508
6477
|
placeholder: j(o).comments.replyPlaceholder,
|
|
6509
6478
|
rows: "2",
|
|
6510
6479
|
onKeydown: (t) => be(t, e.id)
|
|
6511
|
-
}, null, 40,
|
|
6480
|
+
}, null, 40, il), [[ae, v.value]]), I("div", al, [I("button", {
|
|
6512
6481
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6513
6482
|
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6514
6483
|
onClick: (t) => pe(e.id)
|
|
6515
|
-
}, [V(j(
|
|
6484
|
+
}, [V(j(yi), {
|
|
6516
6485
|
size: 14,
|
|
6517
6486
|
"stroke-width": 2
|
|
6518
|
-
})], 8,
|
|
6487
|
+
})], 8, ol), I("button", {
|
|
6519
6488
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6520
6489
|
onClick: n[11] ||= (e) => ce()
|
|
6521
|
-
}, [V(j(
|
|
6490
|
+
}, [V(j(Ai), {
|
|
6522
6491
|
size: 14,
|
|
6523
6492
|
"stroke-width": 2
|
|
6524
6493
|
})])])])])) : A("", !0)]),
|
|
6525
6494
|
_: 2
|
|
6526
6495
|
}, 1024)
|
|
6527
6496
|
]))), 128))]))]),
|
|
6528
|
-
I("div",
|
|
6497
|
+
I("div", sl, [ne.value ? (f(), k("div", cl, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", ll, [c(I("textarea", {
|
|
6529
6498
|
ref_key: "newCommentInput",
|
|
6530
6499
|
ref: ee,
|
|
6531
6500
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6534,46 +6503,46 @@ var ic = {
|
|
|
6534
6503
|
disabled: j(u).isSubmitting.value,
|
|
6535
6504
|
rows: "2",
|
|
6536
6505
|
onKeydown: ye
|
|
6537
|
-
}, null, 40,
|
|
6506
|
+
}, null, 40, ul), [[ae, g.value]]), I("button", {
|
|
6538
6507
|
class: "tpl-comments-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6539
6508
|
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6540
6509
|
onClick: fe
|
|
6541
|
-
}, [j(u).isSubmitting.value ? (f(), N(j(
|
|
6510
|
+
}, [j(u).isSubmitting.value ? (f(), N(j(di), {
|
|
6542
6511
|
key: 0,
|
|
6543
6512
|
class: "tpl-spinner",
|
|
6544
6513
|
size: 16,
|
|
6545
6514
|
"stroke-width": 2
|
|
6546
|
-
})) : (f(), N(j(
|
|
6515
|
+
})) : (f(), N(j(yi), {
|
|
6547
6516
|
key: 1,
|
|
6548
6517
|
size: 16,
|
|
6549
6518
|
"stroke-width": 2
|
|
6550
|
-
}))], 8,
|
|
6519
|
+
}))], 8, dl)]))])
|
|
6551
6520
|
])) : A("", !0)]),
|
|
6552
6521
|
_: 1
|
|
6553
6522
|
}));
|
|
6554
6523
|
}
|
|
6555
|
-
}),
|
|
6524
|
+
}), pl = /* @__PURE__ */ e({ default: () => ml }), ml = /*#__PURE__*/ Fi(fl, [["__scopeId", "data-v-d204f573"]]), hl = {
|
|
6556
6525
|
key: 0,
|
|
6557
6526
|
class: "tpl-design-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)]"
|
|
6558
|
-
},
|
|
6527
|
+
}, gl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, _l = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, vl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, yl = {
|
|
6559
6528
|
key: 0,
|
|
6560
6529
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6561
|
-
},
|
|
6530
|
+
}, bl = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, xl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Sl = {
|
|
6562
6531
|
key: 1,
|
|
6563
6532
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6564
|
-
},
|
|
6533
|
+
}, Cl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, wl = {
|
|
6565
6534
|
key: 0,
|
|
6566
6535
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6567
|
-
},
|
|
6536
|
+
}, Tl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, El = ["src", "alt"], Dl = {
|
|
6568
6537
|
key: 1,
|
|
6569
6538
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6570
|
-
},
|
|
6539
|
+
}, Ol = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, kl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Al = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, jl = ["accept"], Ml = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Nl = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Pl = ["placeholder"], Fl = {
|
|
6571
6540
|
key: 0,
|
|
6572
6541
|
class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
|
|
6573
|
-
},
|
|
6542
|
+
}, Il = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Ll = { class: "tpl:flex tpl:gap-2" }, Rl = {
|
|
6574
6543
|
key: 1,
|
|
6575
6544
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6576
|
-
},
|
|
6545
|
+
}, zl = ["disabled"], Bl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Vl = /*@__PURE__*/ B({
|
|
6577
6546
|
__name: "DesignReferenceSidebar",
|
|
6578
6547
|
props: {
|
|
6579
6548
|
visible: { type: Boolean },
|
|
@@ -6581,8 +6550,8 @@ var ic = {
|
|
|
6581
6550
|
},
|
|
6582
6551
|
emits: ["close", "apply"],
|
|
6583
6552
|
setup(e, { emit: t }) {
|
|
6584
|
-
let n = e, r = t, { t: i } =
|
|
6585
|
-
authManager: J(
|
|
6553
|
+
let n = e, r = t, { t: i } = Gi(), a = J(In, "DesignReferenceSidebar"), o = cs({
|
|
6554
|
+
authManager: J(sr, "DesignReferenceSidebar"),
|
|
6586
6555
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6587
6556
|
onApply: (e) => r("apply", e)
|
|
6588
6557
|
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = O(() => o.isGenerating.value ? !1 : u.value !== null);
|
|
@@ -6653,17 +6622,17 @@ var ic = {
|
|
|
6653
6622
|
"leave-from-class": "tpl:translate-x-0",
|
|
6654
6623
|
"leave-to-class": "tpl:translate-x-full"
|
|
6655
6624
|
}, {
|
|
6656
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6625
|
+
default: b(() => [e.visible ? (f(), k("div", hl, [I("div", gl, [I("div", _l, [V(j(ci), {
|
|
6657
6626
|
size: 13,
|
|
6658
6627
|
"stroke-width": 2
|
|
6659
6628
|
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
6660
6629
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6661
6630
|
onClick: n[0] ||= (e) => r("close")
|
|
6662
|
-
}, [V(j(
|
|
6631
|
+
}, [V(j(Ai), {
|
|
6663
6632
|
size: 14,
|
|
6664
6633
|
"stroke-width": 2
|
|
6665
|
-
})])]), I("div",
|
|
6666
|
-
I("div",
|
|
6634
|
+
})])]), I("div", vl, [j(o).isGenerating.value ? (f(), k("div", yl, [I("div", bl, [V(zi), I("p", xl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", Sl, [
|
|
6635
|
+
I("div", Cl, [I("button", {
|
|
6667
6636
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6668
6637
|
style: L({
|
|
6669
6638
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6671,7 +6640,7 @@ var ic = {
|
|
|
6671
6640
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6672
6641
|
}),
|
|
6673
6642
|
onClick: n[1] ||= (e) => _("image")
|
|
6674
|
-
}, [V(j(
|
|
6643
|
+
}, [V(j(ii), {
|
|
6675
6644
|
size: 12,
|
|
6676
6645
|
"stroke-width": 2
|
|
6677
6646
|
}), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
@@ -6682,23 +6651,23 @@ var ic = {
|
|
|
6682
6651
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6683
6652
|
}),
|
|
6684
6653
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6685
|
-
}, [V(j(
|
|
6654
|
+
}, [V(j(ai), {
|
|
6686
6655
|
size: 12,
|
|
6687
6656
|
"stroke-width": 2
|
|
6688
6657
|
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6689
|
-
I("div", null, [u.value ? (f(), k("div",
|
|
6658
|
+
I("div", null, [u.value ? (f(), k("div", wl, [I("div", Tl, [p.value ? (f(), k("img", {
|
|
6690
6659
|
key: 0,
|
|
6691
6660
|
src: p.value,
|
|
6692
6661
|
alt: u.value.name,
|
|
6693
6662
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6694
|
-
}, null, 8,
|
|
6663
|
+
}, null, 8, El)) : (f(), k("div", Dl, [V(j(ai), {
|
|
6695
6664
|
size: 32,
|
|
6696
6665
|
"stroke-width": 1.5,
|
|
6697
6666
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6698
|
-
}), I("span",
|
|
6667
|
+
}), I("span", Ol, D(u.value.name), 1)])), I("button", {
|
|
6699
6668
|
class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
|
|
6700
6669
|
onClick: x
|
|
6701
|
-
}, [V(j(
|
|
6670
|
+
}, [V(j(Ai), {
|
|
6702
6671
|
size: 12,
|
|
6703
6672
|
"stroke-width": 2
|
|
6704
6673
|
})])])])) : (f(), k("div", {
|
|
@@ -6713,13 +6682,13 @@ var ic = {
|
|
|
6713
6682
|
onDragleave: w,
|
|
6714
6683
|
onDrop: ee
|
|
6715
6684
|
}, [
|
|
6716
|
-
V(j(
|
|
6685
|
+
V(j(Oi), {
|
|
6717
6686
|
size: 24,
|
|
6718
6687
|
"stroke-width": 1.5,
|
|
6719
6688
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6720
6689
|
}),
|
|
6721
|
-
I("span",
|
|
6722
|
-
I("span",
|
|
6690
|
+
I("span", kl, D(j(i).designReference.dropHint), 1),
|
|
6691
|
+
I("span", Al, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6723
6692
|
], 36)), I("input", {
|
|
6724
6693
|
ref_key: "fileInput",
|
|
6725
6694
|
ref: s,
|
|
@@ -6727,14 +6696,14 @@ var ic = {
|
|
|
6727
6696
|
class: "tpl:hidden",
|
|
6728
6697
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6729
6698
|
onChange: v
|
|
6730
|
-
}, null, 40,
|
|
6731
|
-
I("div",
|
|
6699
|
+
}, null, 40, jl)]),
|
|
6700
|
+
I("div", Ml, [I("label", Nl, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6732
6701
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6733
6702
|
class: F(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
|
|
6734
6703
|
placeholder: j(i).designReference.promptPlaceholder,
|
|
6735
6704
|
rows: "3"
|
|
6736
|
-
}, null, 8,
|
|
6737
|
-
m.value ? (f(), k("div",
|
|
6705
|
+
}, null, 8, Pl), [[ae, d.value]])]),
|
|
6706
|
+
m.value ? (f(), k("div", Fl, [I("p", Il, D(j(i).designReference.replaceWarning), 1), I("div", Ll, [I("button", {
|
|
6738
6707
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
6739
6708
|
style: { "background-color": "transparent" },
|
|
6740
6709
|
onClick: E
|
|
@@ -6742,7 +6711,7 @@ var ic = {
|
|
|
6742
6711
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6743
6712
|
onClick: T
|
|
6744
6713
|
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6745
|
-
j(o).error.value ? (f(), k("div",
|
|
6714
|
+
j(o).error.value ? (f(), k("div", Rl, [V(j(Zr), {
|
|
6746
6715
|
size: 14,
|
|
6747
6716
|
"stroke-width": 2,
|
|
6748
6717
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6752,35 +6721,35 @@ var ic = {
|
|
|
6752
6721
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6753
6722
|
disabled: !g.value,
|
|
6754
6723
|
onClick: T
|
|
6755
|
-
}, [V(j(
|
|
6724
|
+
}, [V(j(ci), {
|
|
6756
6725
|
size: 16,
|
|
6757
6726
|
"stroke-width": 2
|
|
6758
|
-
}), z(" " + D(j(i).designReference.generate), 1)], 8,
|
|
6759
|
-
I("p",
|
|
6727
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, zl)),
|
|
6728
|
+
I("p", Bl, D(j(i).aiMenu.disclaimer), 1)
|
|
6760
6729
|
]))])])) : A("", !0)]),
|
|
6761
6730
|
_: 1
|
|
6762
6731
|
}));
|
|
6763
6732
|
}
|
|
6764
|
-
}),
|
|
6733
|
+
}), Hl = /* @__PURE__ */ e({ default: () => Ul }), Ul = /*#__PURE__*/ Fi(Vl, [["__scopeId", "data-v-bdbf8d0d"]]), Wl = ["disabled", "title"], Gl = ["title"], Kl = {
|
|
6765
6734
|
key: 0,
|
|
6766
6735
|
class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
6767
6736
|
style: {
|
|
6768
6737
|
"backdrop-filter": "blur(8px)",
|
|
6769
6738
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6770
6739
|
}
|
|
6771
|
-
},
|
|
6740
|
+
}, ql = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, Jl = {
|
|
6772
6741
|
key: 0,
|
|
6773
6742
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6774
|
-
},
|
|
6743
|
+
}, Yl = {
|
|
6775
6744
|
key: 1,
|
|
6776
6745
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6777
|
-
},
|
|
6746
|
+
}, Xl = {
|
|
6778
6747
|
key: 2,
|
|
6779
6748
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6780
|
-
},
|
|
6749
|
+
}, Zl = ["disabled", "onClick"], Ql = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, $l = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, eu = {
|
|
6781
6750
|
key: 0,
|
|
6782
6751
|
class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
|
|
6783
|
-
},
|
|
6752
|
+
}, tu = ["disabled", "title"], nu = /*@__PURE__*/ B({
|
|
6784
6753
|
__name: "SnapshotHistory",
|
|
6785
6754
|
props: {
|
|
6786
6755
|
snapshots: {},
|
|
@@ -6789,7 +6758,7 @@ var ic = {
|
|
|
6789
6758
|
},
|
|
6790
6759
|
emits: ["load", "navigate"],
|
|
6791
6760
|
setup(e, { emit: t }) {
|
|
6792
|
-
let n = e, r = t, { format: i } = Y(), { t: a } =
|
|
6761
|
+
let n = e, r = t, { format: i } = Y(), { t: a } = Gi(), o = C(!1), s = C(null), c = C(-1);
|
|
6793
6762
|
H(() => n.snapshots.length, () => {
|
|
6794
6763
|
c.value = -1;
|
|
6795
6764
|
});
|
|
@@ -6808,7 +6777,7 @@ var ic = {
|
|
|
6808
6777
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
6809
6778
|
}
|
|
6810
6779
|
function _(e) {
|
|
6811
|
-
let t =
|
|
6780
|
+
let t = ic(e, a.snapshotHistory, i, 7);
|
|
6812
6781
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6813
6782
|
month: "short",
|
|
6814
6783
|
day: "numeric",
|
|
@@ -6828,34 +6797,34 @@ var ic = {
|
|
|
6828
6797
|
disabled: !u.value,
|
|
6829
6798
|
title: j(a).snapshotHistory.olderSnapshot,
|
|
6830
6799
|
onClick: M(p, ["stop"])
|
|
6831
|
-
}, [V(j(
|
|
6800
|
+
}, [V(j(Jr), {
|
|
6832
6801
|
size: 14,
|
|
6833
6802
|
"stroke-width": 2
|
|
6834
|
-
})], 8,
|
|
6803
|
+
})], 8, Wl),
|
|
6835
6804
|
I("button", {
|
|
6836
6805
|
class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6837
6806
|
title: j(a).snapshotHistory.tooltip,
|
|
6838
6807
|
onClick: M(m, ["stop"])
|
|
6839
|
-
}, [V(j(
|
|
6808
|
+
}, [V(j($r), {
|
|
6840
6809
|
size: 16,
|
|
6841
6810
|
"stroke-width": 1.5
|
|
6842
|
-
}), V(j(
|
|
6811
|
+
}), V(j(qr), {
|
|
6843
6812
|
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6844
6813
|
size: 10,
|
|
6845
6814
|
"stroke-width": 2
|
|
6846
|
-
}, null, 8, ["class"])], 8,
|
|
6815
|
+
}, null, 8, ["class"])], 8, Gl),
|
|
6847
6816
|
V(ie, { name: "tpl-dropdown" }, {
|
|
6848
|
-
default: b(() => [o.value ? (f(), k("div",
|
|
6817
|
+
default: b(() => [o.value ? (f(), k("div", Kl, [I("div", ql, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", Jl, [V(j(di), {
|
|
6849
6818
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6850
6819
|
size: 20,
|
|
6851
6820
|
"stroke-width": 2
|
|
6852
|
-
})])) : e.snapshots.length === 0 ? (f(), k("div",
|
|
6821
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", Yl, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", Xl, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
6853
6822
|
key: t.id,
|
|
6854
6823
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
|
|
6855
6824
|
style: { "background-color": "transparent" },
|
|
6856
6825
|
disabled: e.isRestoring,
|
|
6857
6826
|
onClick: (e) => g(t.id)
|
|
6858
|
-
}, [I("div",
|
|
6827
|
+
}, [I("div", Ql, [I("div", $l, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", eu, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, Zl))), 128))]))])) : A("", !0)]),
|
|
6859
6828
|
_: 1
|
|
6860
6829
|
}),
|
|
6861
6830
|
I("button", {
|
|
@@ -6863,74 +6832,74 @@ var ic = {
|
|
|
6863
6832
|
disabled: !l.value,
|
|
6864
6833
|
title: j(a).snapshotHistory.newerSnapshot,
|
|
6865
6834
|
onClick: M(d, ["stop"])
|
|
6866
|
-
}, [V(j(
|
|
6835
|
+
}, [V(j(Yr), {
|
|
6867
6836
|
size: 14,
|
|
6868
6837
|
"stroke-width": 2
|
|
6869
|
-
})], 8,
|
|
6838
|
+
})], 8, tu)
|
|
6870
6839
|
], 512));
|
|
6871
6840
|
}
|
|
6872
|
-
}),
|
|
6841
|
+
}), ru = /* @__PURE__ */ e({ default: () => iu }), iu = nu;
|
|
6873
6842
|
//#endregion
|
|
6874
6843
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6875
|
-
function
|
|
6844
|
+
function au(e) {
|
|
6876
6845
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6877
6846
|
}
|
|
6878
|
-
function
|
|
6847
|
+
function ou(e) {
|
|
6879
6848
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6880
6849
|
}
|
|
6881
|
-
function
|
|
6850
|
+
function su(e) {
|
|
6882
6851
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6883
6852
|
}
|
|
6884
|
-
function
|
|
6853
|
+
function cu(e) {
|
|
6885
6854
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6886
6855
|
}
|
|
6887
6856
|
//#endregion
|
|
6888
6857
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6889
|
-
var
|
|
6858
|
+
var lu = {
|
|
6890
6859
|
key: 0,
|
|
6891
6860
|
class: "tpl-scoring-panel 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)]"
|
|
6892
|
-
},
|
|
6861
|
+
}, uu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, du = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, fu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, pu = ["title"], mu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, hu = {
|
|
6893
6862
|
key: 0,
|
|
6894
6863
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6895
|
-
},
|
|
6864
|
+
}, gu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, _u = {
|
|
6896
6865
|
key: 1,
|
|
6897
6866
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6898
|
-
},
|
|
6867
|
+
}, vu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, yu = {
|
|
6899
6868
|
key: 2,
|
|
6900
6869
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6901
|
-
},
|
|
6870
|
+
}, bu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, xu = {
|
|
6902
6871
|
key: 0,
|
|
6903
6872
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6904
|
-
},
|
|
6873
|
+
}, Su = {
|
|
6905
6874
|
key: 0,
|
|
6906
6875
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6907
|
-
},
|
|
6876
|
+
}, Cu = ["onClick"], wu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Tu = {
|
|
6908
6877
|
key: 0,
|
|
6909
6878
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6910
|
-
},
|
|
6879
|
+
}, Eu = {
|
|
6911
6880
|
key: 0,
|
|
6912
6881
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6913
|
-
},
|
|
6882
|
+
}, Du = {
|
|
6914
6883
|
key: 0,
|
|
6915
6884
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6916
|
-
},
|
|
6885
|
+
}, Ou = { class: "tpl:flex tpl:items-start tpl:gap-2" }, ku = { class: "tpl:flex-1 tpl:min-w-0" }, Au = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, ju = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Mu = {
|
|
6917
6886
|
key: 0,
|
|
6918
6887
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6919
|
-
},
|
|
6888
|
+
}, Nu = {
|
|
6920
6889
|
key: 1,
|
|
6921
6890
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6922
|
-
},
|
|
6891
|
+
}, Pu = ["disabled", "onClick"], Fu = {
|
|
6923
6892
|
key: 0,
|
|
6924
6893
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6925
|
-
},
|
|
6894
|
+
}, Iu = {
|
|
6926
6895
|
key: 3,
|
|
6927
6896
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6928
|
-
},
|
|
6897
|
+
}, Lu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ru = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, zu = /*@__PURE__*/ B({
|
|
6929
6898
|
__name: "TemplateScoringPanel",
|
|
6930
6899
|
props: { visible: { type: Boolean } },
|
|
6931
6900
|
emits: ["close"],
|
|
6932
6901
|
setup(e, { emit: t }) {
|
|
6933
|
-
let n = e, r = t, { t: i } =
|
|
6902
|
+
let n = e, r = t, { t: i } = Gi(), a = J(In, "TemplateScoringPanel"), o = J(dr, "TemplateScoringPanel"), s = v(Jn, []), c = C({
|
|
6934
6903
|
spam: !0,
|
|
6935
6904
|
readability: !0,
|
|
6936
6905
|
accessibility: !0,
|
|
@@ -6945,10 +6914,10 @@ var cu = {
|
|
|
6945
6914
|
"accessibility",
|
|
6946
6915
|
"bestPractices"
|
|
6947
6916
|
], p = {
|
|
6948
|
-
spam:
|
|
6949
|
-
readability:
|
|
6950
|
-
accessibility:
|
|
6951
|
-
bestPractices:
|
|
6917
|
+
spam: Si,
|
|
6918
|
+
readability: ri,
|
|
6919
|
+
accessibility: Ci,
|
|
6920
|
+
bestPractices: ji
|
|
6952
6921
|
};
|
|
6953
6922
|
function m() {
|
|
6954
6923
|
o.score(a.content.value, s);
|
|
@@ -6976,50 +6945,50 @@ var cu = {
|
|
|
6976
6945
|
"leave-from-class": "tpl:translate-x-0",
|
|
6977
6946
|
"leave-to-class": "tpl:translate-x-full"
|
|
6978
6947
|
}, {
|
|
6979
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6948
|
+
default: b(() => [e.visible ? (f(), k("div", lu, [I("div", uu, [I("div", du, [V(j(xi), {
|
|
6980
6949
|
size: 13,
|
|
6981
6950
|
"stroke-width": 2
|
|
6982
|
-
}), I("span", null, D(j(i).scoring.title), 1)]), I("div",
|
|
6951
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", fu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
6983
6952
|
key: 0,
|
|
6984
6953
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6985
6954
|
title: j(i).scoring.rescore,
|
|
6986
6955
|
onClick: n[0] ||= (e) => m()
|
|
6987
|
-
}, [V(j(
|
|
6956
|
+
}, [V(j(_i), {
|
|
6988
6957
|
size: 14,
|
|
6989
6958
|
"stroke-width": 2
|
|
6990
|
-
})], 8,
|
|
6959
|
+
})], 8, pu)) : A("", !0), I("button", {
|
|
6991
6960
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6992
6961
|
onClick: n[1] ||= (e) => r("close")
|
|
6993
|
-
}, [V(j(
|
|
6962
|
+
}, [V(j(Ai), {
|
|
6994
6963
|
size: 14,
|
|
6995
6964
|
"stroke-width": 2
|
|
6996
|
-
})])])]), I("div",
|
|
6997
|
-
V(j(
|
|
6965
|
+
})])])]), I("div", mu, [j(o).isScoring.value ? (f(), k("div", hu, [I("p", gu, D(j(i).scoring.scoring), 1), V(zi, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", _u, [
|
|
6966
|
+
V(j(Zr), {
|
|
6998
6967
|
size: 32,
|
|
6999
6968
|
"stroke-width": 1.5,
|
|
7000
6969
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
7001
6970
|
}),
|
|
7002
|
-
I("p",
|
|
6971
|
+
I("p", vu, D(j(i).scoring.error), 1),
|
|
7003
6972
|
I("button", {
|
|
7004
6973
|
class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
|
|
7005
6974
|
onClick: n[2] ||= (e) => m()
|
|
7006
|
-
}, [V(j(
|
|
6975
|
+
}, [V(j(_i), {
|
|
7007
6976
|
size: 12,
|
|
7008
6977
|
"stroke-width": 2
|
|
7009
6978
|
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
7010
|
-
])) : j(o).scoringResult.value ? (f(), k("div",
|
|
6979
|
+
])) : j(o).scoringResult.value ? (f(), k("div", yu, [
|
|
7011
6980
|
I("div", {
|
|
7012
6981
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
7013
|
-
style: L({ backgroundColor: j(
|
|
6982
|
+
style: L({ backgroundColor: j(ou)(j(o).scoringResult.value.score) })
|
|
7014
6983
|
}, [
|
|
7015
6984
|
I("span", {
|
|
7016
6985
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
7017
|
-
style: L({ color: j(
|
|
6986
|
+
style: L({ color: j(au)(j(o).scoringResult.value.score) })
|
|
7018
6987
|
}, D(j(o).scoringResult.value.score), 5),
|
|
7019
|
-
I("span",
|
|
7020
|
-
_() > 0 ? (f(), k("span",
|
|
6988
|
+
I("span", bu, D(j(i).scoring.overallScore), 1),
|
|
6989
|
+
_() > 0 ? (f(), k("span", xu, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
7021
6990
|
], 4),
|
|
7022
|
-
j(o).fixError.value ? (f(), k("div",
|
|
6991
|
+
j(o).fixError.value ? (f(), k("div", Su, [V(j(Zr), {
|
|
7023
6992
|
size: 14,
|
|
7024
6993
|
"stroke-width": 2,
|
|
7025
6994
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -7034,74 +7003,74 @@ var cu = {
|
|
|
7034
7003
|
(f(), N(d(p[e]), {
|
|
7035
7004
|
size: 14,
|
|
7036
7005
|
"stroke-width": 2,
|
|
7037
|
-
style: L({ color: j(
|
|
7006
|
+
style: L({ color: j(au)(j(o).scoringResult.value.categories[e].score) })
|
|
7038
7007
|
}, null, 8, ["style"])),
|
|
7039
|
-
I("span",
|
|
7008
|
+
I("span", wu, D(j(i).scoring.categories[e]), 1),
|
|
7040
7009
|
I("span", {
|
|
7041
7010
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7042
7011
|
style: L({
|
|
7043
|
-
color: j(
|
|
7044
|
-
backgroundColor: j(
|
|
7012
|
+
color: j(au)(j(o).scoringResult.value.categories[e].score),
|
|
7013
|
+
backgroundColor: j(ou)(j(o).scoringResult.value.categories[e].score)
|
|
7045
7014
|
})
|
|
7046
7015
|
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7047
|
-
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span",
|
|
7048
|
-
V(j(
|
|
7016
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Tu, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
7017
|
+
V(j(qr), {
|
|
7049
7018
|
size: 12,
|
|
7050
7019
|
"stroke-width": 2,
|
|
7051
7020
|
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7052
7021
|
}, null, 8, ["class"])
|
|
7053
|
-
], 8,
|
|
7022
|
+
], 8, Cu), c.value[e] ? (f(), k("div", Eu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", Du, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
|
|
7054
7023
|
key: e.id,
|
|
7055
7024
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7056
|
-
}, [I("div",
|
|
7025
|
+
}, [I("div", Ou, [(f(), N(d(j(e.severity === "high" ? Zr : e.severity === "medium" ? Ei : ui)), {
|
|
7057
7026
|
size: 13,
|
|
7058
7027
|
"stroke-width": 2,
|
|
7059
7028
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7060
|
-
style: L({ color: j(
|
|
7061
|
-
}, null, 8, ["style"])), I("div",
|
|
7062
|
-
I("div",
|
|
7029
|
+
style: L({ color: j(su)(e.severity) })
|
|
7030
|
+
}, null, 8, ["style"])), I("div", ku, [
|
|
7031
|
+
I("div", Au, [I("span", {
|
|
7063
7032
|
class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
|
|
7064
7033
|
style: L({
|
|
7065
|
-
color: j(
|
|
7066
|
-
backgroundColor: j(
|
|
7034
|
+
color: j(su)(e.severity),
|
|
7035
|
+
backgroundColor: j(cu)(e.severity)
|
|
7067
7036
|
})
|
|
7068
|
-
}, D(j(i).scoring.severity[e.severity]), 5), I("span",
|
|
7069
|
-
e.suggestion ? (f(), k("p",
|
|
7070
|
-
e.blockId ? (f(), k("div",
|
|
7037
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", ju, D(e.message), 1)]),
|
|
7038
|
+
e.suggestion ? (f(), k("p", Mu, D(e.suggestion), 1)) : A("", !0),
|
|
7039
|
+
e.blockId ? (f(), k("div", Nu, [I("button", {
|
|
7071
7040
|
class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
|
|
7072
7041
|
style: { "background-color": "transparent" },
|
|
7073
7042
|
disabled: j(o).fixingFindingId.value !== null,
|
|
7074
7043
|
onClick: (t) => g(e)
|
|
7075
|
-
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(
|
|
7044
|
+
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(di), {
|
|
7076
7045
|
key: 0,
|
|
7077
7046
|
class: "tpl-spinner",
|
|
7078
7047
|
size: 11,
|
|
7079
7048
|
"stroke-width": 2
|
|
7080
|
-
})) : (f(), N(j(
|
|
7049
|
+
})) : (f(), N(j(Ci), {
|
|
7081
7050
|
key: 1,
|
|
7082
7051
|
size: 11,
|
|
7083
7052
|
"stroke-width": 2
|
|
7084
|
-
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8,
|
|
7053
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, Pu), j(o).fixError.value ? (f(), k("p", Fu, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
7085
7054
|
])])]))), 128))])) : A("", !0)])), 64))
|
|
7086
|
-
])) : (f(), k("div",
|
|
7055
|
+
])) : (f(), k("div", Iu, [V(j(xi), {
|
|
7087
7056
|
size: 32,
|
|
7088
7057
|
"stroke-width": 1.5,
|
|
7089
7058
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7090
|
-
}), I("p",
|
|
7059
|
+
}), I("p", Lu, D(j(i).scoring.emptyState), 1)])), I("p", Ru, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7091
7060
|
_: 1
|
|
7092
7061
|
}));
|
|
7093
7062
|
}
|
|
7094
|
-
}),
|
|
7063
|
+
}), Bu = /* @__PURE__ */ e({ default: () => Vu }), Vu = /*#__PURE__*/ Fi(zu, [["__scopeId", "data-v-3a059e8d"]]), Hu = ["aria-busy"], Uu = {
|
|
7095
7064
|
id: "tpl-test-email-title",
|
|
7096
7065
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7097
|
-
},
|
|
7066
|
+
}, Wu = { class: "tpl:mb-3" }, Gu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ku = ["value"], qu = ["disabled"], Ju = ["value"], Yu = {
|
|
7098
7067
|
key: 0,
|
|
7099
7068
|
role: "alert",
|
|
7100
7069
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7101
|
-
},
|
|
7070
|
+
}, Xu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Zu = ["disabled"], Qu = ["disabled"], $u = {
|
|
7102
7071
|
key: 0,
|
|
7103
7072
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7104
|
-
},
|
|
7073
|
+
}, ed = { key: 1 }, td = /*@__PURE__*/ B({
|
|
7105
7074
|
__name: "TestEmailModal",
|
|
7106
7075
|
props: {
|
|
7107
7076
|
visible: { type: Boolean },
|
|
@@ -7111,7 +7080,7 @@ var cu = {
|
|
|
7111
7080
|
},
|
|
7112
7081
|
emits: ["send", "close"],
|
|
7113
7082
|
setup(e, { emit: t }) {
|
|
7114
|
-
let n = e, r = t, { t: i } =
|
|
7083
|
+
let n = e, r = t, { t: i } = Gi(), a = C("");
|
|
7115
7084
|
H(() => n.visible, (e) => {
|
|
7116
7085
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7117
7086
|
});
|
|
@@ -7124,7 +7093,7 @@ var cu = {
|
|
|
7124
7093
|
function l(e) {
|
|
7125
7094
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7126
7095
|
}
|
|
7127
|
-
return (t, n) => (f(), N(
|
|
7096
|
+
return (t, n) => (f(), N(Uo, {
|
|
7128
7097
|
visible: e.visible,
|
|
7129
7098
|
onClose: s,
|
|
7130
7099
|
onKeydown: l
|
|
@@ -7140,14 +7109,14 @@ var cu = {
|
|
|
7140
7109
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7141
7110
|
}
|
|
7142
7111
|
}, [
|
|
7143
|
-
I("h3",
|
|
7144
|
-
I("div",
|
|
7112
|
+
I("h3", Uu, D(j(i).testEmail.title), 1),
|
|
7113
|
+
I("div", Wu, [I("label", Gu, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
7145
7114
|
key: 0,
|
|
7146
7115
|
type: "text",
|
|
7147
7116
|
value: a.value,
|
|
7148
7117
|
disabled: "",
|
|
7149
7118
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
7150
|
-
}, null, 8,
|
|
7119
|
+
}, null, 8, Ku)) : c((f(), k("select", {
|
|
7151
7120
|
key: 1,
|
|
7152
7121
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7153
7122
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
@@ -7155,29 +7124,29 @@ var cu = {
|
|
|
7155
7124
|
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7156
7125
|
key: e,
|
|
7157
7126
|
value: e
|
|
7158
|
-
}, D(e), 9,
|
|
7159
|
-
e.error ? (f(), k("p",
|
|
7160
|
-
I("div",
|
|
7127
|
+
}, D(e), 9, Ju))), 128))], 8, qu)), [[w, a.value]])]),
|
|
7128
|
+
e.error ? (f(), k("p", Yu, D(e.error), 1)) : A("", !0),
|
|
7129
|
+
I("div", Xu, [I("button", {
|
|
7161
7130
|
type: "button",
|
|
7162
7131
|
class: F(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
|
|
7163
7132
|
disabled: e.isSending,
|
|
7164
7133
|
onClick: s
|
|
7165
|
-
}, D(j(i).testEmail.cancel), 11,
|
|
7134
|
+
}, D(j(i).testEmail.cancel), 11, Zu), I("button", {
|
|
7166
7135
|
type: "button",
|
|
7167
7136
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
7168
7137
|
disabled: !a.value || e.isSending,
|
|
7169
7138
|
onClick: o
|
|
7170
|
-
}, [e.isSending ? (f(), k("span",
|
|
7139
|
+
}, [e.isSending ? (f(), k("span", $u, [V(j(di), {
|
|
7171
7140
|
class: "tpl:animate-spin",
|
|
7172
7141
|
size: 12,
|
|
7173
7142
|
"stroke-width": 2
|
|
7174
|
-
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span",
|
|
7175
|
-
], 8,
|
|
7143
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", ed, D(j(i).testEmail.send), 1))], 8, Qu)])
|
|
7144
|
+
], 8, Hu)]),
|
|
7176
7145
|
_: 1
|
|
7177
7146
|
}, 8, ["visible"]));
|
|
7178
7147
|
}
|
|
7179
|
-
}),
|
|
7148
|
+
}), nd = /* @__PURE__ */ e({ default: () => rd }), rd = td;
|
|
7180
7149
|
//#endregion
|
|
7181
|
-
export {
|
|
7150
|
+
export { Ki as $, Kn as $t, Bo as A, Ee as An, Kr as At, Ua as B, he as Bn, Wn as Bt, Zo as C, lt as Cn, ni as Ct, Go as D, W as Dn, Zr as Dt, Wo as E, ot as En, $r as Et, lo as F, ge as Fn, Y as Ft, _a as G, ue as Gn, Gn as Gt, Va as H, pe as Hn, fr as Ht, fo as I, me as In, cr as It, la as J, In as Jt, ga as K, qn as Kt, co as L, xe as Ln, tr as Lt, Oo as M, Ce as Mn, Pr as Mt, So as N, _e as Nn, Cr as Nt, Uo as O, Ue as On, Yr as Ot, yo as P, we as Pn, gr as Pt, qi as Q, $n as Qt, io as R, Se as Rn, sr as Rt, Qo as S, yt as Sn, ri as St, Z as T, st as Tn, ei as Tt, Ma as U, de as Un, lr as Ut, Ha as V, be as Vn, nr as Vt, Oa as W, fe as Wn, zn as Wt, Qi as X, Qn as Xt, ea as Y, Bn as Yt, Ji as Z, Yn as Zt, us as _, Tt as _n, fi as _t, pl as a, J as an, Ai as at, os as b, bt as bn, li as bt, Ds as c, wn as cn, Ti as ct, bs as d, Dn as dn, xi as dt, ur as en, Wi as et, ys as f, nn as fn, bi as ft, hs as g, Pt as gn, pi as gt, gs as h, sn as hn, mi as ht, Hl as i, Hn as in, Pi as it, Ro as j, ye as jn, X as jt, Vo as k, ve as kn, qr as kt, Ss as l, q as ln, wi as lt, _s as m, on as mn, _i as mt, Bu as n, ir as nn, Hi as nt, $s as o, hn as on, Oi as ot, vs as p, tn as pn, yi as pt, da as q, er as qt, ru as r, Vn as rn, Fi as rt, Os as s, Cn as sn, Ei as st, nd as t, dr as tn, Gi as tt, xs as u, An as un, Ci as ut, ls as v, ut as vn, di as vt, $ as w, ct as wn, ti as wt, ns as x, gt as xn, ci as xt, ss as y, vt as yn, ui as yt, no as z, Te as zn, Un as zt };
|
|
7182
7151
|
|
|
7183
|
-
//# sourceMappingURL=features-
|
|
7152
|
+
//# sourceMappingURL=features-DmUOSthI.js.map
|